@otwb/ui 2.0.34 → 2.0.35

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.
@@ -3,7 +3,7 @@ import { i as vTooltip } from "./directives-CRvPGywW.js";
3
3
  import { g as useStyle, h as useMergedClsPrefix, n as cB, r as cE, t as c } from "./use-style-DcT-1dj4.js";
4
4
  import { Fragment, computed, createTextVNode, createVNode, defineComponent, inject, isVNode, mergeProps, nextTick, reactive, ref, shallowRef, toRaw, toRef, toValue, unref, useTemplateRef, watch, withDirectives } from "vue";
5
5
  import { toReactive, unrefElement, until, useCurrentElement, useElementSize, watchDebounced } from "@vueuse/core";
6
- import { NAvatar, NAvatarGroup, NButton, NCard, NCheckbox, NCheckboxGroup, NDataTable, NDropdown, NEllipsis, NEmpty, NFlex, NForm, NFormItem, NGi, NGrid, NH4, NIcon, NInput, NList, NListItem, NPagination, NPerformantEllipsis, NPopover, NRadio, NRadioButton, NRadioGroup, NSelect, NSpin, NTag, NText, NTooltip, NTransfer, NTree, NTreeSelect, dataTableProps, formProps, useDialog } from "ithinkdt-ui";
6
+ import { NAvatar, NAvatarGroup, NButton, NCard, NCheckbox, NCheckboxGroup, NDataTable, NDropdown, NEllipsis, NEmpty, NFlex, NForm, NFormItem, NGi, NGrid, NH4, NIcon, NInput, NList, NListItem, NPagination, NPerformantEllipsis, NPopover, NRadio, NRadioButton, NRadioGroup, NSelect, NSpin, NTag, NText, NTooltip, NTransfer, NTree, NTreeSelect, dataTableProps, formProps, useDialog, useMessage } from "ithinkdt-ui";
7
7
  import { useRoute } from "vue-router";
8
8
  import { VOverflow, VResizeObserver } from "vueuc";
9
9
  import { Sortable } from "sortablejs/modular/sortable.core.esm.js";
