@otwb/ui 2.0.26 → 2.0.27

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.
@@ -406,27 +406,28 @@ const DataCustom = /* @__PURE__ */ defineComponent({
406
406
  save: ""
407
407
  },
408
408
  setup(x, { emit: S }) {
409
- let { t: C } = useI18n(), w = useRoute$1();
410
- function T() {
409
+ let { t: C } = useI18n();
410
+ function w() {
411
+ let e = useRoute$1();
411
412
  if (x.showFixed) {
412
- w.name + "";
413
- let e = w.name + "__table";
413
+ e.name + "";
414
+ let b = e.name + "__table";
414
415
  $fetch.post(`${SERVER_CTX.SYS}/cli/module/custom-config/save`, {
415
- __table: localStorage.getItem(e),
416
- url: w.name
416
+ __table: localStorage.getItem(b),
417
+ url: e.name
417
418
  }, { requestType: "json" }).then((e) => {
418
419
  $msg.success("配置保存成功!");
419
420
  });
420
421
  } else S("save");
421
422
  }
422
- function E(e, b, C) {
423
+ function T(e, b, C) {
423
424
  S("custom", {
424
425
  key: e[x.keyField],
425
426
  [b]: C
426
427
  });
427
428
  }
428
- let D = ref();
429
- return watch(D, (e) => {
429
+ let E = ref();
430
+ return watch(E, (e) => {
430
431
  e.$el && Sortable.create(e.$el, {
431
432
  animation: 150,
432
433
  ghostClass: "ghost",
@@ -458,14 +459,14 @@ const DataCustom = /* @__PURE__ */ defineComponent({
458
459
  text: !0,
459
460
  type: "primary",
460
461
  size: "small",
461
- onClick: () => T()
462
+ onClick: () => w()
462
463
  }, { default: () => [createTextVNode("保存")] }), createVNode(NButton, {
463
464
  text: !0,
464
465
  type: "primary",
465
466
  size: "small",
466
467
  onClick: () => S("custom", !0)
467
468
  }, _isSlot$6(e = C("common.page.custom.reset")) ? e : { default: () => [e] })])] }), createVNode(NFlex, {
468
- ref: D,
469
+ ref: E,
469
470
  vertical: !0
470
471
  }, _isSlot$6(b = x.data.filter((e) => e[x.visiblityField] !== !1).map((e) => createVNode(DataCustomItem, {
471
472
  key: e[x.keyField],
@@ -473,8 +474,8 @@ const DataCustom = /* @__PURE__ */ defineComponent({
473
474
  hidden: e[x.hiddenField],
474
475
  fixed: e[x.fixedField],
475
476
  showFixed: x.showFixed,
476
- onUpdateHidden: (b) => E(e, "hidden", b),
477
- onUpdateFixed: (b) => E(e, "fixed", b)
477
+ onUpdateHidden: (b) => T(e, "hidden", b),
478
+ onUpdateFixed: (b) => T(e, "fixed", b)
478
479
  }, null))) ? b : { default: () => [b] })] });
479
480
  }
480
481
  });
@@ -750,69 +751,69 @@ const DataForm = /* @__PURE__ */ defineComponent({
750
751
  "collapse"
751
752
  ],
752
753
  setup(b, { expose: x, emit: S }) {
753
- let C = useRoute$1(), w = () => {
754
- let e = C.name + "__form";
755
- C.name + "", $fetch.post(`${SERVER_CTX.SYS}/cli/module/custom-config/save`, {
756
- __form: localStorage.getItem(e),
757
- url: C.name
754
+ let C = () => {
755
+ let e = useRoute$1(), b = e.name + "__form";
756
+ e.name + "", $fetch.post(`${SERVER_CTX.SYS}/cli/module/custom-config/save`, {
757
+ __form: localStorage.getItem(b),
758
+ url: e.name
758
759
  }, { requestType: "json" }).then((e) => {
759
760
  $msg.success("配置保存成功!");
760
761
  });
761
- }, { t: T } = useI18n(), E = (e) => {
762
+ }, { t: w } = useI18n(), T = (e) => {
762
763
  S("filter", b.model, e);
763
- }, D = (e) => {
764
+ }, E = (e) => {
764
765
  S("reset", e), b.filterOnReset && S("filter", b.model, e);
765
- }, k = ref(b.defaultCollapsed), A = (e) => {
766
- k.value = e;
766
+ }, D = ref(b.defaultCollapsed), k = (e) => {
767
+ D.value = e;
767
768
  };
768
- x({ collapse: A });
769
- let j = reactive({
769
+ x({ collapse: k });
770
+ let A = reactive({
770
771
  span: 6,
771
772
  suffix: !0
772
773
  });
773
774
  return () => {
774
- let { filterOnReset: e, filterText: x, resetText: C, customizable: N, defaultCollapsed: P, collapsible: F, grid: I,...L } = b;
775
+ let { filterOnReset: e, filterText: x, resetText: j, customizable: N, defaultCollapsed: P, collapsible: F, grid: I,...L } = b;
775
776
  return createVNode(DataForm, mergeProps({ grid: {
776
777
  cols: "12 768:18 1200:30 1536:30",
777
778
  yGap: 16,
778
779
  xGap: 12,
779
780
  ...I,
780
- collapsed: k.value
781
+ collapsed: D.value
781
782
  } }, L, {
782
783
  showFeedback: !1,
783
- showAction: j,
784
- onSubmit: E,
785
- onReset: D
786
- }), { action: ({ cols: e, spans: E }) => (j.suffix = e < E + j.span, createVNode(NFlex, {
787
- justify: j.suffix ? "end" : "start",
784
+ showAction: A,
785
+ onSubmit: T,
786
+ onReset: E
787
+ }), { action: ({ cols: e, spans: T }) => (A.suffix = e < T + A.span, createVNode(NFlex, {
788
+ justify: A.suffix ? "end" : "start",
788
789
  align: "center"
789
790
  }, { default: () => [
790
- F && j.suffix ? createVNode(NButton, {
791
+ F && A.suffix ? createVNode(NButton, {
791
792
  class: "collapsedBtn",
792
793
  text: !0,
793
794
  type: "primary",
794
795
  iconPlacement: "right",
795
- renderIcon: k.value ? IDown : IUp,
796
- onClick: () => A(!k.value)
797
- }, { default: () => [k.value ? T("common.page.filter.expand") : T("common.page.filter.collapse")] }) : void 0,
798
- j.suffix ? void 0 : createVNode("span", null, [createTextVNode("\xA0\xA0\xA0\xA0")]),
796
+ renderIcon: D.value ? IDown : IUp,
797
+ onClick: () => k(!D.value)
798
+ }, { default: () => [D.value ? w("common.page.filter.expand") : w("common.page.filter.collapse")] }) : void 0,
799
+ A.suffix ? void 0 : createVNode("span", null, [createTextVNode("\xA0\xA0\xA0\xA0")]),
799
800
  createVNode(NButton, {
800
801
  class: "submitWrap",
801
802
  attrType: "submit",
802
803
  type: "primary",
803
804
  disabled: b.disabled,
804
805
  loading: b.loading
805
- }, { default: () => [x || T("common.page.filter.submitText")] }),
806
+ }, { default: () => [x || w("common.page.filter.submitText")] }),
806
807
  createVNode(NButton, {
807
808
  attrType: "reset",
808
809
  disabled: b.disabled || b.loading
809
- }, { default: () => [C || T("common.page.form.resetText")] }),
810
+ }, { default: () => [j || w("common.page.form.resetText")] }),
810
811
  N ? createVNode(DataCustom, {
811
812
  isFilter: !0,
812
813
  keyField: "name",
813
814
  showFixed: !1,
814
815
  data: L.items,
815
- onSave: w,
816
+ onSave: C,
816
817
  onCustom: (e) => S("custom", e),
817
818
  size: 16,
818
819
  type: "primary"
@@ -1,5 +1,5 @@
1
1
  import "./use-i18n-Dx7V4KrY.js";
2
2
  import "./directives-CRvPGywW.js";
3
3
  import "./use-style-DcT-1dj4.js";
4
- import { a as NRadios, c as DataSelection, d as useLocaleEdit, f as DataFilter, g as NCheckboxes, h as DataActions, i as renderUsers, l as DataPagination, m as DataCustom, n as DtUserDept, o as DataTable, p as DataForm, r as DtUserRender, s as useDataTableDrag, t as DtDeptRender, u as DataLocaleInput } from "./components-C6Mef5JA.js";
4
+ import { a as NRadios, c as DataSelection, d as useLocaleEdit, f as DataFilter, g as NCheckboxes, h as DataActions, i as renderUsers, l as DataPagination, m as DataCustom, n as DtUserDept, o as DataTable, p as DataForm, r as DtUserRender, s as useDataTableDrag, t as DtDeptRender, u as DataLocaleInput } from "./components-fVJ6Vk1p.js";
5
5
  export { DataActions, DataCustom, DataFilter, DataForm, DataLocaleInput, DataPagination, DataSelection, DataTable, DtDeptRender, DtUserDept, DtUserRender, NCheckboxes, NRadios, renderUsers, useDataTableDrag, useLocaleEdit };
package/dist/page.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { n as useI18n } from "./use-i18n-Dx7V4KrY.js";
2
2
  import "./directives-CRvPGywW.js";
3
3
  import "./use-style-DcT-1dj4.js";
4
- import { a as NRadios, g as NCheckboxes, n as DtUserDept, p as DataForm, r as DtUserRender, t as DtDeptRender } from "./components-C6Mef5JA.js";
4
+ import { a as NRadios, g as NCheckboxes, n as DtUserDept, p as DataForm, r as DtUserRender, t as DtDeptRender } from "./components-fVJ6Vk1p.js";
5
5
  import { computed, createVNode, defineComponent, h, isVNode, mergeProps, nextTick, ref, shallowRef, unref } from "vue";
6
6
  import { until } from "@vueuse/core";
7
7
  import { NButton, NCheckbox, NColorPicker, NDatePicker, NDrawer, NDrawerContent, NFlex, NInput, NInputNumber, NModal, NScrollbar, NSelect, NText, NUpload, useMessage } from "ithinkdt-ui";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@otwb/ui",
3
- "version": "2.0.26",
3
+ "version": "2.0.27",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "otwb UI",