@otwb/ui 2.1.0 → 2.1.2
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/README.md +1 -1
- package/auto-imports.d.ts +15 -15
- package/auto-imports.js +34 -34
- package/dist/{components-CjltPCgl.js → components-DAuJ0NEP.js} +25 -24
- package/dist/components.js +1 -1
- package/dist/index.js +1 -4
- package/dist/page.js +1 -1
- package/esm/components.d.ts +448 -448
- package/esm/components.js +1 -1
- package/esm/design.d.ts +243 -243
- package/esm/directives.d.ts +42 -42
- package/esm/directives.js +1 -1
- package/esm/index.d.ts +19 -19
- package/esm/index.js +1 -1
- package/esm/page.d.ts +170 -170
- package/esm/page.js +1 -1
- package/esm/use-style.d.ts +10 -10
- package/esm/use-style.js +1 -1
- package/locale.d.ts +78 -78
- package/package.json +3 -3
- package/unocss-preset.d.ts +5 -5
- package/unocss-preset.js +106 -106
package/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
# @otwb/ui
|
|
1
|
+
# @otwb/ui
|
package/auto-imports.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export declare const UIDirectives: {
|
|
2
|
-
type: 'directive'
|
|
3
|
-
resolve: (name: string) => string | undefined
|
|
4
|
-
}[]
|
|
5
|
-
|
|
6
|
-
export declare const UIComponents: {
|
|
7
|
-
type: 'component'
|
|
8
|
-
resolve: (name: string) => string | undefined
|
|
9
|
-
}[]
|
|
10
|
-
|
|
11
|
-
export declare const UI: {
|
|
12
|
-
from: string
|
|
13
|
-
imports: (string | { name: string, type: boolean })[]
|
|
14
|
-
}[]
|
|
15
|
-
export default UI
|
|
1
|
+
export declare const UIDirectives: {
|
|
2
|
+
type: 'directive'
|
|
3
|
+
resolve: (name: string) => string | undefined
|
|
4
|
+
}[]
|
|
5
|
+
|
|
6
|
+
export declare const UIComponents: {
|
|
7
|
+
type: 'component'
|
|
8
|
+
resolve: (name: string) => string | undefined
|
|
9
|
+
}[]
|
|
10
|
+
|
|
11
|
+
export declare const UI: {
|
|
12
|
+
from: string
|
|
13
|
+
imports: (string | { name: string, type: boolean })[]
|
|
14
|
+
}[]
|
|
15
|
+
export default UI
|
package/auto-imports.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
export const UIDirectives = [
|
|
2
|
-
{
|
|
3
|
-
type: 'directive',
|
|
4
|
-
resolve(name) {
|
|
5
|
-
return ['Spin', 'Tooltip'].includes(name)
|
|
6
|
-
? { name: `v${name}`, from: '@otwb/ui/directives' }
|
|
7
|
-
: undefined
|
|
8
|
-
},
|
|
9
|
-
},
|
|
10
|
-
]
|
|
11
|
-
|
|
12
|
-
export const UIComponents = [
|
|
13
|
-
{
|
|
14
|
-
type: 'component',
|
|
15
|
-
resolve(name) {
|
|
16
|
-
return ['DataTable', 'DataForm', 'DataCustom', 'DataFilter', 'DataSelection', 'DataPagination'].includes(name)
|
|
17
|
-
? { name, from: '@otwb/ui/components' }
|
|
18
|
-
: undefined
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
]
|
|
22
|
-
|
|
23
|
-
export const UI = [
|
|
24
|
-
{
|
|
25
|
-
from: '@otwb/ui/directives',
|
|
26
|
-
imports: ['vSpin', 'vTooltip'],
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
from: '@otwb/ui/components',
|
|
30
|
-
imports: ['DataTable', 'DataForm', 'DataCustom', 'DataFilter', 'DataSelection', 'DataPagination'],
|
|
31
|
-
},
|
|
32
|
-
]
|
|
33
|
-
|
|
34
|
-
export default UI
|
|
1
|
+
export const UIDirectives = [
|
|
2
|
+
{
|
|
3
|
+
type: 'directive',
|
|
4
|
+
resolve(name) {
|
|
5
|
+
return ['Spin', 'Tooltip'].includes(name)
|
|
6
|
+
? { name: `v${name}`, from: '@otwb/ui/directives' }
|
|
7
|
+
: undefined
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
export const UIComponents = [
|
|
13
|
+
{
|
|
14
|
+
type: 'component',
|
|
15
|
+
resolve(name) {
|
|
16
|
+
return ['DataTable', 'DataForm', 'DataCustom', 'DataFilter', 'DataSelection', 'DataPagination'].includes(name)
|
|
17
|
+
? { name, from: '@otwb/ui/components' }
|
|
18
|
+
: undefined
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
export const UI = [
|
|
24
|
+
{
|
|
25
|
+
from: '@otwb/ui/directives',
|
|
26
|
+
imports: ['vSpin', 'vTooltip'],
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
from: '@otwb/ui/components',
|
|
30
|
+
imports: ['DataTable', 'DataForm', 'DataCustom', 'DataFilter', 'DataSelection', 'DataPagination'],
|
|
31
|
+
},
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
export default UI
|
|
@@ -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 = T.appCode, D = () => {
|
|
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,61 +766,62 @@ const DataForm = /* @__PURE__ */ defineComponent({
|
|
|
766
766
|
}).then((e) => {
|
|
767
767
|
w.success("配置保存成功!");
|
|
768
768
|
});
|
|
769
|
-
}, { t:
|
|
769
|
+
}, { t: k } = useI18n(), A = (e) => {
|
|
770
770
|
S("filter", b.model, e);
|
|
771
|
-
},
|
|
771
|
+
}, j = (e) => {
|
|
772
772
|
S("reset", e), b.filterOnReset && S("filter", b.model, e);
|
|
773
|
-
},
|
|
774
|
-
|
|
773
|
+
}, N = ref(b.defaultCollapsed), I = (e) => {
|
|
774
|
+
N.value = e;
|
|
775
775
|
};
|
|
776
|
-
x({ collapse:
|
|
777
|
-
let
|
|
776
|
+
x({ collapse: I });
|
|
777
|
+
let L = 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,...R } = 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
|
-
|
|
788
|
+
collapsedRows: E === "OMS" ? 2 : 1,
|
|
789
|
+
collapsed: N.value
|
|
790
|
+
} }, R, {
|
|
790
791
|
showFeedback: !1,
|
|
791
|
-
showAction:
|
|
792
|
-
onSubmit:
|
|
793
|
-
onReset:
|
|
794
|
-
}), { action: ({ cols: e, spans: T }) => (
|
|
795
|
-
justify:
|
|
792
|
+
showAction: L,
|
|
793
|
+
onSubmit: A,
|
|
794
|
+
onReset: j
|
|
795
|
+
}), { action: ({ cols: e, spans: T }) => (L.suffix = e < T + L.span, createVNode(NFlex, {
|
|
796
|
+
justify: L.suffix ? "end" : "start",
|
|
796
797
|
align: "center"
|
|
797
798
|
}, { default: () => [
|
|
798
|
-
P &&
|
|
799
|
+
P && L.suffix ? createVNode(NButton, {
|
|
799
800
|
class: "collapsedBtn",
|
|
800
801
|
text: !0,
|
|
801
802
|
type: "primary",
|
|
802
803
|
iconPlacement: "right",
|
|
803
|
-
renderIcon:
|
|
804
|
-
onClick: () =>
|
|
805
|
-
}, { default: () => [
|
|
806
|
-
|
|
804
|
+
renderIcon: N.value ? IDown : IUp,
|
|
805
|
+
onClick: () => I(!N.value)
|
|
806
|
+
}, { default: () => [N.value ? k("common.page.filter.expand") : k("common.page.filter.collapse")] }) : void 0,
|
|
807
|
+
L.suffix ? void 0 : createVNode("span", null, [createTextVNode("\xA0\xA0\xA0\xA0")]),
|
|
807
808
|
createVNode(NButton, {
|
|
808
809
|
class: "submitWrap",
|
|
809
810
|
attrType: "submit",
|
|
810
811
|
type: "primary",
|
|
811
812
|
disabled: b.disabled,
|
|
812
813
|
loading: b.loading
|
|
813
|
-
}, { default: () => [x ||
|
|
814
|
+
}, { default: () => [x || k("common.page.filter.submitText")] }),
|
|
814
815
|
createVNode(NButton, {
|
|
815
816
|
attrType: "reset",
|
|
816
817
|
disabled: b.disabled || b.loading
|
|
817
|
-
}, { default: () => [C ||
|
|
818
|
+
}, { default: () => [C || k("common.page.form.resetText")] }),
|
|
818
819
|
w ? createVNode(DataCustom, {
|
|
819
820
|
isFilter: !0,
|
|
820
821
|
keyField: "name",
|
|
821
822
|
showFixed: !1,
|
|
822
|
-
data:
|
|
823
|
-
onSave:
|
|
823
|
+
data: R.items,
|
|
824
|
+
onSave: D,
|
|
824
825
|
onCustom: (e) => S("custom", e),
|
|
825
826
|
size: 16,
|
|
826
827
|
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-DAuJ0NEP.js";
|
|
5
5
|
export { DataActions, DataCustom, DataFilter, DataForm, DataLocaleInput, DataPagination, DataSelection, DataTable, DtDeptRender, DtUserDept, DtUserRender, NCheckboxes, NRadios, renderUsers, useDataTableDrag, useLocaleEdit };
|
package/dist/index.js
CHANGED
|
@@ -945,10 +945,7 @@ const AppMultiTabs = /* @__PURE__ */ defineComponent({
|
|
|
945
945
|
closable: z.closable,
|
|
946
946
|
dark: d.dark,
|
|
947
947
|
onClick: () => {
|
|
948
|
-
|
|
949
|
-
let d = new URL(z.href, window.location.origin);
|
|
950
|
-
H.push(`${d.pathname}${d.search}${d.hash}`);
|
|
951
|
-
}
|
|
948
|
+
G || H.push(z.fullPath);
|
|
952
949
|
},
|
|
953
950
|
onContextmenu: (d) => W(d, z)
|
|
954
951
|
}, { default: () => [B.name ? B.name({
|
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-DAuJ0NEP.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";
|