@aplus-frontend/ui 6.18.0 → 6.19.1
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-drawer/components/ApDrawerClose.vue2.mjs +2 -2
- package/es/src/ap-field/checkbox/index.vue.mjs +1 -1
- package/es/src/ap-field/date/index.vue.mjs +13 -13
- package/es/src/ap-field/date-range/index.vue.mjs +16 -16
- package/es/src/ap-field/index.mjs +36 -36
- 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-field/tree-select/index.vue.mjs +3 -3
- package/es/src/ap-field/tree-select/use-request.d.ts +4 -4
- 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 +7 -6
- 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 +1 -1
- 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.d.ts +3 -3
- 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.d.ts +11 -11
- 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/items/tree-select/index.vue.d.ts +3 -3
- package/es/src/ap-form/items/tree-select/index.vue.mjs +2 -2
- package/es/src/ap-form/modal-form/index.vue.d.ts +7 -6
- 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/components/popover-filter.vue2.mjs +10 -10
- package/es/src/ap-form/search-form/components/popover-sorter/index.vue2.mjs +23 -23
- package/es/src/ap-form/search-form/components/popover-sorter/sortable-item.vue2.mjs +2 -2
- package/es/src/ap-form/search-form/index.vue.d.ts +7 -6
- 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 +9 -9
- package/es/src/ap-grid/editable/index.vue.d.ts +4 -2
- package/es/src/ap-grid/editable/index.vue.mjs +3 -3
- package/es/src/ap-grid/index.vue.d.ts +4 -2
- package/es/src/ap-grid/index.vue.mjs +40 -40
- package/es/src/ap-list/index.vue.d.ts +4 -2
- package/es/src/ap-list/index.vue.mjs +1 -1
- 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 +14 -13
- 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.d.ts +10 -10
- package/es/src/ap-table/constants.mjs +45 -45
- 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-tag/ap-tag-group.vue.mjs +73 -78
- package/es/src/ap-tag/ap-tag.vue.d.ts +1 -0
- package/es/src/ap-tag/ap-tag.vue.mjs +17 -18
- package/es/src/ap-tag/interface.d.ts +6 -0
- package/es/src/ap-tag/utils.d.ts +1 -0
- package/es/src/ap-tag/utils.mjs +12 -0
- 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 +6 -6
- package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.mjs +9 -9
- package/es/src/business/ap-batch-action-group/MenuItemGroup.vue2.mjs +3 -4
- 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 +9 -9
- package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue.d.ts +3 -2
- package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue2.mjs +212 -398
- package/es/src/business/ap-draggable-grid/constans.mjs +1 -1
- package/es/src/business/ap-draggable-grid/index.d.ts +5 -2
- package/es/src/business/ap-draggable-grid/interface.d.ts +3 -2
- package/es/src/business/ap-draggable-grid/utils/sortItemsByRowAndCol.d.ts +2 -0
- package/es/src/business/ap-draggable-grid/utils/sortItemsByRowAndCol.mjs +14 -0
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +4 -2
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +33 -33
- package/es/src/business/ap-expand-alert/index.d.ts +6 -4
- package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +7 -7
- 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-keep-alive/keep-alive.mjs +3 -3
- package/es/src/business/ap-ladder/components/RenderValue.mjs +2 -2
- package/es/src/business/ap-radio-group/ap-radio-group.vue2.mjs +1 -1
- 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/index.d.ts +5 -17
- package/es/src/business/ap-table-modal/modal-title.vue2.mjs +2 -2
- package/es/src/business/ap-table-modal/table-layout/index.vue2.mjs +14 -14
- package/es/src/business/ap-table-modal/table-modal.vue2.mjs +3 -3
- 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/ap-view/ap-view.vue2.mjs +2 -2
- package/es/src/business/ap-view/components/main-button-content.vue.d.ts +5 -4
- package/es/src/business/ap-view/components/main-button-content.vue2.mjs +5 -5
- package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +5 -4
- package/es/src/business/ap-view/components/menu-list-content.vue2.mjs +6 -6
- package/es/src/business/ap-view/icons/line-delete.vue.mjs +2 -2
- package/es/src/business/ap-view/icons/line-down.vue.mjs +2 -2
- package/es/src/business/ap-view/icons/line-eye.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 +38 -37
- package/es/src/editable-table/index.vue.d.ts +4 -2
- package/es/src/editable-table/index.vue.mjs +16 -15
- 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/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/splitter/Panel.vue2.mjs +4 -4
- package/es/src/splitter/SplitBar.vue2.mjs +7 -7
- package/es/src/splitter/Splitter.vue2.mjs +5 -5
- 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 +5 -5
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/es/src/work-order-modal/help-message.vue2.mjs +2 -2
- package/es/src/work-order-modal/work-order-modal.vue.d.ts +5 -4
- 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/date/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/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-field/tree-select/use-request.d.ts +4 -4
- package/lib/src/ap-form/ap-form.vue.d.ts +2 -1
- package/lib/src/ap-form/drawer-form/index.vue.d.ts +7 -6
- package/lib/src/ap-form/items/number/index.vue.d.ts +3 -3
- package/lib/src/ap-form/items/select/index.vue.d.ts +11 -11
- package/lib/src/ap-form/items/tree-select/index.vue.d.ts +3 -3
- package/lib/src/ap-form/modal-form/index.vue.d.ts +7 -6
- package/lib/src/ap-form/search-form/index.vue.d.ts +7 -6
- package/lib/src/ap-grid/editable/form-item.vue.d.ts +4 -2
- package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ap-grid/editable/index.vue.d.ts +4 -2
- package/lib/src/ap-grid/editable/index.vue.js +1 -1
- 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-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.d.ts +10 -10
- 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-tag/ap-tag-group.vue.js +1 -1
- package/lib/src/ap-tag/ap-tag.vue.d.ts +1 -0
- package/lib/src/ap-tag/ap-tag.vue.js +1 -1
- package/lib/src/ap-tag/interface.d.ts +6 -0
- package/lib/src/ap-tag/utils.d.ts +1 -0
- package/lib/src/ap-tag/utils.js +1 -0
- 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/MenuItemGroup.vue2.js +1 -1
- package/lib/src/business/ap-batch-action-group/index.d.ts +3 -3
- package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue.d.ts +3 -2
- package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue2.js +1 -1
- package/lib/src/business/ap-draggable-grid/constans.js +1 -1
- package/lib/src/business/ap-draggable-grid/index.d.ts +5 -2
- package/lib/src/business/ap-draggable-grid/interface.d.ts +3 -2
- package/lib/src/business/ap-draggable-grid/utils/sortItemsByRowAndCol.d.ts +2 -0
- package/lib/src/business/ap-draggable-grid/utils/sortItemsByRowAndCol.js +1 -0
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +4 -2
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
- package/lib/src/business/ap-expand-alert/index.d.ts +6 -4
- 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/index.d.ts +5 -17
- package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +5 -4
- package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +5 -4
- 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/form-item.vue.js +1 -1
- package/lib/src/editable-table/index.vue.d.ts +4 -2
- package/lib/src/editable-table/index.vue.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/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/lib/src/work-order-modal/work-order-modal.vue.d.ts +5 -4
- package/package.json +3 -3
- package/theme/antd-global-overwrite/admin/alert.css +37 -0
- package/theme/antd-global-overwrite/admin/alert.less +51 -0
- package/theme/antd-global-overwrite/admin/button.css +27 -0
- package/theme/antd-global-overwrite/admin/button.less +31 -0
- package/theme/antd-global-overwrite/admin/field.css +42 -0
- package/theme/antd-global-overwrite/admin/field.less +43 -0
- package/theme/antd-global-overwrite/admin/form.css +57 -0
- package/theme/antd-global-overwrite/admin/form.less +97 -0
- package/theme/antd-global-overwrite/admin/message.css +10 -0
- package/theme/antd-global-overwrite/admin/message.less +13 -0
- package/theme/antd-global-overwrite/admin/modal.css +94 -0
- package/theme/antd-global-overwrite/admin/modal.less +128 -0
- package/theme/antd-global-overwrite/admin/pagination.css +122 -0
- package/theme/antd-global-overwrite/admin/pagination.less +91 -0
- package/theme/antd-global-overwrite/admin/steps.css +127 -0
- package/theme/antd-global-overwrite/admin/steps.less +197 -0
- package/theme/antd-global-overwrite/admin/table.css +78 -0
- package/theme/antd-global-overwrite/admin/table.less +62 -0
- package/theme/antd-global-overwrite/admin/tooltip.css +3 -0
- package/theme/antd-global-overwrite/admin/tooltip.less +3 -0
- package/theme/antd-global-overwrite/aplus/alert.css +40 -0
- package/theme/antd-global-overwrite/aplus/alert.less +55 -0
- package/theme/antd-global-overwrite/aplus/button.css +27 -0
- package/theme/antd-global-overwrite/aplus/button.less +31 -0
- package/theme/antd-global-overwrite/aplus/field.css +42 -0
- package/theme/antd-global-overwrite/aplus/field.less +43 -0
- package/theme/antd-global-overwrite/aplus/form.css +87 -0
- package/theme/antd-global-overwrite/aplus/form.less +133 -0
- package/theme/antd-global-overwrite/aplus/message.css +10 -0
- package/theme/antd-global-overwrite/aplus/message.less +13 -0
- package/theme/antd-global-overwrite/aplus/modal.css +87 -0
- package/theme/antd-global-overwrite/aplus/modal.less +120 -0
- package/theme/antd-global-overwrite/aplus/pagination.css +147 -0
- package/theme/antd-global-overwrite/aplus/pagination.less +108 -0
- package/theme/antd-global-overwrite/aplus/steps.css +125 -0
- package/theme/antd-global-overwrite/aplus/steps.less +198 -0
- package/theme/antd-global-overwrite/aplus/table.css +78 -0
- package/theme/antd-global-overwrite/aplus/table.less +61 -0
- package/theme/antd-global-overwrite/aplus/tooltip.css +3 -0
- package/theme/antd-global-overwrite/aplus/tooltip.less +3 -0
- package/theme/antdv-override.css +2 -6
- package/theme/antdv-override.less +2 -6
- package/theme/ap-draggable-grid/ap-draggable-grid.css +3 -3
- package/theme/ap-draggable-grid/ap-draggable-grid.less +3 -4
- package/theme/ap-label/ap-label.css +1 -0
- package/theme/ap-label/ap-label.less +1 -0
- package/theme/ap-table/ap-table-pagination.css +12 -0
- package/theme/ap-table/ap-table-pagination.less +14 -0
- package/theme/ap-tag/ap-tag.css +5 -2
- package/theme/ap-tag/ap-tag.less +5 -2
- package/theme/index.css +11 -11
- package/theme/ui-mode.css +60 -0
- package/theme/ui-mode.less +109 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Oss } from '../hooks/useOss';
|
|
2
|
-
import { actionResponse } from '@aplus-frontend/oss';
|
|
3
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
4
3
|
declare function setValue(val?: (string | Record<string, any>)[]): void;
|
|
5
4
|
interface UploadFile extends File {
|
|
@@ -18,7 +17,13 @@ declare function __VLS_template(): {
|
|
|
18
17
|
pictureContext?(_: {
|
|
19
18
|
fileList: {
|
|
20
19
|
oss: {
|
|
21
|
-
pauseUpload: (() => Promise<
|
|
20
|
+
pauseUpload: (() => Promise<{
|
|
21
|
+
status: number;
|
|
22
|
+
previewUrl?: string;
|
|
23
|
+
saveUrl?: string;
|
|
24
|
+
originalFileName?: string;
|
|
25
|
+
message: string;
|
|
26
|
+
}>) | undefined;
|
|
22
27
|
};
|
|
23
28
|
}[];
|
|
24
29
|
remove: typeof handleRemove;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("@ant-design/icons-vue"),s=require("@aplus-frontend/antdv"),f={style:{display:"flex","align-items":"center"}},p=e.defineComponent({__name:"MenuItemGroup",props:{selectedRows:{},buttonProps:{},menuList:{}},setup(a){const r=a,c=e.ref({});async function t(o,u){var l;const n=(o==null?void 0:o.id)||u;c.value[n]=!0;try{await((l=o==null?void 0:o.onClick)==null?void 0:l.call(o,{selectedRows:r==null?void 0:r.selectedRows}))}finally{c.value[n]=void 0}}return(o,u)=>(e.openBlock(),e.createBlock(e.unref(s.Menu),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.menuList,(n,l)=>(e.openBlock(),e.createBlock(e.unref(s.MenuItem),e.mergeProps({key:(n==null?void 0:n.id)||l,ref_for:!0},{...n,onClick:()=>t(n,l),disabled:c.value[(n==null?void 0:n.id)||l]??(n==null?void 0:n.disabled)??!1}),{default:e.withCtx(()=>[e.createElementVNode("div",f,[e.withDirectives(e.createVNode(e.unref(d.LoadingOutlined),{style:{"margin-right":"10px"}},null,512),[[e.vShow,c.value[(n==null?void 0:n.id)||l]]]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.h(e.Fragment,[n==null?void 0:n.content]))))])]),_:2},1040))),128))]),_:1}))}});exports.default=p;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("@ant-design/icons-vue"),s=require("@aplus-frontend/antdv"),f={style:{display:"flex","align-items":"center"}},p=e.defineComponent({__name:"MenuItemGroup",props:{selectedRows:{},buttonProps:{},menuList:{}},setup(a){const r=a,c=e.ref({});async function t(o,u){var l;const n=(o==null?void 0:o.id)||u;c.value[n]=!0;try{await((l=o==null?void 0:o.onClick)==null?void 0:l.call(o,{selectedRows:r==null?void 0:r.selectedRows}))}finally{c.value[n]=void 0}}return(o,u)=>(e.openBlock(),e.createBlock(e.unref(s.Menu),null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.menuList,(n,l)=>(e.openBlock(),e.createBlock(e.unref(s.MenuItem),e.mergeProps({key:(n==null?void 0:n.id)||l},{ref_for:!0},{...n,onClick:()=>t(n,l),disabled:c.value[(n==null?void 0:n.id)||l]??(n==null?void 0:n.disabled)??!1}),{default:e.withCtx(()=>[e.createElementVNode("div",f,[e.withDirectives(e.createVNode(e.unref(d.LoadingOutlined),{style:{"margin-right":"10px"}},null,512),[[e.vShow,c.value[(n==null?void 0:n.id)||l]]]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.h(e.Fragment,[n==null?void 0:n.content]))))])]),_:2},1040))),128))]),_:1}))}});exports.default=p;
|
|
@@ -3,8 +3,8 @@ import { ButtonType, ButtonShape, ButtonSize } from '@aplus-frontend/antdv/es/bu
|
|
|
3
3
|
import { ButtonHTMLType } from '@aplus-frontend/antdv/es/button/buttonTypes';
|
|
4
4
|
import { VueTypeValidableDef } from '../../../node_modules/vue-types';
|
|
5
5
|
import { MouseEventHandler, FocusEventHandler } from '@aplus-frontend/antdv/es/_util/EventInterface';
|
|
6
|
+
import { ButtonProps, ItemType, MenuTheme, MenuMode, TableColumnsType } from '@aplus-frontend/antdv';
|
|
6
7
|
import { DropdownArrowOptions, Trigger, Align } from '@aplus-frontend/antdv/es/dropdown/props';
|
|
7
|
-
import { ItemType, MenuTheme, MenuMode, TableColumnsType, ButtonProps } from '@aplus-frontend/antdv';
|
|
8
8
|
import { Key } from '@aplus-frontend/antdv/es/_util/type';
|
|
9
9
|
import { CSSMotionProps } from '@aplus-frontend/antdv/es/_util/transition';
|
|
10
10
|
import { BuiltinPlacements, TriggerSubMenuAction, SelectEventHandler, MenuClickEventHandler } from '@aplus-frontend/antdv/es/menu/src/interface';
|
|
@@ -63,7 +63,7 @@ declare const ApBatchActionGroup: {
|
|
|
63
63
|
type: PropType< MouseEventHandler | MouseEventHandler[]>;
|
|
64
64
|
};
|
|
65
65
|
}>>, "type" | "onClick"> & {
|
|
66
|
-
type?:
|
|
66
|
+
type?: ButtonProps["type"] | "borderLink";
|
|
67
67
|
borderLinkColor?: string;
|
|
68
68
|
minWidth?: boolean | number | string;
|
|
69
69
|
lazy?: boolean | number;
|
|
@@ -364,7 +364,7 @@ declare const ApBatchActionGroup: {
|
|
|
364
364
|
type: PropType< MouseEventHandler | MouseEventHandler[]>;
|
|
365
365
|
};
|
|
366
366
|
}>>, "type" | "onClick"> & {
|
|
367
|
-
type?:
|
|
367
|
+
type?: ButtonProps["type"] | "borderLink";
|
|
368
368
|
borderLinkColor?: string;
|
|
369
369
|
minWidth?: boolean | number | string;
|
|
370
370
|
lazy?: boolean | number;
|
|
@@ -10,8 +10,8 @@ declare function __VLS_template(): {
|
|
|
10
10
|
span: number;
|
|
11
11
|
row: number;
|
|
12
12
|
col: number;
|
|
13
|
-
showHeight
|
|
14
|
-
height
|
|
13
|
+
showHeight?: (number | string) | undefined;
|
|
14
|
+
height: number | string;
|
|
15
15
|
module: string;
|
|
16
16
|
};
|
|
17
17
|
index: number;
|
|
@@ -58,6 +58,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
58
58
|
};
|
|
59
59
|
}>, {
|
|
60
60
|
setGridItems: (items: ApDraggableGridItemBase[]) => void;
|
|
61
|
+
getGridItems: () => ApDraggableGridItemBase[];
|
|
61
62
|
refreshGrid: () => void;
|
|
62
63
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
63
64
|
onGridListChange: (args_0: ApDraggableGridItemBase[]) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),X=require("./constans.js"),Y=require("@aplus-frontend/antdv");require("../../config-provider/index.js");const D=require("./utils/sortItemsByRowAndCol.js"),Z=require("../../config-provider/hooks/use-namespace.js"),ee=["data-span","data-index","data-row","data-col","data-height","data-module","draggable"],oe=r.defineComponent({__name:"ApDraggableGrid",props:X.ApDraggableGridProps(),emits:["onGridListChange"],setup(P,{expose:W,emit:_}){const f=P,{b:R,e:$,m:J}=Z.useNamespace("ap-draggable-grid"),T=r.ref(!1),B=r.ref(!1),x=r.computed(()=>$("item")),M=r.computed(()=>$("dragging")),z=r.computed(()=>f.customWrapper?`.${f.customWrapper} .${x.value}:not(.${M.value})`:`.${x.value}:not(.${M.value})`),j=_,m=r.useTemplateRef("gridContainer"),S=r.ref([]);r.watch(()=>f.gridList,e=>{Array.isArray(e)&&i(e)},{deep:!0,immediate:!0});function i(e){const n=[...e].sort((o,u)=>o.row-u.row);S.value=n.map(o=>({...o})),j("onGridListChange",JSON.parse(JSON.stringify(S.value)))}const U=e=>({gridColumn:`${e.col} / span ${e.span}`,gridRow:e.row,minHeight:e.showHeight?e.showHeight+"px":`${f.gridItemHeight}px`,height:e.showHeight?e.showHeight+"px":`${f.gridItemHeight}px`,boxShadow:f.gridItemShadow?f.gridItemShadow:"none"});async function H(){if(i([]),typeof f.request=="function")try{T.value=!0;const e=await f.request();Array.isArray(e)?(console.log("ApDraggableGrid: 请求到的布局数据:",e),i(e)):console.warn("ApDraggableGrid: 请求函数必须返回一个符合 ApDraggableGridItemBase 数组的格式")}catch(e){console.error("ApDraggableGrid: 请求错误:",e)}finally{T.value=!1}}let C=r.ref(null),N=r.ref(null),v=null,G=!1,y=null;const k=e=>{if(!G&&(G=!0,e.dataTransfer&&e.target instanceof HTMLElement)){const n=e.target.dataset;e.dataTransfer.setData("text/plain",n.module),e.dataTransfer.effectAllowed="move",C.value={span:Number(n.span),col:Number(n.col),row:Number(n.row),module:n.module,height:Number(n.height),index:Number(n.index)},v=e.target,v.style.opacity="0"}},q=e=>{if(e.preventDefault(),y&&clearTimeout(y),y=window.setTimeout(()=>{G=!1,y=null},300),e.dataTransfer&&e.target instanceof HTMLElement){const n=e.target.closest(z.value);if(!n)return;const o=n.dataset;N.value={span:Number(o.span),col:Number(o.col),row:Number(o.row),module:o.module,height:Number(o.height),index:Number(o.index)}}},F=e=>{e.preventDefault(),v&&(v.style.opacity="1",v=null),V(C,N)&&K(C,N),C.value=null,N.value=null,B.value=!1},O=()=>{v&&(v.style.opacity="1",v=null),C.value=null,N.value=null,B.value=!1},V=(e,n)=>{const{span:o,module:u}=e.value,{span:c,module:d}=n.value;return u===d&&o===c?(console.log("如果自己放在自己之上不能交换数据"),!1):!0},K=(e,n)=>{if(!e.value||!n.value)return;const{span:o,col:u,row:c,module:d,height:A,index:l}=e.value,{span:I,col:h,row:p,module:Q,height:L,index:g}=n.value;if(c===p&&u===h&&o===I&&A===L&&d===Q){console.log("从同一位置拖拽到同一位置,不做任何操作");return}let t=[...r.toRaw(S.value)];const E=JSON.parse(JSON.stringify(t));if(c===p)if(l>g){console.log("","从右向左拖拽"),console.log(l,g),console.log(l-g),l-g===1?(t[g].col=o+h,t[l].col=h):(t.forEach((w,a)=>{a<l&&a>=g&&(w.col+=I)}),t[l].col=h);const s=D.sortItemsByRowAndCol(t);if(!b(s)){console.warn("交换后的布局无效,恢复原始布局");return}i(s);return}else{console.log(l,g),console.log("","从左向右拖拽"),g-l===1?(t[l].col=I+1,t[g].col=u):(t.forEach((w,a)=>{a>l&&a<=g&&(w.col-=I)}),t[l].col=h);const s=D.sortItemsByRowAndCol(t);if(console.log("交换后的布局:",s),!b(s)){console.warn("交换后的布局无效,恢复原始布局"),i(E);return}i(s);return}else if(p<c){if(console.log("从下向上拖拽"),o===24){const s=[];for(let a=p;a<c;a++)s.push(a);t.forEach(a=>{s.includes(a.row)&&(a.row+=1)}),t[l].row=p;const w=D.sortItemsByRowAndCol(t);if(!b(w)){console.warn("交换后的布局无效,恢复原始布局"),i(E);return}i(w);return}if(o===I&&A===L){t[l].row=p,t[l].col=h,t[g].row=c,t[g].col=u;const s=D.sortItemsByRowAndCol(t);if(!b(s)){console.warn("交换后的布局无效,恢复原始布局"),i(E);return}i(s);return}}else{if(console.log("从上向下拖拽"),o===24){console.log("如果拖拽元素跨度为24","从上向下拖拽");const s=[];for(let a=c+1;a<=p;a++)s.push(a);t.forEach(a=>{s.includes(a.row)&&(a.row-=1)}),t[l].row=p;const w=D.sortItemsByRowAndCol(t);if(!b(w)){console.warn("交换后的布局无效,恢复原始布局"),i(E);return}i(w);return}if(o===I&&A===L){t[l].row=p,t[l].col=h,t[g].row=c,t[g].col=u;const s=D.sortItemsByRowAndCol(t);if(!b(s)){console.warn("交换后的布局无效,恢复原始布局"),i(E);return}i(s);return}}},b=e=>{const n={};e.forEach(o=>{n[o.row]||(n[o.row]=[]),n[o.row].push(o)});for(const o in n){const u=n[o].sort((d,A)=>d.col-A.col);let c=1;for(const d of u){if(d.col<c)return console.warn(`行 ${o} 中的元素重叠: 元素 ${d.module} 在列 ${d.col}, 但当前列已经是 ${c}`),!1;if(c=d.col+d.span,c>25)return console.warn(`行 ${o} 中的元素超出界限: 元素 ${d.module} 在列 ${d.col} 跨度 ${d.span}`),!1}}return!0};return r.onMounted(async()=>{await H(),!f.disableDrag&&m.value&&(m.value.addEventListener("dragstart",k),m.value.addEventListener("dragover",q),m.value.addEventListener("drop",F),m.value.addEventListener("dragend",O))}),r.onUnmounted(()=>{m.value&&(m.value.removeEventListener("dragstart",k),m.value.removeEventListener("dragover",q),m.value.removeEventListener("drop",F),m.value.removeEventListener("dragend",O),y&&clearTimeout(y))}),W({setGridItems:e=>{i(e)},getGridItems:()=>JSON.parse(JSON.stringify(S.value)),refreshGrid:()=>{(async()=>{await H()})()}}),(e,n)=>(r.openBlock(),r.createBlock(r.unref(Y.Spin),{spinning:T.value},{default:r.withCtx(()=>[r.createElementVNode("div",{ref_key:"gridContainer",ref:m,class:r.normalizeClass([T.value?r.unref(R)("loading"):r.unref(R)(),f.customWrapper]),style:r.normalizeStyle({width:typeof e.gridWidth=="number"?`${e.gridWidth}px`:e.gridWidth,gap:`${e.gapWidth}px`})},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(S.value,(o,u)=>(r.openBlock(),r.createElementBlock("div",{key:u,class:r.normalizeClass([r.unref($)("item"),f.disableDrag?"":r.unref(J)("canDrag")]),"data-span":o.span,"data-index":u,"data-row":o.row,"data-col":o.col,"data-height":o.height,"data-module":o.module,style:r.normalizeStyle([U(o)]),draggable:!f.disableDrag},[r.renderSlot(e.$slots,"item",{item:o,index:u})],14,ee))),128))],6)]),_:3},8,["spinning"]))}});exports.default=oe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=()=>({gridList:{type:Array,default:()=>[]},request:{type:Function,default:null},gridWidth:{type:[String,Number],default:"100%"},gridItemHeight:{type:Number,default:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=()=>({gridList:{type:Array,default:()=>[]},request:{type:Function,default:null},gridWidth:{type:[String,Number],default:"100%"},gridItemHeight:{type:Number,default:100},gridItemShadow:{type:String,default:"0px 4px 6px 0px rgba(73, 107, 158, 0.1)"},gapWidth:{type:Number,default:12},disableDrag:{type:Boolean,default:!1},customWrapper:{type:String,default:"ap-draggable-grid"}});exports.ApDraggableGridProps=e;
|
|
@@ -39,6 +39,7 @@ declare const ApDraggableGrid: {
|
|
|
39
39
|
onOnGridListChange?: ((args_0: ApDraggableGridItemBase[]) => any) | undefined;
|
|
40
40
|
}>, {
|
|
41
41
|
setGridItems: (items: ApDraggableGridItemBase[]) => void;
|
|
42
|
+
getGridItems: () => ApDraggableGridItemBase[];
|
|
42
43
|
refreshGrid: () => void;
|
|
43
44
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
44
45
|
onGridListChange: (args_0: ApDraggableGridItemBase[]) => any;
|
|
@@ -97,6 +98,7 @@ declare const ApDraggableGrid: {
|
|
|
97
98
|
onOnGridListChange?: ((args_0: ApDraggableGridItemBase[]) => any) | undefined;
|
|
98
99
|
}>, {
|
|
99
100
|
setGridItems: (items: ApDraggableGridItemBase[]) => void;
|
|
101
|
+
getGridItems: () => ApDraggableGridItemBase[];
|
|
100
102
|
refreshGrid: () => void;
|
|
101
103
|
}, {}, {}, {}, {
|
|
102
104
|
request: () => Promise< ApDraggableGridItemBase[]>;
|
|
@@ -148,6 +150,7 @@ declare const ApDraggableGrid: {
|
|
|
148
150
|
onOnGridListChange?: ((args_0: ApDraggableGridItemBase[]) => any) | undefined;
|
|
149
151
|
}>, {
|
|
150
152
|
setGridItems: (items: ApDraggableGridItemBase[]) => void;
|
|
153
|
+
getGridItems: () => ApDraggableGridItemBase[];
|
|
151
154
|
refreshGrid: () => void;
|
|
152
155
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
153
156
|
onGridListChange: (args_0: ApDraggableGridItemBase[]) => any;
|
|
@@ -169,8 +172,8 @@ declare const ApDraggableGrid: {
|
|
|
169
172
|
span: number;
|
|
170
173
|
row: number;
|
|
171
174
|
col: number;
|
|
172
|
-
showHeight
|
|
173
|
-
height
|
|
175
|
+
showHeight?: (number | string) | undefined;
|
|
176
|
+
height: number | string;
|
|
174
177
|
module: string;
|
|
175
178
|
};
|
|
176
179
|
index: number;
|
|
@@ -2,8 +2,8 @@ export interface ApDraggableGridItemBase {
|
|
|
2
2
|
span: number;
|
|
3
3
|
row: number;
|
|
4
4
|
col: number;
|
|
5
|
-
showHeight
|
|
6
|
-
height
|
|
5
|
+
showHeight?: number | string;
|
|
6
|
+
height: number | string;
|
|
7
7
|
module: string;
|
|
8
8
|
}
|
|
9
9
|
export interface ApDraggableGridItem extends ApDraggableGridItemBase {
|
|
@@ -12,5 +12,6 @@ export interface ApDraggableGridItem extends ApDraggableGridItemBase {
|
|
|
12
12
|
}
|
|
13
13
|
export type ApDraggableGridExpose = {
|
|
14
14
|
setGridItems: (items: ApDraggableGridItemBase[]) => void;
|
|
15
|
+
getGridItems: () => ApDraggableGridItemBase[];
|
|
15
16
|
refreshGrid: () => void;
|
|
16
17
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function w(e){const c=[...e].sort((o,s)=>o.row-s.row),r={};c.forEach(o=>{r[o.row]||(r[o.row]=[]),r[o.row].push(o)});const t=[];return Object.keys(r).map(Number).sort((o,s)=>o-s).forEach(o=>{const s=r[o].sort((n,u)=>n.col-u.col);t.push(...s)}),t}exports.sortItemsByRowAndCol=w;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApExpandAlertProps } from './interface';
|
|
2
|
-
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
|
|
2
|
+
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode, RendererNode, RendererElement } from 'vue';
|
|
3
3
|
declare const _default: <T extends Record<string, 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<{
|
|
4
4
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
5
5
|
readonly onExpand?: ((args_0: "collapse" | "expand") => any) | undefined;
|
|
@@ -23,7 +23,9 @@ declare const _default: <T extends Record<string, any>>(__VLS_props: NonNullable
|
|
|
23
23
|
}): any;
|
|
24
24
|
};
|
|
25
25
|
emit: ((evt: "expand", args_0: "collapse" | "expand") => void) & ((evt: "choose", args_0: T) => void);
|
|
26
|
-
}>) => VNode
|
|
26
|
+
}>) => VNode<RendererNode, RendererElement, {
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
}> & {
|
|
27
29
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
28
30
|
};
|
|
29
31
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),z=require("@ant-design/icons-vue"),h=require("@aplus-frontend/antdv"),N=require("../../ap-action/index.js");require("../../config-provider/index.js");const i=require("lodash-unified"),T=require("../../config-provider/hooks/use-locale.js"),$=require("../../config-provider/hooks/use-namespace.js"),q=require("../../config-provider/hooks/use-global-config.js"),A=["onClick"],D=e.defineComponent({__name:"ApExpandAlert",props:{type:{default:"warning"},data:{default:()=>[]},prefix:{default:""},tipTitle:{default:""},mapLabel:{},separator:{default:"|"},separatorStyle:{default:()=>({})},contentStyle:{default:()=>({})},prefixStyle:{default:()=>({})},rows:{default:2},defaultExpand:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0}},emits:["choose","expand"],setup(g,{expose:v,emit:
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),z=require("@ant-design/icons-vue"),h=require("@aplus-frontend/antdv"),N=require("../../ap-action/index.js");require("../../config-provider/index.js");const i=require("lodash-unified"),T=require("../../config-provider/hooks/use-locale.js"),$=require("../../config-provider/hooks/use-namespace.js"),q=require("../../config-provider/hooks/use-global-config.js"),A=["onClick"],D=e.defineComponent({__name:"ApExpandAlert",props:{type:{default:"warning"},data:{default:()=>[]},prefix:{default:""},tipTitle:{default:""},mapLabel:{},separator:{type:[Object,Function,String],default:"|"},separatorStyle:{default:()=>({})},contentStyle:{default:()=>({})},prefixStyle:{default:()=>({})},rows:{default:2},defaultExpand:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0}},emits:["choose","expand"],setup(g,{expose:v,emit:S}){const f=S,r=g,{t:m}=T.useLocale(),B=e.computed(()=>{if(r.type!="card")return r.type}),n=e.ref(""),s=e.ref(null),w=e.computed(()=>({fontWeight:"400",wordBreak:"break-all",overflow:"hidden",display:"-webkit-box",webkitLineClamp:n.value,webkitBoxOrient:"vertical",lineHeight:"18px"}));function C(){n.value==="1"?(n.value="",f("expand","expand")):(n.value="1",f("expand","collapse"))}const x=e.computed(()=>n.value==="1"?m("ap.apExpandAlert.expand"):m("ap.apExpandAlert.collapse")),u=e.ref(!0),y=e.computed(()=>n.value!=="1");function c(t){t?n.value="":n.value="1"}e.watch(()=>r.data,()=>{n.value="",e.nextTick(()=>{if(s.value){const t=Number(s.value.clientHeight),o=Number(parseInt(s.value.style.lineHeight));t<o*Number(r.rows)&&y.value?u.value=!1:u.value=!0}})},{immediate:!0}),e.watch(()=>r.defaultExpand,t=>{t?e.nextTick(()=>{c(t)}):e.nextTick(()=>{c(t)})},{immediate:!0}),e.onMounted(()=>{e.watch(()=>r.contentStyle,t=>{i.isNil(t.lineHeight)||e.nextTick(()=>{const o=document.querySelector(`#${p} .ant-alert-action`),a=document.querySelector(`#${p} .ant-alert-icon`);o&&o.setAttribute("style",`line-height: ${t.lineHeight}`),a&&a.setAttribute("style",`line-height: ${t.lineHeight}`)})},{deep:!0,immediate:!0,flush:"post"})});const{b:k,e:l,m:b}=$.useNamespace("ap-expand-alert"),p=`${k()}-key-${Date.now()}-${(Math.random()*1e6).toFixed(0)}`,E=q.useGlobalConfig("uiMode","aplus");return v({setExpand:c}),(t,o)=>(e.openBlock(),e.createElementBlock("div",{id:p,class:e.normalizeClass([e.unref(k)(),`${e.unref(b)(e.unref(E))}`])},[e.createVNode(e.unref(h.Alert),{type:B.value,"show-icon":t.showIcon,class:e.normalizeClass([e.unref(l)("antAlert"),t.type=="card"?"card-alert":""])},{action:e.withCtx(()=>[u.value?(e.openBlock(),e.createBlock(e.unref(N.ApActionItem),{key:0,size:"small",style:{"font-size":"12px","padding-left":"16px"},onClick:o[0]||(o[0]=a=>C())},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(e.unref(l)("expandText"))},e.toDisplayString(x.value),3),e.createVNode(e.unref(z.DownOutlined),{class:e.normalizeClass(y.value?e.unref(l)("expandIcon"):e.unref(l)("collapseIcon"))},null,8,["class"])]),_:1})):e.createCommentVNode("",!0)]),message:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"ellipsisBoxRef",ref:s,style:e.normalizeStyle({...w.value,...t.contentStyle}),class:e.normalizeClass(e.unref(l)("alertContent"))},[e.renderSlot(t.$slots,"default",{},()=>[e.unref(i.isString)(t.prefix)?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(l)("prefix")),style:e.normalizeStyle(t.prefixStyle)},e.toDisplayString(t.prefix),7)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.prefix),{key:1,style:e.normalizeStyle(t.prefixStyle)},null,8,["style"])),e.unref(i.isString)(t.data)?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(e.unref(l)("text"))},e.toDisplayString(t.data),3)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(t.data,(a,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:d},[e.createVNode(e.unref(h.Tooltip),{title:t.tipTitle?t.tipTitle:null},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"item",{record:a,index:d},()=>[e.createElementVNode("span",{class:e.normalizeClass(e.unref(l)("showItem")),onClick:V=>t.$emit("choose",a)},e.toDisplayString(t.mapLabel?a[t.mapLabel]:a),11,A)])]),_:2},1032,["title"]),d!==t.data.length-1?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(l)("spliter")),style:e.normalizeStyle(t.separatorStyle)},[e.unref(i.isString)(t.separator)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.separator),1)],64)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.separator),{key:1}))],6)):e.createCommentVNode("",!0)],64))),128))])],6)]),_:3},8,["type","show-icon","class"])],2))}});exports.default=D;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, VNode, CSSProperties, PublicProps, ShallowUnwrapRef, Plugin } from 'vue';
|
|
1
|
+
import { Component, VNode, CSSProperties, PublicProps, ShallowUnwrapRef, RendererNode, RendererElement, Plugin } from 'vue';
|
|
2
2
|
export * from './interface';
|
|
3
3
|
declare const ApExpandAlert: (<T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
4
4
|
attrs: any;
|
|
@@ -20,7 +20,7 @@ declare const ApExpandAlert: (<T extends Record<string, any>>(__VLS_props: NonNu
|
|
|
20
20
|
props: {
|
|
21
21
|
readonly onExpand?: ((args_0: "collapse" | "expand") => any) | undefined;
|
|
22
22
|
readonly onChoose?: ((args_0: T) => any) | undefined;
|
|
23
|
-
type?: "warning" | "error" | "success" | "info" | "card" | undefined
|
|
23
|
+
type?: "warning" | "error" | "success" | "info" | "card" | undefined;
|
|
24
24
|
data?: string | T[] | undefined;
|
|
25
25
|
prefix?: string | undefined;
|
|
26
26
|
tipTitle?: string | undefined;
|
|
@@ -29,7 +29,7 @@ declare const ApExpandAlert: (<T extends Record<string, any>>(__VLS_props: NonNu
|
|
|
29
29
|
separatorStyle?: CSSProperties | undefined;
|
|
30
30
|
contentStyle?: Omit< CSSProperties, "wordBreak" | "overflow" | "display" | "webkitLineClamp" | "webkitBoxOrient"> | undefined;
|
|
31
31
|
prefixStyle?: CSSProperties | undefined;
|
|
32
|
-
rows?: string | number | undefined;
|
|
32
|
+
rows?: (string | number) | undefined;
|
|
33
33
|
defaultExpand?: boolean | undefined;
|
|
34
34
|
showIcon?: boolean | undefined;
|
|
35
35
|
} & PublicProps;
|
|
@@ -51,7 +51,9 @@ declare const ApExpandAlert: (<T extends Record<string, any>>(__VLS_props: NonNu
|
|
|
51
51
|
}): any;
|
|
52
52
|
};
|
|
53
53
|
emit: ((evt: "expand", args_0: "collapse" | "expand") => void) & ((evt: "choose", args_0: T) => void);
|
|
54
|
-
}>) => VNode
|
|
54
|
+
}>) => VNode<RendererNode, RendererElement, {
|
|
55
|
+
[key: string]: any;
|
|
56
|
+
}> & {
|
|
55
57
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
56
58
|
}) & ( Plugin & (new (...args: any[]) => {
|
|
57
59
|
$props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApSelectItem } from './interface';
|
|
2
|
-
import { PublicProps, ShallowUnwrapRef, VNode, Plugin } from 'vue';
|
|
2
|
+
import { PublicProps, ShallowUnwrapRef, VNode, RendererNode, RendererElement, Plugin } from 'vue';
|
|
3
3
|
export * from './interface';
|
|
4
4
|
declare const ApSelectLayout: (<T extends ApSelectItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
5
5
|
attrs: any;
|
|
@@ -38,7 +38,9 @@ declare const ApSelectLayout: (<T extends ApSelectItem>(__VLS_props: NonNullable
|
|
|
38
38
|
(event: "afterEnter", el: Element): void;
|
|
39
39
|
(event: "afterLeave", el: Element): void;
|
|
40
40
|
};
|
|
41
|
-
}>) => VNode
|
|
41
|
+
}>) => VNode<RendererNode, RendererElement, {
|
|
42
|
+
[key: string]: any;
|
|
43
|
+
}> & {
|
|
42
44
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
43
45
|
}) & ( Plugin & (new (...args: any[]) => {
|
|
44
46
|
$props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApSelectItem, ApSelectLayoutProps } from './interface';
|
|
2
|
-
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
|
|
2
|
+
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode, RendererNode, RendererElement } from 'vue';
|
|
3
3
|
declare const _default: <T extends ApSelectItem>(__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<{
|
|
4
4
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
5
5
|
readonly onOnSelect?: ((value: T) => any) | undefined;
|
|
@@ -19,7 +19,9 @@ declare const _default: <T extends ApSelectItem>(__VLS_props: NonNullable<Awaite
|
|
|
19
19
|
(event: "afterEnter", el: Element): void;
|
|
20
20
|
(event: "afterLeave", el: Element): void;
|
|
21
21
|
};
|
|
22
|
-
}>) => VNode
|
|
22
|
+
}>) => VNode<RendererNode, RendererElement, {
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
}> & {
|
|
23
25
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
24
26
|
};
|
|
25
27
|
export default _default;
|
|
@@ -4,8 +4,8 @@ import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicP
|
|
|
4
4
|
import { ApTableModalProps, OpenOptions, OpenReturnType } from './interface';
|
|
5
5
|
import { Recordable } from '../../type';
|
|
6
6
|
import { TableColumnsType } from '@aplus-frontend/antdv';
|
|
7
|
-
import { ApFormSearchFormPopoverSorterItem } from '../..';
|
|
8
7
|
import { InternalPagingType } from '../../ap-table/hooks/use-table-paging-ng';
|
|
8
|
+
import { ApFormSearchFormPopoverSorterItem } from '../..';
|
|
9
9
|
/**
|
|
10
10
|
*
|
|
11
11
|
*/
|
|
@@ -42,14 +42,8 @@ declare const ApTableModal: {
|
|
|
42
42
|
};
|
|
43
43
|
y: undefined;
|
|
44
44
|
};
|
|
45
|
-
getPaging: () =>
|
|
46
|
-
|
|
47
|
-
pageSize: number;
|
|
48
|
-
}>;
|
|
49
|
-
setPaging: (nextPaging: Partial<{
|
|
50
|
-
current: number;
|
|
51
|
-
pageSize: number;
|
|
52
|
-
}>, refreshImmediately?: boolean) => void;
|
|
45
|
+
getPaging: () => InternalPagingType;
|
|
46
|
+
setPaging: (nextPaging: InternalPagingType, refreshImmediately?: boolean) => void;
|
|
53
47
|
getSearchFormSorterItems: () => ApFormSearchFormPopoverSorterItem[];
|
|
54
48
|
setSearchFormSorterItems: (sortedItems: ApFormSearchFormPopoverSorterItem[]) => void;
|
|
55
49
|
resetSearchFormSorterItems: () => void;
|
|
@@ -153,14 +147,8 @@ declare const ApTableModal: {
|
|
|
153
147
|
};
|
|
154
148
|
y: undefined;
|
|
155
149
|
};
|
|
156
|
-
getPaging: () =>
|
|
157
|
-
|
|
158
|
-
pageSize: number;
|
|
159
|
-
}>;
|
|
160
|
-
setPaging: (nextPaging: Partial<{
|
|
161
|
-
current: number;
|
|
162
|
-
pageSize: number;
|
|
163
|
-
}>, refreshImmediately?: boolean) => void;
|
|
150
|
+
getPaging: () => InternalPagingType;
|
|
151
|
+
setPaging: (nextPaging: InternalPagingType, refreshImmediately?: boolean) => void;
|
|
164
152
|
getSearchFormSorterItems: () => ApFormSearchFormPopoverSorterItem[];
|
|
165
153
|
setSearchFormSorterItems: (sortedItems: ApFormSearchFormPopoverSorterItem[]) => void;
|
|
166
154
|
resetSearchFormSorterItems: () => void;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { ApFormProps, UpdateModelOptimizeFn, ApFormInternalInstance, WatchFunc } from '../../../ap-form';
|
|
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
|
-
import { ButtonSize, SizeType } from '@aplus-frontend/antdv/es/button';
|
|
4
3
|
import { ColSize } from '@aplus-frontend/antdv/es/grid';
|
|
5
|
-
import { FormLabelAlign, ValidateMessages, FieldData, ValidateErrorEntity, NamePath, ValidateOptions, InternalNamePath } from '@aplus-frontend/antdv/es/form/interface';
|
|
4
|
+
import { FormLabelAlign, ValidateMessages, FieldData, ValidateErrorEntity, NamePath, RuleObject, ValidateOptions, InternalNamePath } from '@aplus-frontend/antdv/es/form/interface';
|
|
6
5
|
import { RuleObject } from '@aplus-frontend/antdv/es/form';
|
|
7
6
|
import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
|
|
8
7
|
import { Options } from '../../../../node_modules/scroll-into-view-if-needed';
|
|
9
8
|
import { Recordable } from '../../../type';
|
|
10
9
|
import { VueTypeDef, VueTypeValidableDef } from '../../../../node_modules/vue-types';
|
|
10
|
+
import { SizeType } from '@aplus-frontend/antdv/es/config-provider';
|
|
11
|
+
import { SizeType } from '@aplus-frontend/antdv/es/button';
|
|
11
12
|
import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
|
|
12
13
|
import { OnCleanup } from '@vue/reactivity';
|
|
13
14
|
type __VLS_Props = {
|
|
@@ -18,7 +19,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
|
|
|
18
19
|
$: ComponentInternalInstance;
|
|
19
20
|
$data: {};
|
|
20
21
|
$props: {
|
|
21
|
-
readonly size?:
|
|
22
|
+
readonly size?: "small" | "large" | "middle" | undefined;
|
|
22
23
|
readonly onSubmit?: ((e: Event) => void) | undefined;
|
|
23
24
|
readonly layout?: string | undefined;
|
|
24
25
|
readonly disabled?: boolean | undefined;
|
|
@@ -108,7 +109,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
|
|
|
108
109
|
readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
|
|
109
110
|
readonly initialValues?: Recordable | undefined;
|
|
110
111
|
readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
|
|
111
|
-
readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
|
|
112
|
+
readonly syncToUrl?: (boolean | ((values: Recordable, type: "get" | "set") => Recordable)) | undefined;
|
|
112
113
|
readonly syncToUrlPriority?: boolean | undefined;
|
|
113
114
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
114
115
|
$attrs: {
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { ViewListModel } from '../interface';
|
|
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
|
-
import { ButtonSize, SizeType } from '@aplus-frontend/antdv/es/button';
|
|
4
3
|
import { ColSize } from '@aplus-frontend/antdv/es/grid';
|
|
5
|
-
import { FormLabelAlign, ValidateMessages, FieldData, ValidateErrorEntity, NamePath, ValidateOptions, InternalNamePath } from '@aplus-frontend/antdv/es/form/interface';
|
|
4
|
+
import { FormLabelAlign, ValidateMessages, FieldData, ValidateErrorEntity, NamePath, RuleObject, ValidateOptions, InternalNamePath } from '@aplus-frontend/antdv/es/form/interface';
|
|
6
5
|
import { RuleObject } from '@aplus-frontend/antdv/es/form';
|
|
7
6
|
import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
|
|
8
7
|
import { Options } from '../../../../node_modules/scroll-into-view-if-needed';
|
|
9
8
|
import { Recordable } from '../../../type';
|
|
10
9
|
import { VueTypeDef, VueTypeValidableDef } from '../../../../node_modules/vue-types';
|
|
10
|
+
import { SizeType } from '@aplus-frontend/antdv/es/config-provider';
|
|
11
|
+
import { SizeType } from '@aplus-frontend/antdv/es/button';
|
|
11
12
|
import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
|
|
12
13
|
import { ApFormProps, UpdateModelOptimizeFn, ApFormInternalInstance, WatchFunc } from '../../../ap-form';
|
|
13
14
|
import { OnCleanup } from '@vue/reactivity';
|
|
@@ -19,7 +20,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
|
|
|
19
20
|
$: ComponentInternalInstance;
|
|
20
21
|
$data: {};
|
|
21
22
|
$props: {
|
|
22
|
-
readonly size?:
|
|
23
|
+
readonly size?: "small" | "large" | "middle" | undefined;
|
|
23
24
|
readonly onSubmit?: ((e: Event) => void) | undefined;
|
|
24
25
|
readonly layout?: string | undefined;
|
|
25
26
|
readonly disabled?: boolean | undefined;
|
|
@@ -109,7 +110,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
|
|
|
109
110
|
readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
|
|
110
111
|
readonly initialValues?: Recordable | undefined;
|
|
111
112
|
readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
|
|
112
|
-
readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
|
|
113
|
+
readonly syncToUrl?: (boolean | ((values: Recordable, type: "get" | "set") => Recordable)) | undefined;
|
|
113
114
|
readonly syncToUrlPriority?: boolean | undefined;
|
|
114
115
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
115
116
|
$attrs: {
|
|
@@ -2,11 +2,7 @@ import { InjectionKey, Ref, ComputedRef } from 'vue';
|
|
|
2
2
|
export declare const defaultNamespace = "aplus";
|
|
3
3
|
export declare const namespaceContextKey: InjectionKey<Ref<string | undefined>>;
|
|
4
4
|
export declare const useGetDerivedNamespace: (namespaceOverrides?: Ref<string | undefined>) => ComputedRef<string>;
|
|
5
|
-
export declare const useNamespace: (
|
|
6
|
-
/**
|
|
7
|
-
* 块 一般是指组件名
|
|
8
|
-
*/
|
|
9
|
-
block: string, namespaceOverrides?: Ref<string | undefined>) => {
|
|
5
|
+
export declare const useNamespace: (block: string, namespaceOverrides?: Ref<string | undefined>) => {
|
|
10
6
|
namespace: ComputedRef<string>;
|
|
11
7
|
b: (blockSuffix?: string) => string;
|
|
12
8
|
e: (element?: string) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EditableColumnType, EditableTableFormItemExpose, EditableTableFormItemProps } from './interface';
|
|
2
|
-
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
|
|
2
|
+
import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode, RendererNode, RendererElement } from 'vue';
|
|
3
3
|
declare const _default: <RecordType = 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<{
|
|
4
4
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & EditableTableFormItemProps<RecordType> & Partial<{}>> & PublicProps;
|
|
5
5
|
expose(exposed: ShallowUnwrapRef<EditableTableFormItemExpose>): void;
|
|
@@ -36,7 +36,9 @@ declare const _default: <RecordType = any>(__VLS_props: NonNullable<Awaited<type
|
|
|
36
36
|
}) => void;
|
|
37
37
|
};
|
|
38
38
|
emit: {};
|
|
39
|
-
}>) => VNode
|
|
39
|
+
}>) => VNode<RendererNode, RendererElement, {
|
|
40
|
+
[key: string]: any;
|
|
41
|
+
}> & {
|
|
40
42
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
41
43
|
};
|
|
42
44
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),P=require("@aplus-frontend/antdv"),p=require("../ap-form/index.js"),d=require("lodash-unified");require("../config-provider/index.js");const j=require("../ap-form/context.js"),h=require("../utils/index.js"),k=require("./hooks/use-get-columns.js"),z=require("./utils.js"),A=require("../ap-form/utils/get.js"),K=require("../config-provider/hooks/use-namespace.js"),O=require("../config-provider/hooks/use-global-config.js"),G=o.defineComponent({name:"EditableTableFormItem",__name:"form-item",props:{dropdownPrefixCls:{},pagination:{type:[Boolean,Object],default:!1},loading:{type:[Boolean,Object],default:void 0},size:{default:"small"},bordered:{type:Boolean,default:!1},locale:{},onResizeColumn:{},rowSelection:{},getPopupContainer:{},scroll:{},sortDirections:{default:()=>["ascend","descend"]},showSorterTooltip:{type:[Boolean,Object],default:!0},prefixCls:{},rowKey:{default:"key"},tableLayout:{default:"fixed"},rowClassName:{},title:{},footer:{},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]},transformCellText:{},columns:{},value:{},defaultValue:{},"onUpdate:value":{},onChange:{},maxLength:{},onFieldChange:{},label:{},name:{},formItem:{default:()=>({})}},setup(g,{expose:x}){const l=g,{internalInstance:t,model:b}=j.useInjectForm(),i=o.ref(A.getModelValue(o.unref(b),l.name)||[]),w=o.useSlots(),y=o.toRef(l,"name"),C=p.ApForm.useWatch(y);o.watch(()=>C.value,async e=>{var u;await o.nextTick(),i.value=e,(u=l.onChange)==null||u.call(l,e)},{deep:!0});const{b:R}=K.useNamespace("editable-table"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),P=require("@aplus-frontend/antdv"),p=require("../ap-form/index.js"),d=require("lodash-unified");require("../config-provider/index.js");const j=require("../ap-form/context.js"),h=require("../utils/index.js"),k=require("./hooks/use-get-columns.js"),z=require("./utils.js"),A=require("../ap-form/utils/get.js"),K=require("../config-provider/hooks/use-namespace.js"),O=require("../config-provider/hooks/use-global-config.js"),G=o.defineComponent({name:"EditableTableFormItem",__name:"form-item",props:{dropdownPrefixCls:{},pagination:{type:[Boolean,Object],default:!1},loading:{type:[Boolean,Object],default:void 0},size:{default:"small"},bordered:{type:Boolean,default:!1},locale:{},onResizeColumn:{},rowSelection:{},getPopupContainer:{},scroll:{},sortDirections:{default:()=>["ascend","descend"]},showSorterTooltip:{type:[Boolean,Object],default:!0},prefixCls:{},rowKey:{type:[String,Function],default:"key"},tableLayout:{default:"fixed"},rowClassName:{},title:{},footer:{},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]},transformCellText:{},columns:{},value:{},defaultValue:{},"onUpdate:value":{},onChange:{},maxLength:{},onFieldChange:{},label:{},name:{},formItem:{default:()=>({})}},setup(g,{expose:x}){const l=g,{internalInstance:t,model:b}=j.useInjectForm(),i=o.ref(A.getModelValue(o.unref(b),l.name)||[]),w=o.useSlots(),y=o.toRef(l,"name"),C=p.ApForm.useWatch(y);o.watch(()=>C.value,async e=>{var u;await o.nextTick(),i.value=e,(u=l.onChange)==null||u.call(l,e)},{deep:!0});const{b:R}=K.useNamespace("editable-table"),m=o.ref(),v=O.useGlobalConfig("valueTypeMap"),F=k.default(l,v);function B(e,u){var n;const s=((n=o.unref(i))==null?void 0:n.length)||0;if(h.isDef(l.maxLength)&&s>=l.maxLength)return;const a={...e||{}};t==null||t.setFieldValue(l.name,a,!0,(r,f)=>{if(!r[f]){r[f]=[a];return}d.isUndefined(u)?r[f].push(a):r[f].splice(u,0,a)})}function T(e,u="suffix"){var r;const s=((r=o.unref(i))==null?void 0:r.length)||0,a=d.isNumber(e)?e:e.length;if(h.isDef(l.maxLength)&&s+a>l.maxLength)return;const n=d.isNumber(e)?new Array(e).fill(0).map(()=>({})):d.cloneDeep(e);t==null||t.setFieldValue(l.name,n,!0,(f,c)=>{if(!f[c]){f[c]=[...n];return}u==="suffix"?f[c].push(...n):f[c].unshift(...n)})}function q(e){const u=new Set(d.isNumber(e)?[e]:e);t==null||t.setFieldValue(l.name,void 0,!0,(s,a)=>{s[a]=s[a].filter((n,r)=>!u.has(r))})}function D(e){var s;const u=new Set(d.isArray(e)?e:[e]);u.size!==0&&((s=t==null?void 0:t.setFieldValue)==null||s.call(t,l.name,void 0,!0,(a,n)=>{a[n]=a[n].filter(r=>!u.has(r[l.rowKey]))}))}function S(){return o.unref(i)}function N(e){var u;return(u=o.unref(i))==null?void 0:u[e]}function V(e,u,s=!0){t==null||t.setFieldValue(l.name,void 0,!0,(a,n)=>{!a[n]||!a[n][e]||(a[n][e]={...s?a[n][e]:{},...u})})}function L(e){t==null||t.setFieldValue(l.name,e)}function _(e,u){var a;const s=e==="end"?i.value.length-1:e;z.scrollToRowIndex(s,(a=m.value)==null?void 0:a.$el,u)}function E(){var e;(e=t==null?void 0:t.setFieldValue)==null||e.call(t,l.name,[])}return x({add:B,remove:q,getRowData:N,getRowsData:S,setRowData:V,addMultiple:T,scrollTo:_,setTableData:L,clear:E,removeByKey:D}),(e,u)=>(o.openBlock(),o.createBlock(o.unref(p.ApForm).FormItem,o.mergeProps(e.formItem,{name:e.name,label:e.label}),{default:o.withCtx(()=>[o.createVNode(o.unref(P.Table),o.mergeProps(o.unref(d.omit)(l,["name","maxLength","onChange"]),{ref_key:"tableRef",ref:m,class:o.unref(R)(),columns:o.unref(F),"data-source":i.value}),o.createSlots({_:2},[o.renderList(o.unref(d.omit)(w,["headerCell"]),(s,a)=>({name:a,fn:o.withCtx(n=>[o.renderSlot(e.$slots,a,o.normalizeProps(o.guardReactiveProps(n||{})))])}))]),1040,["class","columns","data-source"])]),_:3},16,["name","label"]))}});exports.default=G;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EditableTableProps, EditableColumnType, EditableTableExpose } 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;
|
|
@@ -39,7 +39,9 @@ declare const _default: <RecordType extends Recordable = any>(__VLS_props: NonNu
|
|
|
39
39
|
}) => void;
|
|
40
40
|
};
|
|
41
41
|
emit: (event: "update:value", ...args: any[]) => void;
|
|
42
|
-
}>) => VNode
|
|
42
|
+
}>) => VNode<RendererNode, RendererElement, {
|
|
43
|
+
[key: string]: any;
|
|
44
|
+
}> & {
|
|
43
45
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
44
46
|
};
|
|
45
47
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),K=require("@aplus-frontend/antdv"),v=require("../ap-form/index.js"),f=require("lodash-unified");require("../config-provider/index.js");require("../hooks/index.js");const g=require("../utils/index.js"),O=require("./utils.js"),U=require("./hooks/use-get-columns.js"),G=require("../config-provider/hooks/use-namespace.js"),$=require("../hooks/useControllableValue.js"),H=require("../config-provider/hooks/use-global-config.js"),W=t.defineComponent({name:"EditableTable",__name:"index",props:{dropdownPrefixCls:{},pagination:{type:[Boolean,Object],default:!1},loading:{type:[Boolean,Object],default:void 0},size:{default:"small"},bordered:{type:Boolean,default:!1},locale:{},onResizeColumn:{},rowSelection:{},getPopupContainer:{},scroll:{},sortDirections:{default:()=>["ascend","descend"]},showSorterTooltip:{type:[Boolean,Object],default:!0},prefixCls:{},rowKey:{default:"key"},tableLayout:{default:"fixed"},rowClassName:{},title:{},footer:{},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]},transformCellText:{},columns:{},value:{},defaultValue:{},"onUpdate:value":{},onChange:{},maxLength:{},name:{default:"ap-editable-table-inner-name"},onFieldChange:{}},emits:["update:value"],setup(
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),K=require("@aplus-frontend/antdv"),v=require("../ap-form/index.js"),f=require("lodash-unified");require("../config-provider/index.js");require("../hooks/index.js");const g=require("../utils/index.js"),O=require("./utils.js"),U=require("./hooks/use-get-columns.js"),G=require("../config-provider/hooks/use-namespace.js"),$=require("../hooks/useControllableValue.js"),H=require("../config-provider/hooks/use-global-config.js"),W=t.defineComponent({name:"EditableTable",__name:"index",props:{dropdownPrefixCls:{},pagination:{type:[Boolean,Object],default:!1},loading:{type:[Boolean,Object],default:void 0},size:{default:"small"},bordered:{type:Boolean,default:!1},locale:{},onResizeColumn:{},rowSelection:{},getPopupContainer:{},scroll:{},sortDirections:{default:()=>["ascend","descend"]},showSorterTooltip:{type:[Boolean,Object],default:!0},prefixCls:{},rowKey:{type:[String,Function],default:"key"},tableLayout:{default:"fixed"},rowClassName:{},title:{},footer:{},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]},transformCellText:{},columns:{},value:{},defaultValue:{},"onUpdate:value":{},onChange:{},maxLength:{},name:{default:"ap-editable-table-inner-name"},onFieldChange:{}},emits:["update:value"],setup(y,{expose:w,emit:C}){const o=y,{b}=G.useNamespace("editable-table"),R=t.useSlots(),F=C,x=t.ref(),{value:p,updateValue:B}=$.useControllableValue(o,F),i=t.ref(),V=H.useGlobalConfig("valueTypeMap"),h=v.ApForm.useWatch(o.name,i);t.watch(()=>h.value,e=>{var n;B(e),(n=o.onChange)==null||n.call(o,e)},{deep:!0,flush:"post"}),t.watch(p,e=>{var n;e!==t.unref(h)&&(f.isEqual(e,t.unref(h))||(n=i.value)==null||n.setFieldValue(o.name,e))},{deep:!0});const q=U.default(o,V);function N(){var e;(e=i.value)==null||e.resetFields()}function S(e){return e?(f.isArray(e)?e:[e]).map(a=>f.isArray(a)?[o.name,...a]:[o.name,a]):void 0}async function T(e,n){var l;const a=await((l=i.value)==null?void 0:l.validateFields(S(e),n));return a==null?void 0:a[o.name]}function _(e,n){var u,r,s;const a=((u=t.unref(p))==null?void 0:u.length)||0;if(g.isDef(o.maxLength)&&a>=o.maxLength)return;const l={...e||{}};(s=(r=i.value)==null?void 0:r.setFieldValue)==null||s.call(r,o.name,l,!0,(d,c)=>{if(!d[c]){d[c]=[l];return}f.isUndefined(n)?d[c].push(l):d[c].splice(n,0,l)})}function A(e,n="suffix"){var r,s,d;const a=((r=t.unref(p))==null?void 0:r.length)||0,l=f.isNumber(e)?e:e.length;if(g.isDef(o.maxLength)&&a+l>o.maxLength)return;const u=f.isNumber(e)?new Array(e).fill(0).map(()=>({})):f.cloneDeep(e);(d=(s=i.value)==null?void 0:s.setFieldValue)==null||d.call(s,o.name,u,!0,(c,m)=>{if(!c[m]){c[m]=[...u];return}n==="suffix"?c[m].push(...u):c[m].unshift(...u)})}function D(e){var a,l;const n=new Set(f.isNumber(e)?[e]:e);(l=(a=i.value)==null?void 0:a.setFieldValue)==null||l.call(a,o.name,void 0,!0,(u,r)=>{u[r]=u[r].filter((s,d)=>!n.has(d))})}function L(e){var a,l;const n=new Set(f.isArray(e)?e:[e]);n.size!==0&&((l=(a=i.value)==null?void 0:a.setFieldValue)==null||l.call(a,o.name,void 0,!0,(u,r)=>{u[r]=u[r].filter(s=>!n.has(s[o.rowKey]))}))}function E(){return t.unref(p)}function k(e){var n;(n=i.value)==null||n.setFieldValue(o.name,e)}function P(e){var n;return(n=t.unref(p))==null?void 0:n[e]}function j(e,n,a=!0){var l,u;(u=(l=i.value)==null?void 0:l.setFieldValue)==null||u.call(l,o.name,void 0,!0,(r,s)=>{!r[s]||!r[s][e]||(r[s][e]={...a?r[s][e]:{},...n})})}function z(e,n){var l;const a=e==="end"?p.value.length-1:e;O.scrollToRowIndex(a,(l=x.value)==null?void 0:l.$el,n)}function I(){var e,n;(n=(e=i.value)==null?void 0:e.setFieldValue)==null||n.call(e,o.name,[])}return w({resetFields:N,validateFields:T,add:_,remove:D,getRowData:P,getRowsData:E,setRowData:j,addMultiple:A,scrollTo:z,clear:I,setTableData:k,removeByKey:L}),(e,n)=>(t.openBlock(),t.createBlock(t.unref(v.ApForm),{ref_key:"formRef",ref:i,"initial-values":{[o.name]:t.unref(p)}},{default:t.withCtx(()=>[t.createVNode(t.unref(v.ApForm).FormItem,{name:e.name,"no-style":""},{default:t.withCtx(()=>[t.createVNode(t.unref(K.Table),t.mergeProps(t.unref(f.omit)(o,["name","value","onUpdate:value","maxLength","onChange"]),{ref_key:"tableRef",ref:x,class:t.unref(b)(),columns:t.unref(q),"data-source":t.unref(p)}),t.createSlots({_:2},[t.renderList(t.unref(f.omit)(R,["headerCell"]),(a,l)=>({name:l,fn:t.withCtx(u=>[t.renderSlot(e.$slots,l,t.normalizeProps(t.guardReactiveProps(u||{})))])}))]),1040,["class","columns","data-source"])]),_:3},8,["name"])]),_:3},8,["initial-values"]))}});exports.default=W;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ScrollOptions, ScrollViewProps } from './interface';
|
|
2
|
-
import { ScrollBarDirection, InternalScrollBarProps } from '../scroll-bar';
|
|
2
|
+
import { ScrollBarDirection, InternalScrollBarProps, ColorType } from '../scroll-bar';
|
|
3
3
|
import { CreateComponentPublicInstanceWithMixins, Ref, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DefineComponent, ComputedRef } from 'vue';
|
|
4
4
|
declare function scroll(x?: number, y?: number): void;
|
|
5
5
|
declare function scrollTo({ smooth, left, top }: ScrollOptions): void;
|
|
@@ -106,8 +106,8 @@ declare const __VLS_component: DefineComponent<ScrollViewProps, {
|
|
|
106
106
|
onScroll?: ((percent: number) => void) | undefined;
|
|
107
107
|
disabled?: boolean | undefined;
|
|
108
108
|
trackSpeed?: number | undefined;
|
|
109
|
-
barColor?:
|
|
110
|
-
trackColor?:
|
|
109
|
+
barColor?: ColorType;
|
|
110
|
+
trackColor?: ColorType;
|
|
111
111
|
trackWidth?: number | undefined;
|
|
112
112
|
showTrack?: boolean | undefined;
|
|
113
113
|
onScrollStart?: ((percent: number) => void) | undefined;
|
|
@@ -118,8 +118,8 @@ declare const __VLS_component: DefineComponent<ScrollViewProps, {
|
|
|
118
118
|
onScroll?: ((percent: number) => void) | undefined;
|
|
119
119
|
disabled?: boolean | undefined;
|
|
120
120
|
trackSpeed?: number | undefined;
|
|
121
|
-
barColor?:
|
|
122
|
-
trackColor?:
|
|
121
|
+
barColor?: ColorType;
|
|
122
|
+
trackColor?: ColorType;
|
|
123
123
|
trackWidth?: number | undefined;
|
|
124
124
|
showTrack?: boolean | undefined;
|
|
125
125
|
onScrollStart?: ((percent: number) => void) | undefined;
|