@aplus-frontend/ui 7.13.7 → 7.13.8
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/es/src/ag-grid/components/body-cell/index.vue2.mjs +7 -7
- package/es/src/ag-grid/components/empty/index.vue2.mjs +10 -10
- package/es/src/ag-grid/components/header-cell/index.vue2.mjs +37 -37
- package/es/src/ag-grid/components/row/index.vue2.mjs +5 -5
- package/es/src/ag-grid/components/tooltip/index.vue2.mjs +12 -12
- package/es/src/ag-grid/editable/form-item.vue.mjs +49 -49
- package/es/src/ag-grid/editable/index.vue.mjs +27 -27
- package/es/src/ag-grid/index.vue.mjs +249 -249
- package/es/src/ap-action/group/index.vue.mjs +15 -15
- package/es/src/ap-action/item/index.vue2.mjs +28 -28
- package/es/src/ap-action/item-dropdown/index.vue.mjs +39 -39
- package/es/src/ap-field/checkbox/index.vue.mjs +19 -19
- package/es/src/ap-field/checkbox/read.vue2.mjs +9 -9
- package/es/src/ap-field/date/index.vue.mjs +50 -50
- package/es/src/ap-field/date/read.vue2.mjs +7 -7
- package/es/src/ap-field/date-range/index.vue.mjs +30 -30
- package/es/src/ap-field/date-range/read.vue2.mjs +20 -20
- package/es/src/ap-field/number/index.vue.mjs +24 -24
- package/es/src/ap-field/radio/index.vue.mjs +24 -24
- package/es/src/ap-field/second/index.vue.mjs +15 -15
- package/es/src/ap-field/second/read.vue2.mjs +7 -7
- package/es/src/ap-field/segmented/index.vue.mjs +24 -24
- package/es/src/ap-field/select/index.vue.d.ts +1 -1
- package/es/src/ap-field/select/index.vue.mjs +246 -206
- package/es/src/ap-field/select/read.vue2.mjs +6 -6
- package/es/src/ap-field/slider/index.vue.mjs +11 -11
- package/es/src/ap-field/style/select.mjs +17 -4
- package/es/src/ap-field/switch/index.vue.mjs +45 -45
- package/es/src/ap-field/text/read-password.vue2.mjs +13 -13
- package/es/src/ap-field/text/read.vue2.mjs +3 -3
- package/es/src/ap-field/text-area/index.vue.mjs +29 -29
- package/es/src/ap-field/text-area/read.vue2.mjs +12 -12
- package/es/src/ap-field/tree-select/index.vue.mjs +31 -31
- package/es/src/ap-form/ap-form.vue2.mjs +46 -46
- package/es/src/ap-form/drawer-form/index.vue.mjs +30 -30
- package/es/src/ap-form/item/index.vue.mjs +75 -75
- package/es/src/ap-form/items/checkbox/index.vue.mjs +10 -10
- package/es/src/ap-form/items/number/index.vue.mjs +17 -17
- package/es/src/ap-form/items/radio/index.vue.mjs +13 -13
- package/es/src/ap-form/items/select/index.vue.d.ts +4 -4
- package/es/src/ap-form/items/switch/index.vue.mjs +14 -14
- package/es/src/ap-form/items/text/index.vue2.mjs +26 -26
- package/es/src/ap-form/items/text/password.vue.mjs +19 -19
- package/es/src/ap-form/items/text-area/index.vue.mjs +17 -17
- package/es/src/ap-form/modal-form/index.vue.mjs +34 -34
- package/es/src/ap-form/search-form/components/popover-filter.vue2.mjs +39 -39
- package/es/src/ap-form/search-form/components/popover-sorter/sortable-item.vue2.mjs +7 -7
- package/es/src/ap-grid/editable/form-item.vue.mjs +46 -46
- package/es/src/ap-grid/editable/index.vue.mjs +19 -19
- package/es/src/ap-grid/index.vue.mjs +212 -212
- package/es/src/ap-list/index.vue.mjs +116 -116
- package/es/src/ap-table/ap-table.vue2.mjs +217 -217
- package/es/src/ap-table/components/index/index.vue2.mjs +9 -9
- package/es/src/ap-table/components/setting/modal/index.vue2.mjs +42 -42
- package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +21 -21
- package/es/src/ap-table/components/setting/sortable/index.vue2.mjs +15 -15
- package/es/src/ap-table/components/setting/sortable/item.vue2.mjs +69 -69
- package/es/src/ap-table/components/setting/template/edit-form.vue2.mjs +22 -22
- package/es/src/ap-table/components/setting/template/index.vue2.mjs +25 -25
- package/es/src/ap-table/components/setting/template/item.vue2.mjs +40 -40
- package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +13 -13
- package/es/src/ap-table/constants.d.ts +2 -2
- package/es/src/business/ag-grid-modal/modal-layout/index.vue2.mjs +54 -54
- package/es/src/business/ag-grid-modal/selected-items/default.vue2.mjs +13 -13
- package/es/src/business/ag-grid-modal/wrapper/index.vue2.mjs +20 -20
- package/es/src/business/ap-descriptions/ap-descriptions.vue.mjs +33 -33
- package/es/src/business/ap-descriptions/help-message/index.vue2.mjs +13 -13
- package/es/src/business/ap-download/ap-download.vue.mjs +24 -24
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue.mjs +77 -77
- package/es/src/business/ap-radio-group/ap-radio-group.vue2.mjs +33 -33
- package/es/src/business/ap-status/group/ApStatusGroup.vue2.mjs +12 -12
- package/es/src/business/ap-table-modal/table-layout/index.vue2.mjs +43 -43
- package/es/src/business/ap-table-modal/table-modal.vue2.mjs +57 -57
- package/es/src/business/ap-tag/ap-tag-group.vue.mjs +37 -37
- package/es/src/business/ap-tag/ap-tag.vue.mjs +24 -24
- package/es/src/business/ap-title/ApTitle.vue2.mjs +27 -27
- package/es/src/business/ap-value-select-card/index.vue2.mjs +98 -98
- package/es/src/business/ap-view/components/main-button-content.vue.d.ts +1 -1
- package/es/src/business/batch-input-group/form-item.vue.mjs +25 -25
- package/es/src/business/batch-input-group/index.vue.mjs +60 -60
- package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +29 -29
- package/es/src/editable-table/form-item.vue.mjs +35 -35
- package/es/src/editable-table/index.vue.mjs +19 -19
- package/es/src/full-screen/index.vue.mjs +46 -46
- package/es/src/mask/index.vue.mjs +48 -48
- package/es/src/portal/index.vue.mjs +5 -5
- package/es/src/scroll-bar/internal.vue.mjs +62 -62
- package/es/src/scroll-view/index.vue.mjs +66 -66
- package/es/src/skeleton/components/desc/index.vue2.mjs +9 -9
- package/es/src/skeleton/components/desc/item-large.vue2.mjs +25 -25
- package/es/src/skeleton/components/desc/item.vue2.mjs +13 -13
- package/es/src/skeleton/components/list/index.vue2.mjs +14 -14
- package/es/src/skeleton/components/list/item.vue2.mjs +12 -12
- package/es/src/skeleton/components/page-header/index.vue2.mjs +8 -8
- package/es/src/skeleton/components/search-form/index.vue2.mjs +35 -35
- package/es/src/skeleton/components/table/index.vue2.mjs +17 -17
- package/es/src/skeleton/components/table/item.vue2.mjs +23 -23
- package/es/src/skeleton/descriptions.vue2.mjs +15 -15
- package/es/src/skeleton/list-page.vue2.mjs +12 -12
- package/es/src/splitter/Panel.vue2.mjs +11 -11
- package/es/src/splitter/SplitBar.vue2.mjs +79 -79
- package/es/src/splitter/Splitter.vue2.mjs +50 -50
- package/es/src/text/group.vue.mjs +8 -8
- package/es/src/text/index.vue.mjs +48 -48
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/components/body-cell/index.vue2.js +1 -1
- package/lib/src/ag-grid/components/empty/index.vue2.js +1 -1
- package/lib/src/ag-grid/components/header-cell/index.vue2.js +1 -1
- package/lib/src/ag-grid/components/row/index.vue2.js +1 -1
- package/lib/src/ag-grid/components/tooltip/index.vue2.js +1 -1
- package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ag-grid/editable/index.vue.js +1 -1
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ap-action/group/index.vue.js +1 -1
- package/lib/src/ap-action/item/index.vue2.js +1 -1
- package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
- package/lib/src/ap-field/checkbox/index.vue.js +1 -1
- package/lib/src/ap-field/checkbox/read.vue2.js +1 -1
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-field/date/read.vue2.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/read.vue2.js +1 -1
- package/lib/src/ap-field/number/index.vue.js +1 -1
- package/lib/src/ap-field/radio/index.vue.js +1 -1
- package/lib/src/ap-field/second/index.vue.js +1 -1
- package/lib/src/ap-field/second/read.vue2.js +1 -1
- package/lib/src/ap-field/segmented/index.vue.js +1 -1
- package/lib/src/ap-field/select/index.vue.d.ts +1 -1
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-field/select/read.vue2.js +1 -1
- package/lib/src/ap-field/slider/index.vue.js +1 -1
- package/lib/src/ap-field/style/select.js +1 -1
- package/lib/src/ap-field/switch/index.vue.js +1 -1
- package/lib/src/ap-field/text/read-password.vue2.js +1 -1
- package/lib/src/ap-field/text/read.vue2.js +1 -1
- package/lib/src/ap-field/text-area/index.vue.js +1 -1
- package/lib/src/ap-field/text-area/read.vue2.js +1 -1
- package/lib/src/ap-field/tree-select/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.js +1 -1
- package/lib/src/ap-form/items/radio/index.vue.js +1 -1
- package/lib/src/ap-form/items/select/index.vue.d.ts +4 -4
- package/lib/src/ap-form/items/switch/index.vue.js +1 -1
- package/lib/src/ap-form/items/text/index.vue2.js +1 -1
- package/lib/src/ap-form/items/text/password.vue.js +1 -1
- package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
- package/lib/src/ap-form/modal-form/index.vue.js +1 -1
- package/lib/src/ap-form/search-form/components/popover-filter.vue2.js +1 -1
- package/lib/src/ap-form/search-form/components/popover-sorter/sortable-item.vue2.js +1 -1
- package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ap-grid/editable/index.vue.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-list/index.vue.js +1 -1
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/components/index/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/sortable/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/sortable/item.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/template/edit-form.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/template/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/template/item.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -1
- package/lib/src/ap-table/constants.d.ts +2 -2
- package/lib/src/business/ag-grid-modal/modal-layout/index.vue2.js +1 -1
- package/lib/src/business/ag-grid-modal/selected-items/default.vue2.js +1 -1
- package/lib/src/business/ag-grid-modal/wrapper/index.vue2.js +1 -1
- package/lib/src/business/ap-descriptions/ap-descriptions.vue.js +1 -1
- package/lib/src/business/ap-descriptions/help-message/index.vue2.js +1 -1
- package/lib/src/business/ap-download/ap-download.vue.js +1 -1
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.js +1 -1
- package/lib/src/business/ap-radio-group/ap-radio-group.vue2.js +1 -1
- package/lib/src/business/ap-status/group/ApStatusGroup.vue2.js +1 -1
- package/lib/src/business/ap-table-modal/table-layout/index.vue2.js +1 -1
- package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
- package/lib/src/business/ap-tag/ap-tag-group.vue.js +1 -1
- package/lib/src/business/ap-tag/ap-tag.vue.js +1 -1
- package/lib/src/business/ap-title/ApTitle.vue2.js +1 -1
- package/lib/src/business/ap-value-select-card/index.vue2.js +1 -1
- package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +1 -1
- package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
- package/lib/src/business/batch-input-group/index.vue.js +2 -2
- package/lib/src/business/batch-input-group/popover-input/index.vue2.js +2 -2
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/full-screen/index.vue.js +1 -1
- package/lib/src/mask/index.vue.js +1 -1
- package/lib/src/portal/index.vue.js +1 -1
- package/lib/src/scroll-bar/internal.vue.js +1 -1
- package/lib/src/scroll-view/index.vue.js +1 -1
- package/lib/src/skeleton/components/desc/index.vue2.js +1 -1
- package/lib/src/skeleton/components/desc/item-large.vue2.js +1 -1
- package/lib/src/skeleton/components/desc/item.vue2.js +1 -1
- package/lib/src/skeleton/components/list/index.vue2.js +1 -1
- package/lib/src/skeleton/components/list/item.vue2.js +1 -1
- package/lib/src/skeleton/components/page-header/index.vue2.js +1 -1
- package/lib/src/skeleton/components/search-form/index.vue2.js +1 -1
- package/lib/src/skeleton/components/table/index.vue2.js +1 -1
- package/lib/src/skeleton/components/table/item.vue2.js +1 -1
- package/lib/src/skeleton/descriptions.vue2.js +1 -1
- package/lib/src/skeleton/list-page.vue2.js +1 -1
- package/lib/src/splitter/Panel.vue2.js +1 -1
- package/lib/src/splitter/SplitBar.vue2.js +1 -1
- package/lib/src/splitter/Splitter.vue2.js +1 -1
- package/lib/src/text/group.vue.js +1 -1
- package/lib/src/text/index.vue.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { singleRow as l } from "../../style/index.mjs";
|
|
2
|
-
const
|
|
2
|
+
const o = (i) => {
|
|
3
3
|
const { componentCls: a } = i, p = `${a}-select-popup`;
|
|
4
4
|
return {
|
|
5
5
|
[`${p}`]: {
|
|
6
|
-
// padding: token.space,
|
|
7
6
|
padding: 0,
|
|
8
7
|
[`${p}-all-option-wrapper`]: {
|
|
9
8
|
padding: i.space,
|
|
10
|
-
paddingBlockEnd: i.spaceXS
|
|
9
|
+
paddingBlockEnd: i.spaceXS,
|
|
10
|
+
marginBlockEnd: i.calc(i.space).mul(-1).equal()
|
|
11
11
|
},
|
|
12
12
|
[`${p}-all-option`]: {
|
|
13
13
|
width: "100%",
|
|
@@ -22,10 +22,20 @@ const n = (i) => {
|
|
|
22
22
|
[`${p}-option-wrapper`]: {
|
|
23
23
|
height: "22px"
|
|
24
24
|
},
|
|
25
|
+
[`${p}-option-content-wrapper`]: {
|
|
26
|
+
flex: 1,
|
|
27
|
+
flexShrink: 1,
|
|
28
|
+
minWidth: 0
|
|
29
|
+
},
|
|
25
30
|
[`${p}-option-label`]: {
|
|
26
31
|
...l(i),
|
|
27
32
|
color: "inherit"
|
|
28
33
|
},
|
|
34
|
+
[`${p}-option-custom`]: {
|
|
35
|
+
flex: 1,
|
|
36
|
+
flexShrink: 1,
|
|
37
|
+
minWidth: 0
|
|
38
|
+
},
|
|
29
39
|
[`${p}-option-action`]: {
|
|
30
40
|
display: "none",
|
|
31
41
|
color: i.colorPrimary,
|
|
@@ -50,11 +60,14 @@ const n = (i) => {
|
|
|
50
60
|
},
|
|
51
61
|
"&:last-child": {
|
|
52
62
|
marginBottom: i.space
|
|
63
|
+
},
|
|
64
|
+
"&:first-child": {
|
|
65
|
+
marginTop: i.space
|
|
53
66
|
}
|
|
54
67
|
}
|
|
55
68
|
}
|
|
56
69
|
};
|
|
57
70
|
};
|
|
58
71
|
export {
|
|
59
|
-
|
|
72
|
+
o as genSelectStyle
|
|
60
73
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as U, useSlots as
|
|
2
|
-
import { Switch as A, Popconfirm as
|
|
3
|
-
import { isNil as
|
|
1
|
+
import { defineComponent as U, useSlots as z, ref as D, unref as o, computed as v, createVNode as s, Fragment as f, createBlock as k, createElementBlock as E, openBlock as m, resolveDynamicComponent as K, mergeProps as C, createSlots as V, renderList as x, withCtx as p, renderSlot as B, normalizeProps as b, guardReactiveProps as w } from "vue";
|
|
2
|
+
import { Switch as A, Popconfirm as L } from "@aplus-frontend/antdv";
|
|
3
|
+
import { isNil as M, isFunction as R, omit as P } from "lodash-unified";
|
|
4
4
|
import "../../utils/index.mjs";
|
|
5
5
|
import "../../hooks/index.mjs";
|
|
6
|
-
import { useControllableValue as
|
|
7
|
-
import { isDef as
|
|
8
|
-
const
|
|
6
|
+
import { useControllableValue as j } from "../../hooks/useControllableValue.mjs";
|
|
7
|
+
import { isDef as i } from "../../utils/is.mjs";
|
|
8
|
+
const W = /* @__PURE__ */ U({
|
|
9
9
|
name: "ApFieldSwitch",
|
|
10
10
|
__name: "index",
|
|
11
11
|
props: {
|
|
@@ -51,76 +51,76 @@ const Q = /* @__PURE__ */ U({
|
|
|
51
51
|
confirm: {}
|
|
52
52
|
},
|
|
53
53
|
emits: ["update:checked"],
|
|
54
|
-
setup(
|
|
55
|
-
emit:
|
|
54
|
+
setup(t, {
|
|
55
|
+
emit: S
|
|
56
56
|
}) {
|
|
57
|
-
const
|
|
58
|
-
value:
|
|
57
|
+
const a = z(), e = t, F = S, {
|
|
58
|
+
value: c,
|
|
59
59
|
updateValue: r
|
|
60
|
-
} =
|
|
60
|
+
} = j(e, F, {
|
|
61
61
|
valuePropName: "checked"
|
|
62
|
-
}),
|
|
63
|
-
async function
|
|
64
|
-
if (!
|
|
65
|
-
if (!
|
|
62
|
+
}), l = D(!1);
|
|
63
|
+
async function y(n, u) {
|
|
64
|
+
if (!i(e.confirm)) {
|
|
65
|
+
if (!i(e.onAction)) {
|
|
66
66
|
r(n);
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
69
|
-
|
|
69
|
+
l.value = !0;
|
|
70
70
|
try {
|
|
71
|
-
await e.onAction(n,
|
|
71
|
+
await e.onAction(n, u) && r(n);
|
|
72
72
|
} finally {
|
|
73
|
-
|
|
73
|
+
l.value = !1;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
async function N() {
|
|
78
|
-
const n = o(
|
|
79
|
-
if (!
|
|
78
|
+
const n = o(c) === e.checkedValue ? e.unCheckedValue : e.checkedValue;
|
|
79
|
+
if (!i(e.onAction)) {
|
|
80
80
|
r(n);
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
83
|
await e.onAction(n) && r(n);
|
|
84
84
|
}
|
|
85
|
-
const T =
|
|
86
|
-
const n = o(
|
|
87
|
-
return
|
|
88
|
-
}), $ =
|
|
89
|
-
return (n,
|
|
85
|
+
const T = v(() => {
|
|
86
|
+
const n = o(c);
|
|
87
|
+
return M(n) ? s(f, null, [e.emptyText]) : n === e.checkedValue ? s(f, null, [e.checkedChildren || a.checkedChildren?.() || `${e.checkedValue}`]) : s(f, null, [e.unCheckedChildren || a.unCheckedChildren?.() || `${e.unCheckedValue}`]);
|
|
88
|
+
}), $ = v(() => i(e.confirm) ? R(e.confirm) ? e.confirm(o(c)) : e.confirm : {});
|
|
89
|
+
return (n, u) => t.mode === "read" ? (m(), k(K(T.value), {
|
|
90
90
|
key: 0
|
|
91
|
-
})) : (
|
|
91
|
+
})) : (m(), E(f, {
|
|
92
92
|
key: 1
|
|
93
|
-
}, [!o(
|
|
93
|
+
}, [!o(i)(t.confirm) || t.disabled ? (m(), k(o(A), C({
|
|
94
94
|
key: 0
|
|
95
95
|
}, o(P)(e, ["onUpdate:checked", "emptyText"]), {
|
|
96
|
-
checked: o(
|
|
97
|
-
loading:
|
|
98
|
-
onClick:
|
|
99
|
-
}),
|
|
96
|
+
checked: o(c),
|
|
97
|
+
loading: t.loading ?? l.value,
|
|
98
|
+
onClick: y
|
|
99
|
+
}), V({
|
|
100
100
|
_: 2
|
|
101
|
-
}, [
|
|
102
|
-
name:
|
|
103
|
-
fn:
|
|
104
|
-
}))]), 1040, ["checked", "loading"])) : (
|
|
101
|
+
}, [x(a, (g, d) => ({
|
|
102
|
+
name: d,
|
|
103
|
+
fn: p((h) => [B(n.$slots, d, b(w(h || {})))])
|
|
104
|
+
}))]), 1040, ["checked", "loading"])) : (m(), k(o(L), C({
|
|
105
105
|
key: 1,
|
|
106
|
-
disabled:
|
|
106
|
+
disabled: l.value
|
|
107
107
|
}, $.value, {
|
|
108
108
|
onConfirm: N
|
|
109
109
|
}), {
|
|
110
|
-
default:
|
|
111
|
-
checked: o(
|
|
112
|
-
loading:
|
|
113
|
-
onClick:
|
|
114
|
-
}),
|
|
110
|
+
default: p(() => [s(o(A), C(o(P)(e, ["onUpdate:checked", "emptyText"]), {
|
|
111
|
+
checked: o(c),
|
|
112
|
+
loading: t.loading ?? l.value,
|
|
113
|
+
onClick: y
|
|
114
|
+
}), V({
|
|
115
115
|
_: 2
|
|
116
|
-
}, [
|
|
117
|
-
name:
|
|
118
|
-
fn:
|
|
116
|
+
}, [x(a, (g, d) => ({
|
|
117
|
+
name: d,
|
|
118
|
+
fn: p((h) => [B(n.$slots, d, b(w(h || {})))])
|
|
119
119
|
}))]), 1040, ["checked", "loading"])]),
|
|
120
120
|
_: 3
|
|
121
121
|
}, 16, ["disabled"]))], 64));
|
|
122
122
|
}
|
|
123
123
|
});
|
|
124
124
|
export {
|
|
125
|
-
|
|
125
|
+
W as default
|
|
126
126
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as d, unref as e, createElementBlock as
|
|
2
|
-
import { EyeOutlined as
|
|
3
|
-
import { Space as
|
|
1
|
+
import { defineComponent as d, unref as e, createElementBlock as r, createBlock as a, openBlock as n, Fragment as s, createTextVNode as p, toDisplayString as i, withCtx as f, createElementVNode as u } from "vue";
|
|
2
|
+
import { EyeOutlined as y, EyeInvisibleOutlined as c } from "@ant-design/icons-vue";
|
|
3
|
+
import { Space as m } from "@aplus-frontend/antdv";
|
|
4
4
|
const g = /* @__PURE__ */ d({
|
|
5
5
|
name: "ApFieldTextPasswordRead",
|
|
6
6
|
__name: "read-password",
|
|
@@ -60,21 +60,21 @@ const g = /* @__PURE__ */ d({
|
|
|
60
60
|
"onUpdate:visible": {},
|
|
61
61
|
emptyText: { default: "--" }
|
|
62
62
|
},
|
|
63
|
-
setup(
|
|
64
|
-
const
|
|
65
|
-
return (
|
|
66
|
-
default:
|
|
67
|
-
|
|
68
|
-
|
|
63
|
+
setup(o) {
|
|
64
|
+
const t = e(o.visible);
|
|
65
|
+
return (v, l) => o.value ? (n(), a(e(m), { key: 1 }, {
|
|
66
|
+
default: f(() => [
|
|
67
|
+
u("span", null, i(e(t) ? o.value : "********"), 1),
|
|
68
|
+
u("span", {
|
|
69
69
|
style: { cursor: "pointer" },
|
|
70
|
-
onClick: l[0] || (l[0] = () =>
|
|
70
|
+
onClick: l[0] || (l[0] = () => t.value = !e(t))
|
|
71
71
|
}, [
|
|
72
|
-
e(
|
|
72
|
+
e(t) ? (n(), a(e(y), { key: 0 })) : (n(), a(e(c), { key: 1 }))
|
|
73
73
|
])
|
|
74
74
|
]),
|
|
75
75
|
_: 1
|
|
76
|
-
})) : (
|
|
77
|
-
|
|
76
|
+
})) : (n(), r(s, { key: 0 }, [
|
|
77
|
+
p(i(o.emptyText), 1)
|
|
78
78
|
], 64));
|
|
79
79
|
}
|
|
80
80
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const r = /* @__PURE__ */
|
|
1
|
+
import { defineComponent as n, createElementBlock as a, openBlock as l, toDisplayString as o } from "vue";
|
|
2
|
+
const r = /* @__PURE__ */ n({
|
|
3
3
|
name: "ApFieldTextRead",
|
|
4
4
|
__name: "read",
|
|
5
5
|
props: {
|
|
@@ -56,7 +56,7 @@ const r = /* @__PURE__ */ a({
|
|
|
56
56
|
},
|
|
57
57
|
setup(t) {
|
|
58
58
|
const e = t;
|
|
59
|
-
return (
|
|
59
|
+
return (u, d) => (l(), a("span", null, o(e.prefix) + " " + o(t.value || e.emptyText) + " " + o(e.suffix), 1));
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
62
|
export {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as A, shallowRef as k, computed as
|
|
1
|
+
import { defineComponent as A, shallowRef as k, computed as m, createElementBlock as p, createBlock as z, openBlock as r, Fragment as T, normalizeClass as f, unref as e, toDisplayString as y, createElementVNode as w, mergeProps as R } from "vue";
|
|
2
2
|
import { Input as F } from "@aplus-frontend/antdv";
|
|
3
3
|
import { isNil as S, omit as V } from "lodash-unified";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
5
|
import "../../hooks/index.mjs";
|
|
6
6
|
import { useDefaultPlaceholder as E } from "../hooks/use-default-placeholder.mjs";
|
|
7
7
|
import U from "../style/index.mjs";
|
|
8
|
-
import { languageFormat as
|
|
9
|
-
import { useControllableValue as
|
|
10
|
-
import { useNamespace as
|
|
8
|
+
import { languageFormat as j } from "./utils.mjs";
|
|
9
|
+
import { useControllableValue as M } from "../../hooks/useControllableValue.mjs";
|
|
10
|
+
import { useNamespace as N } from "../../config-provider/hooks/use-namespace.mjs";
|
|
11
11
|
const L = /* @__PURE__ */ A({
|
|
12
12
|
name: "ApFieldTextArea",
|
|
13
13
|
__name: "index",
|
|
@@ -64,46 +64,46 @@ const L = /* @__PURE__ */ A({
|
|
|
64
64
|
code: { type: [Boolean, Object], default: !1 }
|
|
65
65
|
},
|
|
66
66
|
emits: ["update:value"],
|
|
67
|
-
setup(
|
|
68
|
-
const
|
|
69
|
-
if (
|
|
70
|
-
return
|
|
67
|
+
setup(l, { expose: x, emit: g }) {
|
|
68
|
+
const o = k(), t = l, v = g, { value: a, updateValue: h } = M(t, v), { b: B, m: d } = N("field-textarea"), u = U("field"), b = E("TextArea", t), I = m(() => {
|
|
69
|
+
if (t.code)
|
|
70
|
+
return t.code === !0 ? {
|
|
71
71
|
language: "text"
|
|
72
72
|
} : {
|
|
73
|
-
language:
|
|
73
|
+
language: t.code?.language ?? "text"
|
|
74
74
|
};
|
|
75
75
|
});
|
|
76
|
-
function C(
|
|
77
|
-
const
|
|
78
|
-
i && (i.value =
|
|
76
|
+
function C(n) {
|
|
77
|
+
const s = n.target.value || "", c = t.beforeInput ? t.beforeInput?.(s) : s, i = o.value?.$el?.querySelector("textarea");
|
|
78
|
+
i && (i.value = c), h(c);
|
|
79
79
|
}
|
|
80
|
-
return
|
|
81
|
-
focus: (
|
|
82
|
-
|
|
80
|
+
return x({
|
|
81
|
+
focus: (n) => {
|
|
82
|
+
o.value?.focus(n);
|
|
83
83
|
},
|
|
84
84
|
blur: () => {
|
|
85
|
-
|
|
85
|
+
o.value?.blur();
|
|
86
86
|
},
|
|
87
|
-
resizableTextArea:
|
|
88
|
-
}), (
|
|
89
|
-
|
|
87
|
+
resizableTextArea: m(() => o.value?.resizableTextArea)
|
|
88
|
+
}), (n, s) => l.mode === "read" ? (r(), p(T, { key: 0 }, [
|
|
89
|
+
l.code ? (r(), p("pre", {
|
|
90
90
|
key: 1,
|
|
91
|
-
class:
|
|
91
|
+
class: f([e(d)("code"), e(u)])
|
|
92
92
|
}, [
|
|
93
|
-
w("code", null,
|
|
94
|
-
], 2)) : (
|
|
93
|
+
w("code", null, y(e(j)(e(a), I.value.language)), 1)
|
|
94
|
+
], 2)) : (r(), p("span", {
|
|
95
95
|
key: 0,
|
|
96
|
-
class:
|
|
97
|
-
},
|
|
98
|
-
], 64)) : (
|
|
96
|
+
class: f([e(d)("read"), e(u)])
|
|
97
|
+
}, y(e(S)(e(a)) || e(a) === "" ? l.emptyText : e(a)), 3))
|
|
98
|
+
], 64)) : (r(), z(e(F).TextArea, R(
|
|
99
99
|
{ key: 1 },
|
|
100
|
-
e(V)(
|
|
100
|
+
e(V)(t, ["onUpdate:value", "value", "beforeInput", "emptyText"]),
|
|
101
101
|
{
|
|
102
102
|
ref_key: "textAreaRef",
|
|
103
|
-
ref:
|
|
103
|
+
ref: o,
|
|
104
104
|
placeholder: e(b),
|
|
105
|
-
value: e(
|
|
106
|
-
class: [e(B)(), e(
|
|
105
|
+
value: e(a),
|
|
106
|
+
class: [e(B)(), e(u)],
|
|
107
107
|
onInput: C
|
|
108
108
|
}
|
|
109
109
|
), null, 16, ["placeholder", "value", "class"]));
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as s, computed as i, createElementBlock as a, openBlock as n, toDisplayString as l, unref as o, normalizeClass as
|
|
2
|
-
import { isNil as
|
|
1
|
+
import { defineComponent as s, computed as i, createElementBlock as a, openBlock as n, toDisplayString as l, unref as o, normalizeClass as p, createElementVNode as c } from "vue";
|
|
2
|
+
import { isNil as m } from "lodash-unified";
|
|
3
3
|
import "../../config-provider/index.mjs";
|
|
4
|
-
import
|
|
5
|
-
import { languageFormat as
|
|
6
|
-
import { useNamespace as
|
|
7
|
-
const
|
|
4
|
+
import f from "../style/index.mjs";
|
|
5
|
+
import { languageFormat as y } from "./utils.mjs";
|
|
6
|
+
import { useNamespace as g } from "../../config-provider/hooks/use-namespace.mjs";
|
|
7
|
+
const B = {
|
|
8
8
|
key: 0,
|
|
9
9
|
style: {
|
|
10
10
|
whiteSpace: "pre-wrap",
|
|
@@ -66,8 +66,8 @@ const h = {
|
|
|
66
66
|
beforeInput: {},
|
|
67
67
|
code: { type: [Boolean, Object], default: !1 }
|
|
68
68
|
},
|
|
69
|
-
setup(
|
|
70
|
-
const { m:
|
|
69
|
+
setup(e) {
|
|
70
|
+
const { m: r } = g("field-textarea"), u = f("field"), t = e, d = i(() => {
|
|
71
71
|
if (t.code)
|
|
72
72
|
return t.code === !0 ? {
|
|
73
73
|
language: "text"
|
|
@@ -75,12 +75,12 @@ const h = {
|
|
|
75
75
|
language: t.code?.language ?? "text"
|
|
76
76
|
};
|
|
77
77
|
});
|
|
78
|
-
return (
|
|
78
|
+
return (h, v) => e.code ? (n(), a("pre", {
|
|
79
79
|
key: 1,
|
|
80
|
-
class:
|
|
80
|
+
class: p([o(r)("code"), o(u)])
|
|
81
81
|
}, [
|
|
82
|
-
c("code", null, l(o(
|
|
83
|
-
], 2)) : (n(), a("span",
|
|
82
|
+
c("code", null, l(o(y)(e.value, d.value.language)), 1)
|
|
83
|
+
], 2)) : (n(), a("span", B, l(o(m)(e.value) || e.value === "" ? e.emptyText : e.value), 1));
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
86
|
export {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { isVNode as R, defineComponent as A, useSlots as F, shallowRef as
|
|
1
|
+
import { isVNode as R, defineComponent as A, useSlots as F, shallowRef as E, computed as K, unref as e, createVNode as r, Fragment as g, createBlock as v, openBlock as x, resolveDynamicComponent as U, mergeProps as _, createSlots as z, renderList as M, withCtx as S, renderSlot as j, normalizeProps as q, guardReactiveProps as O } from "vue";
|
|
2
2
|
import { Space as $, Tag as H, TreeSelect as W, Spin as G } from "@aplus-frontend/antdv";
|
|
3
3
|
import { isArray as J, omit as Q } from "lodash-unified";
|
|
4
4
|
import "../../hooks/index.mjs";
|
|
5
5
|
import { useRequest as X } from "./use-request.mjs";
|
|
6
6
|
import { useControllableValue as Y } from "../../hooks/useControllableValue.mjs";
|
|
7
|
-
function
|
|
8
|
-
return typeof
|
|
7
|
+
function w(n) {
|
|
8
|
+
return typeof n == "function" || Object.prototype.toString.call(n) === "[object Object]" && !R(n);
|
|
9
9
|
}
|
|
10
10
|
const de = /* @__PURE__ */ A({
|
|
11
11
|
name: "ApFieldTreeSelect",
|
|
@@ -173,40 +173,40 @@ const de = /* @__PURE__ */ A({
|
|
|
173
173
|
}
|
|
174
174
|
},
|
|
175
175
|
emits: ["update:value"],
|
|
176
|
-
setup(
|
|
177
|
-
expose:
|
|
176
|
+
setup(n, {
|
|
177
|
+
expose: B,
|
|
178
178
|
emit: C
|
|
179
179
|
}) {
|
|
180
|
-
const o =
|
|
180
|
+
const o = n, N = F(), T = C, p = E(), {
|
|
181
181
|
value: f,
|
|
182
182
|
updateValue: b
|
|
183
183
|
} = Y(o, T), {
|
|
184
184
|
treeData: c,
|
|
185
185
|
loading: m,
|
|
186
186
|
request: y
|
|
187
|
-
} = X(o), D =
|
|
188
|
-
let
|
|
187
|
+
} = X(o), D = K(() => {
|
|
188
|
+
let a;
|
|
189
189
|
const u = e(f), i = J(u) ? u : [u].filter(Boolean);
|
|
190
190
|
if (!i.length)
|
|
191
|
-
return
|
|
192
|
-
const
|
|
193
|
-
function h(
|
|
194
|
-
for (const
|
|
195
|
-
if (i.find((P) => P ===
|
|
191
|
+
return r(g, null, [o.emptyText]);
|
|
192
|
+
const t = [], s = o.fieldNames?.label || "label", L = o.fieldNames?.value || "value";
|
|
193
|
+
function h(l) {
|
|
194
|
+
for (const d of l) {
|
|
195
|
+
if (i.find((P) => P === d[L]) && t.push(d[s]), t.length === i.length)
|
|
196
196
|
return;
|
|
197
|
-
|
|
197
|
+
d.children?.length && h(d.children);
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
|
-
return h(e(c)),
|
|
200
|
+
return h(e(c)), t.length ? t.length === 1 ? r("span", null, [t[0]]) : r($, {
|
|
201
201
|
size: 4
|
|
202
|
-
},
|
|
202
|
+
}, w(a = t.map((l, d) => r(H, {
|
|
203
203
|
style: "margin-right: 0px",
|
|
204
|
-
key: `${
|
|
205
|
-
},
|
|
204
|
+
key: `${l}-${d}`
|
|
205
|
+
}, w(l) ? l : {
|
|
206
|
+
default: () => [l]
|
|
207
|
+
}))) ? a : {
|
|
206
208
|
default: () => [a]
|
|
207
|
-
})
|
|
208
|
-
default: () => [t]
|
|
209
|
-
}) : d(g, null, [o.emptyText]);
|
|
209
|
+
}) : r(g, null, [o.emptyText]);
|
|
210
210
|
});
|
|
211
211
|
function V() {
|
|
212
212
|
p.value?.focus?.();
|
|
@@ -214,16 +214,16 @@ const de = /* @__PURE__ */ A({
|
|
|
214
214
|
function k() {
|
|
215
215
|
p.value?.blur?.();
|
|
216
216
|
}
|
|
217
|
-
function I(
|
|
218
|
-
return y(
|
|
217
|
+
function I(a) {
|
|
218
|
+
return y(a);
|
|
219
219
|
}
|
|
220
|
-
return
|
|
220
|
+
return B({
|
|
221
221
|
request: y,
|
|
222
222
|
focus: V,
|
|
223
223
|
blur: k
|
|
224
|
-
}), (
|
|
224
|
+
}), (a, u) => n.mode === "read" ? (x(), v(U(D.value), {
|
|
225
225
|
key: 0
|
|
226
|
-
})) : (
|
|
226
|
+
})) : (x(), v(e(W), _({
|
|
227
227
|
key: 1
|
|
228
228
|
}, e(Q)(o, ["onUpdate:value", "value", "treeData", "loadData"]), {
|
|
229
229
|
ref_key: "treeSelectRef",
|
|
@@ -231,16 +231,16 @@ const de = /* @__PURE__ */ A({
|
|
|
231
231
|
value: e(f),
|
|
232
232
|
"tree-data": e(c),
|
|
233
233
|
loading: e(m),
|
|
234
|
-
"load-data":
|
|
234
|
+
"load-data": n.loadData ? I : void 0,
|
|
235
235
|
"onUpdate:value": e(b)
|
|
236
236
|
}), z({
|
|
237
237
|
_: 2
|
|
238
|
-
}, [M(N, (i,
|
|
239
|
-
name:
|
|
240
|
-
fn:
|
|
238
|
+
}, [M(N, (i, t) => ({
|
|
239
|
+
name: t,
|
|
240
|
+
fn: S((s) => [j(a.$slots, t, q(O(s || {})))])
|
|
241
241
|
})), e(m) ? {
|
|
242
242
|
name: "notFoundContent",
|
|
243
|
-
fn:
|
|
243
|
+
fn: S(() => [r(e(G), {
|
|
244
244
|
size: "small"
|
|
245
245
|
})]),
|
|
246
246
|
key: "0"
|