@aplus-frontend/ui 7.13.8 → 7.13.10
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/hooks/use-columns.d.ts +2 -0
- package/es/src/ag-grid/hooks/use-columns.mjs +35 -17
- package/es/src/ag-grid/index.vue.mjs +349 -318
- 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 +29 -29
- package/es/src/ap-field/date-range/read.vue2.mjs +22 -22
- package/es/src/ap-field/hooks/use-default-presets.mjs +59 -16
- package/es/src/ap-field/interface.d.ts +46 -1
- 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 +12 -2
- package/es/src/ap-field/select/index.vue.mjs +127 -124
- 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 +53 -36
- 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/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 +52 -51
- 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.vue.d.ts +1 -0
- package/es/src/ap-table/components/setting/template/edit-form.vue2.mjs +31 -30
- package/es/src/ap-table/components/setting/template/index.vue2.mjs +25 -25
- package/es/src/ap-table/components/setting/template/item.vue2.mjs +41 -40
- package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +14 -14
- package/es/src/ap-table/hooks/use-sorted-filtered.d.ts +18 -2
- package/es/src/ap-table/hooks/use-sorted-filtered.mjs +13 -11
- package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +17 -2
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +148 -142
- package/es/src/ap-table/style/setting.mjs +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-export-group/ApExportGroup.vue2.mjs +119 -112
- package/es/src/business/ap-export-group/handleExportDownload.d.ts +1 -1
- package/es/src/business/ap-export-group/handleExportDownload.mjs +2 -2
- package/es/src/business/ap-export-group/interface.d.ts +9 -0
- 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/config-provider/config-provider-props.d.ts +1 -1
- package/es/src/config-provider/config-provider.d.ts +3 -0
- package/es/src/config-provider/hooks/use-global-config.d.ts +1 -0
- package/es/src/config-provider/index.d.ts +6 -0
- 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/locale/lang/en.mjs +2 -1
- package/es/src/locale/lang/zh-cn.mjs +2 -1
- 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/hooks/use-columns.d.ts +2 -0
- package/lib/src/ag-grid/hooks/use-columns.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/hooks/use-default-presets.js +1 -1
- package/lib/src/ap-field/interface.d.ts +46 -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 +12 -2
- 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/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.vue.d.ts +1 -0
- 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/hooks/use-sorted-filtered.d.ts +18 -2
- package/lib/src/ap-table/hooks/use-sorted-filtered.js +1 -1
- package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +17 -2
- package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
- package/lib/src/ap-table/style/setting.js +1 -1
- 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-export-group/ApExportGroup.vue2.js +1 -1
- package/lib/src/business/ap-export-group/handleExportDownload.d.ts +1 -1
- package/lib/src/business/ap-export-group/handleExportDownload.js +1 -1
- package/lib/src/business/ap-export-group/interface.d.ts +9 -0
- 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/config-provider/config-provider-props.d.ts +1 -1
- package/lib/src/config-provider/config-provider.d.ts +3 -0
- package/lib/src/config-provider/hooks/use-global-config.d.ts +1 -0
- package/lib/src/config-provider/index.d.ts +6 -0
- 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/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.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 +3 -3
|
@@ -1,65 +1,66 @@
|
|
|
1
|
-
import { defineComponent as f, ref as u, createElementBlock as d, openBlock as y, createVNode as
|
|
2
|
-
import { Flex as
|
|
3
|
-
import { ApForm as
|
|
1
|
+
import { defineComponent as f, ref as u, createElementBlock as d, openBlock as y, createVNode as l, unref as e, withCtx as o, createTextVNode as i, toDisplayString as r } from "vue";
|
|
2
|
+
import { Flex as C, Button as p } from "@aplus-frontend/antdv";
|
|
3
|
+
import { ApForm as b } from "../../../../ap-form/index.mjs";
|
|
4
4
|
import "../../../../config-provider/index.mjs";
|
|
5
|
-
import { useLocale as
|
|
6
|
-
import { ApFormItemText as
|
|
7
|
-
const
|
|
5
|
+
import { useLocale as g } from "../../../../config-provider/hooks/use-locale.mjs";
|
|
6
|
+
import { ApFormItemText as h } from "../../../../ap-form/items/text/index.mjs";
|
|
7
|
+
const B = /* @__PURE__ */ f({
|
|
8
8
|
__name: "edit-form",
|
|
9
9
|
props: {
|
|
10
10
|
onConfirm: { type: Function },
|
|
11
11
|
onCancel: { type: Function },
|
|
12
|
-
initialValues: {}
|
|
12
|
+
initialValues: {},
|
|
13
|
+
isEdit: { type: Boolean }
|
|
13
14
|
},
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
16
|
-
async function
|
|
17
|
-
const
|
|
18
|
-
|
|
15
|
+
setup(m) {
|
|
16
|
+
const s = m, { t } = g(), n = u();
|
|
17
|
+
async function c() {
|
|
18
|
+
const a = await n.value?.validateFields();
|
|
19
|
+
s.onConfirm(a?.label);
|
|
19
20
|
}
|
|
20
|
-
return (
|
|
21
|
-
|
|
21
|
+
return (a, T) => (y(), d("div", null, [
|
|
22
|
+
l(e(b), {
|
|
22
23
|
ref_key: "formRef",
|
|
23
24
|
ref: n,
|
|
24
25
|
colon: !1,
|
|
25
26
|
"label-col": { span: 24 },
|
|
26
|
-
"initial-values":
|
|
27
|
+
"initial-values": a.initialValues
|
|
27
28
|
}, {
|
|
28
|
-
default:
|
|
29
|
-
|
|
29
|
+
default: o(() => [
|
|
30
|
+
l(e(h), {
|
|
30
31
|
rules: [
|
|
31
32
|
{
|
|
32
33
|
required: !0,
|
|
33
|
-
message: e(
|
|
34
|
+
message: e(t)("ap.apTable.setting.templateNamePlaceholder")
|
|
34
35
|
}
|
|
35
36
|
],
|
|
36
37
|
name: "label",
|
|
37
|
-
label: e(
|
|
38
|
+
label: a.isEdit ? e(t)("ap.apTable.setting.templateName") : e(t)("ap.apTable.setting.newTemplateName")
|
|
38
39
|
}, null, 8, ["rules", "label"])
|
|
39
40
|
]),
|
|
40
41
|
_: 1
|
|
41
42
|
}, 8, ["initial-values"]),
|
|
42
|
-
|
|
43
|
+
l(e(C), {
|
|
43
44
|
justify: "end",
|
|
44
45
|
gap: 8
|
|
45
46
|
}, {
|
|
46
|
-
default:
|
|
47
|
-
|
|
47
|
+
default: o(() => [
|
|
48
|
+
l(e(p), {
|
|
48
49
|
style: { height: "24px" },
|
|
49
|
-
onClick:
|
|
50
|
+
onClick: a.onCancel
|
|
50
51
|
}, {
|
|
51
|
-
default:
|
|
52
|
-
r(
|
|
52
|
+
default: o(() => [
|
|
53
|
+
i(r(e(t)("ap.common.cancelText")), 1)
|
|
53
54
|
]),
|
|
54
55
|
_: 1
|
|
55
56
|
}, 8, ["onClick"]),
|
|
56
|
-
|
|
57
|
+
l(e(p), {
|
|
57
58
|
style: { height: "24px" },
|
|
58
59
|
type: "primary",
|
|
59
|
-
onClick:
|
|
60
|
+
onClick: c
|
|
60
61
|
}, {
|
|
61
|
-
default:
|
|
62
|
-
r(
|
|
62
|
+
default: o(() => [
|
|
63
|
+
i(r(e(t)("ap.common.save")), 1)
|
|
63
64
|
]),
|
|
64
65
|
_: 1
|
|
65
66
|
})
|
|
@@ -70,5 +71,5 @@ const V = /* @__PURE__ */ f({
|
|
|
70
71
|
}
|
|
71
72
|
});
|
|
72
73
|
export {
|
|
73
|
-
|
|
74
|
+
B as default
|
|
74
75
|
};
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Flex as
|
|
1
|
+
import { defineComponent as v, createBlock as l, openBlock as a, unref as e, normalizeClass as s, withCtx as d, createElementVNode as r, createVNode as f, toDisplayString as y, createElementBlock as g, Fragment as k, renderList as _ } from "vue";
|
|
2
|
+
import { Flex as h, Divider as C } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../../../../config-provider/index.mjs";
|
|
4
4
|
import { useInjectApColumnSetting as L } from "../context.mjs";
|
|
5
5
|
import "./item.vue.mjs";
|
|
6
|
-
import { useLocale as
|
|
7
|
-
import { useNamespace as
|
|
8
|
-
import
|
|
9
|
-
const j = /* @__PURE__ */
|
|
6
|
+
import { useLocale as x } from "../../../../config-provider/hooks/use-locale.mjs";
|
|
7
|
+
import { useNamespace as z } from "../../../../config-provider/hooks/use-namespace.mjs";
|
|
8
|
+
import A from "./item.vue2.mjs";
|
|
9
|
+
const j = /* @__PURE__ */ v({
|
|
10
10
|
__name: "index",
|
|
11
11
|
props: {
|
|
12
12
|
customizeTemplateList: {},
|
|
13
13
|
persistenceKey: {},
|
|
14
14
|
onActiveChange: { type: Function }
|
|
15
15
|
},
|
|
16
|
-
setup(
|
|
17
|
-
const { t:
|
|
18
|
-
function
|
|
19
|
-
|
|
16
|
+
setup(B, { expose: c }) {
|
|
17
|
+
const { t: m } = x(), { b: o } = z("ap-column-setting-template-list"), { activeKey: n } = L();
|
|
18
|
+
function p(t) {
|
|
19
|
+
n.value = t;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
|
|
21
|
+
function u(t) {
|
|
22
|
+
n.value = t;
|
|
23
23
|
}
|
|
24
|
-
return
|
|
24
|
+
return c({ updateActiveKey: u }), (t, F) => (a(), l(e(h), {
|
|
25
25
|
vertical: "",
|
|
26
|
-
class:
|
|
26
|
+
class: s(e(o)())
|
|
27
27
|
}, {
|
|
28
|
-
default:
|
|
29
|
-
|
|
30
|
-
class:
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
class:
|
|
28
|
+
default: d(() => [
|
|
29
|
+
r("div", {
|
|
30
|
+
class: s(e(o)("title"))
|
|
31
|
+
}, y(e(m)("ap.apTable.setting.templateSetting")), 3),
|
|
32
|
+
f(e(C), { style: { margin: "0" } }),
|
|
33
|
+
r("div", {
|
|
34
|
+
class: s(e(o)("content"))
|
|
35
35
|
}, [
|
|
36
|
-
(a(!0), k
|
|
36
|
+
(a(!0), g(k, null, _(t.customizeTemplateList, (i) => (a(), l(A, {
|
|
37
37
|
key: i.key,
|
|
38
38
|
value: i,
|
|
39
|
-
"is-active": e(
|
|
40
|
-
"should-remove":
|
|
41
|
-
onClick: () =>
|
|
39
|
+
"is-active": e(n) === i.key,
|
|
40
|
+
"should-remove": t.customizeTemplateList.length > 1,
|
|
41
|
+
onClick: () => p(i.key)
|
|
42
42
|
}, null, 8, ["value", "is-active", "should-remove", "onClick"]))), 128))
|
|
43
43
|
], 2)
|
|
44
44
|
]),
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as b, ref as g, createElementBlock as
|
|
2
|
-
import { EditOutlined as
|
|
3
|
-
import { Flex as
|
|
1
|
+
import { defineComponent as b, ref as g, createElementBlock as u, openBlock as s, normalizeClass as n, unref as e, createElementVNode as c, createBlock as w, createCommentVNode as f, toDisplayString as B, withCtx as r, createVNode as i, withModifiers as v } from "vue";
|
|
2
|
+
import { EditOutlined as N, DeleteOutlined as A } from "@ant-design/icons-vue";
|
|
3
|
+
import { Flex as D, Popover as E } from "@aplus-frontend/antdv";
|
|
4
4
|
import "../../../../config-provider/index.mjs";
|
|
5
|
-
import { useInjectApColumnSetting as
|
|
5
|
+
import { useInjectApColumnSetting as V } from "../context.mjs";
|
|
6
6
|
import "./edit-form.vue.mjs";
|
|
7
|
-
import { useNamespace as
|
|
8
|
-
import
|
|
9
|
-
const
|
|
7
|
+
import { useNamespace as F } from "../../../../config-provider/hooks/use-namespace.mjs";
|
|
8
|
+
import O from "./edit-form.vue2.mjs";
|
|
9
|
+
const M = /* @__PURE__ */ b({
|
|
10
10
|
__name: "item",
|
|
11
11
|
props: {
|
|
12
12
|
value: {},
|
|
@@ -14,65 +14,66 @@ const K = /* @__PURE__ */ b({
|
|
|
14
14
|
onClick: { type: Function },
|
|
15
15
|
shouldRemove: { type: Boolean }
|
|
16
16
|
},
|
|
17
|
-
setup(
|
|
18
|
-
const
|
|
19
|
-
function y(
|
|
20
|
-
if (!
|
|
17
|
+
setup(d) {
|
|
18
|
+
const p = d, { b: l } = F("ap-column-setting-template-item"), a = g(!1), { deleteTemplate: C, cacheConfig: k } = V();
|
|
19
|
+
function y(t) {
|
|
20
|
+
if (!t || t === p.value.label)
|
|
21
21
|
return;
|
|
22
|
-
const
|
|
23
|
-
|
|
22
|
+
const o = p.value;
|
|
23
|
+
o.label = t, a.value = !1;
|
|
24
24
|
}
|
|
25
|
-
return (
|
|
26
|
-
class: n([e(
|
|
27
|
-
onClick:
|
|
28
|
-
(...
|
|
25
|
+
return (t, o) => (s(), u("div", {
|
|
26
|
+
class: n([e(l)(), { [e(l)("active")]: t.isActive }]),
|
|
27
|
+
onClick: o[3] || (o[3] = //@ts-ignore
|
|
28
|
+
(...m) => t.onClick && t.onClick(...m))
|
|
29
29
|
}, [
|
|
30
|
-
|
|
31
|
-
class: n(e(
|
|
32
|
-
}, B(
|
|
33
|
-
e(k).persistenceKey ? (
|
|
30
|
+
c("span", {
|
|
31
|
+
class: n(e(l)("label"))
|
|
32
|
+
}, B(t.value.label), 3),
|
|
33
|
+
e(k).persistenceKey ? (s(), w(e(D), {
|
|
34
34
|
key: 0,
|
|
35
35
|
gap: 8,
|
|
36
|
-
class: n(e(
|
|
36
|
+
class: n(e(l)("action-wrapper"))
|
|
37
37
|
}, {
|
|
38
|
-
default:
|
|
39
|
-
|
|
38
|
+
default: r(() => [
|
|
39
|
+
i(e(E), {
|
|
40
40
|
open: a.value,
|
|
41
41
|
trigger: "click",
|
|
42
42
|
arrow: !1,
|
|
43
43
|
placement: "bottom",
|
|
44
44
|
"destroy-tooltip-on-hide": ""
|
|
45
45
|
}, {
|
|
46
|
-
content:
|
|
47
|
-
|
|
48
|
-
"
|
|
46
|
+
content: r(() => [
|
|
47
|
+
i(O, {
|
|
48
|
+
"is-edit": "",
|
|
49
|
+
"initial-values": { label: t.value.label },
|
|
49
50
|
onConfirm: y,
|
|
50
|
-
onCancel:
|
|
51
|
+
onCancel: o[1] || (o[1] = () => a.value = !1)
|
|
51
52
|
}, null, 8, ["initial-values"])
|
|
52
53
|
]),
|
|
53
|
-
default:
|
|
54
|
-
|
|
55
|
-
class: n(e(
|
|
56
|
-
onClick:
|
|
54
|
+
default: r(() => [
|
|
55
|
+
c("span", {
|
|
56
|
+
class: n(e(l)("icon-wrapper")),
|
|
57
|
+
onClick: o[0] || (o[0] = v((m) => a.value = !0, ["stop"]))
|
|
57
58
|
}, [
|
|
58
|
-
|
|
59
|
+
i(e(N))
|
|
59
60
|
], 2)
|
|
60
61
|
]),
|
|
61
62
|
_: 1
|
|
62
63
|
}, 8, ["open"]),
|
|
63
|
-
|
|
64
|
+
t.shouldRemove ? (s(), u("span", {
|
|
64
65
|
key: 0,
|
|
65
|
-
class: n(e(
|
|
66
|
-
onClick:
|
|
66
|
+
class: n(e(l)("icon-wrapper")),
|
|
67
|
+
onClick: o[2] || (o[2] = v(() => e(C)(t.value.key), ["stop"]))
|
|
67
68
|
}, [
|
|
68
|
-
|
|
69
|
-
], 2)) :
|
|
69
|
+
i(e(A))
|
|
70
|
+
], 2)) : f("", !0)
|
|
70
71
|
]),
|
|
71
72
|
_: 1
|
|
72
|
-
}, 8, ["class"])) :
|
|
73
|
+
}, 8, ["class"])) : f("", !0)
|
|
73
74
|
], 2));
|
|
74
75
|
}
|
|
75
76
|
});
|
|
76
77
|
export {
|
|
77
|
-
|
|
78
|
+
M as default
|
|
78
79
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as v, computed as w, unref as r, createElementBlock as u, createCommentVNode as b, openBlock as o, createVNode as c, withCtx as l, Fragment as
|
|
2
|
-
import { Row as N, Col as
|
|
1
|
+
import { defineComponent as v, computed as w, unref as r, createElementBlock as u, createCommentVNode as b, openBlock as o, createVNode as c, withCtx as l, Fragment as f, renderList as x, createBlock as d, mergeProps as B, resolveDynamicComponent as V } from "vue";
|
|
2
|
+
import { Row as N, Col as m, Checkbox as I } from "@aplus-frontend/antdv";
|
|
3
3
|
import { useInjectApTable as L } from "../../../context.mjs";
|
|
4
4
|
import "../select-group/index.vue.mjs";
|
|
5
5
|
import { getLabelNode as P } from "../utils.mjs";
|
|
@@ -9,41 +9,41 @@ const U = { key: 0 }, T = /* @__PURE__ */ v({
|
|
|
9
9
|
props: {
|
|
10
10
|
value: {}
|
|
11
11
|
},
|
|
12
|
-
setup(
|
|
13
|
-
const
|
|
14
|
-
function
|
|
15
|
-
return
|
|
12
|
+
setup(h) {
|
|
13
|
+
const s = h, { columnsBackup: p, renderConfig: k } = L(), g = w(() => [...r(p) || []].sort((e, t) => e.children?.length && !t.children?.length ? 1 : !e.children?.length && t.children?.length ? -1 : 0));
|
|
14
|
+
function i(n) {
|
|
15
|
+
return s.value.find((e) => e.key === n.key);
|
|
16
16
|
}
|
|
17
17
|
function C(n) {
|
|
18
|
-
const e =
|
|
18
|
+
const e = i(n);
|
|
19
19
|
return {
|
|
20
20
|
checked: e?.show,
|
|
21
21
|
disabled: e?.disabled
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
function _(n, e) {
|
|
25
|
-
const a =
|
|
25
|
+
const a = s.value?.find((y) => y.key === n);
|
|
26
26
|
a && (a.show = e);
|
|
27
27
|
}
|
|
28
|
-
return (n, e) =>
|
|
28
|
+
return (n, e) => n.value?.length ? (o(), u("div", U, [
|
|
29
29
|
c(r(N), { gutter: [24, 12] }, {
|
|
30
30
|
default: l(() => [
|
|
31
|
-
(o(!0), u(
|
|
31
|
+
(o(!0), u(f, null, x(g.value, (t) => (o(), u(f, {
|
|
32
32
|
key: t.key
|
|
33
33
|
}, [
|
|
34
|
-
t.children?.length ? (o(), d(r(
|
|
34
|
+
t.children?.length ? (o(), d(r(m), {
|
|
35
35
|
key: 1,
|
|
36
36
|
span: 24
|
|
37
37
|
}, {
|
|
38
38
|
default: l(() => [
|
|
39
39
|
c(S, {
|
|
40
|
-
value:
|
|
40
|
+
value: i(t)
|
|
41
41
|
}, null, 8, ["value"])
|
|
42
42
|
]),
|
|
43
43
|
_: 2
|
|
44
|
-
}, 1024)) : (o(), d(r(
|
|
44
|
+
}, 1024)) : (o(), d(r(m), {
|
|
45
45
|
key: 0,
|
|
46
|
-
span:
|
|
46
|
+
span: 12
|
|
47
47
|
}, {
|
|
48
48
|
default: l(() => [
|
|
49
49
|
c(r(I), B({ ref_for: !0 }, C(t), {
|
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
import { Recordable } from '../../type';
|
|
2
2
|
import { ApColumnType } from '../interface';
|
|
3
3
|
import { Ref } from 'vue';
|
|
4
|
-
export
|
|
4
|
+
export type DefaultSortOrderType = {
|
|
5
|
+
colKey: string | number;
|
|
6
|
+
field: string;
|
|
7
|
+
order: 'descend' | 'ascend';
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
};
|
|
10
|
+
export declare const useTableSortedAndFiltered: (defaultSorterInfo?: DefaultSortOrderType) => {
|
|
5
11
|
getColumnSFConfig: (column: ApColumnType, append?: boolean) => Recordable;
|
|
6
12
|
setSF: (filters: any, sorter: any) => void;
|
|
7
13
|
clearSorter: () => void;
|
|
8
14
|
clearFilters: () => void;
|
|
9
15
|
clearAll: () => void;
|
|
10
|
-
sortedInfo: Ref<
|
|
16
|
+
sortedInfo: Ref<{
|
|
17
|
+
[x: string]: any;
|
|
18
|
+
colKey: string | number;
|
|
19
|
+
field: string;
|
|
20
|
+
order: "descend" | "ascend";
|
|
21
|
+
} | null | undefined, DefaultSortOrderType | {
|
|
22
|
+
[x: string]: any;
|
|
23
|
+
colKey: string | number;
|
|
24
|
+
field: string;
|
|
25
|
+
order: "descend" | "ascend";
|
|
26
|
+
} | null | undefined>;
|
|
11
27
|
filteredInfo: Ref<any, any>;
|
|
12
28
|
};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { ref as i, unref as s } from "vue";
|
|
2
|
-
const
|
|
3
|
-
const r = i(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
const p = (c) => {
|
|
3
|
+
const r = i(
|
|
4
|
+
c
|
|
5
|
+
), t = i();
|
|
6
|
+
function a(e, n = !1) {
|
|
7
|
+
const F = s(t) || {}, u = s(r) || {}, l = n ? e : {};
|
|
8
|
+
return e.filters && (l.filteredValue = F[e.key] || null), e.sorter && (l.sortOrder = u.columnKey === e.key ? u.order : null), l;
|
|
7
9
|
}
|
|
8
|
-
function
|
|
10
|
+
function d(e, n) {
|
|
9
11
|
t.value = e, r.value = n;
|
|
10
12
|
}
|
|
11
13
|
function o() {
|
|
@@ -14,19 +16,19 @@ const S = () => {
|
|
|
14
16
|
function f() {
|
|
15
17
|
t.value = null;
|
|
16
18
|
}
|
|
17
|
-
function
|
|
19
|
+
function v() {
|
|
18
20
|
o(), f();
|
|
19
21
|
}
|
|
20
22
|
return {
|
|
21
|
-
getColumnSFConfig:
|
|
22
|
-
setSF:
|
|
23
|
+
getColumnSFConfig: a,
|
|
24
|
+
setSF: d,
|
|
23
25
|
clearSorter: o,
|
|
24
26
|
clearFilters: f,
|
|
25
|
-
clearAll:
|
|
27
|
+
clearAll: v,
|
|
26
28
|
sortedInfo: r,
|
|
27
29
|
filteredInfo: t
|
|
28
30
|
};
|
|
29
31
|
};
|
|
30
32
|
export {
|
|
31
|
-
|
|
33
|
+
p as useTableSortedAndFiltered
|
|
32
34
|
};
|
|
@@ -3,6 +3,7 @@ import { Ref, ComputedRef } from 'vue';
|
|
|
3
3
|
import { ApFormSearchFormExpose } from '../../ap-form';
|
|
4
4
|
import { Recordable } from '../../type';
|
|
5
5
|
import { ApTablePaginationConfig, RequestData } from '../interface';
|
|
6
|
+
import { DefaultSortOrderType } from './use-sorted-filtered';
|
|
6
7
|
import { TablePaginationConfig } from '@aplus-frontend/antdv';
|
|
7
8
|
import { FilterValue, SorterResult, TableCurrentDataSource } from '@aplus-frontend/antdv/es/table/interface';
|
|
8
9
|
import { ApColumnType } from '..';
|
|
@@ -63,6 +64,10 @@ export type UseTablePagingParams<DataType, ParamsType> = {
|
|
|
63
64
|
* @returns
|
|
64
65
|
*/
|
|
65
66
|
onAfterRequest?: (records: DataType[]) => void;
|
|
67
|
+
/**
|
|
68
|
+
* 默认排序规则(只允许单字段)
|
|
69
|
+
*/
|
|
70
|
+
defaultSortOrder?: DefaultSortOrderType;
|
|
66
71
|
};
|
|
67
72
|
export type TablePagingRequestOptions = {
|
|
68
73
|
/**
|
|
@@ -86,7 +91,7 @@ type InternalDataType<DataType = Recordable> = {
|
|
|
86
91
|
export declare const DEFAULT_CURRENT = 1;
|
|
87
92
|
export declare const DEFAULT_PAGE_SIZE = 20;
|
|
88
93
|
export type OptionalOnTableChange<T extends (...args: any[]) => any> = (...args: Partial<Parameters<T>>) => ReturnType<T>;
|
|
89
|
-
export declare const useTablePaging: <DataType = any, ParamsType = Record<string, any>>({ manual, request, params, defaultData, formatParams, paramsValueTypeMap, resetFieldsIgnores, filterFields, sortFields, namespace, pagination, onClickReset, onAfterRequest }: UseTablePagingParams<DataType, ParamsType>) => {
|
|
94
|
+
export declare const useTablePaging: <DataType = any, ParamsType = Record<string, any>>({ manual, request, params, defaultData, formatParams, paramsValueTypeMap, resetFieldsIgnores, filterFields, sortFields, namespace, pagination, onClickReset, onAfterRequest, defaultSortOrder }: UseTablePagingParams<DataType, ParamsType>) => {
|
|
90
95
|
formRef: Ref<ApFormSearchFormExpose | undefined, ApFormSearchFormExpose | undefined>;
|
|
91
96
|
submit: () => void;
|
|
92
97
|
reset: () => void;
|
|
@@ -114,7 +119,17 @@ export declare const useTablePaging: <DataType = any, ParamsType = Record<string
|
|
|
114
119
|
dataSource: ComputedRef<DataType[]>;
|
|
115
120
|
setDataSource: (dataSource?: DataType[]) => void;
|
|
116
121
|
getColumnSFConfig: (column: ApColumnType, append?: boolean) => Recordable;
|
|
117
|
-
sortedInfo: Ref<
|
|
122
|
+
sortedInfo: Ref<{
|
|
123
|
+
[x: string]: any;
|
|
124
|
+
colKey: string | number;
|
|
125
|
+
field: string;
|
|
126
|
+
order: "descend" | "ascend";
|
|
127
|
+
} | null | undefined, DefaultSortOrderType | {
|
|
128
|
+
[x: string]: any;
|
|
129
|
+
colKey: string | number;
|
|
130
|
+
field: string;
|
|
131
|
+
order: "descend" | "ascend";
|
|
132
|
+
} | null | undefined>;
|
|
118
133
|
filteredInfo: Ref<any, any>;
|
|
119
134
|
getPaging: () => {
|
|
120
135
|
current?: number | undefined;
|