@@ -407,8 +407,8 @@ const DataCustom = /* @__PURE__ */ defineComponent({
407
407
  save: ""
408
408
  },
409
409
  setup(x, { emit: S }) {
410
- let { t: C } = useI18n(), w = useRoute();
411
- function T() {
410
+ let { t: C } = useI18n(), w = useRoute(), T = useMessage();
411
+ function E() {
412
412
  if (x.showFixed) {
413
413
  w.name + "";
414
414
  let e = w.name + "__table";
@@ -416,18 +416,18 @@ const DataCustom = /* @__PURE__ */ defineComponent({
416
416
  __table: localStorage.getItem(e),
417
417
  url: w.name
418
418
  }, { requestType: "json" }).then((e) => {
419
- $msg.success("配置保存成功!");
419
+ T.success("配置保存成功!");
420
420
  });
421
421
  } else S("save");
422
422
  }
423
- function E(e, b, C) {
423
+ function D(e, b, C) {
424
424
  S("custom", {
425
425
  key: e[x.keyField],
426
426
  [b]: C
427
427
  });
428
428
  }
429
- let D = ref();
430
- return watch(D, (e) => {
429
+ let k = ref();
430
+ return watch(k, (e) => {
431
431
  e.$el && Sortable.create(e.$el, {
432
432
  animation: 150,
433
433
  ghostClass: "ghost",
@@ -459,14 +459,14 @@ const DataCustom = /* @__PURE__ */ defineComponent({
459
459
  text: !0,
460
460
  type: "primary",
461
461
  size: "small",
462
- onClick: () => T()
462
+ onClick: () => E()
463
463
  }, { default: () => [createTextVNode("保存")] }), createVNode(NButton, {
464
464
  text: !0,
465
465
  type: "primary",
466
466
  size: "small",
467
467
  onClick: () => S("custom", !0)
468
468
  }, _isSlot$6(e = C("common.page.custom.reset")) ? e : { default: () => [e] })])] }), createVNode(NFlex, {
469
- ref: D,
469
+ ref: k,
470
470
  vertical: !0
471
471
  }, _isSlot$6(b = x.data.filter((e) => e[x.visiblityField] !== !1).map((e) => createVNode(DataCustomItem, {
472
472
  key: e[x.keyField],
@@ -474,8 +474,8 @@ const DataCustom = /* @__PURE__ */ defineComponent({
474
474
  hidden: e[x.hiddenField],
475
475
  fixed: e[x.fixedField],
476
476
  showFixed: x.showFixed,
477
- onUpdateHidden: (b) => E(e, "hidden", b),
478
- onUpdateFixed: (b) => E(e, "fixed", b)
477
+ onUpdateHidden: (b) => D(e, "hidden", b),
478
+ onUpdateFixed: (b) => D(e, "fixed", b)
479
479
  }, null))) ? b : { default: () => [b] })] });
480
480
  }
481
481
  });
@@ -751,69 +751,69 @@ const DataForm = /* @__PURE__ */ defineComponent({
751
751
  "collapse"
752
752
  ],
753
753
  setup(b, { expose: x, emit: S }) {
754
- let C = useRoute(), w = () => {
754
+ let C = useRoute(), w = useMessage(), T = () => {
755
755
  let e = C.name + "__form";
756
756
  C.name + "", request.post("/api/v1/otwb-cloud-uc/cli/module/custom-config/save", {
757
757
  __form: localStorage.getItem(e),
758
758
  url: C.name
759
759
  }, { requestType: "json" }).then((e) => {
760
- $msg.success("配置保存成功!");
760
+ w.success("配置保存成功!");
761
761
  });
762
- }, { t: T } = useI18n(), E = (e) => {
762
+ }, { t: E } = useI18n(), D = (e) => {
763
763
  S("filter", b.model, e);
764
- }, D = (e) => {
764
+ }, k = (e) => {
765
765
  S("reset", e), b.filterOnReset && S("filter", b.model, e);
766
- }, k = ref(b.defaultCollapsed), A = (e) => {
767
- k.value = e;
766
+ }, A = ref(b.defaultCollapsed), j = (e) => {
767
+ A.value = e;
768
768
  };
769
- x({ collapse: A });
770
- let j = reactive({
769
+ x({ collapse: j });
770
+ let N = reactive({
771
771
  span: 6,
772
772
  suffix: !0
773
773
  });
774
774
  return () => {
775
- let { filterOnReset: e, filterText: x, resetText: C, customizable: N, defaultCollapsed: P, collapsible: F, grid: I,...L } = b;
775
+ let { filterOnReset: e, filterText: x, resetText: C, customizable: w, defaultCollapsed: P, collapsible: F, grid: I,...L } = b;
776
776
  return createVNode(DataForm, mergeProps({ grid: {
777
777
  cols: "12 768:18 1200:30 1536:30",
778
778
  yGap: 16,
779
779
  xGap: 12,
780
780
  ...I,
781
- collapsed: k.value
781
+ collapsed: A.value
782
782
  } }, L, {
783
783
  showFeedback: !1,
784
- showAction: j,
785
- onSubmit: E,
786
- onReset: D
787
- }), { action: ({ cols: e, spans: E }) => (j.suffix = e < E + j.span, createVNode(NFlex, {
788
- justify: j.suffix ? "end" : "start",
784
+ showAction: N,
785
+ onSubmit: D,
786
+ onReset: k
787
+ }), { action: ({ cols: e, spans: D }) => (N.suffix = e < D + N.span, createVNode(NFlex, {
788
+ justify: N.suffix ? "end" : "start",
789
789
  align: "center"
790
790
  }, { default: () => [
791
- F && j.suffix ? createVNode(NButton, {
791
+ F && N.suffix ? createVNode(NButton, {
792
792
  class: "collapsedBtn",
793
793
  text: !0,
794
794
  type: "primary",
795
795
  iconPlacement: "right",
796
- renderIcon: k.value ? IDown : IUp,
797
- onClick: () => A(!k.value)
798
- }, { default: () => [k.value ? T("common.page.filter.expand") : T("common.page.filter.collapse")] }) : void 0,
799
- j.suffix ? void 0 : createVNode("span", null, [createTextVNode("\xA0\xA0\xA0\xA0")]),
796
+ renderIcon: A.value ? IDown : IUp,
797
+ onClick: () => j(!A.value)
798
+ }, { default: () => [A.value ? E("common.page.filter.expand") : E("common.page.filter.collapse")] }) : void 0,
799
+ N.suffix ? void 0 : createVNode("span", null, [createTextVNode("\xA0\xA0\xA0\xA0")]),
800
800
  createVNode(NButton, {
801
801
  class: "submitWrap",
802
802
  attrType: "submit",
803
803
  type: "primary",
804
804
  disabled: b.disabled,
805
805
  loading: b.loading
806
- }, { default: () => [x || T("common.page.filter.submitText")] }),
806
+ }, { default: () => [x || E("common.page.filter.submitText")] }),
807
807
  createVNode(NButton, {
808
808
  attrType: "reset",
809
809
  disabled: b.disabled || b.loading
810
- }, { default: () => [C || T("common.page.form.resetText")] }),
811
- N ? createVNode(DataCustom, {
810
+ }, { default: () => [C || E("common.page.form.resetText")] }),
811
+ w ? createVNode(DataCustom, {
812
812
  isFilter: !0,
813
813
  keyField: "name",
814
814
  showFixed: !1,
815
815
  data: L.items,
816
- onSave: w,
816
+ onSave: T,
817
817
  onCustom: (e) => S("custom", e),
818
818
  size: 16,
819
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-DVm3Ttki.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-DSGssYMr.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-DVm3Ttki.js";
4
+ import { a as NRadios, g as NCheckboxes, n as DtUserDept, p as DataForm, r as DtUserRender, t as DtDeptRender } from "./components-DSGssYMr.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.34",
3
+ "version": "2.0.35",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "otwb UI",