3h1-ui 2.9.4 → 2.9.6
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.
- package/es/index.js +39 -9
- package/es/style.css +5 -5
- package/es/ui/src/Table/src/hooks/useAdvancedSearch.d.ts +1 -0
- package/lib/index.js +39 -9
- package/package.json +3 -3
package/es/index.js
CHANGED
|
@@ -14403,9 +14403,10 @@ const searchTypeSelect = [{ label: "等于", value: "eq" }];
|
|
|
14403
14403
|
const getGlobalAdvancedType = (fieldList, value) => {
|
|
14404
14404
|
const temp = {};
|
|
14405
14405
|
fieldList.forEach((field) => {
|
|
14406
|
-
temp[`${field}-op`] = "ct";
|
|
14407
|
-
temp[field] = value;
|
|
14406
|
+
temp[`${field}.${field}-op`] = "ct";
|
|
14407
|
+
temp[`${field}.${field}`] = value;
|
|
14408
14408
|
});
|
|
14409
|
+
temp.gexpr = fieldList.join("|");
|
|
14409
14410
|
return temp;
|
|
14410
14411
|
};
|
|
14411
14412
|
const _hoisted_1$e = { class: "shy-ui-advanced-search" };
|
|
@@ -14476,6 +14477,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
14476
14477
|
return;
|
|
14477
14478
|
delete schema[key2];
|
|
14478
14479
|
});
|
|
14480
|
+
schema.op = "eq";
|
|
14479
14481
|
};
|
|
14480
14482
|
const getSearchType = (field) => {
|
|
14481
14483
|
const type = getTypeByField(field);
|
|
@@ -15107,10 +15109,30 @@ function useTableFooter(propsRef, scrollRef, tableElRef, getDataSourceRef) {
|
|
|
15107
15109
|
}
|
|
15108
15110
|
return { getFooterProps };
|
|
15109
15111
|
}
|
|
15112
|
+
function deepCopy(obj) {
|
|
15113
|
+
if (typeof obj !== "object" || obj === null) {
|
|
15114
|
+
return obj;
|
|
15115
|
+
}
|
|
15116
|
+
let copy;
|
|
15117
|
+
if (Array.isArray(obj)) {
|
|
15118
|
+
copy = [];
|
|
15119
|
+
for (let i = 0; i < obj.length; i++) {
|
|
15120
|
+
copy[i] = deepCopy(obj[i]);
|
|
15121
|
+
}
|
|
15122
|
+
} else {
|
|
15123
|
+
copy = {};
|
|
15124
|
+
for (let key2 in obj) {
|
|
15125
|
+
if (Object.prototype.hasOwnProperty.call(obj, key2)) {
|
|
15126
|
+
copy[key2] = deepCopy(obj[key2]);
|
|
15127
|
+
}
|
|
15128
|
+
}
|
|
15129
|
+
}
|
|
15130
|
+
return copy;
|
|
15131
|
+
}
|
|
15110
15132
|
function useTableForm(propsRef, slots, fetch, getLoading) {
|
|
15111
15133
|
const getFormConfig = computed(() => {
|
|
15112
15134
|
const { formConfig } = unref(propsRef);
|
|
15113
|
-
const temp =
|
|
15135
|
+
const temp = deepCopy(formConfig);
|
|
15114
15136
|
temp == null ? void 0 : temp.schemas.forEach((item) => {
|
|
15115
15137
|
if (item.component === "Input") {
|
|
15116
15138
|
item.componentProps = {
|
|
@@ -15172,6 +15194,11 @@ const useAdvancedSearch = ({ getProps, reload }) => {
|
|
|
15172
15194
|
};
|
|
15173
15195
|
});
|
|
15174
15196
|
});
|
|
15197
|
+
const schemasAdvancedSearchString = computed(() => {
|
|
15198
|
+
return schemasAdvancedSearch.value.filter((item) => {
|
|
15199
|
+
return item.type === "string";
|
|
15200
|
+
});
|
|
15201
|
+
});
|
|
15175
15202
|
const openAdvancedSearch = () => {
|
|
15176
15203
|
isVisibleAdvancedSearch.value = true;
|
|
15177
15204
|
};
|
|
@@ -15234,7 +15261,8 @@ const useAdvancedSearch = ({ getProps, reload }) => {
|
|
|
15234
15261
|
setGlobalSearchValue,
|
|
15235
15262
|
getGlobalSearchValue,
|
|
15236
15263
|
setCurSearchParams,
|
|
15237
|
-
getCurSearchParams
|
|
15264
|
+
getCurSearchParams,
|
|
15265
|
+
schemasAdvancedSearchString
|
|
15238
15266
|
};
|
|
15239
15267
|
};
|
|
15240
15268
|
const basicProps$3 = reactive({
|
|
@@ -15507,8 +15535,8 @@ const _sfc_main$j = defineComponent({
|
|
|
15507
15535
|
};
|
|
15508
15536
|
}
|
|
15509
15537
|
});
|
|
15510
|
-
const
|
|
15511
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
15538
|
+
const TableGlobalSearch_vue_vue_type_style_index_0_scoped_fa3d98b2_lang = "";
|
|
15539
|
+
const _withScopeId = (n) => (pushScopeId("data-v-fa3d98b2"), n = n(), popScopeId(), n);
|
|
15512
15540
|
const _hoisted_1$a = { class: "shy-basic-table-global-search" };
|
|
15513
15541
|
const _hoisted_2$4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", null, "搜索全部", -1));
|
|
15514
15542
|
const _hoisted_3$1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", null, "搜索特定字段", -1));
|
|
@@ -15563,7 +15591,7 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
15563
15591
|
])
|
|
15564
15592
|
]);
|
|
15565
15593
|
}
|
|
15566
|
-
const TableGlobalSearch = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$c], ["__scopeId", "data-v-
|
|
15594
|
+
const TableGlobalSearch = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$c], ["__scopeId", "data-v-fa3d98b2"]]);
|
|
15567
15595
|
const _sfc_main$i = defineComponent({
|
|
15568
15596
|
components: {
|
|
15569
15597
|
TableAdvancedSearch,
|
|
@@ -15754,6 +15782,7 @@ const _sfc_main$i = defineComponent({
|
|
|
15754
15782
|
});
|
|
15755
15783
|
const {
|
|
15756
15784
|
schemasAdvancedSearch,
|
|
15785
|
+
schemasAdvancedSearchString,
|
|
15757
15786
|
isVisibleAdvancedSearch,
|
|
15758
15787
|
openAdvancedSearch,
|
|
15759
15788
|
closeAdvancedSearch,
|
|
@@ -15863,7 +15892,8 @@ const _sfc_main$i = defineComponent({
|
|
|
15863
15892
|
schemasAdvancedSearch,
|
|
15864
15893
|
isVisibleAdvancedSearch,
|
|
15865
15894
|
handleAdvancedEnsure,
|
|
15866
|
-
isVisibleGlobalSearch
|
|
15895
|
+
isVisibleGlobalSearch,
|
|
15896
|
+
schemasAdvancedSearchString
|
|
15867
15897
|
};
|
|
15868
15898
|
}
|
|
15869
15899
|
});
|
|
@@ -15908,7 +15938,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
15908
15938
|
}, null, 8, ["schemasAdvancedSearch", "onEnsure"]), [
|
|
15909
15939
|
[vShow, _ctx.isVisibleAdvancedSearch]
|
|
15910
15940
|
]),
|
|
15911
|
-
withDirectives(createVNode(_component_TableGlobalSearch, { schemasAdvancedSearch: _ctx.
|
|
15941
|
+
withDirectives(createVNode(_component_TableGlobalSearch, { schemasAdvancedSearch: _ctx.schemasAdvancedSearchString }, null, 8, ["schemasAdvancedSearch"]), [
|
|
15912
15942
|
[vShow, _ctx.isVisibleGlobalSearch]
|
|
15913
15943
|
]),
|
|
15914
15944
|
withDirectives(createVNode(_component_Table, mergeProps({ ref: "tableElRef" }, _ctx.getBindValues, {
|
package/es/style.css
CHANGED
|
@@ -25482,7 +25482,7 @@ span.iconify {
|
|
|
25482
25482
|
}
|
|
25483
25483
|
.shy-basic-table-header__toolbar > * {
|
|
25484
25484
|
margin-right: 8px;
|
|
25485
|
-
}.shy-basic-table-global-search[data-v-
|
|
25485
|
+
}.shy-basic-table-global-search[data-v-fa3d98b2] {
|
|
25486
25486
|
position: absolute;
|
|
25487
25487
|
top: 40px;
|
|
25488
25488
|
right: 131px;
|
|
@@ -25494,7 +25494,7 @@ span.iconify {
|
|
|
25494
25494
|
border: 1px solid #ebebeb;
|
|
25495
25495
|
padding: 10px;
|
|
25496
25496
|
}
|
|
25497
|
-
.shy-basic-table-global-search-item-global[data-v-
|
|
25497
|
+
.shy-basic-table-global-search-item-global[data-v-fa3d98b2] {
|
|
25498
25498
|
height: 32px;
|
|
25499
25499
|
line-height: 32px;
|
|
25500
25500
|
font-size: 14px;
|
|
@@ -25505,7 +25505,7 @@ span.iconify {
|
|
|
25505
25505
|
align-items: center;
|
|
25506
25506
|
justify-content: space-between;
|
|
25507
25507
|
}
|
|
25508
|
-
.shy-basic-table-global-search-item-special[data-v-
|
|
25508
|
+
.shy-basic-table-global-search-item-special[data-v-fa3d98b2] {
|
|
25509
25509
|
height: 32px;
|
|
25510
25510
|
line-height: 32px;
|
|
25511
25511
|
font-size: 14px;
|
|
@@ -25516,10 +25516,10 @@ span.iconify {
|
|
|
25516
25516
|
align-items: center;
|
|
25517
25517
|
justify-content: space-between;
|
|
25518
25518
|
}
|
|
25519
|
-
.shy-basic-table-global-search-checkbox-wrapper[data-v-
|
|
25519
|
+
.shy-basic-table-global-search-checkbox-wrapper[data-v-fa3d98b2] {
|
|
25520
25520
|
padding: 0 8px;
|
|
25521
25521
|
}
|
|
25522
|
-
.shy-basic-table-global-search .selected-bg[data-v-
|
|
25522
|
+
.shy-basic-table-global-search .selected-bg[data-v-fa3d98b2] {
|
|
25523
25523
|
background-color: #ebf1ff;
|
|
25524
25524
|
}.shy-basic-table-action {
|
|
25525
25525
|
display: flex;
|
|
@@ -31,6 +31,7 @@ export declare const useAdvancedSearch: ({ getProps, reload }: {
|
|
|
31
31
|
getGlobalSearchValue: () => string;
|
|
32
32
|
setCurSearchParams: (value: any) => void;
|
|
33
33
|
getCurSearchParams: () => {};
|
|
34
|
+
schemasAdvancedSearchString: import("vue").ComputedRef<any>;
|
|
34
35
|
};
|
|
35
36
|
export declare const useAdvancedSearchKv: () => {
|
|
36
37
|
getKvOperator: () => {
|
package/lib/index.js
CHANGED
|
@@ -14405,9 +14405,10 @@ const searchTypeSelect = [{ label: "等于", value: "eq" }];
|
|
|
14405
14405
|
const getGlobalAdvancedType = (fieldList, value) => {
|
|
14406
14406
|
const temp = {};
|
|
14407
14407
|
fieldList.forEach((field) => {
|
|
14408
|
-
temp[`${field}-op`] = "ct";
|
|
14409
|
-
temp[field] = value;
|
|
14408
|
+
temp[`${field}.${field}-op`] = "ct";
|
|
14409
|
+
temp[`${field}.${field}`] = value;
|
|
14410
14410
|
});
|
|
14411
|
+
temp.gexpr = fieldList.join("|");
|
|
14411
14412
|
return temp;
|
|
14412
14413
|
};
|
|
14413
14414
|
const _hoisted_1$e = { class: "shy-ui-advanced-search" };
|
|
@@ -14478,6 +14479,7 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
|
|
|
14478
14479
|
return;
|
|
14479
14480
|
delete schema[key2];
|
|
14480
14481
|
});
|
|
14482
|
+
schema.op = "eq";
|
|
14481
14483
|
};
|
|
14482
14484
|
const getSearchType = (field) => {
|
|
14483
14485
|
const type = getTypeByField(field);
|
|
@@ -15109,10 +15111,30 @@ function useTableFooter(propsRef, scrollRef, tableElRef, getDataSourceRef) {
|
|
|
15109
15111
|
}
|
|
15110
15112
|
return { getFooterProps };
|
|
15111
15113
|
}
|
|
15114
|
+
function deepCopy(obj) {
|
|
15115
|
+
if (typeof obj !== "object" || obj === null) {
|
|
15116
|
+
return obj;
|
|
15117
|
+
}
|
|
15118
|
+
let copy;
|
|
15119
|
+
if (Array.isArray(obj)) {
|
|
15120
|
+
copy = [];
|
|
15121
|
+
for (let i = 0; i < obj.length; i++) {
|
|
15122
|
+
copy[i] = deepCopy(obj[i]);
|
|
15123
|
+
}
|
|
15124
|
+
} else {
|
|
15125
|
+
copy = {};
|
|
15126
|
+
for (let key2 in obj) {
|
|
15127
|
+
if (Object.prototype.hasOwnProperty.call(obj, key2)) {
|
|
15128
|
+
copy[key2] = deepCopy(obj[key2]);
|
|
15129
|
+
}
|
|
15130
|
+
}
|
|
15131
|
+
}
|
|
15132
|
+
return copy;
|
|
15133
|
+
}
|
|
15112
15134
|
function useTableForm(propsRef, slots, fetch, getLoading) {
|
|
15113
15135
|
const getFormConfig = vue.computed(() => {
|
|
15114
15136
|
const { formConfig } = vue.unref(propsRef);
|
|
15115
|
-
const temp =
|
|
15137
|
+
const temp = deepCopy(formConfig);
|
|
15116
15138
|
temp == null ? void 0 : temp.schemas.forEach((item) => {
|
|
15117
15139
|
if (item.component === "Input") {
|
|
15118
15140
|
item.componentProps = {
|
|
@@ -15174,6 +15196,11 @@ const useAdvancedSearch = ({ getProps, reload }) => {
|
|
|
15174
15196
|
};
|
|
15175
15197
|
});
|
|
15176
15198
|
});
|
|
15199
|
+
const schemasAdvancedSearchString = vue.computed(() => {
|
|
15200
|
+
return schemasAdvancedSearch.value.filter((item) => {
|
|
15201
|
+
return item.type === "string";
|
|
15202
|
+
});
|
|
15203
|
+
});
|
|
15177
15204
|
const openAdvancedSearch = () => {
|
|
15178
15205
|
isVisibleAdvancedSearch.value = true;
|
|
15179
15206
|
};
|
|
@@ -15236,7 +15263,8 @@ const useAdvancedSearch = ({ getProps, reload }) => {
|
|
|
15236
15263
|
setGlobalSearchValue,
|
|
15237
15264
|
getGlobalSearchValue,
|
|
15238
15265
|
setCurSearchParams,
|
|
15239
|
-
getCurSearchParams
|
|
15266
|
+
getCurSearchParams,
|
|
15267
|
+
schemasAdvancedSearchString
|
|
15240
15268
|
};
|
|
15241
15269
|
};
|
|
15242
15270
|
const basicProps$3 = vue.reactive({
|
|
@@ -15509,8 +15537,8 @@ const _sfc_main$j = vue.defineComponent({
|
|
|
15509
15537
|
};
|
|
15510
15538
|
}
|
|
15511
15539
|
});
|
|
15512
|
-
const
|
|
15513
|
-
const _withScopeId = (n) => (vue.pushScopeId("data-v-
|
|
15540
|
+
const TableGlobalSearch_vue_vue_type_style_index_0_scoped_fa3d98b2_lang = "";
|
|
15541
|
+
const _withScopeId = (n) => (vue.pushScopeId("data-v-fa3d98b2"), n = n(), vue.popScopeId(), n);
|
|
15514
15542
|
const _hoisted_1$a = { class: "shy-basic-table-global-search" };
|
|
15515
15543
|
const _hoisted_2$4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", null, "搜索全部", -1));
|
|
15516
15544
|
const _hoisted_3$1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", null, "搜索特定字段", -1));
|
|
@@ -15565,7 +15593,7 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
15565
15593
|
])
|
|
15566
15594
|
]);
|
|
15567
15595
|
}
|
|
15568
|
-
const TableGlobalSearch = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$c], ["__scopeId", "data-v-
|
|
15596
|
+
const TableGlobalSearch = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$c], ["__scopeId", "data-v-fa3d98b2"]]);
|
|
15569
15597
|
const _sfc_main$i = vue.defineComponent({
|
|
15570
15598
|
components: {
|
|
15571
15599
|
TableAdvancedSearch,
|
|
@@ -15756,6 +15784,7 @@ const _sfc_main$i = vue.defineComponent({
|
|
|
15756
15784
|
});
|
|
15757
15785
|
const {
|
|
15758
15786
|
schemasAdvancedSearch,
|
|
15787
|
+
schemasAdvancedSearchString,
|
|
15759
15788
|
isVisibleAdvancedSearch,
|
|
15760
15789
|
openAdvancedSearch,
|
|
15761
15790
|
closeAdvancedSearch,
|
|
@@ -15865,7 +15894,8 @@ const _sfc_main$i = vue.defineComponent({
|
|
|
15865
15894
|
schemasAdvancedSearch,
|
|
15866
15895
|
isVisibleAdvancedSearch,
|
|
15867
15896
|
handleAdvancedEnsure,
|
|
15868
|
-
isVisibleGlobalSearch
|
|
15897
|
+
isVisibleGlobalSearch,
|
|
15898
|
+
schemasAdvancedSearchString
|
|
15869
15899
|
};
|
|
15870
15900
|
}
|
|
15871
15901
|
});
|
|
@@ -15910,7 +15940,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
15910
15940
|
}, null, 8, ["schemasAdvancedSearch", "onEnsure"]), [
|
|
15911
15941
|
[vue.vShow, _ctx.isVisibleAdvancedSearch]
|
|
15912
15942
|
]),
|
|
15913
|
-
vue.withDirectives(vue.createVNode(_component_TableGlobalSearch, { schemasAdvancedSearch: _ctx.
|
|
15943
|
+
vue.withDirectives(vue.createVNode(_component_TableGlobalSearch, { schemasAdvancedSearch: _ctx.schemasAdvancedSearchString }, null, 8, ["schemasAdvancedSearch"]), [
|
|
15914
15944
|
[vue.vShow, _ctx.isVisibleGlobalSearch]
|
|
15915
15945
|
]),
|
|
15916
15946
|
vue.withDirectives(vue.createVNode(_component_Table, vue.mergeProps({ ref: "tableElRef" }, _ctx.getBindValues, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "3h1-ui",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"vue-types": "^5.0.2",
|
|
32
32
|
"vxe-table": "^4.3.6",
|
|
33
33
|
"xe-utils": "^3.5.7",
|
|
34
|
-
"@shy-plugins/
|
|
35
|
-
"@shy-plugins/
|
|
34
|
+
"@shy-plugins/use": "1.0.4",
|
|
35
|
+
"@shy-plugins/utils": "1.0.15"
|
|
36
36
|
},
|
|
37
37
|
"types": "es/ui/index.d.ts",
|
|
38
38
|
"devDependencies": {
|