47 lines
848 B
Vue
47 lines
848 B
Vue
<template>
|
|
<view class="u-relative choose-haocai">
|
|
<view class="input u-flex" >
|
|
<view>{{text||''}}</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { reactive, ref, watch, onMounted } from 'vue';
|
|
const props = defineProps({
|
|
modelValue: {
|
|
type: [String, Number],
|
|
default: ''
|
|
},
|
|
})
|
|
let text = ref('')
|
|
watch(() => props.modelValue, (newval) => {
|
|
setText()
|
|
})
|
|
onMounted(() => {
|
|
setText()
|
|
})
|
|
function setText() {
|
|
text.value=props.modelValue
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.choose-haocai {
|
|
.input {
|
|
width: 172rpx;
|
|
padding: 10rpx 16rpx;
|
|
height: 60rpx;
|
|
box-sizing: border-box;
|
|
background: #FFFFFF;
|
|
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
border: 2rpx solid #E5E5E5;
|
|
overflow: hidden;
|
|
}
|
|
}
|
|
</style> |