@aplus-frontend/ui 0.5.16 → 0.5.18
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/ap-action/group/index.vue.mjs +3 -3
- package/es/src/ap-action/item/index.vue2.mjs +5 -5
- package/es/src/ap-action/item-dropdown/index.vue.mjs +7 -7
- package/es/src/ap-action/item-modal/index.vue.mjs +2 -2
- package/es/src/ap-action/item-popconfirm/index.vue.mjs +2 -2
- package/es/src/ap-button/ap-action-button.vue.mjs +2 -2
- package/es/src/ap-button/ap-button.vue.mjs +2 -2
- package/es/src/ap-button/ap-confirm-button.vue.mjs +2 -2
- package/es/src/ap-descriptions/ap-descriptions.vue.mjs +4 -4
- package/es/src/ap-descriptions/help-message/index.vue2.mjs +4 -4
- package/es/src/ap-download/ap-download.vue.mjs +1 -1
- package/es/src/ap-field/checkbox/index.vue.mjs +1 -1
- package/es/src/ap-field/date/index.vue.mjs +4 -4
- package/es/src/ap-field/date-range/index.vue.mjs +8 -8
- package/es/src/ap-field/index.mjs +30 -30
- package/es/src/ap-field/number/index.vue.mjs +8 -8
- package/es/src/ap-field/radio/index.vue.mjs +1 -1
- package/es/src/ap-field/rate/index.vue.mjs +2 -2
- package/es/src/ap-field/segmented/index.vue.mjs +1 -1
- package/es/src/ap-field/select/index.vue.mjs +2 -2
- package/es/src/ap-field/select/use-select-options.d.ts +2 -2
- package/es/src/ap-field/slider/index.vue.mjs +4 -4
- package/es/src/ap-field/switch/index.vue.mjs +3 -3
- package/es/src/ap-field/text/index.vue2.mjs +2 -2
- package/es/src/ap-field/text/password.vue.mjs +2 -2
- package/es/src/ap-field/text-area/index.vue.mjs +3 -3
- package/es/src/ap-form/ap-form.vue.d.ts +2 -1
- package/es/src/ap-form/ap-form.vue2.mjs +2 -2
- package/es/src/ap-form/drawer-form/index.vue.d.ts +4 -3
- package/es/src/ap-form/drawer-form/index.vue.mjs +9 -9
- package/es/src/ap-form/item/index.vue.mjs +7 -7
- package/es/src/ap-form/item-group/index.vue.mjs +3 -3
- package/es/src/ap-form/items/checkbox/index.vue.mjs +2 -2
- package/es/src/ap-form/items/date/index.vue.mjs +2 -2
- package/es/src/ap-form/items/date-range/index.vue.mjs +2 -2
- package/es/src/ap-form/items/number/index.vue.mjs +2 -2
- package/es/src/ap-form/items/radio/index.vue.mjs +2 -2
- package/es/src/ap-form/items/select/index.vue.mjs +2 -2
- package/es/src/ap-form/items/switch/index.vue.mjs +2 -2
- package/es/src/ap-form/items/text/group.vue2.mjs +2 -2
- package/es/src/ap-form/items/text/index.vue2.mjs +2 -2
- package/es/src/ap-form/items/text/password.vue.mjs +2 -2
- package/es/src/ap-form/items/text-area/index.vue.mjs +2 -2
- package/es/src/ap-form/modal-form/index.vue.d.ts +4 -3
- package/es/src/ap-form/modal-form/index.vue.mjs +7 -7
- package/es/src/ap-form/render/item.vue.mjs +2 -2
- package/es/src/ap-form/search-form/index.vue.d.ts +4 -3
- package/es/src/ap-form/search-form/index.vue.mjs +1 -1
- package/es/src/ap-form/set/index.vue.mjs +1 -1
- package/es/src/ap-grid/editable/form-item.vue.d.ts +4 -2
- package/es/src/ap-grid/editable/form-item.vue.mjs +2 -2
- package/es/src/ap-grid/editable/index.vue.d.ts +4 -2
- package/es/src/ap-grid/editable/index.vue.mjs +2 -2
- package/es/src/ap-grid/hooks/use-inner-params.mjs +3 -3
- package/es/src/ap-grid/index.vue.d.ts +4 -2
- package/es/src/ap-grid/index.vue.mjs +110 -109
- package/es/src/ap-grid/interface.d.ts +10 -0
- package/es/src/ap-grid/utils/table.mjs +39 -32
- package/es/src/ap-info-layout/ApInfoLayout.vue.mjs +2 -2
- package/es/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.mjs +2 -2
- package/es/src/ap-info-layout/ap-info-layout-aplus/ap-info-layout.vue2.mjs +1 -1
- package/es/src/ap-list/index.vue.d.ts +4 -2
- package/es/src/ap-list/index.vue.mjs +4 -4
- package/es/src/ap-modal/utils/confirm.d.ts +1 -1
- package/es/src/ap-table/ap-table.vue.d.ts +4 -2
- package/es/src/ap-table/ap-table.vue2.mjs +26 -26
- package/es/src/ap-table/components/dynamic-component/index.vue2.mjs +2 -2
- package/es/src/ap-table/components/index/index.vue2.mjs +2 -2
- package/es/src/ap-table/components/paragraph-ellipsis/index.vue2.mjs +3 -3
- package/es/src/ap-table/components/setting/modal/index.vue2.mjs +3 -3
- package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +1 -1
- package/es/src/ap-table/components/setting/sortable/index.vue2.mjs +1 -1
- package/es/src/ap-table/components/setting/sortable/item.vue2.mjs +1 -1
- package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +11 -11
- package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +1 -1
- package/es/src/ap-table/components/status/index.vue2.mjs +2 -2
- package/es/src/ap-table/constants.mjs +40 -40
- package/es/src/ap-table/hooks/use-table-column-state.d.ts +4 -4
- package/es/src/ap-table/hooks/use-table-column-state.mjs +3 -3
- package/es/src/ap-table/utils.mjs +27 -26
- package/es/src/ap-tag/ap-tag-group.vue.mjs +8 -8
- package/es/src/ap-tag/ap-tag.vue.mjs +2 -2
- package/es/src/ap-upload/apUpload.vue.mjs +5 -5
- package/es/src/ap-upload/components/MultipleFile.vue.d.ts +1 -1
- package/es/src/ap-upload/components/MultipleFile.vue2.mjs +3 -3
- package/es/src/ap-upload/components/Picture.vue.d.ts +7 -2
- package/es/src/ap-upload/components/Picture.vue2.mjs +6 -6
- package/es/src/ap-upload/components/SingleFile.vue2.mjs +7 -7
- package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +1 -1
- package/es/src/business/ap-appendix/icons/file-icon.vue.mjs +2 -2
- package/es/src/business/ap-batch-action/ApBatchAction.vue2.mjs +2 -2
- package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.mjs +10 -10
- package/es/src/business/ap-batch-action-group/MenuItemGroup.vue2.mjs +1 -1
- package/es/src/business/ap-batch-action-group/index.d.ts +3 -3
- package/es/src/business/ap-button-group/ApButtonGroup.vue2.mjs +1 -1
- package/es/src/business/ap-card/ApCard.vue2.mjs +7 -7
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +4 -2
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +11 -11
- package/es/src/business/ap-expand-alert/index.d.ts +6 -4
- package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +9 -9
- package/es/src/business/ap-group-search/ap-group-search.vue2.mjs +5 -5
- package/es/src/business/ap-group-search/extension-select/index.vue2.mjs +4 -4
- package/es/src/business/ap-group-search/images/icon-down.vue.mjs +2 -2
- package/es/src/business/ap-group-search/images/icon-line-select.vue.mjs +2 -2
- package/es/src/business/ap-group-search/popover-select/index.vue2.mjs +2 -2
- package/es/src/business/ap-image/ApImage.vue2.mjs +1 -1
- package/es/src/business/ap-input-radio/ApInputRadio.vue2.mjs +2 -2
- package/es/src/business/ap-ladder/ApLadder.vue.d.ts +2 -14
- package/es/src/business/ap-ladder/ApLadder.vue2.mjs +64 -266
- package/es/src/business/ap-ladder/components/SimpleMode.vue.d.ts +110 -0
- package/es/src/business/ap-ladder/components/SimpleMode.vue.mjs +4 -0
- package/es/src/business/ap-ladder/components/SimpleMode.vue2.mjs +119 -0
- package/es/src/business/ap-ladder/components/ValueGroupMode.vue.d.ts +118 -0
- package/es/src/business/ap-ladder/components/ValueGroupMode.vue.mjs +4 -0
- package/es/src/business/ap-ladder/components/ValueGroupMode.vue2.mjs +213 -0
- package/es/src/business/ap-ladder/index.d.ts +4 -35
- package/es/src/business/ap-ladder/interface.d.ts +26 -0
- package/es/src/business/ap-ladder/useWatchEllipsis.d.ts +1 -2
- package/es/src/business/ap-ladder/useWatchEllipsis.origin.d.ts +3 -0
- package/es/src/business/ap-ladder/utils.d.ts +2 -0
- package/es/src/business/ap-ladder/utils.mjs +5 -0
- package/es/src/business/ap-select-layout/index.d.ts +4 -2
- package/es/src/business/ap-select-layout/select-layout.vue.d.ts +4 -2
- package/es/src/business/ap-select-layout/select-layout.vue2.mjs +4 -4
- package/es/src/business/ap-status/ApStatus.vue2.mjs +8 -8
- package/es/src/business/ap-status/group/ApStatusGroup.vue2.mjs +4 -4
- package/es/src/business/ap-summary/ap-summary.vue2.mjs +1 -1
- package/es/src/business/ap-table-modal/hooks/use-create-table-modal.mjs +1 -1
- package/es/src/business/ap-table-modal/interface.d.ts +1 -1
- package/es/src/business/ap-table-modal/modal-title.vue2.mjs +3 -3
- package/es/src/business/ap-table-modal/table-layout/index.vue2.mjs +20 -21
- package/es/src/business/ap-table-modal/table-modal.vue2.mjs +17 -17
- package/es/src/business/ap-title/ApTitle.vue2.mjs +7 -7
- package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs +1 -1
- package/es/src/business/ap-upload-file/icon/delete-icon.vue.mjs +2 -2
- package/es/src/business/ap-upload-file/icon/file-icon.vue.mjs +2 -2
- package/es/src/business/batch-input-group/form-item.vue.mjs +2 -2
- package/es/src/business/batch-input-group/index.vue.mjs +1 -1
- package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +2 -2
- package/es/src/check-card/index.vue2.mjs +3 -3
- package/es/src/config-provider/hooks/use-namespace.d.ts +1 -5
- package/es/src/editable-table/form-item.vue.d.ts +4 -2
- package/es/src/editable-table/form-item.vue.mjs +2 -2
- package/es/src/editable-table/index.vue.d.ts +4 -2
- package/es/src/editable-table/index.vue.mjs +2 -2
- package/es/src/full-screen/index.vue.mjs +3 -3
- package/es/src/hooks/useFullScreen.mjs +5 -5
- package/es/src/mask/index.vue.mjs +10 -10
- package/es/src/mask/style/css.d.ts +0 -0
- package/es/src/mask/style/css.js +1 -0
- package/es/src/mask/style/index.d.ts +0 -0
- package/es/src/mask/style/index.js +1 -0
- package/es/src/path-map.mjs +3 -1
- package/es/src/portal/index.vue.mjs +2 -2
- package/es/src/scroll-bar/index.vue.mjs +3 -3
- package/es/src/scroll-bar/internal.vue.mjs +2 -2
- package/es/src/scroll-view/index.vue.d.ts +5 -5
- package/es/src/scroll-view/index.vue.mjs +9 -9
- package/es/src/tests/wrapper.d.ts +4 -4
- package/es/src/text/group.vue.mjs +2 -2
- package/es/src/text/index.vue.mjs +4 -4
- package/es/src/text/style/css.d.ts +0 -0
- package/es/src/text/style/css.js +2 -0
- package/es/src/text/style/index.d.ts +0 -0
- package/es/src/text/style/index.js +2 -0
- package/es/src/work-order-modal/help-message.vue2.mjs +2 -2
- package/es/src/work-order-modal/work-order-modal.vue.d.ts +3 -2
- package/es/src/work-order-modal/work-order-modal.vue.mjs +2 -2
- package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
- package/lib/src/ap-field/index.js +1 -1
- package/lib/src/ap-field/select/use-select-options.d.ts +2 -2
- package/lib/src/ap-form/ap-form.vue.d.ts +2 -1
- package/lib/src/ap-form/drawer-form/index.vue.d.ts +4 -3
- package/lib/src/ap-form/modal-form/index.vue.d.ts +4 -3
- package/lib/src/ap-form/search-form/index.vue.d.ts +4 -3
- package/lib/src/ap-grid/editable/form-item.vue.d.ts +4 -2
- package/lib/src/ap-grid/editable/index.vue.d.ts +4 -2
- package/lib/src/ap-grid/index.vue.d.ts +4 -2
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/interface.d.ts +10 -0
- package/lib/src/ap-grid/utils/table.js +1 -1
- package/lib/src/ap-list/index.vue.d.ts +4 -2
- package/lib/src/ap-modal/utils/confirm.d.ts +1 -1
- package/lib/src/ap-table/ap-table.vue.d.ts +4 -2
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/constants.js +1 -1
- package/lib/src/ap-table/hooks/use-table-column-state.d.ts +4 -4
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/ap-upload/apUpload.vue.js +1 -1
- package/lib/src/ap-upload/components/MultipleFile.vue.d.ts +1 -1
- package/lib/src/ap-upload/components/Picture.vue.d.ts +7 -2
- package/lib/src/business/ap-batch-action-group/index.d.ts +3 -3
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +4 -2
- package/lib/src/business/ap-expand-alert/index.d.ts +6 -4
- package/lib/src/business/ap-ladder/ApLadder.vue.d.ts +2 -14
- package/lib/src/business/ap-ladder/ApLadder.vue2.js +1 -1
- package/lib/src/business/ap-ladder/components/SimpleMode.vue.d.ts +110 -0
- package/lib/src/business/ap-ladder/components/SimpleMode.vue.js +1 -0
- package/lib/src/business/ap-ladder/components/SimpleMode.vue2.js +1 -0
- package/lib/src/business/ap-ladder/components/ValueGroupMode.vue.d.ts +118 -0
- package/lib/src/business/ap-ladder/components/ValueGroupMode.vue.js +1 -0
- package/lib/src/business/ap-ladder/components/ValueGroupMode.vue2.js +1 -0
- package/lib/src/business/ap-ladder/index.d.ts +4 -35
- package/lib/src/business/ap-ladder/interface.d.ts +26 -0
- package/lib/src/business/ap-ladder/useWatchEllipsis.d.ts +1 -2
- package/lib/src/business/ap-ladder/useWatchEllipsis.origin.d.ts +3 -0
- package/lib/src/business/ap-ladder/utils.d.ts +2 -0
- package/lib/src/business/ap-ladder/utils.js +1 -0
- package/lib/src/business/ap-select-layout/index.d.ts +4 -2
- package/lib/src/business/ap-select-layout/select-layout.vue.d.ts +4 -2
- package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.js +1 -1
- package/lib/src/business/ap-table-modal/interface.d.ts +1 -1
- package/lib/src/business/ap-table-modal/modal-title.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/config-provider/hooks/use-namespace.d.ts +1 -5
- package/lib/src/editable-table/form-item.vue.d.ts +4 -2
- package/lib/src/editable-table/index.vue.d.ts +4 -2
- package/lib/src/mask/style/css.cjs +1 -0
- package/lib/src/mask/style/css.d.ts +0 -0
- package/lib/src/mask/style/index.cjs +1 -0
- package/lib/src/mask/style/index.d.ts +0 -0
- package/lib/src/path-map.js +1 -1
- package/lib/src/scroll-view/index.vue.d.ts +5 -5
- package/lib/src/tests/wrapper.d.ts +4 -4
- package/lib/src/text/style/css.cjs +2 -0
- package/lib/src/text/style/css.d.ts +0 -0
- package/lib/src/text/style/index.cjs +2 -0
- package/lib/src/text/style/index.d.ts +0 -0
- package/lib/src/work-order-modal/work-order-modal.vue.d.ts +3 -2
- package/package.json +3 -3
- package/theme/ap-ladder/ap-ladder.css +28 -1
- package/theme/ap-ladder/ap-ladder.less +32 -1
- package/theme/index.css +28 -1
- package/es/src/business/ap-ladder/HelpMessageIcon.vue.d.ts +0 -14
- package/es/src/business/ap-ladder/HelpMessageIcon.vue.mjs +0 -4
- package/es/src/business/ap-ladder/HelpMessageIcon.vue2.mjs +0 -35
- package/es/src/business/ap-ladder/useWatchEllipsis.mjs +0 -35
- package/lib/src/business/ap-ladder/HelpMessageIcon.vue.d.ts +0 -14
- package/lib/src/business/ap-ladder/HelpMessageIcon.vue.js +0 -1
- package/lib/src/business/ap-ladder/HelpMessageIcon.vue2.js +0 -1
- package/lib/src/business/ap-ladder/useWatchEllipsis.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as fe, ref as ue, reactive as he, computed as v, unref as l, watchEffect as _, watch as pe,
|
|
1
|
+
import { defineComponent as fe, ref as ue, reactive as he, computed as v, unref as l, watchEffect as _, watch as pe, openBlock as P, createElementBlock as ye, normalizeClass as B, normalizeStyle as M, withModifiers as A, createElementVNode as z, renderSlot as me, createBlock as L, mergeProps as O, createCommentVNode as T } from "vue";
|
|
2
2
|
import "../config-provider/index.mjs";
|
|
3
3
|
import "../scroll-bar/index.mjs";
|
|
4
4
|
import { isDef as f } from "../utils/index.mjs";
|
|
@@ -206,10 +206,10 @@ const Ye = /* @__PURE__ */ fe({
|
|
|
206
206
|
ref_key: "containerRef",
|
|
207
207
|
ref: s,
|
|
208
208
|
class: B(l(J)()),
|
|
209
|
-
style:
|
|
209
|
+
style: M(oe.value),
|
|
210
210
|
onWheel: [
|
|
211
|
-
|
|
212
|
-
|
|
211
|
+
A(ae, ["exact"]),
|
|
212
|
+
A(le, ["shift"])
|
|
213
213
|
]
|
|
214
214
|
}, [
|
|
215
215
|
z("div", {
|
|
@@ -221,21 +221,21 @@ const Ye = /* @__PURE__ */ fe({
|
|
|
221
221
|
], 2),
|
|
222
222
|
z("div", {
|
|
223
223
|
class: B([l(w)("bar-wrapper"), l(W)("bar-wrapper", "vertical")]),
|
|
224
|
-
style:
|
|
224
|
+
style: M(`height: calc(100% - ${m.value ? t.xBarProps.trackWidth || 10 : 0}px)`)
|
|
225
225
|
}, [
|
|
226
|
-
x.value ? (P(), L(l(H),
|
|
226
|
+
x.value ? (P(), L(l(H), O({
|
|
227
227
|
key: 0,
|
|
228
228
|
ref_key: "yBarRef",
|
|
229
229
|
ref: Q
|
|
230
230
|
}, t.yBarProps, {
|
|
231
231
|
"bar-length": c.y,
|
|
232
232
|
onScroll: e[0] || (e[0] = (a) => X(a, "vertical"))
|
|
233
|
-
}), null, 16, ["bar-length"])) :
|
|
233
|
+
}), null, 16, ["bar-length"])) : T("", !0)
|
|
234
234
|
], 6),
|
|
235
235
|
z("div", {
|
|
236
236
|
class: B([l(w)("bar-wrapper"), l(W)("bar-wrapper", "horizontal")])
|
|
237
237
|
}, [
|
|
238
|
-
m.value ? (P(), L(l(H),
|
|
238
|
+
m.value ? (P(), L(l(H), O({
|
|
239
239
|
key: 0,
|
|
240
240
|
ref_key: "xBarRef",
|
|
241
241
|
ref: K
|
|
@@ -243,7 +243,7 @@ const Ye = /* @__PURE__ */ fe({
|
|
|
243
243
|
direction: "horizontal",
|
|
244
244
|
"bar-length": c.x,
|
|
245
245
|
onScroll: e[1] || (e[1] = (a) => X(a, "horizontal"))
|
|
246
|
-
}), null, 16, ["bar-length"])) :
|
|
246
|
+
}), null, 16, ["bar-length"])) : T("", !0)
|
|
247
247
|
], 2)
|
|
248
248
|
], 38));
|
|
249
249
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
2
|
export declare const Wrapper: DefineComponent<{
|
|
3
|
-
uiMode?: "admin" | "aplus" | undefined;
|
|
4
|
-
lang?: "en" | "zh-cn" | undefined;
|
|
3
|
+
uiMode?: ("admin" | "aplus") | undefined;
|
|
4
|
+
lang?: ("en" | "zh-cn") | undefined;
|
|
5
5
|
}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{
|
|
6
|
-
uiMode?: "admin" | "aplus" | undefined;
|
|
7
|
-
lang?: "en" | "zh-cn" | undefined;
|
|
6
|
+
uiMode?: ("admin" | "aplus") | undefined;
|
|
7
|
+
lang?: ("en" | "zh-cn") | undefined;
|
|
8
8
|
}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as n, toRef as t,
|
|
1
|
+
import { defineComponent as n, toRef as t, openBlock as p, createBlock as c, unref as o, mergeProps as s, withCtx as f, renderSlot as u } from "vue";
|
|
2
2
|
import { useProvideApTextGroup as d } from "./context.mjs";
|
|
3
3
|
import "../config-provider/index.mjs";
|
|
4
4
|
import { Space as m } from "@aplus-frontend/antdv";
|
|
@@ -22,7 +22,7 @@ const z = /* @__PURE__ */ n({
|
|
|
22
22
|
colon: t(e.colon),
|
|
23
23
|
vertical: t(e.vertical),
|
|
24
24
|
labelStyle: t(e.labelStyle)
|
|
25
|
-
}), (l, b) => (
|
|
25
|
+
}), (l, b) => (p(), c(o(m), s({
|
|
26
26
|
class: [o(r)(), l.direction === "horizontal" ? o(i)("horizontal") : null]
|
|
27
27
|
}, o(v)(e, ["colon", "vertical", "labelStyle"])), {
|
|
28
28
|
default: f(() => [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as L, useSlots as O, computed as r, unref as t,
|
|
1
|
+
import { defineComponent as L, useSlots as O, computed as r, unref as t, isVNode as $, createVNode as z, Fragment as D, openBlock as o, createElementBlock as u, normalizeClass as s, normalizeStyle as E, createBlock as c, resolveDynamicComponent as U, createCommentVNode as v, createElementVNode as w, normalizeProps as m, mergeProps as B, withCtx as f, renderSlot as i, createSlots as F, createTextVNode as G, toDisplayString as I, renderList as R, guardReactiveProps as q } from "vue";
|
|
2
2
|
import { TypographyLink as x, TypographyText as H } from "@aplus-frontend/antdv";
|
|
3
3
|
import { isUndefined as d, isString as J, omit as g } from "lodash-unified";
|
|
4
4
|
import "../config-provider/index.mjs";
|
|
@@ -77,7 +77,7 @@ const le = /* @__PURE__ */ L({
|
|
|
77
77
|
return Object.assign(e, l.labelStyle || {}), e;
|
|
78
78
|
}), b = r(() => {
|
|
79
79
|
if (l.label)
|
|
80
|
-
return
|
|
80
|
+
return $(l.label) ? l.label : z(D, null, [l.label]);
|
|
81
81
|
});
|
|
82
82
|
return (e, Q) => (o(), u("div", {
|
|
83
83
|
class: s([t(C)(), {
|
|
@@ -88,8 +88,8 @@ const le = /* @__PURE__ */ L({
|
|
|
88
88
|
class: s([t(p)("label"), {
|
|
89
89
|
[t(N)("label", "no-colon")]: !h.value
|
|
90
90
|
}]),
|
|
91
|
-
style:
|
|
92
|
-
}, [(o(), c(
|
|
91
|
+
style: E(T.value)
|
|
92
|
+
}, [(o(), c(U(b.value)))], 6)) : v("", !0), w("div", {
|
|
93
93
|
class: s(t(p)("content"))
|
|
94
94
|
}, [e.link ? (o(), c(t(x), m(B({
|
|
95
95
|
key: 0
|
|
File without changes
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as n,
|
|
1
|
+
import { defineComponent as n, openBlock as s, createBlock as a, unref as o, withCtx as r, createElementVNode as t, toDisplayString as i, createVNode as d } from "vue";
|
|
2
2
|
import { QuestionCircleOutlined as p } from "@ant-design/icons-vue";
|
|
3
3
|
import { Tooltip as m } from "@aplus-frontend/antdv";
|
|
4
4
|
import "../config-provider/index.mjs";
|
|
@@ -7,7 +7,7 @@ const u = { class: "title" }, c = { class: "flex" }, _ = { class: "flex" }, w =
|
|
|
7
7
|
__name: "help-message",
|
|
8
8
|
setup(x) {
|
|
9
9
|
const { t: l } = f();
|
|
10
|
-
return (v, e) => (
|
|
10
|
+
return (v, e) => (s(), a(o(m), { placement: "right" }, {
|
|
11
11
|
title: r(() => [
|
|
12
12
|
t("div", u, [
|
|
13
13
|
t("div", c, [
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { WorkOrderModalProps } from './interfaces';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, ComponentInternalInstance, ExtractPropTypes, PropType, HTMLAttributes, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, GlobalComponents, GlobalDirectives, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties } from 'vue';
|
|
3
3
|
import { ButtonSize, SizeType } from '@aplus-frontend/antdv/es/button';
|
|
4
|
-
import { ValidateMessages, FormLabelAlign, FieldData, ValidateErrorEntity, NamePath, ValidateOptions, InternalNamePath } from '@aplus-frontend/antdv/es/form/interface';
|
|
4
|
+
import { ValidateMessages, FormLabelAlign, FieldData, ValidateErrorEntity, NamePath, RuleObject, ValidateOptions, InternalNamePath } from '@aplus-frontend/antdv/es/form/interface';
|
|
5
5
|
import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
|
|
6
6
|
import { ColSize } from '@aplus-frontend/antdv/es/grid';
|
|
7
7
|
import { RuleObject } from '@aplus-frontend/antdv/es/form';
|
|
8
8
|
import { Options } from '../../node_modules/scroll-into-view-if-needed';
|
|
9
9
|
import { Recordable } from '../type';
|
|
10
10
|
import { VueTypeDef, VueTypeValidableDef } from '../../node_modules/vue-types';
|
|
11
|
+
import { SizeType } from '@aplus-frontend/antdv/es/config-provider';
|
|
11
12
|
import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
|
|
12
13
|
import { ApFormProps, ApFormInternalInstance, WatchFunc } from '..';
|
|
13
14
|
import { OnCleanup } from '@vue/reactivity';
|
|
@@ -112,7 +113,7 @@ declare const _default: DefineComponent<WorkOrderModalProps, {}, {}, {}, {}, Com
|
|
|
112
113
|
readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
|
|
113
114
|
readonly initialValues?: Recordable | undefined;
|
|
114
115
|
readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
|
|
115
|
-
readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
|
|
116
|
+
readonly syncToUrl?: (boolean | ((values: Recordable, type: "get" | "set") => Recordable)) | undefined;
|
|
116
117
|
readonly syncToUrlPriority?: boolean | undefined;
|
|
117
118
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
118
119
|
$attrs: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as F, ref as g, computed as M,
|
|
1
|
+
import { defineComponent as F, ref as g, computed as M, openBlock as N, createElementBlock as L, createVNode as t, unref as e, mergeProps as P, withCtx as n, h as q } from "vue";
|
|
2
2
|
import { message as E, Modal as I, Input as A, Textarea as V } from "@aplus-frontend/antdv";
|
|
3
3
|
import { ApForm as c } from "../ap-form/index.mjs";
|
|
4
4
|
import "./help-message.vue.mjs";
|
|
@@ -86,7 +86,7 @@ const pe = /* @__PURE__ */ F({
|
|
|
86
86
|
console.log(i.value);
|
|
87
87
|
}, 500), m("modalClose");
|
|
88
88
|
};
|
|
89
|
-
return (r, a) => (
|
|
89
|
+
return (r, a) => (N(), L("div", null, [
|
|
90
90
|
t(e(I), P(s, {
|
|
91
91
|
width: 600,
|
|
92
92
|
centered: !0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("@aplus-frontend/antdv");require("../item/index.vue.js");require("../item-modal/index.vue2.js");require("../item-popconfirm/index.vue2.js");const f=require("@aplus-frontend/icon");require("../../config-provider/index.js");const s=require("lodash-unified"),m=require("../../config-provider/hooks/use-namespace.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("@aplus-frontend/antdv");require("../item/index.vue.js");require("../item-modal/index.vue2.js");require("../item-popconfirm/index.vue2.js");const f=require("@aplus-frontend/icon");require("../../config-provider/index.js");const s=require("lodash-unified"),m=require("../../config-provider/hooks/use-namespace.js"),_=require("../item-modal/index.vue.js"),g=require("../item-popconfirm/index.vue.js"),i=require("../item/index.vue2.js"),k=e.defineComponent({name:"ApActionItemDropDown",__name:"index",props:{trigger:{default:()=>["hover"]},placement:{default:"bottomLeft"},actions:{default:()=>[]},showIcon:{type:Boolean,default:!0},text:{},color:{default:"primary"},disabled:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},onClick:{},loading:{type:Boolean,default:!1}},setup(c){const a=c,n=e.ref(!1),{e:l}=m.useNamespace("action-item-dropdown"),p=e.computed(()=>a.actions.filter(r=>r.visible||s.isUndefined(r.visible)).map(r=>({...r,onAction:async o=>{var t;try{await((t=r.onAction)==null?void 0:t.call(r,o))}finally{n.value=!1}}})));return(r,o)=>(e.openBlock(),e.createBlock(e.unref(u.Dropdown),{open:n.value,"onUpdate:open":o[0]||(o[0]=t=>n.value=t),trigger:r.trigger,placement:r.placement},{overlay:e.withCtx(()=>[e.createVNode(e.unref(u.Menu),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(t,d)=>(e.openBlock(),e.createBlock(e.unref(u.MenuItem),{key:d,class:e.normalizeClass(e.unref(l)("item"))},{default:e.withCtx(()=>[t.modalProps?(e.openBlock(),e.createBlock(_.default,e.mergeProps({key:0,ref_for:!0},t),null,16)):t.popconfirmProps?(e.openBlock(),e.createBlock(g.default,e.mergeProps({key:1,ref_for:!0},t),null,16)):(e.openBlock(),e.createBlock(i.default,e.mergeProps({key:2,ref_for:!0},t),null,16))]),_:2},1032,["class"]))),128))]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(e.unref(l)("wrapper"))},[e.createVNode(i.default,e.normalizeProps(e.guardReactiveProps(e.unref(s.omit)(a,["actions","trigger","placement"]))),{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:3},16),r.showIcon?(e.openBlock(),e.createBlock(e.unref(f.IconApAdLineDown),{key:0,class:e.normalizeClass(e.unref(l)("icon"))},null,8,["class"])):e.createCommentVNode("",!0)],2)]),_:3},8,["open","trigger","placement"]))}});exports.default=k;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./text/index.js");require("./checkbox/index.vue2.js");require("./date/index.vue2.js");require("./number/index.vue2.js");require("./radio/index.vue2.js");require("./switch/index.vue2.js");require("./text-area/index.vue2.js");require("./date-range/index.vue2.js");require("./select/index.vue2.js");require("./slider/index.vue2.js");require("./segmented/index.vue2.js");require("./rate/index.vue2.js");require("./interface.js");const t=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./text/index.js");require("./checkbox/index.vue2.js");require("./date/index.vue2.js");require("./number/index.vue2.js");require("./radio/index.vue2.js");require("./switch/index.vue2.js");require("./text-area/index.vue2.js");require("./date-range/index.vue2.js");require("./select/index.vue2.js");require("./slider/index.vue2.js");require("./segmented/index.vue2.js");require("./rate/index.vue2.js");require("./interface.js");const t=require("./text-area/index.vue.js"),u=require("./number/index.vue.js"),r=require("./date/index.vue.js"),_=require("./date-range/index.vue.js"),i=require("./radio/index.vue.js"),d=require("./checkbox/index.vue.js"),l=require("./select/index.vue.js"),p=require("./switch/index.vue.js"),a=require("./slider/index.vue.js"),n=require("./segmented/index.vue.js"),s=require("./rate/index.vue.js"),c={Text:e.ApFieldText,TextArea:t.default,Number:u.default,Date:r.default,DateRange:_.default,Radio:i.default,Checkbox:d.default,Select:l.default,Switch:p.default,Slider:a.default,Segmented:n.default,Rate:s.default};exports.ApFieldText=e.ApFieldText;exports.ApFieldTextArea=t.default;exports.ApFieldNumber=u.default;exports.ApFieldDate=r.default;exports.ApFieldDateRange=_.default;exports.ApFieldRadio=i.default;exports.ApFieldCheckbox=d.default;exports.ApFieldSelect=l.default;exports.ApFieldSwitch=p.default;exports.ApFieldSlider=a.default;exports.ApFieldSegmented=n.default;exports.ApFieldRate=s.default;exports.ApField=c;
|
|
@@ -6,13 +6,13 @@ export declare const useSelectOptions: (props: ApFieldSelectProps) => {
|
|
|
6
6
|
options: Ref<{
|
|
7
7
|
[x: string]: any;
|
|
8
8
|
label?: any;
|
|
9
|
-
value?: string | number | null | undefined;
|
|
9
|
+
value?: (string | number | null) | undefined;
|
|
10
10
|
children?: Omit<DefaultOptionType, "children">[] | undefined;
|
|
11
11
|
disabled?: boolean | undefined;
|
|
12
12
|
}[], DefaultOptionType[] | {
|
|
13
13
|
[x: string]: any;
|
|
14
14
|
label?: any;
|
|
15
|
-
value?: string | number | null | undefined;
|
|
15
|
+
value?: (string | number | null) | undefined;
|
|
16
16
|
children?: Omit<DefaultOptionType, "children">[] | undefined;
|
|
17
17
|
disabled?: boolean | undefined;
|
|
18
18
|
}[]>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApFormProps, WatchFunc, ApFormInternalInstance } from './interface';
|
|
2
|
-
import { InternalNamePath, NamePath, ValidateOptions, FormLabelAlign, ValidateMessages, FieldData, ValidateErrorEntity } from '@aplus-frontend/antdv/es/form/interface';
|
|
2
|
+
import { InternalNamePath, NamePath, ValidateOptions, FormLabelAlign, RuleObject, ValidateMessages, FieldData, ValidateErrorEntity } from '@aplus-frontend/antdv/es/form/interface';
|
|
3
3
|
import { Recordable } from '../type';
|
|
4
4
|
import { CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, HTMLAttributes, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DefineComponent } from 'vue';
|
|
5
5
|
import { VueTypeDef, VueTypeValidableDef } from '../../node_modules/vue-types';
|
|
@@ -7,6 +7,7 @@ import { ColSize } from '@aplus-frontend/antdv/es/grid';
|
|
|
7
7
|
import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
|
|
8
8
|
import { RuleObject } from '@aplus-frontend/antdv/es/form';
|
|
9
9
|
import { Options } from '../../node_modules/scroll-into-view-if-needed';
|
|
10
|
+
import { SizeType } from '@aplus-frontend/antdv/es/config-provider';
|
|
10
11
|
import { SizeType } from '@aplus-frontend/antdv/es/button';
|
|
11
12
|
import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
|
|
12
13
|
declare function __VLS_template(): {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApFormDrawerFormProps, CustomizeResizeType } from '../interface';
|
|
2
2
|
import { VNode, ComponentInternalInstance, ExtractPropTypes, PropType, HTMLAttributes, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent, CSSProperties } from 'vue';
|
|
3
|
-
import { InternalNamePath, NamePath, ValidateOptions, ValidateMessages, FormLabelAlign, FieldData, ValidateErrorEntity } from '@aplus-frontend/antdv/es/form/interface';
|
|
3
|
+
import { InternalNamePath, NamePath, ValidateOptions, ValidateMessages, FormLabelAlign, FieldData, ValidateErrorEntity, RuleObject } from '@aplus-frontend/antdv/es/form/interface';
|
|
4
4
|
import { ButtonSize, SizeType } from '@aplus-frontend/antdv/es/button';
|
|
5
5
|
import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
|
|
6
6
|
import { ColSize } from '@aplus-frontend/antdv/es/grid';
|
|
@@ -8,6 +8,7 @@ import { RuleObject } from '@aplus-frontend/antdv/es/form';
|
|
|
8
8
|
import { Options } from '../../../node_modules/scroll-into-view-if-needed';
|
|
9
9
|
import { Recordable } from '../../type';
|
|
10
10
|
import { VueTypeDef, VueTypeValidableDef } from '../../../node_modules/vue-types';
|
|
11
|
+
import { SizeType } from '@aplus-frontend/antdv/es/config-provider';
|
|
11
12
|
import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
|
|
12
13
|
import { ApFormProps, ApFormInternalInstance, WatchFunc, ApFormSubmitterConfig } from '..';
|
|
13
14
|
import { OnCleanup } from '@vue/reactivity';
|
|
@@ -117,7 +118,7 @@ declare function __VLS_template(): {
|
|
|
117
118
|
readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
|
|
118
119
|
readonly initialValues?: Recordable | undefined;
|
|
119
120
|
readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
|
|
120
|
-
readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
|
|
121
|
+
readonly syncToUrl?: (boolean | ((values: Recordable, type: "get" | "set") => Recordable)) | undefined;
|
|
121
122
|
readonly syncToUrlPriority?: boolean | undefined;
|
|
122
123
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
123
124
|
$attrs: {
|
|
@@ -1059,7 +1060,7 @@ declare const __VLS_component: DefineComponent<ApFormDrawerFormProps, {
|
|
|
1059
1060
|
readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
|
|
1060
1061
|
readonly initialValues?: Recordable | undefined;
|
|
1061
1062
|
readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
|
|
1062
|
-
readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
|
|
1063
|
+
readonly syncToUrl?: (boolean | ((values: Recordable, type: "get" | "set") => Recordable)) | undefined;
|
|
1063
1064
|
readonly syncToUrlPriority?: boolean | undefined;
|
|
1064
1065
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
1065
1066
|
$attrs: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApFormModalFormProps } from '../interface';
|
|
2
2
|
import { VNode, ComponentInternalInstance, ExtractPropTypes, PropType, HTMLAttributes, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent, CSSProperties } from 'vue';
|
|
3
|
-
import { InternalNamePath, NamePath, ValidateOptions, ValidateMessages, FormLabelAlign, FieldData, ValidateErrorEntity } from '@aplus-frontend/antdv/es/form/interface';
|
|
3
|
+
import { InternalNamePath, NamePath, ValidateOptions, ValidateMessages, FormLabelAlign, FieldData, ValidateErrorEntity, RuleObject } from '@aplus-frontend/antdv/es/form/interface';
|
|
4
4
|
import { Recordable } from '../../type';
|
|
5
5
|
import { ButtonSize, SizeType, ButtonType, ButtonShape } from '@aplus-frontend/antdv/es/button';
|
|
6
6
|
import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
|
|
@@ -8,6 +8,7 @@ import { ColSize } from '@aplus-frontend/antdv/es/grid';
|
|
|
8
8
|
import { RuleObject } from '@aplus-frontend/antdv/es/form';
|
|
9
9
|
import { Options } from '../../../node_modules/scroll-into-view-if-needed';
|
|
10
10
|
import { VueTypeDef, VueTypeValidableDef } from '../../../node_modules/vue-types';
|
|
11
|
+
import { SizeType } from '@aplus-frontend/antdv/es/config-provider';
|
|
11
12
|
import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
|
|
12
13
|
import { ApFormProps, ApFormInternalInstance, WatchFunc, ApFormSubmitterConfig } from '..';
|
|
13
14
|
import { OnCleanup } from '@vue/reactivity';
|
|
@@ -117,7 +118,7 @@ declare function __VLS_template(): {
|
|
|
117
118
|
readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
|
|
118
119
|
readonly initialValues?: Recordable | undefined;
|
|
119
120
|
readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
|
|
120
|
-
readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
|
|
121
|
+
readonly syncToUrl?: (boolean | ((values: Recordable, type: "get" | "set") => Recordable)) | undefined;
|
|
121
122
|
readonly syncToUrlPriority?: boolean | undefined;
|
|
122
123
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
123
124
|
$attrs: {
|
|
@@ -1247,7 +1248,7 @@ declare const __VLS_component: DefineComponent<ApFormModalFormProps, {
|
|
|
1247
1248
|
readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
|
|
1248
1249
|
readonly initialValues?: Recordable | undefined;
|
|
1249
1250
|
readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
|
|
1250
|
-
readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
|
|
1251
|
+
readonly syncToUrl?: (boolean | ((values: Recordable, type: "get" | "set") => Recordable)) | undefined;
|
|
1251
1252
|
readonly syncToUrlPriority?: boolean | undefined;
|
|
1252
1253
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
1253
1254
|
$attrs: {
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { ApFormExpose, ApFormSearchFormProps } from '../interface';
|
|
2
2
|
import { ComponentInternalInstance, ExtractPropTypes, PropType, HTMLAttributes, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent, ComputedRef } from 'vue';
|
|
3
3
|
import { ButtonSize, SizeType } from '@aplus-frontend/antdv/es/button';
|
|
4
|
-
import { ValidateMessages, FormLabelAlign, FieldData, ValidateErrorEntity, NamePath, ValidateOptions, InternalNamePath } from '@aplus-frontend/antdv/es/form/interface';
|
|
4
|
+
import { ValidateMessages, FormLabelAlign, FieldData, ValidateErrorEntity, NamePath, RuleObject, ValidateOptions, InternalNamePath } from '@aplus-frontend/antdv/es/form/interface';
|
|
5
5
|
import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
|
|
6
6
|
import { ColSize } from '@aplus-frontend/antdv/es/grid';
|
|
7
7
|
import { RuleObject } from '@aplus-frontend/antdv/es/form';
|
|
8
8
|
import { Options } from '../../../node_modules/scroll-into-view-if-needed';
|
|
9
9
|
import { Recordable } from '../../type';
|
|
10
10
|
import { VueTypeDef, VueTypeValidableDef } from '../../../node_modules/vue-types';
|
|
11
|
+
import { SizeType } from '@aplus-frontend/antdv/es/config-provider';
|
|
11
12
|
import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
|
|
12
13
|
import { ApFormProps, ApFormInternalInstance, WatchFunc } from '..';
|
|
13
14
|
import { OnCleanup } from '@vue/reactivity';
|
|
@@ -115,7 +116,7 @@ declare function __VLS_template(): {
|
|
|
115
116
|
readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
|
|
116
117
|
readonly initialValues?: Recordable | undefined;
|
|
117
118
|
readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
|
|
118
|
-
readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
|
|
119
|
+
readonly syncToUrl?: (boolean | ((values: Recordable, type: "get" | "set") => Recordable)) | undefined;
|
|
119
120
|
readonly syncToUrlPriority?: boolean | undefined;
|
|
120
121
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
121
122
|
$attrs: {
|
|
@@ -952,7 +953,7 @@ declare const __VLS_component: DefineComponent<ApFormSearchFormProps, {
|
|
|
952
953
|
readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
|
|
953
954
|
readonly initialValues?: Recordable | undefined;
|
|
954
955
|
readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
|
|
955
|
-
readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
|
|
956
|
+
readonly syncToUrl?: (boolean | ((values: Recordable, type: "get" | "set") => Recordable)) | undefined;
|
|
956
957
|
readonly syncToUrlPriority?: boolean | undefined;
|
|
957
958
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
958
959
|
$attrs: {
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { EditableGridFormItemExpose, EditableGridFormItemProps } from './interface';
|
|
2
2
|
import { Recordable } from '../../type';
|
|
3
|
-
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
|
|
3
|
+
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode, RendererNode, RendererElement } from 'vue';
|
|
4
4
|
declare const _default: <RecordType extends Recordable = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
5
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & EditableGridFormItemProps<RecordType> & Partial<{}>> & PublicProps;
|
|
6
6
|
expose(exposed: ShallowUnwrapRef<EditableGridFormItemExpose>): void;
|
|
7
7
|
attrs: any;
|
|
8
8
|
slots: Readonly<Record<string, any>> & Record<string, any>;
|
|
9
9
|
emit: {};
|
|
10
|
-
}>) => VNode
|
|
10
|
+
}>) => VNode<RendererNode, RendererElement, {
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
}> & {
|
|
11
13
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
12
14
|
};
|
|
13
15
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EditableGridExpose, EditableGridProps } from './interface';
|
|
2
2
|
import { Recordable } from '../../type';
|
|
3
|
-
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
|
|
3
|
+
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode, RendererNode, RendererElement } from 'vue';
|
|
4
4
|
declare const _default: <RecordType extends Recordable = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
5
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
6
6
|
readonly "onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -9,7 +9,9 @@ declare const _default: <RecordType extends Recordable = any>(__VLS_props: NonNu
|
|
|
9
9
|
attrs: any;
|
|
10
10
|
slots: Readonly<Record<string, any>> & Record<string, any>;
|
|
11
11
|
emit: (event: "update:value", ...args: any[]) => void;
|
|
12
|
-
}>) => VNode
|
|
12
|
+
}>) => VNode<RendererNode, RendererElement, {
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
}> & {
|
|
13
15
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
14
16
|
};
|
|
15
17
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VxeTableSlots } from 'vxe-table';
|
|
2
2
|
import { ApGridColumnType, ApGridExpose, ApGridProps } from './interface';
|
|
3
|
-
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
|
|
3
|
+
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode, RendererNode, RendererElement } from 'vue';
|
|
4
4
|
declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
5
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & ApGridProps<RecordType> & Partial<{}>> & PublicProps;
|
|
6
6
|
expose(exposed: ShallowUnwrapRef<ApGridExpose>): void;
|
|
@@ -35,7 +35,9 @@ declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __V
|
|
|
35
35
|
}) => any;
|
|
36
36
|
};
|
|
37
37
|
emit: {};
|
|
38
|
-
}>) => VNode
|
|
38
|
+
}>) => VNode<RendererNode, RendererElement, {
|
|
39
|
+
[key: string]: any;
|
|
40
|
+
}> & {
|
|
39
41
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
40
42
|
};
|
|
41
43
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),b=require("vxe-table");require("vxe-table/es/style.css");require("vxe-pc-ui/es/style.css");const _=require("vxe-pc-ui"),m=require("lodash-unified"),se=require("../ap-form/index.js");require("../config-provider/index.js");const ue=require("../ap-table/constants.js"),d=require("../ap-table/utils.js"),ce=require("../ap-table/hooks/use-table-paging-ng.js"),x=require("@aplus-frontend/antdv"),de=require("./hooks/use-inner-params.js"),k=require("./utils/table.js"),ie=require("../ap-table/hooks/use-table-row-selection.js"),pe=require("../ap-table/context.js"),T=require("./constants.js"),fe=require("./hooks/use-render-columns.js"),me=require("@aplus-frontend/antdv/es/theme/internal");require("../scroll-bar/index.js");const ge=require("../config-provider/hooks/use-namespace.js"),ve=require("../config-provider/hooks/use-global-config.js"),Ce=require("../config-provider/hooks/use-locale.js"),he=require("../scroll-bar/index.vue.js"),ye=e.defineComponent({name:"ApGrid",__name:"index",props:{dropdownPrefixCls:{},loading:{type:[Boolean,Object],default:void 0},bordered:{type:Boolean,default:!1},locale:{},onChange:{},onResizeColumn:{},getPopupContainer:{},scroll:{},sortDirections:{default:()=>["ascend","descend"]},showSorterTooltip:{type:[Boolean,Object],default:!1},prefixCls:{},tableLayout:{},title:{},id:{},showHeader:{type:Boolean,default:!0},components:{},customRow:{},customHeaderRow:{},direction:{},expandFixed:{type:[String,Boolean],default:!1},expandColumnWidth:{},expandedRowKeys:{},defaultExpandedRowKeys:{},expandedRowRender:{},expandRowByClick:{type:Boolean,default:!1},expandIcon:{},onExpand:{},onExpandedRowsChange:{},defaultExpandAllRows:{type:Boolean,default:!1},indentSize:{default:15},expandIconColumnIndex:{},showExpandColumn:{type:Boolean,default:!0},expandedRowClassName:{},childrenColumnName:{default:"children"},rowExpandable:{},sticky:{type:[Boolean,Object],default:!1},transformCellText:{},rowClassName:{},stripe:{type:Boolean},headerRowClassName:{},footerRowClassName:{},cellClassName:{},headerCellClassName:{},footerCellClassName:{},rowStyle:{},headerRowStyle:{},footerRowStyle:{},cellStyle:{},headerCellStyle:{},footerCellStyle:{},height:{},minHeight:{},maxHeight:{},mergeCells:{},mergeFooterItems:{},cellConfig:{},columns:{},rowSelection:{type:Boolean},card:{type:Boolean,default:!1},params:{},request:{},defaultData:{},dataSource:{},onLoadingChange:{},searchForm:{type:[Boolean,Object],default:void 0},beforeSearchSubmit:{},pagination:{type:[Boolean,Object],default:void 0},searchFormWrapperStyle:{},tableWrapperStyle:{},wrapperStyle:{},manual:{type:Boolean,default:!1},size:{default:void 0},adaptive:{type:Boolean,default:!1},columnResizable:{type:[Boolean,Object],default:!1},rowKey:{default:"key"},footer:{},virtual:{type:[Boolean,Object],default:void 0},expandable:{},value:{}},setup(A,{expose:L}){var V;const R=e.useSlots(),o=A,g=(V=e.getCurrentInstance())==null?void 0:V.appContext.app;g&&!g.__VXE_PC_UI_INSTALLED__&&(g.use(_.VxeUI),g.__VXE_PC_UI_INSTALLED__=!0);const{e:y,b:s,be:O}=ge.useNamespace("ap-grid"),D=ve.useGlobalConfig("valueTypeMap"),l=e.ref([]),B=e.ref([]),c=e.ref(),v=e.ref(o.size),[,i]=me.useToken(),{t:U}=Ce.useLocale();_.VxeUI.setConfig({i18n:(r,n)=>U(`ap.${r}`,n)});const{renderConfig:K,updateSignal:$}=fe.useRenderColumns(l);let P=0;const j=e.computed(()=>{if(c.value)return c.value.$el.querySelector(".vxe-table--header-inner-wrapper")}),F=e.computed(()=>{var r,n,t;return P++,((t=(n=(r=o.columns)==null?void 0:r.filter(a=>!a.hideInSearch&&a.dataIndex&&(a.valueType||a.customRenderFormItem)&&!ue.noRenderAsFormItemValueList.includes(a.valueType)))==null?void 0:n.sort((a,u)=>{let f=d.getColumnOrder(a.order);return d.getColumnOrder(u.order)-f}))==null?void 0:t.map(a=>{const u=d.updateFormProps(a,d.getFieldProps(a.fieldProps,{})),f={...a,fieldProps:{label:a.title,name:a.dataIndex,...u||{},_signal:P},renderNode:void 0};return f.renderNode=d.getSearchFormItemRenderNode(f,e.unref(D)),f}))||[]}),H=e.computed(()=>[s(),o.card?null:s("wrapper"),o.adaptive?s("adaptive"):null,o.sticky?s("sticky"):null].filter(Boolean)),E=e.computed(()=>d.recursionApColumns(e.unref(l),r=>{if(r.sorter===!0)return r.key||r.dataIndex}).filter(Boolean)),I=e.computed(()=>d.recursionApColumns(e.unref(l),r=>{if(r.filters&&!r.onFilter)return r.key||r.dataIndex}).filter(Boolean)),{formRef:w,submit:N,reset:q,refresh:M,data:p,tableProps:W,setDataSource:G,handleTableChange:X}=ce.useTablePaging({async request(r){var t;if(!h.value.preserveSelectedRowKeys&&m.isUndefined(o.dataSource)&&S(),!m.isUndefined(o.dataSource)){const a=r.pageSize*(r.current-1);return{data:(o.pagination===!1?o.dataSource:o.dataSource.slice(a,a+r.pageSize))||[],total:o.dataSource.length||0}}const n=await((t=o.request)==null?void 0:t.call(o,r));return{data:(n==null?void 0:n.data)||[],total:(n==null?void 0:n.total)||0}},namespace:"ap-grid",filterFields:I,sortFields:E,defaultParams:o.params,defaultData:o.defaultData,manual:o.manual,formatParams:o.beforeSearchSubmit,pagination:o.pagination}),{sortChangeEvent:J,filterChangeEvent:Q,paginationChangeEvent:Y}=de.useInnerParams(X);pe.useProvideApTable({columns:e.computed(()=>l.value),columnsBackup:e.computed(()=>B.value),size:e.computed(()=>v.value?T.sizeMap[v.value]:"middle"),updateColumns(r){l.value=r},updateSize(r){v.value=T.sizeReverseMap[r]},renderConfig:e.computed(()=>({className:O("table-header","title"),color:i.value.colorPrimary}))});const Z=e.computed(()=>l.value.some(r=>r.fixed==="left"||r.fixed===!0)?"left":void 0),ee=e.computed(()=>m.isUndefined(o.dataSource)?p.records:o.dataSource),{selectedRows:C,rowSelection:h,...re}=ie.default({...o.rowSelection===!0?{}:o.rowSelection,dataSource:ee,rowKey:o.rowKey}),z=()=>{const r=c.value;r&&(C.value=[...r.getCheckboxReserveRecords(),...r.getCheckboxRecords()])},oe=()=>{const r=c.value;r&&(C.value=[r.getRadioRecord()])};function ae(){var r;return((r=o.columns)==null?void 0:r.filter(n=>!n.hideInTable))||[]}function te(r){var n,t,a;(a=(t=(n=w.value)==null?void 0:n.apForm)==null?void 0:t.setFieldsValue)==null||a.call(t,r)}function ne(r=!1){var t,a,u;const n=r?"getFieldsValueTransformed":"getFieldsValue";return(u=(a=(t=w.value)==null?void 0:t.apForm)==null?void 0:a[n])==null?void 0:u.call(a,!0)}function S(){re.clearAll();const r=c.value;r&&(h.value.type==="radio"?(r.clearRadioRow(),r.clearRadioReserve()):(r.clearCheckboxRow(),r.clearCheckboxReserve()))}async function le(r,n){var a;const t=p.records[r];if(t)return(a=c.value)==null?void 0:a.scrollToRow(t,n)}return e.watch(()=>[o.columnResizable,o.columns],()=>{const r=ae();l.value=r,B.value=r},{deep:!0,immediate:!0}),e.watch(()=>o.dataSource,r=>{G(r)},{immediate:!0}),e.watch(()=>e.unref(p).loading,r=>{var n;(n=o.onLoadingChange)==null||n.call(o,r)}),L({submit:N,reset:q,refresh:M,setSearchFormValues:te,getSearchFormValues:ne,getShowColumns:()=>e.unref(l),rowSelection:{selectedRows:e.computed(()=>C.value),clearAll:S},scrollToRow:le}),(r,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(H.value),style:e.normalizeStyle(r.wrapperStyle)},[e.unref(m.isUndefined)(r.dataSource)&&r.searchForm!==!1&&F.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(r.card?e.unref(y)("search-wrapper"):null),style:e.normalizeStyle(r.searchFormWrapperStyle)},[e.createVNode(e.unref(se.ApForm).SearchForm,e.mergeProps(r.searchForm||{},{ref_key:"formRef",ref:w,"custom-reset":"","submit-loading":!1,onSubmit:e.unref(N),onReset:e.unref(q)}),e.createSlots({default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,t=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.renderNode.Comp),e.mergeProps({key:t.dataIndex,item:t,ref_for:!0},t.fieldProps||{},{span:t.span,"custom-render":t.renderNode.render}),null,16,["item","span","custom-render"]))),128))]),_:2},[R.searchFormExtra?{name:"extra",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"searchFormExtra")]),key:"0"}:void 0]),1040,["onSubmit","onReset"])],6)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([e.unref(y)("table-wrapper"),r.card?e.unref(y)("table-wrapper-card"):null]),style:e.normalizeStyle(r.tableWrapperStyle)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(s)("header-wrapper"))},[e.renderSlot(r.$slots,"title",{selectedRows:e.unref(C),selectedRowKeys:e.unref(h).selectedRowKeys,shownColumns:l.value,clearAll:S})],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(s)("vxe-wrapper"))},[(e.openBlock(),e.createBlock(e.unref(b.VxeTable),e.mergeProps(e.unref(k.toVxeProps)(o),{ref_key:"tableRef",ref:c,key:e.unref($),data:e.unref(p).records,"sort-config":{remote:E.value.length>0},"filter-config":{remote:I.value.length>0},loading:e.unref(p).loading,"row-config":{isHover:!0,keyField:o.rowKey},style:{"--vxe-ui-table-row-checkbox-checked-background-color":e.unref(i).controlItemBgActive,"--vxe-ui-table-row-hover-checkbox-checked-background-color":e.unref(i).controlItemBgActiveHover,"--vxe-ui-font-primary-color":e.unref(i).colorPrimary,"--vxe-ui-table-header-background-color":"var(--ap-table-header-bg)","--vxe-ui-table-cell-padding-default":"12px","--vxe-ui-table-cell-padding-medium":"9px","--vxe-ui-table-row-radio-checked-background-color":e.unref(i).controlItemBgActive,"--vxe-ui-table-row-hover-radio-checked-background-color":e.unref(i).controlItemBgActiveHover},size:v.value,onSortChange:e.unref(J),onFilterChange:e.unref(Q),onCheckboxChange:z,onCheckboxAll:z,onRadioChange:oe}),e.createSlots({empty:e.withCtx(()=>[e.createVNode(e.unref(x.Empty),{image:e.unref(x.Empty).PRESENTED_IMAGE_SIMPLE},null,8,["image"])]),default:e.withCtx(()=>[o.expandable?(e.openBlock(),e.createBlock(e.unref(b.VxeColumn),e.mergeProps({key:0},e.unref(k.getRowExpandProps)(r.expandable),{fixed:Z.value}),{content:e.withCtx(t=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.expandable.renderContent(t))))]),_:1},16,["fixed"])):e.createCommentVNode("",!0),o.rowSelection?(e.openBlock(),e.createBlock(e.unref(b.VxeColumn),e.normalizeProps(e.mergeProps({key:1},e.unref(k.getRowSelectionProps)(e.unref(h),l.value))),null,16)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(K),t=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t),{key:t.props.colId}))),128))]),_:2},[e.renderList(e.unref(m.omit)(R,["searchFormExtra"]),(t,a)=>({name:a,fn:e.withCtx(u=>[e.renderSlot(r.$slots,a,e.normalizeProps(e.guardReactiveProps(u||{})))])}))]),1040,["data","sort-config","filter-config","loading","row-config","style","size","onSortChange","onFilterChange"]))],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(s)("pagination-wrapper"))},[r.sticky?(e.openBlock(),e.createBlock(e.unref(he.default),{key:0,direction:"horizontal","scroll-container":j.value},null,8,["scroll-container"])):e.createCommentVNode("",!0),r.pagination!==!1?(e.openBlock(),e.createBlock(e.unref(x.Pagination),e.mergeProps({key:1,class:e.unref(s)("pagination")},e.unref(W).pagination,{onChange:e.unref(Y)}),null,16,["class","onChange"])):e.createCommentVNode("",!0)],2)],6)],6))}});exports.default=ye;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),x=require("vxe-table");require("vxe-table/es/style.css");require("vxe-pc-ui/es/style.css");const T=require("vxe-pc-ui"),m=require("lodash-unified"),se=require("../ap-form/index.js");require("../config-provider/index.js");const ue=require("../ap-table/constants.js"),d=require("../ap-table/utils.js"),ce=require("../ap-table/hooks/use-table-paging-ng.js"),k=require("@aplus-frontend/antdv"),de=require("./hooks/use-inner-params.js"),R=require("./utils/table.js"),ie=require("../ap-table/hooks/use-table-row-selection.js"),pe=require("../ap-table/context.js"),A=require("./constants.js"),fe=require("./hooks/use-render-columns.js"),me=require("@aplus-frontend/antdv/es/theme/internal");require("../scroll-bar/index.js");const ge=require("../config-provider/hooks/use-namespace.js"),ve=require("../config-provider/hooks/use-global-config.js"),Ce=require("../config-provider/hooks/use-locale.js"),he=require("../scroll-bar/index.vue.js"),ye=e.defineComponent({name:"ApGrid",__name:"index",props:{dropdownPrefixCls:{},loading:{type:[Boolean,Object],default:void 0},bordered:{type:Boolean,default:!1},locale:{},onChange:{},onResizeColumn:{},getPopupContainer:{},scroll:{},sortDirections:{default:()=>["ascend","descend"]},showSorterTooltip:{type:[Boolean,Object],default:!1},prefixCls:{},tableLayout:{},title:{},id:{},showHeader:{type:Boolean,default:!0},components:{},customRow:{},customHeaderRow:{},direction:{},expandFixed:{type:[String,Boolean],default:!1},expandColumnWidth:{},expandedRowKeys:{},defaultExpandedRowKeys:{},expandedRowRender:{},expandRowByClick:{type:Boolean,default:!1},expandIcon:{},onExpand:{},onExpandedRowsChange:{},defaultExpandAllRows:{type:Boolean,default:!1},indentSize:{default:15},expandIconColumnIndex:{},showExpandColumn:{type:Boolean,default:!0},expandedRowClassName:{},childrenColumnName:{default:"children"},rowExpandable:{},sticky:{type:[Boolean,Object],default:!1},transformCellText:{},rowClassName:{},stripe:{type:Boolean},headerRowClassName:{},footerRowClassName:{},cellClassName:{},headerCellClassName:{},footerCellClassName:{},rowStyle:{},headerRowStyle:{},footerRowStyle:{},cellStyle:{},headerCellStyle:{},footerCellStyle:{},height:{},minHeight:{},maxHeight:{},mergeCells:{},mergeFooterItems:{},cellConfig:{},columns:{},rowSelection:{type:Boolean},card:{type:Boolean,default:!1},params:{},request:{},defaultData:{},dataSource:{},onLoadingChange:{},searchForm:{type:[Boolean,Object],default:void 0},beforeSearchSubmit:{},pagination:{type:[Boolean,Object],default:void 0},searchFormWrapperStyle:{},tableWrapperStyle:{},wrapperStyle:{},manual:{type:Boolean,default:!1},size:{default:void 0},adaptive:{type:Boolean,default:!1},columnResizable:{type:[Boolean,Object],default:!1},rowKey:{default:"key"},footer:{},virtual:{type:[Boolean,Object],default:void 0},expandable:{},value:{}},setup(L,{expose:O}){var _;const B=e.useSlots(),o=L,g=(_=e.getCurrentInstance())==null?void 0:_.appContext.app;g&&!g.__VXE_PC_UI_INSTALLED__&&(g.use(T.VxeUI),g.__VXE_PC_UI_INSTALLED__=!0);const{e:y,b:s,be:D}=ge.useNamespace("ap-grid"),U=ve.useGlobalConfig("valueTypeMap"),l=e.ref([]),P=e.ref([]),c=e.ref(),v=e.ref(o.size),[,i]=me.useToken(),{t:K}=Ce.useLocale();T.VxeUI.setConfig({i18n:(r,n)=>K(`ap.${r}`,n)});const{renderConfig:$,updateSignal:j}=fe.useRenderColumns(l);let F=0;const H=e.computed(()=>{if(c.value)return c.value.$el.querySelector(".vxe-table--header-inner-wrapper")}),E=e.computed(()=>{var r,n,t;return F++,((t=(n=(r=o.columns)==null?void 0:r.filter(a=>!a.hideInSearch&&a.dataIndex&&(a.valueType||a.customRenderFormItem)&&!ue.noRenderAsFormItemValueList.includes(a.valueType)))==null?void 0:n.sort((a,u)=>{let f=d.getColumnOrder(a.order);return d.getColumnOrder(u.order)-f}))==null?void 0:t.map(a=>{const u=d.updateFormProps(a,d.getFieldProps(a.fieldProps,{})),f={...a,fieldProps:{label:a.title,name:a.dataIndex,...u||{},_signal:F},renderNode:void 0};return f.renderNode=d.getSearchFormItemRenderNode(f,e.unref(U)),f}))||[]}),M=e.computed(()=>[s(),o.card?null:s("wrapper"),o.adaptive?s("adaptive"):null,o.sticky?s("sticky"):null].filter(Boolean)),I=e.computed(()=>d.recursionApColumns(e.unref(l),r=>{if(r.sorter===!0)return r.key||r.dataIndex}).filter(Boolean)),N=e.computed(()=>d.recursionApColumns(e.unref(l),r=>{if(r.filters&&!r.onFilter)return r.key||r.dataIndex}).filter(Boolean)),{formRef:b,submit:q,reset:z,refresh:W,data:p,tableProps:V,setDataSource:G,handleTableChange:X}=ce.useTablePaging({async request(r){var t;if(!h.value.preserveSelectedRowKeys&&m.isUndefined(o.dataSource)&&S(),!m.isUndefined(o.dataSource)){const a=r.pageSize*(r.current-1);return{data:(o.pagination===!1?o.dataSource:o.dataSource.slice(a,a+r.pageSize))||[],total:o.dataSource.length||0}}const n=await((t=o.request)==null?void 0:t.call(o,r));return{data:(n==null?void 0:n.data)||[],total:(n==null?void 0:n.total)||0}},namespace:"ap-grid",filterFields:N,sortFields:I,defaultParams:o.params,defaultData:o.defaultData,manual:o.manual,formatParams:o.beforeSearchSubmit,pagination:o.pagination}),{sortChangeEvent:J,filterChangeEvent:Q,paginationChangeEvent:Y}=de.useInnerParams(X);pe.useProvideApTable({columns:e.computed(()=>l.value),columnsBackup:e.computed(()=>P.value),size:e.computed(()=>v.value?A.sizeMap[v.value]:"middle"),updateColumns(r){l.value=r},updateSize(r){v.value=A.sizeReverseMap[r]},renderConfig:e.computed(()=>({className:D("table-header","title"),color:i.value.colorPrimary}))});const Z=e.computed(()=>l.value.some(r=>r.fixed==="left"||r.fixed===!0)?"left":void 0),ee=e.computed(()=>m.isUndefined(o.dataSource)?p.records:o.dataSource),{selectedRows:C,rowSelection:h,...re}=ie.default({...o.rowSelection===!0?{}:o.rowSelection,dataSource:ee,rowKey:o.rowKey}),w=()=>{const r=c.value;r&&(C.value=[...r.getCheckboxReserveRecords(),...r.getCheckboxRecords()])},oe=()=>{const r=c.value;r&&(C.value=[r.getRadioRecord()])};function ae(){var r;return((r=o.columns)==null?void 0:r.filter(n=>!n.hideInTable))||[]}function te(r){var n,t,a;(a=(t=(n=b.value)==null?void 0:n.apForm)==null?void 0:t.setFieldsValue)==null||a.call(t,r)}function ne(r=!1){var t,a,u;const n=r?"getFieldsValueTransformed":"getFieldsValue";return(u=(a=(t=b.value)==null?void 0:t.apForm)==null?void 0:a[n])==null?void 0:u.call(a,!0)}function S(){re.clearAll();const r=c.value;r&&(h.value.type==="radio"?(r.clearRadioRow(),r.clearRadioReserve()):(r.clearCheckboxRow(),r.clearCheckboxReserve()))}async function le(r,n){var a;const t=p.records[r];if(t)return(a=c.value)==null?void 0:a.scrollToRow(t,n)}return e.watch(()=>[o.columnResizable,o.columns],()=>{const r=ae();l.value=r,P.value=r},{deep:!0,immediate:!0}),e.watch(()=>o.dataSource,r=>{G(r)},{immediate:!0}),e.watch(()=>e.unref(p).loading,r=>{var n;(n=o.onLoadingChange)==null||n.call(o,r)}),O({submit:q,reset:z,refresh:W,setSearchFormValues:te,getSearchFormValues:ne,getShowColumns:()=>e.unref(l),rowSelection:{selectedRows:e.computed(()=>C.value),clearAll:S},scrollToRow:le}),(r,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(M.value),style:e.normalizeStyle(r.wrapperStyle)},[e.unref(m.isUndefined)(r.dataSource)&&r.searchForm!==!1&&E.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(r.card?e.unref(y)("search-wrapper"):null),style:e.normalizeStyle(r.searchFormWrapperStyle)},[e.createVNode(e.unref(se.ApForm).SearchForm,e.mergeProps(r.searchForm||{},{ref_key:"formRef",ref:b,"custom-reset":"","submit-loading":e.unref(V).loading,onSubmit:e.unref(q),onReset:e.unref(z)}),e.createSlots({default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,t=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.renderNode.Comp),e.mergeProps({key:t.dataIndex,item:t,ref_for:!0},t.fieldProps||{},{span:t.span,"custom-render":t.renderNode.render}),null,16,["item","span","custom-render"]))),128))]),_:2},[B.searchFormExtra?{name:"extra",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"searchFormExtra")]),key:"0"}:void 0]),1040,["submit-loading","onSubmit","onReset"])],6)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([e.unref(y)("table-wrapper"),r.card?e.unref(y)("table-wrapper-card"):null]),style:e.normalizeStyle(r.tableWrapperStyle)},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(s)("header-wrapper"))},[e.renderSlot(r.$slots,"title",{selectedRows:e.unref(C),selectedRowKeys:e.unref(h).selectedRowKeys,shownColumns:l.value,clearAll:S})],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(s)("vxe-wrapper"))},[(e.openBlock(),e.createBlock(e.unref(x.VxeTable),e.mergeProps(e.unref(R.toVxeProps)(o),{ref_key:"tableRef",ref:c,key:e.unref(j),data:e.unref(p).records,"sort-config":{remote:I.value.length>0},"filter-config":{remote:N.value.length>0},loading:e.unref(p).loading,"row-config":{isHover:!0,keyField:o.rowKey},style:{"--vxe-ui-table-row-checkbox-checked-background-color":e.unref(i).controlItemBgActive,"--vxe-ui-table-row-hover-checkbox-checked-background-color":e.unref(i).controlItemBgActiveHover,"--vxe-ui-font-primary-color":e.unref(i).colorPrimary,"--vxe-ui-table-header-background-color":"var(--ap-table-header-bg)","--vxe-ui-table-cell-padding-default":"12px","--vxe-ui-table-cell-padding-medium":"9px","--vxe-ui-table-row-radio-checked-background-color":e.unref(i).controlItemBgActive,"--vxe-ui-table-row-hover-radio-checked-background-color":e.unref(i).controlItemBgActiveHover},size:v.value,onSortChange:e.unref(J),onFilterChange:e.unref(Q),onCheckboxChange:w,onCheckboxRangeChange:w,onCheckboxAll:w,onRadioChange:oe}),e.createSlots({empty:e.withCtx(()=>[e.createVNode(e.unref(k.Empty),{image:e.unref(k.Empty).PRESENTED_IMAGE_SIMPLE},null,8,["image"])]),default:e.withCtx(()=>[o.expandable?(e.openBlock(),e.createBlock(e.unref(x.VxeColumn),e.mergeProps({key:0},e.unref(R.getRowExpandProps)(r.expandable),{fixed:Z.value}),{content:e.withCtx(t=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.expandable.renderContent(t))))]),_:1},16,["fixed"])):e.createCommentVNode("",!0),o.rowSelection?(e.openBlock(),e.createBlock(e.unref(x.VxeColumn),e.normalizeProps(e.mergeProps({key:1},e.unref(R.getRowSelectionProps)(e.unref(h),l.value))),null,16)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref($),t=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t),{key:t.props.colId}))),128))]),_:2},[e.renderList(e.unref(m.omit)(B,["searchFormExtra"]),(t,a)=>({name:a,fn:e.withCtx(u=>[e.renderSlot(r.$slots,a,e.normalizeProps(e.guardReactiveProps(u||{})))])}))]),1040,["data","sort-config","filter-config","loading","row-config","style","size","onSortChange","onFilterChange"]))],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(s)("pagination-wrapper"))},[r.sticky?(e.openBlock(),e.createBlock(e.unref(he.default),{key:0,direction:"horizontal","scroll-container":H.value},null,8,["scroll-container"])):e.createCommentVNode("",!0),r.pagination!==!1?(e.openBlock(),e.createBlock(e.unref(k.Pagination),e.mergeProps({key:1,class:e.unref(s)("pagination")},e.unref(V).pagination,{onChange:e.unref(Y)}),null,16,["class","onChange"])):e.createCommentVNode("",!0)],2)],6)],6))}});exports.default=ye;
|
|
@@ -104,6 +104,16 @@ export type ApGridRowSelection<RecordType> = Pick<TableRowSelection<RecordType>,
|
|
|
104
104
|
* @returns
|
|
105
105
|
*/
|
|
106
106
|
disabled?: (row: RecordType) => boolean;
|
|
107
|
+
/**
|
|
108
|
+
* 是否显示选择框的方法,返回false将显示
|
|
109
|
+
* @param row
|
|
110
|
+
* @returns
|
|
111
|
+
*/
|
|
112
|
+
shown?: (row: RecordType) => boolean;
|
|
113
|
+
/**
|
|
114
|
+
* 是否开启鼠标滑动的范围选择(仅复选有效)
|
|
115
|
+
*/
|
|
116
|
+
range?: boolean;
|
|
107
117
|
};
|
|
108
118
|
export type ApGridProps<RecordType = any, ParamsType = any> = Omit<TableProps<RecordType>, 'columns' | 'pagination' | 'dataSource' | 'size' | 'rowSelection' | 'rowKey' | 'rowClassName' | 'footer'> & Pick<VxeTableProps<RecordType>, 'rowClassName' | 'stripe' | 'headerRowClassName' | 'footerRowClassName' | 'cellClassName' | 'headerCellClassName' | 'footerCellClassName' | 'rowStyle' | 'headerRowStyle' | 'footerRowStyle' | 'cellStyle' | 'headerCellStyle' | 'footerCellStyle' | 'height' | 'minHeight' | 'maxHeight' | 'mergeCells' | 'mergeFooterItems' | 'cellConfig'> & {
|
|
109
119
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("lodash-unified"),a=20,f=50;function c(e){var n,l,i;const t={...d.omit(e,["columns","request","searchForm","dataSource","rowKey","value"])};if(e.adaptive&&(t.autoResize=!0,t.height="100%"),e.columnResizable&&(t.columnConfig?t.columnConfig.resizable=!0:t.columnConfig={resizable:!0}),e.rowSelection){const o=e.rowSelection===!0?{}:e.rowSelection;o.type==="radio"?t.radioConfig={highlight:!0,checkMethod({row:r}){return o.disabled?!o.disabled(r):!0},visibleMethod({row:r}){return o.shown?o.shown(r):!0},checkRowKey:(n=o.defaultSelectedRowKeys)==null?void 0:n[0],reserve:d.isUndefined(o.preserveSelectedRowKeys)?!0:o.preserveSelectedRowKeys}:t.checkboxConfig={highlight:!0,checkMethod({row:r}){return o.disabled?!o.disabled(r):!0},visibleMethod({row:r}){return o.shown?o.shown(r):!0},checkRowKeys:o.defaultSelectedRowKeys,reserve:d.isUndefined(o.preserveSelectedRowKeys)?!0:o.preserveSelectedRowKeys,range:o.range||!1}}return t.border=e.bordered,e.expandable&&(t.expandConfig=d.omit(e.expandable,["renderContent","width","title"])),e.footer&&(t.showFooter=!0,d.isFunction(e.footer)?t.footerMethod=e.footer:t.footerData=e.footer),e.virtual===!1?(t.virtualXConfig={enabled:!1},t.virtualYConfig={enabled:!1}):(u(t,"X",(l=e.virtual)==null?void 0:l.x),u(t,"Y",(i=e.virtual)==null?void 0:i.y)),t}function u(e,t,n){const l=t==="X",i=l?"virtualXConfig":"virtualYConfig",o=n!==!1,r=l?a:f,s=d.isNumber(n)&&n>=0?n:r;e[i]={enabled:o,gt:s}}function h(e){return e===!0?"left":e}function b(e,t){const n=e===!0||!e.type?"checkbox":e.type,l=e===!0?60:e.columnWidth||60;let i=e===!0?void 0:h(e.fixed);return i||(i===!1?i=void 0:i=t.some(o=>o.fixed==="left"||o.fixed===!0)?"left":void 0),{type:n,width:l,fixed:i}}function v(e){const t=(e==null?void 0:e.width)||"auto";return{type:"expand",title:e==null?void 0:e.title,width:t}}exports.getRowExpandProps=v;exports.getRowSelectionProps=b;exports.toVxeProps=c;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApListProps } from './interface';
|
|
2
2
|
import { Recordable } from '../type';
|
|
3
|
-
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, Ref, VNode } from 'vue';
|
|
3
|
+
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, Ref, VNode, RendererNode, RendererElement } from 'vue';
|
|
4
4
|
import { ApFormSearchFormExpose } from '..';
|
|
5
5
|
declare const _default: <RecordType extends Recordable>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
6
6
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & ApListProps<RecordType> & Partial<{}>> & PublicProps;
|
|
@@ -41,7 +41,9 @@ declare const _default: <RecordType extends Recordable>(__VLS_props: NonNullable
|
|
|
41
41
|
}): any;
|
|
42
42
|
};
|
|
43
43
|
emit: {};
|
|
44
|
-
}>) => VNode
|
|
44
|
+
}>) => VNode<RendererNode, RendererElement, {
|
|
45
|
+
[key: string]: any;
|
|
46
|
+
}> & {
|
|
45
47
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
46
48
|
};
|
|
47
49
|
export default _default;
|
|
@@ -6,7 +6,7 @@ export type ModalFunc = (props: ModalFuncProps) => {
|
|
|
6
6
|
update: (configUpdate: ConfigUpdate) => void;
|
|
7
7
|
};
|
|
8
8
|
declare const confirm: (config: ModalFuncProps) => {
|
|
9
|
-
destroy: (this:
|
|
9
|
+
destroy: (this: any, ...args: any[]) => void;
|
|
10
10
|
update: (configUpdate: ConfigUpdate) => void;
|
|
11
11
|
};
|
|
12
12
|
export default confirm;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ApColumnType, ApTableProps } from './interface';
|
|
2
2
|
import { ColumnsType, ColumnType } from '@aplus-frontend/antdv/es/table';
|
|
3
3
|
import { RowSelectionReturnType } from './hooks/use-table-row-selection';
|
|
4
|
-
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, ComputedRef, Ref, VNode } from 'vue';
|
|
4
|
+
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, ComputedRef, Ref, VNode, RendererNode, RendererElement } from 'vue';
|
|
5
5
|
declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
6
6
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & ApTableProps<RecordType> & Partial<{}>> & PublicProps;
|
|
7
7
|
expose(exposed: ShallowUnwrapRef<{
|
|
@@ -85,7 +85,9 @@ declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __V
|
|
|
85
85
|
}) => void;
|
|
86
86
|
};
|
|
87
87
|
emit: {};
|
|
88
|
-
}>) => VNode
|
|
88
|
+
}>) => VNode<RendererNode, RendererElement, {
|
|
89
|
+
[key: string]: any;
|
|
90
|
+
}> & {
|
|
89
91
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
90
92
|
};
|
|
91
93
|
export default _default;
|