根据uniapp调整工程结构
This commit is contained in:
35
components/AiMore.vue
Normal file
35
components/AiMore.vue
Normal file
@@ -0,0 +1,35 @@
|
||||
<template>
|
||||
<section class="AiMore">
|
||||
<u-icon :name="icon" color="#ddd" :label="value||placeholder" label-pos="left" :label-color="labelColor"
|
||||
:label-size="size" :size="size" @click="$emit('click')"/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "AiMore",
|
||||
model: {
|
||||
prop: "value",
|
||||
event: "change"
|
||||
},
|
||||
props: {
|
||||
placeholder: {default: "请选择"},
|
||||
value: String,
|
||||
icon: {default: "arrow-right"},
|
||||
size: {default: 30}
|
||||
},
|
||||
computed: {
|
||||
isEmpty() {
|
||||
return !this.value
|
||||
},
|
||||
labelColor() {
|
||||
return this.isEmpty ? "#999" : "#333"
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AiMore {
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user