3h1-ui 2.9.6 → 2.9.7

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
@@ -5590,7 +5590,7 @@ const _sfc_main$V = defineComponent({
5590
5590
  }
5591
5591
  });
5592
5592
  const _hoisted_1$m = { key: "component" };
5593
- const _hoisted_2$a = { key: "skeleton" };
5593
+ const _hoisted_2$9 = { key: "skeleton" };
5594
5594
  function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
5595
5595
  const _component_Skeleton = resolveComponent("Skeleton");
5596
5596
  return openBlock(), createBlock(TransitionGroup, mergeProps({ class: "h-full w-full" }, _ctx.$attrs, {
@@ -5602,7 +5602,7 @@ function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
5602
5602
  default: withCtx(() => [
5603
5603
  _ctx.isInit ? (openBlock(), createElementBlock("div", _hoisted_1$m, [
5604
5604
  renderSlot(_ctx.$slots, "default", { loading: _ctx.loading })
5605
- ])) : (openBlock(), createElementBlock("div", _hoisted_2$a, [
5605
+ ])) : (openBlock(), createElementBlock("div", _hoisted_2$9, [
5606
5606
  _ctx.$slots.skeleton ? renderSlot(_ctx.$slots, "skeleton", { key: 0 }) : (openBlock(), createBlock(_component_Skeleton, { key: 1 }))
5607
5607
  ]))
5608
5608
  ]),
@@ -6956,14 +6956,14 @@ function useTransition(source, options = {}) {
6956
6956
  });
6957
6957
  }
6958
6958
  const _hoisted_1$l = { class: "flex justify-between" };
6959
- const _hoisted_2$9 = { key: 0 };
6959
+ const _hoisted_2$8 = { key: 0 };
6960
6960
  const _hoisted_3$5 = { class: "flex flex-wrap px-2" };
6961
6961
  const _hoisted_4$3 = ["onClick", "title"];
6962
6962
  const _hoisted_5$2 = {
6963
6963
  key: 0,
6964
6964
  class: "flex py-2 items-center justify-center"
6965
6965
  };
6966
- const _hoisted_6$2 = {
6966
+ const _hoisted_6$1 = {
6967
6967
  key: 1,
6968
6968
  class: "p-5"
6969
6969
  };
@@ -7072,7 +7072,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
7072
7072
  ])
7073
7073
  ]),
7074
7074
  content: withCtx(() => [
7075
- unref(getPaginationList).length ? (openBlock(), createElementBlock("div", _hoisted_2$9, [
7075
+ unref(getPaginationList).length ? (openBlock(), createElementBlock("div", _hoisted_2$8, [
7076
7076
  createVNode(unref(ScrollContainer$1), { class: "border border-solid border-t-0" }, {
7077
7077
  default: withCtx(() => [
7078
7078
  createElementVNode("ul", _hoisted_3$5, [
@@ -7105,7 +7105,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
7105
7105
  onChange: handlePageChange
7106
7106
  }, null, 8, ["pageSize", "total"])
7107
7107
  ])) : createCommentVNode("", true)
7108
- ])) : (openBlock(), createElementBlock("div", _hoisted_6$2, [
7108
+ ])) : (openBlock(), createElementBlock("div", _hoisted_6$1, [
7109
7109
  createVNode(unref(AEmpty))
7110
7110
  ]))
7111
7111
  ]),
@@ -7273,7 +7273,7 @@ function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
7273
7273
  }
7274
7274
  const CountdownInput = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["render", _sfc_render$y]]);
7275
7275
  const _hoisted_1$k = { key: 0 };
7276
- const _hoisted_2$8 = {
7276
+ const _hoisted_2$7 = {
7277
7277
  key: 1,
7278
7278
  class: "delete-wrapper"
7279
7279
  };
@@ -7408,7 +7408,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
7408
7408
  }, 1032, ["rules", "name"])
7409
7409
  ]),
7410
7410
  _: 2
7411
- }, 1032, ["model"])) : (openBlock(), createElementBlock("div", _hoisted_2$8, [
7411
+ }, 1032, ["model"])) : (openBlock(), createElementBlock("div", _hoisted_2$7, [
7412
7412
  createElementVNode("span", _hoisted_3$4, toDisplayString(index2 + 1), 1),
7413
7413
  createElementVNode("div", {
7414
7414
  class: "delete-item",
@@ -7835,9 +7835,8 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
7835
7835
  ...on2,
7836
7836
  ...bindValue
7837
7837
  };
7838
- console.log(compAttr);
7839
7838
  const handleInput = (e) => {
7840
- compAttr.onInputEvent(e);
7839
+ (compAttr == null ? void 0 : compAttr.onInputEvent) && compAttr.onInputEvent(e);
7841
7840
  };
7842
7841
  if (!renderComponentContent) {
7843
7842
  return createVNode(Comp, mergeProps(compAttr, {
@@ -14297,14 +14296,16 @@ const _sfc_main$q = defineComponent({
14297
14296
  setup() {
14298
14297
  const { isVisibleAdvancedSearch, closeGlobalSearch } = useTableContext();
14299
14298
  const handleIconClick = () => {
14300
- isVisibleAdvancedSearch.value = !isVisibleAdvancedSearch.value;
14301
- closeGlobalSearch();
14299
+ nextTick(() => {
14300
+ isVisibleAdvancedSearch.value = !isVisibleAdvancedSearch.value;
14301
+ closeGlobalSearch();
14302
+ });
14302
14303
  };
14303
14304
  return { isVisibleAdvancedSearch, handleIconClick };
14304
14305
  }
14305
14306
  });
14306
- const AdvancedSearchSetting_vue_vue_type_style_index_0_scoped_851e809a_lang = "";
14307
- const _withScopeId$1 = (n) => (pushScopeId("data-v-851e809a"), n = n(), popScopeId(), n);
14307
+ const AdvancedSearchSetting_vue_vue_type_style_index_0_scoped_f74ee46a_lang = "";
14308
+ const _withScopeId$1 = (n) => (pushScopeId("data-v-f74ee46a"), n = n(), popScopeId(), n);
14308
14309
  const _hoisted_1$f = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("span", null, "高级搜索", -1));
14309
14310
  function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
14310
14311
  const _component_FilterOutlined = resolveComponent("FilterOutlined");
@@ -14322,7 +14323,7 @@ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
14322
14323
  _: 1
14323
14324
  });
14324
14325
  }
14325
- const AdvancedSearchSetting = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$h], ["__scopeId", "data-v-851e809a"]]);
14326
+ const AdvancedSearchSetting = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$h], ["__scopeId", "data-v-f74ee46a"]]);
14326
14327
  const index$2 = "";
