fix soul筛选显示

This commit is contained in:
Theluyuan 2023-05-04 16:19:37 +08:00
parent ff6ff998c0
commit dc4ca22ced
5 changed files with 20 additions and 13 deletions

View File

@ -664,7 +664,8 @@ const _sfc_main$1 = defineComponent({
left: { default: 10 }, left: { default: 10 },
top: { default: 10 }, top: { default: 10 },
list: { default: [] }, list: { default: [] },
soulkey: { default: "" } soulkey: { default: "" },
show: { type: Boolean, default: false }
}, },
emits: ["asc", "desc", "sx", "daochu"], emits: ["asc", "desc", "sx", "daochu"],
setup(__props, { emit }) { setup(__props, { emit }) {
@ -681,7 +682,7 @@ const _sfc_main$1 = defineComponent({
const sel = ref([]); const sel = ref([]);
const list = ref([]); const list = ref([]);
const alllist = ref([]); const alllist = ref([]);
watch(() => [props.list, props.soulkey], () => { watch(() => [props.show], () => {
let set = /* @__PURE__ */ new Set(); let set = /* @__PURE__ */ new Set();
for (let i of props.list) { for (let i of props.list) {
set.add(i[props.soulkey]); set.add(i[props.soulkey]);
@ -1772,13 +1773,14 @@ const _sfc_main = defineComponent({
withDirectives(createVNode(_sfc_main$1, { withDirectives(createVNode(_sfc_main$1, {
top: soultop.value, top: soultop.value,
left: soulleft.value, left: soulleft.value,
show: soulkey.value == column.key,
onAsc: asc, onAsc: asc,
onDesc: desc, onDesc: desc,
onDaochu: exportData, onDaochu: exportData,
list: datalist.value, list: datalist.value,
soulkey: column.key, soulkey: column.key,
onSx: sx onSx: sx
}, null, 8, ["top", "left", "list", "soulkey"]), [ }, null, 8, ["top", "left", "show", "list", "soulkey"]), [
[vShow, soulkey.value == column.key] [vShow, soulkey.value == column.key]
]) ])
]); ]);

View File

@ -19088,7 +19088,8 @@ const _sfc_main$E = defineComponent({
left: { default: 10 }, left: { default: 10 },
top: { default: 10 }, top: { default: 10 },
list: { default: [] }, list: { default: [] },
soulkey: { default: "" } soulkey: { default: "" },
show: { type: Boolean, default: false }
}, },
emits: ["asc", "desc", "sx", "daochu"], emits: ["asc", "desc", "sx", "daochu"],
setup(__props, { emit }) { setup(__props, { emit }) {
@ -19105,7 +19106,7 @@ const _sfc_main$E = defineComponent({
const sel = ref([]); const sel = ref([]);
const list = ref([]); const list = ref([]);
const alllist = ref([]); const alllist = ref([]);
watch(() => [props.list, props.soulkey], () => { watch(() => [props.show], () => {
let set = /* @__PURE__ */ new Set(); let set = /* @__PURE__ */ new Set();
for (let i of props.list) { for (let i of props.list) {
set.add(i[props.soulkey]); set.add(i[props.soulkey]);
@ -20196,13 +20197,14 @@ const _sfc_main$D = defineComponent({
withDirectives(createVNode(_sfc_main$E, { withDirectives(createVNode(_sfc_main$E, {
top: soultop.value, top: soultop.value,
left: soulleft.value, left: soulleft.value,
show: soulkey.value == column.key,
onAsc: asc, onAsc: asc,
onDesc: desc, onDesc: desc,
onDaochu: exportData, onDaochu: exportData,
list: datalist.value, list: datalist.value,
soulkey: column.key, soulkey: column.key,
onSx: sx onSx: sx
}, null, 8, ["top", "left", "list", "soulkey"]), [ }, null, 8, ["top", "left", "show", "list", "soulkey"]), [
[vShow, soulkey.value == column.key] [vShow, soulkey.value == column.key]
]) ])
]); ]);

View File

@ -1133,6 +1133,7 @@ window.addEventListener("click", heddin);
:top="soultop" :top="soultop"
:left="soulleft" :left="soulleft"
v-show="soulkey == column.key" v-show="soulkey == column.key"
:show="soulkey == column.key"
@asc="asc" @asc="asc"
@desc="desc" @desc="desc"
@daochu="exportData" @daochu="exportData"

View File

@ -76,12 +76,14 @@ export interface SoulTableProps {
top: number; top: number;
list: any; list: any;
soulkey: string; soulkey: string;
show:boolean;
} }
const props = withDefaults(defineProps<SoulTableProps>(), { const props = withDefaults(defineProps<SoulTableProps>(), {
top: 10, top: 10,
left: 10, left: 10,
list: [], list: [],
soulkey: "", soulkey: "",
show:false
}); });
const emit = defineEmits(["asc", "desc", "sx",'daochu']); const emit = defineEmits(["asc", "desc", "sx",'daochu']);
function asc(event: any) { function asc(event: any) {
@ -97,7 +99,7 @@ const sel: any = ref([]);
const list: any = ref([]); const list: any = ref([]);
const alllist: any = ref([]); const alllist: any = ref([]);
watch( watch(
() => [props.list, props.soulkey], () => [props.show],
() => { () => {
let set = new Set(); let set = new Set();
for (let i of props.list) { for (let i of props.list) {

File diff suppressed because one or more lines are too long