fix(dict.vue):不能批量删除的问题

This commit is contained in:
有来技术 2021-12-11 22:52:56 +08:00
parent 556cd58f5f
commit f50a829901
4 changed files with 14 additions and 13 deletions

View File

@ -0,0 +1 @@
<svg t="1639233044571" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2374" width="200" height="200"><path d="M101.888 985.088l-20.48-130.56 270.336-371.712a278.2208 278.2208 0 0 1 16.896-304.128 279.3472 279.3472 0 0 1 183.808-112.64c74.24-11.776 148.48 6.144 209.408 50.176s100.864 109.568 112.64 183.808c11.776 74.24-6.144 148.48-50.176 209.408a279.3472 279.3472 0 0 1-183.808 112.64c-43.52 6.656-88.064 3.584-130.048-9.728l-15.36 20.992 1.024 94.208-98.816 39.936-151.552 208.896-143.872 8.704z m33.28-117.248l10.24 63.488 73.728-4.608 146.432-201.216 79.872-32.256-1.024-76.288 48.128-66.56 18.432 7.68c38.4 15.36 80.384 19.968 121.856 13.824 60.928-9.728 114.176-42.496 150.528-92.16 36.352-49.664 50.688-110.592 40.96-171.52-9.728-60.928-42.496-114.176-92.16-150.528s-110.592-50.688-171.52-40.96c-60.928 9.216-114.688 41.984-150.528 92.16-36.352 49.664-51.2 110.592-41.472 171.008 5.12 32.256 16.896 62.976 34.816 90.112l9.728 14.848-278.016 382.976z" p-id="2375"></path><path d="M685.568 372.736c-5.12 0-10.752-1.536-14.848-5.12l-136.704-99.328a25.8048 25.8048 0 0 1-9.728-28.16c12.288-42.496 48.64-74.24 92.672-81.408 30.72-4.608 60.928 2.56 85.504 20.48 25.088 17.92 41.472 45.056 46.08 75.264 6.656 43.52-12.288 88.064-48.64 113.152a21.504 21.504 0 0 1-14.336 5.12z m-104.96-133.632l103.424 75.264a64.0512 64.0512 0 0 0-11.264-93.184c-13.824-10.24-30.72-13.824-47.616-11.264-18.432 3.072-34.816 13.824-44.544 29.184z" p-id="2376"></path><path d="M851.968 972.8h-226.816c-14.336 0-25.6-11.264-25.6-25.6s11.264-25.6 25.6-25.6h226.816c14.336 0 25.6 11.264 25.6 25.6s-11.264 25.6-25.6 25.6z" p-id="2377"></path><path d="M763.392 870.4h-134.144c-14.336 0-25.6-11.264-25.6-25.6s11.264-25.6 25.6-25.6h134.144c14.336 0 25.6 11.264 25.6 25.6s-11.776 25.6-25.6 25.6z" p-id="2378"></path></svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -9,7 +9,7 @@
>
<el-form-item>
<el-button type="success" :icon="Plus" @click="handleAdd">新增</el-button>
<el-button type="danger" :icon="Delete" :disabled="state.single" @click="handleDelete">删除
<el-button type="danger" :icon="Delete" :disabled="state.multiple" @click="handleDelete">删除
</el-button>
</el-form-item>

View File

@ -4,7 +4,7 @@
<el-col :span="12" :xs="24">
<el-card class="box-card">
<template #header>
<svg-icon color="#000" icon-class="dict"/>
<svg-icon color="#333" icon-class="education"/>
字典列表
</template>
<!-- 字典列表子组件 -->
@ -15,11 +15,10 @@
<el-col :span="12" :xs="24">
<el-card class="box-card">
<template #header>
<svg-icon color="#333" v-if=" state.dictCode" icon-class="education" />
<span v-if=" state.dictCode" style="margin:0 5px;">字典</span>
<svg-icon color="#333" icon-class="dict"/>
<span style="margin:0 5px;">字典数据项列表</span>
<el-tag type="primary" v-if=" state.dictCode" size="small">{{ state.dictName }}</el-tag>
<span v-if=" state.dictCode" style="margin-left: 5px">数据项</span>
<el-tag type="warning" v-if=" !state.dictCode" size="small">未选择字典</el-tag>
<el-tag type="warning" v-else size="small">未选择字典</el-tag>
</template>
<!-- 字典项组件 -->
<dict-item :dictName="state.dictName" :dictCode='state.dictCode'/>
@ -42,10 +41,10 @@ const state = reactive({
})
const handleDictClick = (dictRow: any) => {
if(dictRow){
if (dictRow) {
state.dictName = dictRow.name
state.dictCode = dictRow.code
}else{
} else {
state.dictName = ''
state.dictCode = ''
}

View File

@ -4,19 +4,20 @@
<el-col :span="10" :xs="24">
<el-card class="box-card" shadow="always">
<template #header>
<svg-icon color="#000" icon-class="menu"/> 菜单列表
<svg-icon color="#333" icon-class="menu"/> 菜单列表
</template>
<menu-table @menuClick="handleMenuClick"/>
</el-card>
</el-col>
<el-col :span="14" :xs="24">
<el-card class="box-card" shadow="always">
<div slot="header">
<template #header>
<svg-icon color="#333" icon-class="perm"/>
<b v-if=" state.dictCode" style="margin-right: 5px">菜单</b>
<el-tag type="success" v-if=" state.dictCode"><b>{{ state.dictName }}</b></el-tag>
<b v-if=" state.dictCode" style="margin-left: 5px">数据权限</b>
<el-tag type="warning" v-if=" !state.dictCode">未选择菜单</el-tag>
</div>
<b v-if=" state.dictCode" style="margin-left: 5px"></b>
<el-tag type="warning" v-if=" !state.dictCode" size="small">权限列表</el-tag>
</template>
<perm-table :menuId="state.menuId" :menuName="state.menuName"/>
</el-card>
</el-col>