Browse Source

详情组件扩展操作按钮

master
陈薪名 11 months ago
parent
commit
83192f2385
  1. 18
      src/components/Detail/src/Detail.vue

18
src/components/Detail/src/Detail.vue

@ -230,6 +230,14 @@ const props = defineProps({
type: Array,
required: false,
default: null
},
//
buttondataTable: {
type: Array,
required: false,
default: ()=>{
return []
}
}
})
const isShowDrawer = ref(false)
@ -364,13 +372,14 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
}
//
buttondata.value = [
buttondata.value = [...[
defaultButtons.mainListEditBtn({
hide: isShowMainButton(row, ['1'])
}), //
defaultButtons.mainListDeleteBtn({
hide: isShowMainButton(row, ['1'])
}) //
})], //
...props.buttondataTable
]
} finally {
detailLoading.value = false
@ -459,6 +468,8 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'delete') {
//
handleDelete(row.id)
} else {
emit('tableFormButton',val, row)
}
}
/** 添加/修改操作 */
@ -497,7 +508,8 @@ const emit = defineEmits([
'searchTableSuccessDetail',
'changeTabs',
'selectChangeDetail',
'detailOpenForm'
'detailOpenForm',
'tableFormButton'
])
/** 删除按钮操作 */
const handleDelete = async (id: number) => {

Loading…
Cancel
Save