自定义级联多选优化

v1.1.0
于肖磊 2024-12-09 17:35:40 +08:00
parent 03e29c9eb8
commit fe92a49a9f
2 changed files with 20 additions and 20 deletions

View File

@ -7,7 +7,7 @@
<template v-if="item.type == 'select'"> <template v-if="item.type == 'select'">
<template v-if="+item?.config?.is_level == 1"> <template v-if="+item?.config?.is_level == 1">
<div class="flex-row gap-10"> <div class="flex-row gap-10">
<el-cascader v-model="new_dataInterface[item.form_name]" :placeholder="placeholder_config(item, 'select')" :show-all-levels="false" filterable clearable class="w h" collapse-tags popper-class="filter-form-cascader" :placement="+item?.config?.is_level == 1 && props.direction == 'vertical' ? 'left' : 'bottom'" :props="{ 'expandTrigger': 'hover', 'multiple': +item?.config?.is_multiple == 1, 'checkStrictly': true, 'emitPath': false, 'value': item?.data_key || 'id', 'label': item?.data_name || 'name', 'children': item?.config?.children || '' }" :options="selectData(item)" /> <el-cascader v-model="new_dataInterface[item.form_name]" :placeholder="placeholder_config(item, 'select')" :show-all-levels="false" filterable clearable class="w h" collapse-tags popper-class="filter-form-cascader" :placement="+item?.config?.is_level == 1 && props.direction == 'vertical' ? 'left' : 'bottom'" :props="{'multiple': +item?.config?.is_multiple == 1, 'checkStrictly': true, 'emitPath': false, 'value': item?.data_key || 'id', 'label': item?.data_name || 'name', 'children': item?.config?.children || '' }" :options="selectData(item)" />
<template v-if="+item?.config?.is_multiple == 1"> <template v-if="+item?.config?.is_multiple == 1">
<el-tooltip effect="dark" :show-after="200" :hide-after="200" content="父级选中包含所有子级" raw-content placement="top"> <el-tooltip effect="dark" :show-after="200" :hide-after="200" content="父级选中包含所有子级" raw-content placement="top">
<icon name="miaosha-hdgz" size="12" color="#999"></icon> <icon name="miaosha-hdgz" size="12" color="#999"></icon>

View File

@ -269,27 +269,27 @@ p {
text-align: left; text-align: left;
} }
.filter-form-cascader { // .filter-form-cascader {
.el-checkbox, // .el-checkbox,
.el-radio { // .el-radio {
width: 100%; // width: 100%;
height: 100%; // height: 100%;
position: absolute; // position: absolute;
top: 0; // top: 0;
left: 0; // left: 0;
z-index: 10; // z-index: 10;
} // }
.el-cascader-node { // .el-cascader-node {
padding-left: 34px; // padding-left: 34px;
} // }
.el-checkbox__input, // .el-checkbox__input,
.el-radio__input { // .el-radio__input {
position: absolute; // position: absolute;
left: 20px; // left: 20px;
} // }
} // }
.el-table .table-error-row { .el-table .table-error-row {
background: #FFEAEA !important; background: #FFEAEA !important;