Browse Source

详情默认第一个

master_hella_20240701
wangyufei 4 months ago
parent
commit
36719fde42
  1. 3
      src/components/Detail/src/Detail.vue
  2. 6
      src/components/Tabs/src/Tabs.vue

3
src/components/Detail/src/Detail.vue

@ -625,6 +625,9 @@ const titleNameRef = ref()
const titleValueRef = ref() const titleValueRef = ref()
const count =ref(0) const count =ref(0)
const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => { const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => {
if(tabRef.value){
tabRef.value.changeCurrent(0)
}
annexTableData.value = [] annexTableData.value = []
titleNameRef.value = titleName titleNameRef.value = titleName
titleValueRef.value = titleValue titleValueRef.value = titleValue

6
src/components/Tabs/src/Tabs.vue

@ -32,7 +32,13 @@ const change = (item, index) => {
current.value = index current.value = index
emit('change',item,index) emit('change',item,index)
} }
const changeCurrent = (index) =>{
change(props.tabsList[index],index)
}
const emit = defineEmits(['change']) const emit = defineEmits(['change'])
defineExpose({ changeCurrent})
</script> </script>

Loading…
Cancel
Save