工单大厅
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
active: item.value === activeValue
|
||||
}"
|
||||
>
|
||||
{{ item.name }}
|
||||
{{ item[props.options.label] }}
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -20,15 +20,19 @@ import { ref } from 'vue'
|
||||
type tabslistType = { name: string; value: number }
|
||||
const props = defineProps<{
|
||||
tabslist: tabslistType[]
|
||||
options: {
|
||||
label: 'name'
|
||||
value: 'value'
|
||||
}
|
||||
}>()
|
||||
const emit = defineEmits<{
|
||||
update: [value: number]
|
||||
}>()
|
||||
|
||||
const activeValue = ref(0)
|
||||
const activeValue = ref(props.tabslist[0].value)
|
||||
const handleTabs = (row: tabslistType) => {
|
||||
activeValue.value = row.value
|
||||
emit('update', row.value)
|
||||
activeValue.value = row[props.options.value]
|
||||
emit('update', row[props.options.value])
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user