You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1001 B
40 lines
1001 B
<template>
|
|
<div>
|
|
<Dialog v-model="isPackageShow" :title="dialogTitle" :width="width?width:'900px'" v-loading="packageLoading">
|
|
<Table
|
|
ref="searchTableRef"
|
|
:columns="columns"
|
|
:data="allList"
|
|
:reserveSelection="true"
|
|
row-key="id"
|
|
/>
|
|
</Dialog>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
|
|
const isPackageShow = ref(false)
|
|
const packageLoading = ref(false)
|
|
const dialogTitle = ref()
|
|
const message = useMessage() // 消息弹窗
|
|
const columns = ref()
|
|
const allList = ref()
|
|
// 接受父组件参数
|
|
const props = defineProps({
|
|
width: {
|
|
type: String,
|
|
required: false
|
|
},
|
|
})
|
|
const openPackage = async (row?: any, titleName?: any,tableColumns?: any,list?: any) => {
|
|
isPackageShow.value = true
|
|
if (titleName) {
|
|
dialogTitle.value = titleName
|
|
}
|
|
columns.value = tableColumns.filter(item => (item.field !== 'action'))
|
|
allList.value = list
|
|
}
|
|
defineExpose({ openPackage }) // 提供 open 方法,用于打开弹窗
|
|
</script>
|
|
|
|
|