| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <template>
- <u-cell :isLink="isLink" :arrow-direction="arrowDirection" :border="border" :center="center">
- <view slot="value" class="cell_wrap">
- <view v-if="val" class="dictLabel">{{ val }}</view>
- <view v-else class="placeholder">请选择</view>
- <view v-if="isDelete && val" @click.stop="clear()">
- <u-icon size="15" name="close-circle"></u-icon>
- </view>
- </view>
- </u-cell>
- </template>
- <script>
- export default {
- name: 'CustomCell',
- data() {
- return {}
- },
- props: {
- isLink: {
- type: Boolean,
- default: true,
- },
- arrowDirection: {
- type: String,
- default: 'right',
- },
- border: {
- type: Boolean,
- default: false,
- },
- center: {
- type: Boolean,
- default: true,
- },
- val: {
- type: String,
- default: '',
- },
- isDelete: {
- type: Boolean,
- default: false,
- },
- },
- emits: ['handleClear'],
- methods: {
- clear(){
- this.$emit('handleClear');
- }
- }
- }
- </script>
- <style scoped>
- @import './index.scss';
- </style>
|