@otwb/ui 2.0.0 → 2.0.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/page.js +2 -2
- 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 +2 -2
- package/unocss-preset.d.ts +5 -5
- package/unocss-preset.js +94 -94
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
|
package/dist/page.js
CHANGED
|
@@ -119,7 +119,7 @@ function createPageFormHelper({ getUserGroups: n, getUsersByGroup: d, getDeptsBy
|
|
|
119
119
|
style: "line-height: 1.25"
|
|
120
120
|
}, _isSlot(n = (d?.map((n) => c?.find((c) => c[b.valueField || "value"] === n)) ?? []).map((n, c, l) => {
|
|
121
121
|
let u = n ? b.renderLabel ? b.renderLabel(n) ?? "" : n[b.labelField || "label"] ?? "" : d[c] ?? "";
|
|
122
|
-
return createVNode("span", { key: n[b.valueField || "value"] }, [u, c < l.length - 1 ? ", " : ""]);
|
|
122
|
+
return createVNode("span", { key: n ? n[b.valueField || "value"] : d[c] ?? "" }, [u, c < l.length - 1 ? ", " : ""]);
|
|
123
123
|
})) ? n : { default: () => [n] });
|
|
124
124
|
} else {
|
|
125
125
|
let n = c?.find((n) => n[b.valueField || "value"] === d);
|
|
@@ -165,7 +165,7 @@ function createPageFormHelper({ getUserGroups: n, getUsersByGroup: d, getDeptsBy
|
|
|
165
165
|
style: "line-height: 2.4"
|
|
166
166
|
}, _isSlot(n = (d?.map((n) => c?.find((c) => c[y.valueField || "value"] === n)) ?? []).map((n, c, l) => {
|
|
167
167
|
let u = n ? n[y.labelField ?? "label"] ?? "" : d[c] ?? "";
|
|
168
|
-
return createVNode("span", { key: n[y.valueField ?? "value"] }, [u, c < l.length - 1 ? ", " : ""]);
|
|
168
|
+
return createVNode("span", { key: n ? n[y.valueField ?? "value"] : d[c] ?? "" }, [u, c < l.length - 1 ? ", " : ""]);
|
|
169
169
|
})) ? n : { default: () => [n] });
|
|
170
170
|
}
|
|
171
171
|
return h(NCheckboxes, {
|