3h1-ui 2.9.0 → 2.9.4

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 CHANGED
@@ -14399,6 +14399,7 @@ const searchTypeString = searchType.filter((item) => {
14399
14399
  const searchTypeDate = searchType.filter((item) => {
14400
14400
  return ["eq", "gt", "ge", "lt", "le", "bt"].includes(item.value);
14401
14401
  });
14402
+ const searchTypeSelect = [{ label: "等于", value: "eq" }];
14402
14403
  const getGlobalAdvancedType = (fieldList, value) => {
14403
14404
  const temp = {};
14404
14405
  fieldList.forEach((field) => {
@@ -14445,7 +14446,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
14445
14446
  const formRef = ref();
14446
14447
  const schemasCurrent = reactive([]);
14447
14448
  if (props2.schemas.length !== 0)
14448
- schemasCurrent.push({ field: props2.schemas[0].field });
14449
+ schemasCurrent.push({ field: props2.schemas[0].field, op: "eq" });
14449
14450
  const dicColumn = computed(() => {
14450
14451
  const temp = [];
14451
14452
  props2.schemas.forEach((schama) => {
@@ -14461,7 +14462,10 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
14461
14462
  return temp;
14462
14463
  });
14463
14464
  const handleAdd = () => {
14464
- schemasCurrent.push({ field: "" });
14465
+ const item = dicColumn.value.find((item2) => {
14466
+ return item2.disabled === false;
14467
+ });
14468
+ schemasCurrent.push({ field: (item == null ? void 0 : item.value) || "", op: "eq" });
14465
14469
  };
14466
14470
  const handleMinus = (index2) => {
14467
14471
  schemasCurrent.splice(index2, 1);
@@ -14482,6 +14486,8 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
14482
14486
  return searchTypeString;
14483
14487
  case "date":
14484
14488
  return searchTypeDate;
14489
+ case "select":
14490
+ return searchTypeSelect;
14485
14491
  }
14486
14492
  };
14487
14493
  const getComponent = (field) => {
@@ -14572,14 +14578,18 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
14572
14578
  class: "shy-ui-advanced-search-item-op",
14573
14579
  name: `${schema.field}-op`
14574
14580
  }, {
14575
- default: withCtx(() => [
14576
- createVNode(unref(Select), {
14577
- value: schema.op,
14578
- "onUpdate:value": ($event) => schema.op = $event,
14579
- style: { "width": "120px" },
14580
- options: getSearchType(schema == null ? void 0 : schema.field)
14581
- }, null, 8, ["value", "onUpdate:value", "options"])
14582
- ]),
14581
+ default: withCtx(() => {
14582
+ var _a2;
14583
+ return [
14584
+ createVNode(unref(Select), {
14585
+ value: schema.op,
14586
+ "onUpdate:value": ($event) => schema.op = $event,
14587
+ style: { "width": "120px" },
14588
+ options: getSearchType(schema == null ? void 0 : schema.field),
14589
+ defaultValue: ((_a2 = getSearchType(schema == null ? void 0 : schema.field)[0]) == null ? void 0 : _a2.value) || ""
14590
+ }, null, 8, ["value", "onUpdate:value", "options", "defaultValue"])
14591
+ ];
14592
+ }),
14583
14593
  _: 2
14584
14594
  }, 1032, ["name"]),
14585
14595
  createVNode(unref(FormItem), { class: "shy-ui-advanced-search-item-value" }, {
@@ -14645,7 +14655,16 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
14645
14655
  "onUpdate:value": ($event) => schema[schema.field] = $event,
14646
14656
  "value-format": "YYYY-MM-DD HH:mm:ss"
14647
14657
  }, null, 8, ["value", "onUpdate:value"]))
14648
- ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
14658
+ ], 64)) : getTypeByField(schema == null ? void 0 : schema.field) === "select" ? (openBlock(), createBlock(unref(FormItem), { key: 2 }, {
14659
+ default: withCtx(() => [
14660
+ createVNode(unref(Select), mergeProps({
14661
+ value: schema[`${schema.field}`],
14662
+ "onUpdate:value": ($event) => schema[`${schema.field}`] = $event,
14663
+ valueModifiers: { number: true }
14664
+ }, getComponentPropsByField(schema.field)), null, 16, ["value", "onUpdate:value"])
14665
+ ]),
14666
+ _: 2
14667
+ }, 1024)) : (openBlock(), createElementBlock(Fragment, { key: 3 }, [
14649
14668
  getComponent(schema.field) === "Input" ? (openBlock(), createBlock(unref(Input), mergeProps({
14650
14669
  key: 0,
14651
14670
  value: schema[schema.field],
@@ -14796,23 +14815,26 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
14796
14815
  const _component_ColumnSetting = resolveComponent("ColumnSetting");
14797
14816
  const _component_FullScreenSetting = resolveComponent("FullScreenSetting");
14798
14817
  return openBlock(), createElementBlock("div", _hoisted_1$d, [
14799
- createVNode(_component_GlobalSearch),
14800
- createVNode(_component_AdvancedSearchSetting, { getPopupContainer: _ctx.getTableContainer }, null, 8, ["getPopupContainer"]),
14818
+ _ctx.getBindValues.useAdvancedSearch ? (openBlock(), createBlock(_component_GlobalSearch, { key: 0 })) : createCommentVNode("", true),
14819
+ _ctx.getBindValues.useAdvancedSearch ? (openBlock(), createBlock(_component_AdvancedSearchSetting, {
14820
+ key: 1,
14821
+ getPopupContainer: _ctx.getTableContainer
14822
+ }, null, 8, ["getPopupContainer"])) : createCommentVNode("", true),
14801
14823
  ((_b = (_a2 = _ctx.getBindValues) == null ? void 0 : _a2.formConfig) == null ? void 0 : _b.schemas) && ((_e = (_d = (_c = _ctx.getBindValues) == null ? void 0 : _c.formConfig) == null ? void 0 : _d.schemas) == null ? void 0 : _e.length) !== 0 ? (openBlock(), createBlock(_component_ShowSearchSetting, {
14802
- key: 0,
14824
+ key: 2,
14803
14825
  getPopupContainer: _ctx.getTableContainer
14804
14826
  }, null, 8, ["getPopupContainer"])) : createCommentVNode("", true),
14805
14827
  _ctx.getSetting.size ? (openBlock(), createBlock(_component_SizeSetting, {
14806
- key: 1,
14828
+ key: 3,
14807
14829
  getPopupContainer: _ctx.getTableContainer
14808
14830
  }, null, 8, ["getPopupContainer"])) : createCommentVNode("", true),
14809
14831
  _ctx.getSetting.setting ? (openBlock(), createBlock(_component_ColumnSetting, {
14810
- key: 2,
14832
+ key: 4,
14811
14833
  onColumnsChange: _ctx.handleColumnChange,
14812
14834
  getPopupContainer: _ctx.getTableContainer
14813
14835
  }, null, 8, ["onColumnsChange", "getPopupContainer"])) : createCommentVNode("", true),
14814
14836
  _ctx.getSetting.fullScreen ? (openBlock(), createBlock(_component_FullScreenSetting, {
14815
- key: 3,
14837
+ key: 5,
14816
14838
  getPopupContainer: _ctx.getTableContainer
14817
14839
  }, null, 8, ["getPopupContainer"])) : createCommentVNode("", true)
14818
14840
  ]);
@@ -15396,7 +15418,7 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
15396
15418
  onClick: _ctx.handleEnsure
15397
15419
  }, {
15398
15420
  default: withCtx(() => [
15399
- createTextVNode("确定")
15421
+ createTextVNode("搜索")
15400
15422
  ]),
15401
15423
  _: 1
15402
15424
  }, 8, ["onClick"]),
@@ -21531,6 +21553,7 @@ export {
21531
21553
  searchType,
21532
21554
  searchTypeDate,
21533
21555
  searchTypeNumber,
21556
+ searchTypeSelect,
21534
21557
  searchTypeString,
21535
21558
  treeEmits,
21536
21559
  treeProps,
package/es/style.css CHANGED
@@ -25453,8 +25453,9 @@ span.iconify {
25453
25453
  align-items: center;
25454
25454
  font-size: 14px;
25455
25455
  font-weight: 400;
25456
- color: #81B2FB;
25456
+ color: #5C9AF9;
25457
25457
  cursor: pointer;
25458
+ line-height: 30px;
25458
25459
  }.table-settings {
25459
25460
  display: flex;
25460
25461
  align-items: center;
@@ -14,4 +14,8 @@ export declare const searchTypeDate: {
14
14
  label: string;
15
15
  value: string;
16
16
  }[];
17
+ export declare const searchTypeSelect: {
18
+ label: string;
19
+ value: string;
20
+ }[];
17
21
  export declare const getGlobalAdvancedType: (fieldList: any, value: any) => {};
package/lib/index.js CHANGED
@@ -14401,6 +14401,7 @@ const searchTypeString = searchType.filter((item) => {
14401
14401
  const searchTypeDate = searchType.filter((item) => {
14402
14402
  return ["eq", "gt", "ge", "lt", "le", "bt"].includes(item.value);
14403
14403
  });
14404
+ const searchTypeSelect = [{ label: "等于", value: "eq" }];
14404
14405
  const getGlobalAdvancedType = (fieldList, value) => {
14405
14406
  const temp = {};
14406
14407
  fieldList.forEach((field) => {
@@ -14447,7 +14448,7 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
14447
14448
  const formRef = vue.ref();
14448
14449
  const schemasCurrent = vue.reactive([]);
14449
14450
  if (props2.schemas.length !== 0)
14450
- schemasCurrent.push({ field: props2.schemas[0].field });
14451
+ schemasCurrent.push({ field: props2.schemas[0].field, op: "eq" });
14451
14452
  const dicColumn = vue.computed(() => {
14452
14453
  const temp = [];
14453
14454
  props2.schemas.forEach((schama) => {
@@ -14463,7 +14464,10 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
14463
14464
  return temp;
14464
14465
  });
14465
14466
  const handleAdd = () => {
14466
- schemasCurrent.push({ field: "" });
14467
+ const item = dicColumn.value.find((item2) => {
14468
+ return item2.disabled === false;
14469
+ });
14470
+ schemasCurrent.push({ field: (item == null ? void 0 : item.value) || "", op: "eq" });
14467
14471
  };
14468
14472
  const handleMinus = (index2) => {
14469
14473
  schemasCurrent.splice(index2, 1);
@@ -14484,6 +14488,8 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
14484
14488
  return searchTypeString;
14485
14489
  case "date":
14486
14490
  return searchTypeDate;
14491
+ case "select":
14492
+ return searchTypeSelect;
14487
14493
  }
14488
14494
  };
14489
14495
  const getComponent = (field) => {
@@ -14574,14 +14580,18 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
14574
14580
  class: "shy-ui-advanced-search-item-op",
14575
14581
  name: `${schema.field}-op`
14576
14582
  }, {
14577
- default: vue.withCtx(() => [
14578
- vue.createVNode(vue.unref(antDesignVue.Select), {
14579
- value: schema.op,
14580
- "onUpdate:value": ($event) => schema.op = $event,
14581
- style: { "width": "120px" },
14582
- options: getSearchType(schema == null ? void 0 : schema.field)
14583
- }, null, 8, ["value", "onUpdate:value", "options"])
14584
- ]),
14583
+ default: vue.withCtx(() => {
14584
+ var _a2;
14585
+ return [
14586
+ vue.createVNode(vue.unref(antDesignVue.Select), {
14587
+ value: schema.op,
14588
+ "onUpdate:value": ($event) => schema.op = $event,
14589
+ style: { "width": "120px" },
14590
+ options: getSearchType(schema == null ? void 0 : schema.field),
14591
+ defaultValue: ((_a2 = getSearchType(schema == null ? void 0 : schema.field)[0]) == null ? void 0 : _a2.value) || ""
14592
+ }, null, 8, ["value", "onUpdate:value", "options", "defaultValue"])
14593
+ ];
14594
+ }),
14585
14595
  _: 2
14586
14596
  }, 1032, ["name"]),
14587
14597
  vue.createVNode(vue.unref(antDesignVue.FormItem), { class: "shy-ui-advanced-search-item-value" }, {
@@ -14647,7 +14657,16 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
14647
14657
  "onUpdate:value": ($event) => schema[schema.field] = $event,
14648
14658
  "value-format": "YYYY-MM-DD HH:mm:ss"
14649
14659
  }, null, 8, ["value", "onUpdate:value"]))
14650
- ], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
14660
+ ], 64)) : getTypeByField(schema == null ? void 0 : schema.field) === "select" ? (vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.FormItem), { key: 2 }, {
14661
+ default: vue.withCtx(() => [
14662
+ vue.createVNode(vue.unref(antDesignVue.Select), vue.mergeProps({
14663
+ value: schema[`${schema.field}`],
14664
+ "onUpdate:value": ($event) => schema[`${schema.field}`] = $event,
14665
+ valueModifiers: { number: true }
14666
+ }, getComponentPropsByField(schema.field)), null, 16, ["value", "onUpdate:value"])
14667
+ ]),
14668
+ _: 2
14669
+ }, 1024)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 3 }, [
14651
14670
  getComponent(schema.field) === "Input" ? (vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.Input), vue.mergeProps({
14652
14671
  key: 0,
14653
14672
  value: schema[schema.field],
@@ -14798,23 +14817,26 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
14798
14817
  const _component_ColumnSetting = vue.resolveComponent("ColumnSetting");
14799
14818
  const _component_FullScreenSetting = vue.resolveComponent("FullScreenSetting");
14800
14819
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$d, [
14801
- vue.createVNode(_component_GlobalSearch),
14802
- vue.createVNode(_component_AdvancedSearchSetting, { getPopupContainer: _ctx.getTableContainer }, null, 8, ["getPopupContainer"]),
14820
+ _ctx.getBindValues.useAdvancedSearch ? (vue.openBlock(), vue.createBlock(_component_GlobalSearch, { key: 0 })) : vue.createCommentVNode("", true),
14821
+ _ctx.getBindValues.useAdvancedSearch ? (vue.openBlock(), vue.createBlock(_component_AdvancedSearchSetting, {
14822
+ key: 1,
14823
+ getPopupContainer: _ctx.getTableContainer
14824
+ }, null, 8, ["getPopupContainer"])) : vue.createCommentVNode("", true),
14803
14825
  ((_b = (_a2 = _ctx.getBindValues) == null ? void 0 : _a2.formConfig) == null ? void 0 : _b.schemas) && ((_e = (_d = (_c = _ctx.getBindValues) == null ? void 0 : _c.formConfig) == null ? void 0 : _d.schemas) == null ? void 0 : _e.length) !== 0 ? (vue.openBlock(), vue.createBlock(_component_ShowSearchSetting, {
14804
- key: 0,
14826
+ key: 2,
14805
14827
  getPopupContainer: _ctx.getTableContainer
14806
14828
  }, null, 8, ["getPopupContainer"])) : vue.createCommentVNode("", true),
14807
14829
  _ctx.getSetting.size ? (vue.openBlock(), vue.createBlock(_component_SizeSetting, {
14808
- key: 1,
14830
+ key: 3,
14809
14831
  getPopupContainer: _ctx.getTableContainer
14810
14832
  }, null, 8, ["getPopupContainer"])) : vue.createCommentVNode("", true),
14811
14833
  _ctx.getSetting.setting ? (vue.openBlock(), vue.createBlock(_component_ColumnSetting, {
14812
- key: 2,
14834
+ key: 4,
14813
14835
  onColumnsChange: _ctx.handleColumnChange,
14814
14836
  getPopupContainer: _ctx.getTableContainer
14815
14837
  }, null, 8, ["onColumnsChange", "getPopupContainer"])) : vue.createCommentVNode("", true),
14816
14838
  _ctx.getSetting.fullScreen ? (vue.openBlock(), vue.createBlock(_component_FullScreenSetting, {
14817
- key: 3,
14839
+ key: 5,
14818
14840
  getPopupContainer: _ctx.getTableContainer
14819
14841
  }, null, 8, ["getPopupContainer"])) : vue.createCommentVNode("", true)
14820
14842
  ]);
@@ -15398,7 +15420,7 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
15398
15420
  onClick: _ctx.handleEnsure
15399
15421
  }, {
15400
15422
  default: vue.withCtx(() => [
15401
- vue.createTextVNode("确定")
15423
+ vue.createTextVNode("搜索")
15402
15424
  ]),
15403
15425
  _: 1
15404
15426
  }, 8, ["onClick"]),
@@ -21532,6 +21554,7 @@ exports.getGlobalAdvancedType = getGlobalAdvancedType;
21532
21554
  exports.searchType = searchType;
21533
21555
  exports.searchTypeDate = searchTypeDate;
21534
21556
  exports.searchTypeNumber = searchTypeNumber;
21557
+ exports.searchTypeSelect = searchTypeSelect;
21535
21558
  exports.searchTypeString = searchTypeString;
21536
21559
  exports.treeEmits = treeEmits;
21537
21560
  exports.treeProps = treeProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "3h1-ui",
3
- "version": "2.9.0",
3
+ "version": "2.9.4",
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/use": "1.0.4",
35
- "@shy-plugins/utils": "1.0.15"
34
+ "@shy-plugins/utils": "1.0.15",
35
+ "@shy-plugins/use": "1.0.4"
36
36
  },
37
37
  "types": "es/ui/index.d.ts",
38
38
  "devDependencies": {