@94ai/nf-search-form 100.1.19 → 100.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -7048,14 +7048,14 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7048
7048
|
}
|
|
7049
7049
|
return props.formOptions.map((item) => item.prop);
|
|
7050
7050
|
};
|
|
7051
|
-
const localShowItems = vueDemi.ref(initLocalShow());
|
|
7051
|
+
const localShowItems = vueDemi.ref(initLocalShow(true));
|
|
7052
7052
|
vueDemi.watch(() => {
|
|
7053
7053
|
var _a2;
|
|
7054
7054
|
return (_a2 = localShowItems.value) == null ? void 0 : _a2.length;
|
|
7055
7055
|
}, async () => {
|
|
7056
7056
|
emit("update:showItems", localShowItems.value);
|
|
7057
7057
|
if (Object.keys(nfSearchFormModel.value).length) {
|
|
7058
|
-
|
|
7058
|
+
refreshNfSearchFormModel(false);
|
|
7059
7059
|
}
|
|
7060
7060
|
}, {
|
|
7061
7061
|
immediate: true
|
|
@@ -7135,7 +7135,6 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7135
7135
|
});
|
|
7136
7136
|
const renderSearchFormItemOptions = vueDemi.ref([]);
|
|
7137
7137
|
const syncCookiesToSearchFormItemOptions = async (readCached = true) => {
|
|
7138
|
-
renderSearchFormItemOptions.value = [];
|
|
7139
7138
|
props.formOptions._skip = true;
|
|
7140
7139
|
const columns = props.formOptions.map((item, index2) => {
|
|
7141
7140
|
item.key = item.key || commonUtils.createUniqueString();
|
|
@@ -7173,8 +7172,9 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7173
7172
|
}
|
|
7174
7173
|
}
|
|
7175
7174
|
renderSearchFormItemOptions.value = columns.sort((a, b) => a._index - b._index < 0 ? -1 : a._index - b._index > 0 ? 1 : 0);
|
|
7176
|
-
|
|
7177
|
-
|
|
7175
|
+
vueDemi.nextTick(() => {
|
|
7176
|
+
props.formOptions._skip = false;
|
|
7177
|
+
});
|
|
7178
7178
|
};
|
|
7179
7179
|
syncCookiesToSearchFormItemOptions();
|
|
7180
7180
|
const itemIsShow = (item) => {
|
|
@@ -7209,7 +7209,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7209
7209
|
return;
|
|
7210
7210
|
}
|
|
7211
7211
|
setLocalShowItems(initLocalShow());
|
|
7212
|
-
await syncCookiesToSearchFormItemOptions(
|
|
7212
|
+
await syncCookiesToSearchFormItemOptions();
|
|
7213
7213
|
}, {
|
|
7214
7214
|
deep: true
|
|
7215
7215
|
});
|
|
@@ -7356,7 +7356,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7356
7356
|
};
|
|
7357
7357
|
const columnCheckConfirm = async (cb, error) => {
|
|
7358
7358
|
try {
|
|
7359
|
-
const value =
|
|
7359
|
+
const value = columnCheckDrawer.value.syncTableColumnsToCookies();
|
|
7360
7360
|
columnCheckConfirmFeedback(value);
|
|
7361
7361
|
await syncCookiesToLocalShowColumn();
|
|
7362
7362
|
await syncCookiesToSearchFormItemOptions();
|
|
@@ -7046,14 +7046,14 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7046
7046
|
}
|
|
7047
7047
|
return props.formOptions.map((item) => item.prop);
|
|
7048
7048
|
};
|
|
7049
|
-
const localShowItems = ref(initLocalShow());
|
|
7049
|
+
const localShowItems = ref(initLocalShow(true));
|
|
7050
7050
|
watch(() => {
|
|
7051
7051
|
var _a2;
|
|
7052
7052
|
return (_a2 = localShowItems.value) == null ? void 0 : _a2.length;
|
|
7053
7053
|
}, async () => {
|
|
7054
7054
|
emit("update:showItems", localShowItems.value);
|
|
7055
7055
|
if (Object.keys(nfSearchFormModel.value).length) {
|
|
7056
|
-
|
|
7056
|
+
refreshNfSearchFormModel(false);
|
|
7057
7057
|
}
|
|
7058
7058
|
}, {
|
|
7059
7059
|
immediate: true
|
|
@@ -7133,7 +7133,6 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7133
7133
|
});
|
|
7134
7134
|
const renderSearchFormItemOptions = ref([]);
|
|
7135
7135
|
const syncCookiesToSearchFormItemOptions = async (readCached = true) => {
|
|
7136
|
-
renderSearchFormItemOptions.value = [];
|
|
7137
7136
|
props.formOptions._skip = true;
|
|
7138
7137
|
const columns = props.formOptions.map((item, index2) => {
|
|
7139
7138
|
item.key = item.key || createUniqueString();
|
|
@@ -7171,8 +7170,9 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7171
7170
|
}
|
|
7172
7171
|
}
|
|
7173
7172
|
renderSearchFormItemOptions.value = columns.sort((a, b) => a._index - b._index < 0 ? -1 : a._index - b._index > 0 ? 1 : 0);
|
|
7174
|
-
|
|
7175
|
-
|
|
7173
|
+
nextTick(() => {
|
|
7174
|
+
props.formOptions._skip = false;
|
|
7175
|
+
});
|
|
7176
7176
|
};
|
|
7177
7177
|
syncCookiesToSearchFormItemOptions();
|
|
7178
7178
|
const itemIsShow = (item) => {
|
|
@@ -7207,7 +7207,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7207
7207
|
return;
|
|
7208
7208
|
}
|
|
7209
7209
|
setLocalShowItems(initLocalShow());
|
|
7210
|
-
await syncCookiesToSearchFormItemOptions(
|
|
7210
|
+
await syncCookiesToSearchFormItemOptions();
|
|
7211
7211
|
}, {
|
|
7212
7212
|
deep: true
|
|
7213
7213
|
});
|
|
@@ -7354,7 +7354,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
7354
7354
|
};
|
|
7355
7355
|
const columnCheckConfirm = async (cb, error) => {
|
|
7356
7356
|
try {
|
|
7357
|
-
const value =
|
|
7357
|
+
const value = columnCheckDrawer.value.syncTableColumnsToCookies();
|
|
7358
7358
|
columnCheckConfirmFeedback(value);
|
|
7359
7359
|
await syncCookiesToLocalShowColumn();
|
|
7360
7360
|
await syncCookiesToSearchFormItemOptions();
|
|
@@ -630,11 +630,11 @@ const initLocalShow = (init = false) => {
|
|
|
630
630
|
/**
|
|
631
631
|
* 表单显示的item集合
|
|
632
632
|
*/
|
|
633
|
-
const localShowItems = ref<string[]>(initLocalShow())
|
|
633
|
+
const localShowItems = ref<string[]>(initLocalShow(true))
|
|
634
634
|
watch(() => localShowItems.value?.length, async () => {
|
|
635
635
|
emit('update:showItems', localShowItems.value)
|
|
636
636
|
if (Object.keys(nfSearchFormModel.value).length) {
|
|
637
|
-
|
|
637
|
+
refreshNfSearchFormModel(false)
|
|
638
638
|
}
|
|
639
639
|
}, {
|
|
640
640
|
immediate: true
|
|
@@ -731,7 +731,6 @@ const isShowBtnBoxSlot = computed(() => {
|
|
|
731
731
|
*/
|
|
732
732
|
const renderSearchFormItemOptions = ref<NfSearchFormItemOption[]>([])
|
|
733
733
|
const syncCookiesToSearchFormItemOptions = async (readCached = true) => {
|
|
734
|
-
renderSearchFormItemOptions.value = []
|
|
735
734
|
props.formOptions._skip = true
|
|
736
735
|
const columns = props.formOptions!.map((item, index) => {
|
|
737
736
|
item.key = item.key || createUniqueString()
|
|
@@ -770,9 +769,10 @@ const syncCookiesToSearchFormItemOptions = async (readCached = true) => {
|
|
|
770
769
|
console.log(e)
|
|
771
770
|
}
|
|
772
771
|
}
|
|
773
|
-
renderSearchFormItemOptions.value = columns.sort((a, b) => a._index
|
|
774
|
-
|
|
775
|
-
|
|
772
|
+
renderSearchFormItemOptions.value = columns.sort((a, b) => a._index - b._index < 0 ? -1 : a._index - b._index > 0 ? 1 : 0);
|
|
773
|
+
nextTick(() => {
|
|
774
|
+
props.formOptions._skip = false;
|
|
775
|
+
})
|
|
776
776
|
}
|
|
777
777
|
syncCookiesToSearchFormItemOptions()
|
|
778
778
|
|
|
@@ -834,7 +834,7 @@ onBeforeMount(() => {
|
|
|
834
834
|
return
|
|
835
835
|
}
|
|
836
836
|
setLocalShowItems(initLocalShow())
|
|
837
|
-
await syncCookiesToSearchFormItemOptions(
|
|
837
|
+
await syncCookiesToSearchFormItemOptions()
|
|
838
838
|
}, {
|
|
839
839
|
deep: true
|
|
840
840
|
})
|
|
@@ -1005,7 +1005,7 @@ const columnCheckConfirmFeedback = (value: Record<string, any>) => {
|
|
|
1005
1005
|
// 抽屉确定
|
|
1006
1006
|
const columnCheckConfirm = async (cb, error) => {
|
|
1007
1007
|
try {
|
|
1008
|
-
const value =
|
|
1008
|
+
const value = columnCheckDrawer.value.syncTableColumnsToCookies()
|
|
1009
1009
|
columnCheckConfirmFeedback(value)
|
|
1010
1010
|
await syncCookiesToLocalShowColumn()
|
|
1011
1011
|
await syncCookiesToSearchFormItemOptions()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@94ai/nf-search-form",
|
|
3
|
-
"version": "100.1.
|
|
3
|
+
"version": "100.1.21",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "zoujiahe <zoujiahe@94ai.com>",
|
|
@@ -14,21 +14,21 @@
|
|
|
14
14
|
"url": "http://94ai.gitlab.com/zoujiahe/common-ui.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@94ai/common-utils": "^100.1.
|
|
18
|
-
"@94ai/nf-action": "^100.1.
|
|
19
|
-
"@94ai/nf-double-half-year": "^100.1.
|
|
20
|
-
"@94ai/nf-double-quarter": "^100.1.
|
|
21
|
-
"@94ai/nf-double-week": "^100.1.
|
|
22
|
-
"@94ai/nf-double-year": "^100.1.
|
|
23
|
-
"@94ai/nf-drawer": "^100.1.
|
|
24
|
-
"@94ai/nf-form": "^100.1.
|
|
25
|
-
"@94ai/nf-form-item": "^100.1.
|
|
26
|
-
"@94ai/nf-half-year-picker": "^100.1.
|
|
27
|
-
"@94ai/nf-message": "^100.1.
|
|
28
|
-
"@94ai/nf-quarter-picker": "^100.1.
|
|
29
|
-
"@94ai/nf-select-transfer": "^100.1.
|
|
30
|
-
"@94ai/nf-theme-chalk": "^100.1.
|
|
31
|
-
"@94ai/nf-virtual-select": "^100.1.
|
|
17
|
+
"@94ai/common-utils": "^100.1.21",
|
|
18
|
+
"@94ai/nf-action": "^100.1.21",
|
|
19
|
+
"@94ai/nf-double-half-year": "^100.1.21",
|
|
20
|
+
"@94ai/nf-double-quarter": "^100.1.21",
|
|
21
|
+
"@94ai/nf-double-week": "^100.1.21",
|
|
22
|
+
"@94ai/nf-double-year": "^100.1.21",
|
|
23
|
+
"@94ai/nf-drawer": "^100.1.21",
|
|
24
|
+
"@94ai/nf-form": "^100.1.21",
|
|
25
|
+
"@94ai/nf-form-item": "^100.1.21",
|
|
26
|
+
"@94ai/nf-half-year-picker": "^100.1.21",
|
|
27
|
+
"@94ai/nf-message": "^100.1.21",
|
|
28
|
+
"@94ai/nf-quarter-picker": "^100.1.21",
|
|
29
|
+
"@94ai/nf-select-transfer": "^100.1.21",
|
|
30
|
+
"@94ai/nf-theme-chalk": "^100.1.21",
|
|
31
|
+
"@94ai/nf-virtual-select": "^100.1.21",
|
|
32
32
|
"idb-keyval": "^6.2.1",
|
|
33
33
|
"resize-observer-polyfill": "^1.5.1",
|
|
34
34
|
"vue-demi": "^0.14.5",
|