You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.2 KiB
Vue

10 months ago
<template>
<div>
<el-table :data="globalFormData.pageVariable[options.dataKey]" style="width: 100%">
10 months ago
<el-table-column :prop="i.keyName" :label="i.name" v-for="i in options.thTdMap" />
<el-table-column label="操作">
<template #default="scope">
<el-button
link
type="primary"
size="small"
@click.prevent="updateBtn(scope)"
>
修改
</el-button>
<el-popconfirm title="确定要删除此项数据吗?" @confirm="delBtn(scope)">
<template #reference>
<el-button
link
type="primary"
size="small"
>
删除
</el-button>
</template>
</el-popconfirm>
</template>
</el-table-column>
10 months ago
</el-table>
</div>
</template>
<script lang="ts" setup>
defineOptions({
name: 'hw-table-view'
});
const props = defineProps({
options: Object
});
const { options } = toRefs(props);
const globalFormData = inject('globalFormData');
10 months ago
const updateBtn = (scope) => {
console.log(scope);
};
const delBtn = (scope) => {
console.log(scope.row);
};
10 months ago
</script>
<style scoped lang="less">
</style>