14327
14328
  const searchType = [
14328
14329
  {
@@ -14409,20 +14410,19 @@ const getGlobalAdvancedType = (fieldList, value) => {
14409
14410
  temp.gexpr = fieldList.join("|");
14410
14411
  return temp;
14411
14412
  };
14412
- const _hoisted_1$e = { class: "shy-ui-advanced-search" };
14413
- const _hoisted_2$7 = { class: "shy-ui-advanced-search-add" };
14414
- const _hoisted_3$3 = { class: "shy-ui-advanced-search-item-wrapper" };
14415
- const _hoisted_4$1 = {
14413
+ const _hoisted_1$e = { class: "shy-ui-advanced-search-add" };
14414
+ const _hoisted_2$6 = { class: "shy-ui-advanced-search-item-wrapper" };
14415
+ const _hoisted_3$3 = {
14416
14416
  key: 0,
14417
14417
  class: "shy-ui-advanced-search-item-value-range"
14418
14418
  };
14419
- const _hoisted_5$1 = /* @__PURE__ */ createElementVNode("div", { style: { "flex": "0", "width": "40px", "margin-right": "8px" } }, " 至 ", -1);
14420
- const _hoisted_6$1 = {
14419
+ const _hoisted_4$1 = /* @__PURE__ */ createElementVNode("div", { style: { "flex": "0", "width": "40px", "margin-right": "8px" } }, " 至 ", -1);
14420
+ const _hoisted_5$1 = {
14421
14421
  key: 0,
14422
14422
  class: "shy-ui-advanced-search-item-value-range"
14423
14423
  };
14424
- const _hoisted_7 = /* @__PURE__ */ createElementVNode("div", { style: { "flex": "0", "width": "40px", "margin-right": "8px" } }, " 至 ", -1);
14425
- const _hoisted_8 = ["onClick"];
14424
+ const _hoisted_6 = /* @__PURE__ */ createElementVNode("div", { style: { "flex": "0", "width": "40px", "margin-right": "8px" } }, " 至 ", -1);
14425
+ const _hoisted_7 = ["onClick"];
14426
14426
  const _sfc_main$p = /* @__PURE__ */ defineComponent({
14427
14427
  __name: "AdvancedSearch",
14428
14428
  props: {
@@ -14444,6 +14444,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
14444
14444
  setup(__props, { expose }) {
14445
14445
  const props2 = __props;
14446
14446
  reactive({});
14447
+ const advancedSearchRef = ref();
14447
14448
  const formRef = ref();
14448
14449
  const schemasCurrent = reactive([]);
14449
14450
  if (props2.schemas.length !== 0)
@@ -14538,11 +14539,16 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
14538
14539
  };
14539
14540
  expose({
14540
14541
  getSearchFrom,
14541
- resetFields
14542
+ resetFields,
14543
+ advancedSearchRef
14542
14544
  });
14543
14545
  return (_ctx, _cache) => {
14544
- return openBlock(), createElementBlock("div", _hoisted_1$e, [
14545
- createElementVNode("div", _hoisted_2$7, [
14546
+ return openBlock(), createElementBlock("div", {
14547
+ class: "shy-ui-advanced-search",
14548
+ ref_key: "advancedSearchRef",
14549
+ ref: advancedSearchRef
14550
+ }, [
14551
+ createElementVNode("div", _hoisted_1$e, [
14546
14552
  createVNode(unref(PlusCircleOutlined$1)),
14547
14553
  createElementVNode("div", {
14548
14554
  style: { "margin-left": "8px" },
@@ -14560,7 +14566,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
14560
14566
  (openBlock(true), createElementBlock(Fragment, null, renderList(schemasCurrent, (schema, index2) => {
14561
14567
  return openBlock(), createBlock(unref(Col), normalizeProps(mergeProps({ key: index2 }, (schema == null ? void 0 : schema.colProps) || { span: 24 })), {
14562
14568
  default: withCtx(() => [
14563
- createElementVNode("div", _hoisted_3$3, [
14569
+ createElementVNode("div", _hoisted_2$6, [
14564
14570
  createVNode(unref(FormItem), {
14565
14571
  class: "shy-ui-advanced-search-item-op",
14566
14572
  name: `${schema.field}-op`
@@ -14597,7 +14603,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
14597
14603
  createVNode(unref(FormItem), { class: "shy-ui-advanced-search-item-value" }, {
14598
14604
  default: withCtx(() => [
14599
14605
  getTypeByField(schema == null ? void 0 : schema.field) === "number" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
14600
- schema.op === "bt" ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
14606
+ schema.op === "bt" ? (openBlock(), createElementBlock("div", _hoisted_3$3, [
14601
14607
  createVNode(unref(FormItem), null, {
14602
14608
  default: withCtx(() => [
14603
14609
  createVNode(unref(InputNumber), {
@@ -14608,7 +14614,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
14608
14614
  ]),
14609
14615
  _: 2
14610
14616
  }, 1024),
14611
- _hoisted_5$1,
14617
+ _hoisted_4$1,
14612
14618
  createVNode(unref(FormItem), null, {
14613
14619
  default: withCtx(() => [
14614
14620
  createVNode(unref(InputNumber), {
@@ -14627,7 +14633,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
14627
14633
  valueModifiers: { number: true }
14628
14634
  }, null, 8, ["value", "onUpdate:value"]))
14629
14635
  ], 64)) : getTypeByField(schema == null ? void 0 : schema.field) === "date" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
14630
- schema.op === "bt" ? (openBlock(), createElementBlock("div", _hoisted_6$1, [
14636
+ schema.op === "bt" ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
14631
14637
  createVNode(unref(FormItem), null, {
14632
14638
  default: withCtx(() => [
14633
14639
  createVNode(unref(DatePicker), {
@@ -14639,7 +14645,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
14639
14645
  ]),
14640
14646
  _: 2
14641
14647
  }, 1024),
14642
- _hoisted_7,
14648
+ _hoisted_6,
14643
14649
  createVNode(unref(FormItem), null, {
14644
14650
  default: withCtx(() => [
14645
14651
  createVNode(unref(DatePicker), {
@@ -14686,7 +14692,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
14686
14692
  onClick: ($event) => handleMinus(index2)
14687
14693
  }, [
14688
14694
  createVNode(unref(MinusCircleTwoTone$1))
14689
- ], 8, _hoisted_8)) : createCommentVNode("", true)
14695
+ ], 8, _hoisted_7)) : createCommentVNode("", true)
14690
14696
  ])
14691
14697
  ]),
14692
14698
  _: 2
@@ -14698,7 +14704,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
14698
14704
  ]),
14699
14705
  _: 1
14700
14706
  }, 8, ["model"])
14701
- ]);
14707
+ ], 512);
14702
14708
  };
14703
14709
  }
14704
14710
  });
@@ -14875,7 +14881,7 @@ const _sfc_main$m = defineComponent({
14875
14881
  });
14876
14882
  const TableHeader_vue_vue_type_style_index_0_lang = "";
14877
14883
  const _hoisted_1$c = { style: { "width": "100%" } };
14878
- const _hoisted_2$6 = {
14884
+ const _hoisted_2$5 = {
14879
14885
  key: 0,
14880
14886
  style: { "margin": "5px" }
14881
14887
  };
@@ -14883,7 +14889,7 @@ const _hoisted_3$2 = { class: "flex items-center" };
14883
14889
  function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
14884
14890
  const _component_TableSetting = resolveComponent("TableSetting");
14885
14891
  return openBlock(), createElementBlock("div", _hoisted_1$c, [
14886
- _ctx.$slots.headerTop ? (openBlock(), createElementBlock("div", _hoisted_2$6, [
14892
+ _ctx.$slots.headerTop ? (openBlock(), createElementBlock("div", _hoisted_2$5, [
14887
14893
  renderSlot(_ctx.$slots, "headerTop")
14888
14894
  ])) : createCommentVNode("", true),
14889
14895
  createElementVNode("div", _hoisted_3$2, [
@@ -15417,6 +15423,15 @@ const _sfc_main$k = defineComponent({
15417
15423
  emits: ["ensure"],
15418
15424
  setup(props2, { emit }) {
15419
15425
  const advancedSearchRef = ref();
15426
+ const table2 = useTableContext();
15427
+ const setStyle2 = () => {
15428
+ const dom = document.querySelector(".table-settings");
15429
+ if (dom) {
15430
+ return { left: `${dom.offsetLeft - 370}px` };
15431
+ } else {
15432
+ return {};
15433
+ }
15434
+ };
15420
15435
  const handleEnsure = () => {
15421
15436
  const form = advancedSearchRef.value.getSearchFrom();
15422
15437
  emit("ensure", form);
@@ -15424,21 +15439,44 @@ const _sfc_main$k = defineComponent({
15424
15439
  const handleReset = () => {
15425
15440
  advancedSearchRef.value.resetFields();
15426
15441
  };
15427
- return { handleEnsure, handleReset, advancedSearchRef };
15442
+ const tableAdvancedSearchWrapperRef = ref();
15443
+ const clickOutside = (e) => {
15444
+ if (document.querySelector(".table-settings").contains(e.target))
15445
+ return;
15446
+ if (tableAdvancedSearchWrapperRef.value.contains(e.target))
15447
+ return;
15448
+ table2.closeAdvancedSearch();
15449
+ };
15450
+ onMounted(() => {
15451
+ document.addEventListener("click", clickOutside);
15452
+ });
15453
+ onUnmounted(() => {
15454
+ document.removeEventListener("click", clickOutside);
15455
+ });
15456
+ return {
15457
+ handleEnsure,
15458
+ handleReset,
15459
+ advancedSearchRef,
15460
+ setStyle: setStyle2,
15461
+ tableAdvancedSearchWrapperRef
15462
+ };
15428
15463
  }
15429
15464
  });
15430
- const _hoisted_1$b = { class: "shy-basic-table-advanced-search" };
15431
- const _hoisted_2$5 = { class: "shy-basic-table-advanced-search-footer" };
15465
+ const _hoisted_1$b = { class: "shy-basic-table-advanced-search-footer" };
15432
15466
  function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
15433
15467
  const _component_AdvancedSearch = resolveComponent("AdvancedSearch");
15434
15468
  const _component_BasicButton = resolveComponent("BasicButton");
15435
15469
  const _component_Space = resolveComponent("Space");
15436
- return openBlock(), createElementBlock("div", _hoisted_1$b, [
15470
+ return openBlock(), createElementBlock("div", {
15471
+ class: "shy-basic-table-advanced-search",
15472
+ ref: "tableAdvancedSearchWrapperRef",
15473
+ style: normalizeStyle(_ctx.setStyle())
15474
+ }, [
15437
15475
  createVNode(_component_AdvancedSearch, {
15438
15476
  ref: "advancedSearchRef",
15439
15477
  schemas: _ctx.schemasAdvancedSearch
15440
15478
  }, null, 8, ["schemas"]),
15441
- createElementVNode("div", _hoisted_2$5, [
15479
+ createElementVNode("div", _hoisted_1$b, [
15442
15480
  createVNode(_component_Space, null, {
15443
15481
  default: withCtx(() => [
15444
15482
  createVNode(_component_BasicButton, {
@@ -15460,7 +15498,7 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
15460
15498
  _: 1
15461
15499
  })
15462
15500
  ])
15463
- ]);
15501
+ ], 4);
15464
15502
  }
15465
15503
  const TableAdvancedSearch = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$d]]);
15466
15504
  const _sfc_main$j = defineComponent({
@@ -15525,45 +15563,72 @@ const _sfc_main$j = defineComponent({
15525
15563
  const handleReset = () => {
15526
15564
  advancedSearchRef.value.resetFields();
15527
15565
  };
15566
+ const setStyle2 = () => {
15567
+ const dom = document.querySelector(".table-settings");
15568
+ if (dom) {
15569
+ return { left: `${dom.offsetLeft}px` };
15570
+ } else {
15571
+ return {};
15572
+ }
15573
+ };
15574
+ const globalSearchWrapperRef = ref();
15575
+ const clickOutside = (e) => {
15576
+ if (document.querySelector(".table-settings").contains(e.target))
15577
+ return;
15578
+ if (globalSearchWrapperRef.value.contains(e.target))
15579
+ return;
15580
+ table2.closeGlobalSearch();
15581
+ };
15582
+ onMounted(() => {
15583
+ document.addEventListener("click", clickOutside);
15584
+ });
15585
+ onUnmounted(() => {
15586
+ document.removeEventListener("click", clickOutside);
15587
+ });
15528
15588
  return {
15529
15589
  handleReset,
15530
15590
  advancedSearchRef,
15531
15591
  fieldList,
15532
15592
  curSelected,
15533
15593
  handleSelectedClick,
15534
- handleCheckboxChange
15594
+ handleCheckboxChange,
15595
+ setStyle: setStyle2,
15596
+ globalSearchWrapperRef
15535
15597
  };
15536
15598
  }
15537
15599
  });
15538
- const TableGlobalSearch_vue_vue_type_style_index_0_scoped_fa3d98b2_lang = "";
15539
- const _withScopeId = (n) => (pushScopeId("data-v-fa3d98b2"), n = n(), popScopeId(), n);
15540
- const _hoisted_1$a = { class: "shy-basic-table-global-search" };
15541
- const _hoisted_2$4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", null, "搜索全部", -1));
15542
- const _hoisted_3$1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", null, "搜索特定字段", -1));
15543
- const _hoisted_4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", null, null, -1));
15544
- const _hoisted_5 = { class: "shy-basic-table-global-search-checkbox-wrapper" };
15545
- const _hoisted_6 = { style: { "color": "#131415", "font-size": "12px" } };
15600
+ const TableGlobalSearch_vue_vue_type_style_index_0_scoped_46f4dcdc_lang = "";
15601
+ const _withScopeId = (n) => (pushScopeId("data-v-46f4dcdc"), n = n(), popScopeId(), n);
15602
+ const _hoisted_1$a = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", null, "搜索全部", -1));
15603
+ const _hoisted_2$4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", null, "搜索特定字段", -1));
15604
+ const _hoisted_3$1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", null, null, -1));
15605
+ const _hoisted_4 = { class: "shy-basic-table-global-search-checkbox-wrapper" };
15606
+ const _hoisted_5 = { style: { "color": "#131415", "font-size": "12px" } };
15546
15607
  function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
15547
15608
  const _component_CheckOutlined = resolveComponent("CheckOutlined");
15548
15609
  const _component_Checkbox = resolveComponent("Checkbox");
15549
15610
  const _component_CheckboxGroup = resolveComponent("CheckboxGroup");
15550
- return openBlock(), createElementBlock("div", _hoisted_1$a, [
15611
+ return openBlock(), createElementBlock("div", {
15612
+ class: "shy-basic-table-global-search",
15613
+ style: normalizeStyle(_ctx.setStyle()),
15614
+ ref: "globalSearchWrapperRef"
15615
+ }, [
15551
15616
  createElementVNode("div", {
15552
15617
  class: normalizeClass(["shy-basic-table-global-search-item-global", { "selected-bg": _ctx.curSelected === 1 }]),
15553
15618
  onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handleSelectedClick(1))
15554
15619
  }, [
15555
- _hoisted_2$4,
15620
+ _hoisted_1$a,
15556
15621
  _ctx.curSelected === 1 ? (openBlock(), createBlock(_component_CheckOutlined, { key: 0 })) : createCommentVNode("", true)
15557
15622
  ], 2),
15558
15623
  createElementVNode("div", {
15559
15624
  class: normalizeClass(["shy-basic-table-global-search-item-special", { "selected-bg": _ctx.curSelected === 2 }]),
15560
15625
  onClick: _cache[1] || (_cache[1] = ($event) => _ctx.handleSelectedClick(2))
15561
15626
  }, [
15562
- _hoisted_3$1,
15627
+ _hoisted_2$4,
15563
15628
  _ctx.curSelected === 2 ? (openBlock(), createBlock(_component_CheckOutlined, { key: 0 })) : createCommentVNode("", true)
15564
15629
  ], 2),
15565
- _hoisted_4,
15566
- createElementVNode("div", _hoisted_5, [
15630
+ _hoisted_3$1,
15631
+ createElementVNode("div", _hoisted_4, [
15567
15632
  createVNode(_component_CheckboxGroup, {
15568
15633
  value: _ctx.fieldList,
15569
15634
  "onUpdate:value": _cache[2] || (_cache[2] = ($event) => _ctx.fieldList = $event),
@@ -15579,7 +15644,7 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
15579
15644
  value: item.field
15580
15645
  }, {
15581
15646
  default: withCtx(() => [
15582
- createElementVNode("span", _hoisted_6, toDisplayString(item.label), 1)
15647
+ createElementVNode("span", _hoisted_5, toDisplayString(item.label), 1)
15583
15648
  ]),
15584
15649
  _: 2
15585
15650
  }, 1032, ["value"])
@@ -15589,9 +15654,9 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
15589
15654
  _: 1
15590
15655
  }, 8, ["value", "onChange"])
15591
15656
  ])
15592
- ]);
15657
+ ], 4);
15593
15658
  }
15594
- const TableGlobalSearch = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$c], ["__scopeId", "data-v-fa3d98b2"]]);
15659
+ const TableGlobalSearch = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$c], ["__scopeId", "data-v-46f4dcdc"]]);
15595
15660
  const _sfc_main$i = defineComponent({
15596
15661
  components: {
15597
15662
  TableAdvancedSearch,
package/es/style.css CHANGED
@@ -25412,7 +25412,7 @@ span.iconify {
25412
25412
  }
25413
25413
  .shy-basic-column-setting__cloumn-list .scrollbar {
25414
25414
  height: 220px;
25415
- }.icon-selected[data-v-851e809a] {
25415
+ }.icon-selected[data-v-f74ee46a] {
25416
25416
  color: #498bf8;
25417
25417
  }.shy-ui-advanced-search .ant-form-item {
25418
25418
  margin-bottom: 0;
@@ -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-fa3d98b2] {
25485
+ }.shy-basic-table-global-search[data-v-46f4dcdc] {
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-fa3d98b2] {
25497
+ .shy-basic-table-global-search-item-global[data-v-46f4dcdc] {
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-fa3d98b2] {
25508
+ .shy-basic-table-global-search-item-special[data-v-46f4dcdc] {
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-fa3d98b2] {
25519
+ .shy-basic-table-global-search-checkbox-wrapper[data-v-46f4dcdc] {
25520
25520
  padding: 0 8px;
25521
25521
  }
25522
- .shy-basic-table-global-search .selected-bg[data-v-fa3d98b2] {
25522
+ .shy-basic-table-global-search .selected-bg[data-v-46f4dcdc] {
25523
25523
  background-color: #ebf1ff;
25524
25524
  }.shy-basic-table-action {
25525
25525
  display: flex;
@@ -25583,16 +25583,18 @@ span.iconify {
25583
25583
  }
25584
25584
  .shy-basic-table-advanced-search {
25585
25585
  position: absolute;
25586
- top: 30px;
25587
- right: 100px;
25586
+ top: 40px;
25587
+ right: 106px;
25588
25588
  width: 600px;
25589
- max-height: 800px;
25590
- overflow: auto;
25591
25589
  z-index: 100;
25592
25590
  background-color: #fff;
25593
25591
  border: 1px solid #ebebeb;
25594
25592
  padding: 10px 10px 42px 10px;
25595
25593
  }
25594
+ .shy-basic-table-advanced-search .shy-ui-advanced-search {
25595
+ max-height: 500px;
25596
+ overflow: auto;
25597
+ }
25596
25598
  .shy-basic-table-advanced-search-footer {
25597
25599
  position: absolute;
25598
25600
  left: 10px;
@@ -7,6 +7,12 @@ declare const _sfc_main: import("vue").DefineComponent<{
7
7
  handleEnsure: () => void;
8
8
  handleReset: () => void;
9
9
  advancedSearchRef: import("vue").Ref<any>;
10
+ setStyle: () => {
11
+ left: string;
12
+ } | {
13
+ left?: undefined;
14
+ };
15
+ tableAdvancedSearchWrapperRef: import("vue").Ref<any>;
10
16
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "ensure"[], "ensure", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
11
17
  schemasAdvancedSearch: {
12
18
  default: () => any[];
package/lib/index.js CHANGED
@@ -5592,7 +5592,7 @@ const _sfc_main$V = vue.defineComponent({
5592
5592
  }
5593
5593
  });
5594
5594
  const _hoisted_1$m = { key: "component" };
5595
- const _hoisted_2$a = { key: "skeleton" };
5595
+ const _hoisted_2$9 = { key: "skeleton" };
5596
5596
  function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
5597
5597
  const _component_Skeleton = vue.resolveComponent("Skeleton");
5598
5598
  return vue.openBlock(), vue.createBlock(vue.TransitionGroup, vue.mergeProps({ class: "h-full w-full" }, _ctx.$attrs, {
@@ -5604,7 +5604,7 @@ function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
5604
5604
  default: vue.withCtx(() => [
5605
5605
  _ctx.isInit ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$m, [
5606
5606
  vue.renderSlot(_ctx.$slots, "default", { loading: _ctx.loading })
5607
- ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$a, [
5607
+ ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$9, [
5608
5608
  _ctx.$slots.skeleton ? vue.renderSlot(_ctx.$slots, "skeleton", { key: 0 }) : (vue.openBlock(), vue.createBlock(_component_Skeleton, { key: 1 }))
5609
5609
  ]))
5610
5610
  ]),
@@ -6958,14 +6958,14 @@ function useTransition(source, options = {}) {
6958
6958
  });
6959
6959
  }
6960
6960
  const _hoisted_1$l = { class: "flex justify-between" };
6961
- const _hoisted_2$9 = { key: 0 };
6961
+ const _hoisted_2$8 = { key: 0 };
6962
6962
  const _hoisted_3$5 = { class: "flex flex-wrap px-2" };
6963
6963
  const _hoisted_4$3 = ["onClick", "title"];
6964
6964
  const _hoisted_5$2 = {
6965
6965
  key: 0,
6966
6966
  class: "flex py-2 items-center justify-center"
6967
6967
  };
6968
- const _hoisted_6$2 = {
6968
+ const _hoisted_6$1 = {
6969
6969
  key: 1,
6970
6970
  class: "p-5"
6971
6971
  };
@@ -7074,7 +7074,7 @@ const _sfc_main$U = /* @__PURE__ */ vue.defineComponent({
7074
7074
  ])
7075
7075
  ]),
7076
7076
  content: vue.withCtx(() => [
7077
- vue.unref(getPaginationList).length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$9, [
7077
+ vue.unref(getPaginationList).length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$8, [
7078
7078
  vue.createVNode(vue.unref(ScrollContainer$1), { class: "border border-solid border-t-0" }, {
7079
7079
  default: vue.withCtx(() => [
7080
7080
  vue.createElementVNode("ul", _hoisted_3$5, [
@@ -7107,7 +7107,7 @@ const _sfc_main$U = /* @__PURE__ */ vue.defineComponent({
7107
7107
  onChange: handlePageChange
7108
7108
  }, null, 8, ["pageSize", "total"])
7109
7109
  ])) : vue.createCommentVNode("", true)
7110
- ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$2, [
7110
+ ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$1, [
7111
7111
  vue.createVNode(vue.unref(AEmpty))
7112
7112
  ]))
7113
7113
  ]),
@@ -7275,7 +7275,7 @@ function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
7275
7275
  }
7276
7276
  const CountdownInput = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["render", _sfc_render$y]]);
7277
7277
  const _hoisted_1$k = { key: 0 };
7278
- const _hoisted_2$8 = {
7278
+ const _hoisted_2$7 = {
7279
7279
  key: 1,
7280
7280
  class: "delete-wrapper"
7281
7281
  };
@@ -7410,7 +7410,7 @@ const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
7410
7410
  }, 1032, ["rules", "name"])
7411
7411
  ]),
7412
7412
  _: 2
7413
- }, 1032, ["model"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$8, [
7413
+ }, 1032, ["model"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$7, [
7414
7414
  vue.createElementVNode("span", _hoisted_3$4, vue.toDisplayString(index2 + 1), 1),
7415
7415
  vue.createElementVNode("div", {
7416
7416
  class: "delete-item",
@@ -7837,9 +7837,8 @@ const _sfc_main$Q = /* @__PURE__ */ vue.defineComponent({
7837
7837
  ...on,
7838
7838
  ...bindValue
7839
7839
  };
7840
- console.log(compAttr);
7841
7840
  const handleInput = (e) => {
7842
- compAttr.onInputEvent(e);
7841
+ (compAttr == null ? void 0 : compAttr.onInputEvent) && compAttr.onInputEvent(e);
7843
7842
  };
7844
7843
  if (!renderComponentContent) {
7845
7844
  return vue.createVNode(Comp, vue.mergeProps(compAttr, {
@@ -14299,14 +14298,16 @@ const _sfc_main$q = vue.defineComponent({
14299
14298
  setup() {
14300
14299
  const { isVisibleAdvancedSearch, closeGlobalSearch } = useTableContext();
14301
14300
  const handleIconClick = () => {
14302
- isVisibleAdvancedSearch.value = !isVisibleAdvancedSearch.value;
14303
- closeGlobalSearch();
14301
+ vue.nextTick(() => {
14302
+ isVisibleAdvancedSearch.value = !isVisibleAdvancedSearch.value;
14303
+ closeGlobalSearch();
14304
+ });
14304
14305
  };
14305
14306
  return { isVisibleAdvancedSearch, handleIconClick };
14306
14307
  }
14307
14308
  });
14308
- const AdvancedSearchSetting_vue_vue_type_style_index_0_scoped_851e809a_lang = "";
14309
- const _withScopeId$1 = (n) => (vue.pushScopeId("data-v-851e809a"), n = n(), vue.popScopeId(), n);
14309
+ const AdvancedSearchSetting_vue_vue_type_style_index_0_scoped_f74ee46a_lang = "";
14310
+ const _withScopeId$1 = (n) => (vue.pushScopeId("data-v-f74ee46a"), n = n(), vue.popScopeId(), n);
14310
14311
  const _hoisted_1$f = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ vue.createElementVNode("span", null, "高级搜索", -1));
14311
14312
  function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
14312
14313
  const _component_FilterOutlined = vue.resolveComponent("FilterOutlined");
@@ -14324,7 +14325,7 @@ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
14324
14325
  _: 1
14325
14326
  });
14326
14327
  }
14327
- const AdvancedSearchSetting = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$h], ["__scopeId", "data-v-851e809a"]]);
14328
+ const AdvancedSearchSetting = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$h], ["__scopeId", "data-v-f74ee46a"]]);
14328
14329
  const index$2 = "";
14329
14330
  const searchType = [
14330
14331
  {
@@ -14411,20 +14412,19 @@ const getGlobalAdvancedType = (fieldList, value) => {
14411
14412
  temp.gexpr = fieldList.join("|");
14412
14413
  return temp;
14413
14414
  };
14414
- const _hoisted_1$e = { class: "shy-ui-advanced-search" };
14415
- const _hoisted_2$7 = { class: "shy-ui-advanced-search-add" };
14416
- const _hoisted_3$3 = { class: "shy-ui-advanced-search-item-wrapper" };
14417
- const _hoisted_4$1 = {
14415
+ const _hoisted_1$e = { class: "shy-ui-advanced-search-add" };
14416
+ const _hoisted_2$6 = { class: "shy-ui-advanced-search-item-wrapper" };
14417
+ const _hoisted_3$3 = {
14418
14418
  key: 0,
14419
14419
  class: "shy-ui-advanced-search-item-value-range"
14420
14420
  };
14421
- const _hoisted_5$1 = /* @__PURE__ */ vue.createElementVNode("div", { style: { "flex": "0", "width": "40px", "margin-right": "8px" } }, " 至 ", -1);
14422
- const _hoisted_6$1 = {
14421
+ const _hoisted_4$1 = /* @__PURE__ */ vue.createElementVNode("div", { style: { "flex": "0", "width": "40px", "margin-right": "8px" } }, " 至 ", -1);
14422
+ const _hoisted_5$1 = {
14423
14423
  key: 0,
14424
14424
  class: "shy-ui-advanced-search-item-value-range"
14425
14425
  };
14426
- const _hoisted_7 = /* @__PURE__ */ vue.createElementVNode("div", { style: { "flex": "0", "width": "40px", "margin-right": "8px" } }, " 至 ", -1);
14427
- const _hoisted_8 = ["onClick"];
14426
+ const _hoisted_6 = /* @__PURE__ */ vue.createElementVNode("div", { style: { "flex": "0", "width": "40px", "margin-right": "8px" } }, " 至 ", -1);
14427
+ const _hoisted_7 = ["onClick"];
14428
14428
  const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
14429
14429
  __name: "AdvancedSearch",
14430
14430
  props: {
@@ -14446,6 +14446,7 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
14446
14446
  setup(__props, { expose }) {
14447
14447
  const props2 = __props;
14448
14448
  vue.reactive({});
14449
+ const advancedSearchRef = vue.ref();
14449
14450
  const formRef = vue.ref();
14450
14451
  const schemasCurrent = vue.reactive([]);
14451
14452
  if (props2.schemas.length !== 0)
@@ -14540,11 +14541,16 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
14540
14541
  };
14541
14542
  expose({
14542
14543
  getSearchFrom,
14543
- resetFields
14544
+ resetFields,
14545
+ advancedSearchRef
14544
14546
  });
14545
14547
  return (_ctx, _cache) => {
14546
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$e, [
14547
- vue.createElementVNode("div", _hoisted_2$7, [
14548
+ return vue.openBlock(), vue.createElementBlock("div", {
14549
+ class: "shy-ui-advanced-search",
14550
+ ref_key: "advancedSearchRef",
14551
+ ref: advancedSearchRef
14552
+ }, [
14553
+ vue.createElementVNode("div", _hoisted_1$e, [
14548
14554
  vue.createVNode(vue.unref(PlusCircleOutlined$1)),
14549
14555
  vue.createElementVNode("div", {
14550
14556
  style: { "margin-left": "8px" },
@@ -14562,7 +14568,7 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
14562
14568
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(schemasCurrent, (schema, index2) => {
14563
14569
  return vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.Col), vue.normalizeProps(vue.mergeProps({ key: index2 }, (schema == null ? void 0 : schema.colProps) || { span: 24 })), {
14564
14570
  default: vue.withCtx(() => [
14565
- vue.createElementVNode("div", _hoisted_3$3, [
14571
+ vue.createElementVNode("div", _hoisted_2$6, [
14566
14572
  vue.createVNode(vue.unref(antDesignVue.FormItem), {
14567
14573
  class: "shy-ui-advanced-search-item-op",
14568
14574
  name: `${schema.field}-op`
@@ -14599,7 +14605,7 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
14599
14605
  vue.createVNode(vue.unref(antDesignVue.FormItem), { class: "shy-ui-advanced-search-item-value" }, {
14600
14606
  default: vue.withCtx(() => [
14601
14607
  getTypeByField(schema == null ? void 0 : schema.field) === "number" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
14602
- schema.op === "bt" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$1, [
14608
+ schema.op === "bt" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$3, [
14603
14609
  vue.createVNode(vue.unref(antDesignVue.FormItem), null, {
14604
14610
  default: vue.withCtx(() => [
14605
14611
  vue.createVNode(vue.unref(antDesignVue.InputNumber), {
@@ -14610,7 +14616,7 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
14610
14616
  ]),
14611
14617
  _: 2
14612
14618
  }, 1024),
14613
- _hoisted_5$1,
14619
+ _hoisted_4$1,
14614
14620
  vue.createVNode(vue.unref(antDesignVue.FormItem), null, {
14615
14621
  default: vue.withCtx(() => [
14616
14622
  vue.createVNode(vue.unref(antDesignVue.InputNumber), {
@@ -14629,7 +14635,7 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
14629
14635
  valueModifiers: { number: true }
14630
14636
  }, null, 8, ["value", "onUpdate:value"]))
14631
14637
  ], 64)) : getTypeByField(schema == null ? void 0 : schema.field) === "date" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
14632
- schema.op === "bt" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$1, [
14638
+ schema.op === "bt" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$1, [
14633
14639
  vue.createVNode(vue.unref(antDesignVue.FormItem), null, {
14634
14640
  default: vue.withCtx(() => [
14635
14641
  vue.createVNode(vue.unref(antDesignVue.DatePicker), {
@@ -14641,7 +14647,7 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
14641
14647
  ]),
14642
14648
  _: 2
14643
14649
  }, 1024),
14644
- _hoisted_7,
14650
+ _hoisted_6,
14645
14651
  vue.createVNode(vue.unref(antDesignVue.FormItem), null, {
14646
14652
  default: vue.withCtx(() => [
14647
14653
  vue.createVNode(vue.unref(antDesignVue.DatePicker), {
@@ -14688,7 +14694,7 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
14688
14694
  onClick: ($event) => handleMinus(index2)
14689
14695
  }, [
14690
14696
  vue.createVNode(vue.unref(MinusCircleTwoTone$1))
14691
- ], 8, _hoisted_8)) : vue.createCommentVNode("", true)
14697
+ ], 8, _hoisted_7)) : vue.createCommentVNode("", true)
14692
14698
  ])
14693
14699
  ]),
14694
14700
  _: 2
@@ -14700,7 +14706,7 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
14700
14706
  ]),
14701
14707
  _: 1
14702
14708
  }, 8, ["model"])
14703
- ]);
14709
+ ], 512);
14704
14710
  };
14705
14711
  }
14706
14712
  });
@@ -14877,7 +14883,7 @@ const _sfc_main$m = vue.defineComponent({
14877
14883
  });
14878
14884
  const TableHeader_vue_vue_type_style_index_0_lang = "";
14879
14885
  const _hoisted_1$c = { style: { "width": "100%" } };
14880
- const _hoisted_2$6 = {
14886
+ const _hoisted_2$5 = {
14881
14887
  key: 0,
14882
14888
  style: { "margin": "5px" }
14883
14889
  };
@@ -14885,7 +14891,7 @@ const _hoisted_3$2 = { class: "flex items-center" };
14885
14891
  function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
14886
14892
  const _component_TableSetting = vue.resolveComponent("TableSetting");
14887
14893
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$c, [
14888
- _ctx.$slots.headerTop ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$6, [
14894
+ _ctx.$slots.headerTop ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$5, [
14889
14895
  vue.renderSlot(_ctx.$slots, "headerTop")
14890
14896
  ])) : vue.createCommentVNode("", true),
14891
14897
  vue.createElementVNode("div", _hoisted_3$2, [
@@ -15419,6 +15425,15 @@ const _sfc_main$k = vue.defineComponent({
15419
15425
  emits: ["ensure"],
15420
15426
  setup(props2, { emit }) {
15421
15427
  const advancedSearchRef = vue.ref();
15428
+ const table2 = useTableContext();
15429
+ const setStyle2 = () => {
15430
+ const dom = document.querySelector(".table-settings");
15431
+ if (dom) {
15432
+ return { left: `${dom.offsetLeft - 370}px` };
15433
+ } else {
15434
+ return {};
15435
+ }
15436
+ };
15422
15437
  const handleEnsure = () => {
15423
15438
  const form = advancedSearchRef.value.getSearchFrom();
15424
15439
  emit("ensure", form);
@@ -15426,21 +15441,44 @@ const _sfc_main$k = vue.defineComponent({
15426
15441
  const handleReset = () => {
15427
15442
  advancedSearchRef.value.resetFields();
15428
15443
  };
15429
- return { handleEnsure, handleReset, advancedSearchRef };
15444
+ const tableAdvancedSearchWrapperRef = vue.ref();
15445
+ const clickOutside = (e) => {
15446
+ if (document.querySelector(".table-settings").contains(e.target))
15447
+ return;
15448
+ if (tableAdvancedSearchWrapperRef.value.contains(e.target))
15449
+ return;
15450
+ table2.closeAdvancedSearch();
15451
+ };
15452
+ vue.onMounted(() => {
15453
+ document.addEventListener("click", clickOutside);
15454
+ });
15455
+ vue.onUnmounted(() => {
15456
+ document.removeEventListener("click", clickOutside);
15457
+ });
15458
+ return {
15459
+ handleEnsure,
15460
+ handleReset,
15461
+ advancedSearchRef,
15462
+ setStyle: setStyle2,
15463
+ tableAdvancedSearchWrapperRef
15464
+ };
15430
15465
  }
15431
15466
  });
15432
- const _hoisted_1$b = { class: "shy-basic-table-advanced-search" };
15433
- const _hoisted_2$5 = { class: "shy-basic-table-advanced-search-footer" };
15467
+ const _hoisted_1$b = { class: "shy-basic-table-advanced-search-footer" };
15434
15468
  function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
15435
15469
  const _component_AdvancedSearch = vue.resolveComponent("AdvancedSearch");
15436
15470
  const _component_BasicButton = vue.resolveComponent("BasicButton");
15437
15471
  const _component_Space = vue.resolveComponent("Space");
15438
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$b, [
15472
+ return vue.openBlock(), vue.createElementBlock("div", {
15473
+ class: "shy-basic-table-advanced-search",
15474
+ ref: "tableAdvancedSearchWrapperRef",
15475
+ style: vue.normalizeStyle(_ctx.setStyle())
15476
+ }, [
15439
15477
  vue.createVNode(_component_AdvancedSearch, {
15440
15478
  ref: "advancedSearchRef",
15441
15479
  schemas: _ctx.schemasAdvancedSearch
15442
15480
  }, null, 8, ["schemas"]),
15443
- vue.createElementVNode("div", _hoisted_2$5, [
15481
+ vue.createElementVNode("div", _hoisted_1$b, [
15444
15482
  vue.createVNode(_component_Space, null, {
15445
15483
  default: vue.withCtx(() => [
15446
15484
  vue.createVNode(_component_BasicButton, {
@@ -15462,7 +15500,7 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
15462
15500
  _: 1
15463
15501
  })
15464
15502
  ])
15465
- ]);
15503
+ ], 4);
15466
15504
  }
15467
15505
  const TableAdvancedSearch = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$d]]);
15468
15506
  const _sfc_main$j = vue.defineComponent({
@@ -15527,45 +15565,72 @@ const _sfc_main$j = vue.defineComponent({
15527
15565
  const handleReset = () => {
15528
15566
  advancedSearchRef.value.resetFields();
15529
15567
  };
15568
+ const setStyle2 = () => {
15569
+ const dom = document.querySelector(".table-settings");
15570
+ if (dom) {
15571
+ return { left: `${dom.offsetLeft}px` };
15572
+ } else {
15573
+ return {};
15574
+ }
15575
+ };
15576
+ const globalSearchWrapperRef = vue.ref();
15577
+ const clickOutside = (e) => {
15578
+ if (document.querySelector(".table-settings").contains(e.target))
15579
+ return;
15580
+ if (globalSearchWrapperRef.value.contains(e.target))
15581
+ return;
15582
+ table2.closeGlobalSearch();
15583
+ };
15584
+ vue.onMounted(() => {
15585
+ document.addEventListener("click", clickOutside);
15586
+ });
15587
+ vue.onUnmounted(() => {
15588
+ document.removeEventListener("click", clickOutside);
15589
+ });
15530
15590
  return {
15531
15591
  handleReset,
15532
15592
  advancedSearchRef,
15533
15593
  fieldList,
15534
15594
  curSelected,
15535
15595
  handleSelectedClick,
15536
- handleCheckboxChange
15596
+ handleCheckboxChange,
15597
+ setStyle: setStyle2,
15598
+ globalSearchWrapperRef
15537
15599
  };
15538
15600
  }
15539
15601
  });
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);
15542
- const _hoisted_1$a = { class: "shy-basic-table-global-search" };
15543
- const _hoisted_2$4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", null, "搜索全部", -1));
15544
- const _hoisted_3$1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", null, "搜索特定字段", -1));
15545
- const _hoisted_4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", null, null, -1));
15546
- const _hoisted_5 = { class: "shy-basic-table-global-search-checkbox-wrapper" };
15547
- const _hoisted_6 = { style: { "color": "#131415", "font-size": "12px" } };
15602
+ const TableGlobalSearch_vue_vue_type_style_index_0_scoped_46f4dcdc_lang = "";
15603
+ const _withScopeId = (n) => (vue.pushScopeId("data-v-46f4dcdc"), n = n(), vue.popScopeId(), n);
15604
+ const _hoisted_1$a = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", null, "搜索全部", -1));
15605
+ const _hoisted_2$4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", null, "搜索特定字段", -1));
15606
+ const _hoisted_3$1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", null, null, -1));
15607
+ const _hoisted_4 = { class: "shy-basic-table-global-search-checkbox-wrapper" };
15608
+ const _hoisted_5 = { style: { "color": "#131415", "font-size": "12px" } };
15548
15609
  function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
15549
15610
  const _component_CheckOutlined = vue.resolveComponent("CheckOutlined");
15550
15611
  const _component_Checkbox = vue.resolveComponent("Checkbox");
15551
15612
  const _component_CheckboxGroup = vue.resolveComponent("CheckboxGroup");
15552
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [
15613
+ return vue.openBlock(), vue.createElementBlock("div", {
15614
+ class: "shy-basic-table-global-search",
15615
+ style: vue.normalizeStyle(_ctx.setStyle()),
15616
+ ref: "globalSearchWrapperRef"
15617
+ }, [
15553
15618
  vue.createElementVNode("div", {
15554
15619
  class: vue.normalizeClass(["shy-basic-table-global-search-item-global", { "selected-bg": _ctx.curSelected === 1 }]),
15555
15620
  onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handleSelectedClick(1))
15556
15621
  }, [
15557
- _hoisted_2$4,
15622
+ _hoisted_1$a,
15558
15623
  _ctx.curSelected === 1 ? (vue.openBlock(), vue.createBlock(_component_CheckOutlined, { key: 0 })) : vue.createCommentVNode("", true)
15559
15624
  ], 2),
15560
15625
  vue.createElementVNode("div", {
15561
15626
  class: vue.normalizeClass(["shy-basic-table-global-search-item-special", { "selected-bg": _ctx.curSelected === 2 }]),
15562
15627
  onClick: _cache[1] || (_cache[1] = ($event) => _ctx.handleSelectedClick(2))
15563
15628
  }, [
15564
- _hoisted_3$1,
15629
+ _hoisted_2$4,
15565
15630
  _ctx.curSelected === 2 ? (vue.openBlock(), vue.createBlock(_component_CheckOutlined, { key: 0 })) : vue.createCommentVNode("", true)
15566
15631
  ], 2),
15567
- _hoisted_4,
15568
- vue.createElementVNode("div", _hoisted_5, [
15632
+ _hoisted_3$1,
15633
+ vue.createElementVNode("div", _hoisted_4, [
15569
15634
  vue.createVNode(_component_CheckboxGroup, {
15570
15635
  value: _ctx.fieldList,
15571
15636
  "onUpdate:value": _cache[2] || (_cache[2] = ($event) => _ctx.fieldList = $event),
@@ -15581,7 +15646,7 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
15581
15646
  value: item.field
15582
15647
  }, {
15583
15648
  default: vue.withCtx(() => [
15584
- vue.createElementVNode("span", _hoisted_6, vue.toDisplayString(item.label), 1)
15649
+ vue.createElementVNode("span", _hoisted_5, vue.toDisplayString(item.label), 1)
15585
15650
  ]),
15586
15651
  _: 2
15587
15652
  }, 1032, ["value"])
@@ -15591,9 +15656,9 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
15591
15656
  _: 1
15592
15657
  }, 8, ["value", "onChange"])
15593
15658
  ])
15594
- ]);
15659
+ ], 4);
15595
15660
  }
15596
- const TableGlobalSearch = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$c], ["__scopeId", "data-v-fa3d98b2"]]);
15661
+ const TableGlobalSearch = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$c], ["__scopeId", "data-v-46f4dcdc"]]);
15597
15662
  const _sfc_main$i = vue.defineComponent({
15598
15663
  components: {
15599
15664
  TableAdvancedSearch,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "3h1-ui",
3
- "version": "2.9.6",
3
+ "version": "2.9.7",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",