@otwb/ui 2.1.2 → 2.1.3
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.
|
@@ -755,7 +755,7 @@ const DataForm = /* @__PURE__ */ defineComponent({
|
|
|
755
755
|
"collapse"
|
|
756
756
|
],
|
|
757
757
|
setup(b, { expose: x, emit: S }) {
|
|
758
|
-
let C = useRoute(), w = useMessage(), T = useApp(), E =
|
|
758
|
+
let C = useRoute(), w = useMessage(), T = useApp(), E = () => {
|
|
759
759
|
let e = C.name + "__form";
|
|
760
760
|
C.name + "", request.post("/api/v1/otwb-cloud-uc/cli/module/custom-config/save", {
|
|
761
761
|
__form: localStorage.getItem(e),
|
|
@@ -766,62 +766,61 @@ const DataForm = /* @__PURE__ */ defineComponent({
|
|
|
766
766
|
}).then((e) => {
|
|
767
767
|
w.success("配置保存成功!");
|
|
768
768
|
});
|
|
769
|
-
}, { t:
|
|
769
|
+
}, { t: D } = useI18n(), k = (e) => {
|
|
770
770
|
S("filter", b.model, e);
|
|
771
|
-
},
|
|
771
|
+
}, A = (e) => {
|
|
772
772
|
S("reset", e), b.filterOnReset && S("filter", b.model, e);
|
|
773
|
-
},
|
|
774
|
-
|
|
773
|
+
}, j = ref(b.defaultCollapsed), N = (e) => {
|
|
774
|
+
j.value = e;
|
|
775
775
|
};
|
|
776
|
-
x({ collapse:
|
|
777
|
-
let
|
|
776
|
+
x({ collapse: N });
|
|
777
|
+
let I = reactive({
|
|
778
778
|
span: 6,
|
|
779
779
|
suffix: !0
|
|
780
780
|
});
|
|
781
781
|
return () => {
|
|
782
|
-
let { filterOnReset: e, filterText: x, resetText: C, customizable: w, defaultCollapsed: T, collapsible: P, grid: F,...
|
|
782
|
+
let { filterOnReset: e, filterText: x, resetText: C, customizable: w, defaultCollapsed: T, collapsible: P, grid: F,...L } = b;
|
|
783
783
|
return createVNode(DataForm, mergeProps({ grid: {
|
|
784
784
|
cols: "12 768:18 1200:30 1536:30",
|
|
785
785
|
yGap: 16,
|
|
786
786
|
xGap: 12,
|
|
787
787
|
...F,
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
} }, R, {
|
|
788
|
+
collapsed: j.value
|
|
789
|
+
} }, L, {
|
|
791
790
|
showFeedback: !1,
|
|
792
|
-
showAction:
|
|
793
|
-
onSubmit:
|
|
794
|
-
onReset:
|
|
795
|
-
}), { action: ({ cols: e, spans: T }) => (
|
|
796
|
-
justify:
|
|
791
|
+
showAction: I,
|
|
792
|
+
onSubmit: k,
|
|
793
|
+
onReset: A
|
|
794
|
+
}), { action: ({ cols: e, spans: T }) => (I.suffix = e < T + I.span, createVNode(NFlex, {
|
|
795
|
+
justify: I.suffix ? "end" : "start",
|
|
797
796
|
align: "center"
|
|
798
797
|
}, { default: () => [
|
|
799
|
-
P &&
|
|
798
|
+
P && I.suffix ? createVNode(NButton, {
|
|
800
799
|
class: "collapsedBtn",
|
|
801
800
|
text: !0,
|
|
802
801
|
type: "primary",
|
|
803
802
|
iconPlacement: "right",
|
|
804
|
-
renderIcon:
|
|
805
|
-
onClick: () =>
|
|
806
|
-
}, { default: () => [
|
|
807
|
-
|
|
803
|
+
renderIcon: j.value ? IDown : IUp,
|
|
804
|
+
onClick: () => N(!j.value)
|
|
805
|
+
}, { default: () => [j.value ? D("common.page.filter.expand") : D("common.page.filter.collapse")] }) : void 0,
|
|
806
|
+
I.suffix ? void 0 : createVNode("span", null, [createTextVNode("\xA0\xA0\xA0\xA0")]),
|
|
808
807
|
createVNode(NButton, {
|
|
809
808
|
class: "submitWrap",
|
|
810
809
|
attrType: "submit",
|
|
811
810
|
type: "primary",
|
|
812
811
|
disabled: b.disabled,
|
|
813
812
|
loading: b.loading
|
|
814
|
-
}, { default: () => [x ||
|
|
813
|
+
}, { default: () => [x || D("common.page.filter.submitText")] }),
|
|
815
814
|
createVNode(NButton, {
|
|
816
815
|
attrType: "reset",
|
|
817
816
|
disabled: b.disabled || b.loading
|
|
818
|
-
}, { default: () => [C ||
|
|
817
|
+
}, { default: () => [C || D("common.page.form.resetText")] }),
|
|
819
818
|
w ? createVNode(DataCustom, {
|
|
820
819
|
isFilter: !0,
|
|
821
820
|
keyField: "name",
|
|
822
821
|
showFixed: !1,
|
|
823
|
-
data:
|
|
824
|
-
onSave:
|
|
822
|
+
data: L.items,
|
|
823
|
+
onSave: E,
|
|
825
824
|
onCustom: (e) => S("custom", e),
|
|
826
825
|
size: 16,
|
|
827
826
|
type: "primary"
|
package/dist/components.js
CHANGED
|
@@ -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-
|
|
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-CjltPCgl.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-
|
|
4
|
+
import { a as NRadios, g as NCheckboxes, n as DtUserDept, p as DataForm, r as DtUserRender, t as DtDeptRender } from "./components-CjltPCgl.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";
|