emis-app/components/tpx-select/default-select-input.vue

105 lines
1.6 KiB
Vue
Raw Normal View History

2023-12-18 16:30:33 +00:00
<template>
2024-01-29 10:05:13 +00:00
<view :class="contClass" :style="styles">
<u-row custom-style="width: 100%;">
2023-12-18 16:30:33 +00:00
<view style="flex: 1;">
2024-05-22 17:48:52 +00:00
<tpx-text-dic :value="value" :list="list" :checkedList="checkedList" :text="text" :placeholder="placeholder"></tpx-text-dic>
2023-12-18 16:30:33 +00:00
</view>
<u-row>
<u-icon size="22" :name="`${show?'arrow-up':'arrow-down'}`" color="#333"></u-icon>
</u-row>
</u-row>
</view>
</template>
<script>
export default {
computed: {
contClass() {
2024-01-29 10:05:13 +00:00
let pre = ['radius-10']
2024-06-11 08:33:16 +00:00
// if (this.isWhite) {
// pre.push('c-white')
// }
2024-06-11 08:32:18 +00:00
if (true) {
pre.push('c-white')
2023-12-18 16:30:33 +00:00
} else {
2024-01-29 10:05:13 +00:00
pre.push('c-grey')
2023-12-18 16:30:33 +00:00
}
return pre.join(" ")
2024-01-29 10:05:13 +00:00
},
styles() {
return `margin-top: 0;height: 62rpx;${this.customStyle}`
2023-12-18 16:30:33 +00:00
}
},
props: {
2024-01-29 10:05:13 +00:00
customStyle: {
default () {
return ''
}
},
2023-12-18 16:30:33 +00:00
isWhite: {
default () {
return false
}
},
placeholder: {
default () {
return ''
}
},
show: {
default () {
return false
}
},
2024-05-22 17:48:52 +00:00
list: {
default () {
return []
}
},
checkedList: {
},
value: {
default () {
return ""
}
},
2024-05-22 16:32:47 +00:00
text: {
2023-12-18 16:30:33 +00:00
default () {
return ''
}
},
},
data() {
return {
}
},
created() {
},
onHide() {
},
2024-01-30 03:09:14 +00:00
unmounted() {},
2023-12-18 16:30:33 +00:00
methods: {}
}
</script>
<style scoped lang="scss">
2024-01-29 10:05:13 +00:00
.c-white,.c-grey{
display: flex;
padding-left: 20rpx;
padding-right: 20rpx;
border-radius: 10rpx;
align-items: center;
}
.c-white{
background-color: #fff;
2024-07-07 08:14:01 +00:00
border: 2rpx solid #dadbde;
2024-01-29 10:05:13 +00:00
}
.c-grey{
background-color: #F6F6F6;
2024-07-07 08:14:01 +00:00
border: 2rpx solid #dadbde;
2024-01-29 10:05:13 +00:00
}
2023-12-18 16:30:33 +00:00
</style>