邓洁 : 修改页面细节
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
@cancel="handleCancel"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button type="text" size="mini">删除</el-button>
|
||||
<el-button :type="btnType" size="mini" v-perm="perm" :disabled="isDisabled" :icon="btnIcon" :plain="isPlain">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
@@ -17,17 +17,40 @@
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
name: {
|
||||
type: Object,
|
||||
default: null
|
||||
},
|
||||
btnType: {
|
||||
type: String,
|
||||
default: ''
|
||||
default: 'text'
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
btnIcon: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
perm: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
isDisabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
isPlain: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
})
|
||||
const emit = defineEmits()
|
||||
const title = ref(`确认删除名称为 "${props.name}" 的${props.type}吗!`)
|
||||
const visible = ref(false)
|
||||
watch(()=>props.name,(newVal)=>{
|
||||
title.value="确认删除名称为"+'"'+props.name+'"'+"的"+props.type+"吗!"
|
||||
})
|
||||
const handleCancel = () => {
|
||||
visible.value = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user