emis-sapp/components/tpx-select/default-select-text.vue
2024-05-31 18:42:15 +08:00

72 lines
1.2 KiB
Vue

<template>
<u-row justify="between">
<view>
<template v-if="!$slots.left">
<u-text :text="label" size="28" :bold="true"></u-text>
</template>
<slot name="left"></slot>
</view>
<u-row :custom-style="`min-width: ${rightWidth}rpx;`" justify="end" align="center">
<template v-if="!$slots.right">
<u-text align="right" margin="0 12rpx 0 0" size="26"
:text="title"></u-text>
<template v-if="!$slots.rightRcon">
<u-icon v-if="list || checkedList" size="26" name="arrow-right" color="#333"></u-icon>
</template>
<slot name="rightRcon"></slot>
</template>
<slot name="right"></slot>
</u-row>
</u-row>
</template>
<script>
export default {
computed: {
title() {
let title = this.text || this.placeholder
return title
}
},
props: {
rightWidth:{
default() {
return 400
}
},
label: {
default () {
return ''
}
},
placeholder: {
default () {
return '请选择'
}
},
text: {
},
},
data() {
return {
}
},
created() {
},
onHide() {
},
unmounted() {},
methods: {
}
}
</script>
<style scoped lang="scss">
</style>