@aplus-frontend/ui 0.6.0-beta.16 → 0.6.0-beta.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/index.mjs +118 -109
- package/es/src/ap-field/date-range/index.vue.mjs +8 -7
- package/es/src/ap-field/number/index.vue.d.ts +2 -4
- package/es/src/ap-field/radio/index.vue.d.ts +2 -4
- package/es/src/ap-field/rate/index.vue.d.ts +2 -4
- package/es/src/ap-field/select/index.vue.d.ts +3 -6
- package/es/src/ap-field/slider/index.vue.d.ts +2 -4
- package/es/src/ap-field/text/index.vue2.mjs +42 -44
- package/es/src/ap-field/text/password.vue.mjs +15 -17
- package/es/src/ap-field/text-area/index.vue.d.ts +2 -2
- package/es/src/ap-field/tree-select/index.vue.mjs +31 -30
- package/es/src/ap-form/ap-form.vue2.mjs +18 -17
- package/es/src/ap-form/dependency/index.vue.mjs +24 -23
- package/es/src/ap-form/drawer-form/index.vue.d.ts +9 -7
- package/es/src/ap-form/drawer-form/index.vue.mjs +58 -49
- package/es/src/ap-form/interface.d.ts +2 -2
- package/es/src/ap-form/item/index.vue.d.ts +5 -10
- package/es/src/ap-form/items/select/index.vue.mjs +12 -14
- package/es/src/ap-form/items/text/password.vue.mjs +9 -9
- package/es/src/ap-form/items/text-area/index.vue.d.ts +5 -5
- package/es/src/ap-form/items/tree-select/index.vue.mjs +12 -14
- package/es/src/ap-form/modal-form/index.vue.d.ts +9 -7
- package/es/src/ap-form/modal-form/index.vue.mjs +64 -55
- package/es/src/ap-form/provider/index.vue.mjs +6 -5
- package/es/src/ap-form/search-form/index.vue.d.ts +4 -8
- package/es/src/ap-form/search-form/index.vue.mjs +50 -50
- package/es/src/ap-form/set/index.vue.mjs +7 -6
- package/es/src/ap-grid/editable/form-item.vue.mjs +1 -1
- package/es/src/ap-grid/hooks/use-editable-columns.mjs +17 -17
- package/es/src/ap-grid/index.vue.mjs +79 -75
- package/es/src/ap-grid/interface.d.ts +13 -0
- package/es/src/ap-list/index.vue.d.ts +2 -9
- package/es/src/ap-list/index.vue.mjs +116 -106
- package/es/src/ap-list/interface.d.ts +20 -0
- package/es/src/ap-table/ap-table.vue.d.ts +10 -2
- package/es/src/ap-table/ap-table.vue2.mjs +87 -83
- package/es/src/ap-table/components/setting/modal/index.vue2.mjs +12 -11
- package/es/src/ap-table/constants.d.ts +4 -4
- package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +9 -2
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +113 -105
- package/es/src/ap-table/interface.d.ts +14 -1
- package/es/src/ap-table/utils.d.ts +3 -3
- package/es/src/business/ap-card/ApCard.vue2.mjs +1 -1
- package/es/src/business/ap-keep-alive/cacher/cacher.d.ts +10 -0
- package/es/src/business/ap-keep-alive/cacher/lru-cacher.d.ts +16 -0
- package/es/src/business/ap-keep-alive/cacher/lru-cacher.mjs +43 -0
- package/es/src/business/ap-keep-alive/hook.d.ts +10 -0
- package/es/src/business/ap-keep-alive/hook.mjs +31 -0
- package/es/src/business/ap-keep-alive/index.d.ts +101 -0
- package/es/src/business/ap-keep-alive/index.mjs +13 -0
- package/es/src/business/ap-keep-alive/interface.d.ts +35 -0
- package/es/src/business/ap-keep-alive/interface.mjs +54 -0
- package/es/src/business/ap-keep-alive/keep-alive.d.ts +51 -0
- package/es/src/business/ap-keep-alive/keep-alive.mjs +154 -0
- package/es/src/business/ap-keep-alive/keeper/ap-form-keeper.d.ts +7 -0
- package/es/src/business/ap-keep-alive/keeper/ap-form-keeper.mjs +21 -0
- package/es/src/business/ap-keep-alive/keeper/ap-grid-keeper.d.ts +14 -0
- package/es/src/business/ap-keep-alive/keeper/ap-grid-keeper.mjs +27 -0
- package/es/src/business/ap-keep-alive/keeper/ap-list-keeper.d.ts +13 -0
- package/es/src/business/ap-keep-alive/keeper/ap-list-keeper.mjs +18 -0
- package/es/src/business/ap-keep-alive/keeper/ap-radio-group-keeper.d.ts +6 -0
- package/es/src/business/ap-keep-alive/keeper/ap-radio-group-keeper.mjs +17 -0
- package/es/src/business/ap-keep-alive/keeper/ap-search-form-keeper.d.ts +7 -0
- package/es/src/business/ap-keep-alive/keeper/ap-search-form-keeper.mjs +18 -0
- package/es/src/business/ap-keep-alive/keeper/ap-table-keeper.d.ts +13 -0
- package/es/src/business/ap-keep-alive/keeper/ap-table-keeper.mjs +18 -0
- package/es/src/business/ap-keep-alive/keeper/ap-view-keeper.d.ts +6 -0
- package/es/src/business/ap-keep-alive/keeper/ap-view-keeper.mjs +12 -0
- package/es/src/business/ap-keep-alive/keeper/edit-grid-keeper.d.ts +6 -0
- package/es/src/business/ap-keep-alive/keeper/edit-grid-keeper.mjs +18 -0
- package/es/src/business/ap-keep-alive/keeper/edit-table-keeper.d.ts +6 -0
- package/es/src/business/ap-keep-alive/keeper/edit-table-keeper.mjs +18 -0
- package/es/src/business/ap-keep-alive/keeper/index.d.ts +3 -0
- package/es/src/business/ap-keep-alive/keeper/index.mjs +27 -0
- package/es/src/business/ap-keep-alive/keeper/step-keeper.d.ts +6 -0
- package/es/src/business/ap-keep-alive/keeper/step-keeper.mjs +17 -0
- package/es/src/business/ap-keep-alive/keeper/tab-keeper.d.ts +6 -0
- package/es/src/business/ap-keep-alive/keeper/tab-keeper.mjs +17 -0
- package/es/src/business/ap-keep-alive/utils.d.ts +22 -0
- package/es/src/business/ap-keep-alive/utils.mjs +41 -0
- package/es/src/business/ap-radio-group/ap-radio-group.vue2.mjs +23 -23
- package/es/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +4 -1
- package/es/src/business/ap-table-modal/hooks/use-table-modal.d.ts +4 -1
- package/es/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +4 -1
- package/es/src/business/ap-table-modal/index.d.ts +32 -5
- package/es/src/business/ap-table-modal/table-modal.vue.d.ts +14 -3
- package/es/src/business/ap-view/components/main-button-content.vue.d.ts +1 -1
- package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +1 -1
- package/es/src/business/batch-input-group/form-item.vue.mjs +14 -13
- package/es/src/business/batch-input-group/index.vue.mjs +10 -9
- package/es/src/business/hooks/usePageListApTable.d.ts +4 -1
- package/es/src/business/index.d.ts +1 -0
- package/es/src/business/index.mjs +18 -16
- package/es/src/editable-table/form-item.vue.mjs +23 -23
- package/es/src/full-screen/interface.d.ts +5 -6
- package/es/src/index.mjs +199 -190
- package/es/src/mask/index.vue.mjs +21 -20
- package/es/src/resize-observer/interface.d.ts +2 -3
- package/es/src/scroll-bar/interface.d.ts +7 -7
- package/es/src/scroll-view/interface.d.ts +2 -3
- package/es/src/splitter/SplitBar.vue2.mjs +1 -0
- package/es/src/splitter/Splitter.vue2.mjs +1 -0
- package/es/src/text/group.vue.mjs +7 -6
- package/es/src/text/index.vue.mjs +20 -19
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/es/src/work-order-modal/work-order-modal.vue.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/number/index.vue.d.ts +2 -4
- package/lib/src/ap-field/radio/index.vue.d.ts +2 -4
- package/lib/src/ap-field/rate/index.vue.d.ts +2 -4
- package/lib/src/ap-field/select/index.vue.d.ts +3 -6
- package/lib/src/ap-field/slider/index.vue.d.ts +2 -4
- package/lib/src/ap-field/text/index.vue2.js +1 -1
- package/lib/src/ap-field/text/password.vue.js +1 -1
- package/lib/src/ap-field/text-area/index.vue.d.ts +2 -2
- package/lib/src/ap-field/tree-select/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/dependency/index.vue.js +1 -1
- package/lib/src/ap-form/drawer-form/index.vue.d.ts +9 -7
- package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
- package/lib/src/ap-form/interface.d.ts +2 -2
- package/lib/src/ap-form/item/index.vue.d.ts +5 -10
- package/lib/src/ap-form/items/select/index.vue.js +1 -1
- package/lib/src/ap-form/items/text/password.vue.js +1 -1
- package/lib/src/ap-form/items/text-area/index.vue.d.ts +5 -5
- package/lib/src/ap-form/items/tree-select/index.vue.js +1 -1
- package/lib/src/ap-form/modal-form/index.vue.d.ts +9 -7
- package/lib/src/ap-form/modal-form/index.vue.js +1 -1
- package/lib/src/ap-form/provider/index.vue.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.d.ts +4 -8
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-form/set/index.vue.js +1 -1
- package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ap-grid/hooks/use-editable-columns.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/interface.d.ts +13 -0
- package/lib/src/ap-list/index.vue.d.ts +2 -9
- package/lib/src/ap-list/index.vue.js +1 -1
- package/lib/src/ap-list/interface.d.ts +20 -0
- package/lib/src/ap-table/ap-table.vue.d.ts +10 -2
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
- package/lib/src/ap-table/constants.d.ts +4 -4
- package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +9 -2
- package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
- package/lib/src/ap-table/interface.d.ts +14 -1
- package/lib/src/ap-table/utils.d.ts +3 -3
- package/lib/src/business/ap-card/ApCard.vue2.js +1 -1
- package/lib/src/business/ap-keep-alive/cacher/cacher.d.ts +10 -0
- package/lib/src/business/ap-keep-alive/cacher/lru-cacher.d.ts +16 -0
- package/lib/src/business/ap-keep-alive/cacher/lru-cacher.js +1 -0
- package/lib/src/business/ap-keep-alive/hook.d.ts +10 -0
- package/lib/src/business/ap-keep-alive/hook.js +1 -0
- package/lib/src/business/ap-keep-alive/index.d.ts +101 -0
- package/lib/src/business/ap-keep-alive/index.js +1 -0
- package/lib/src/business/ap-keep-alive/interface.d.ts +35 -0
- package/lib/src/business/ap-keep-alive/interface.js +1 -0
- package/lib/src/business/ap-keep-alive/keep-alive.d.ts +51 -0
- package/lib/src/business/ap-keep-alive/keep-alive.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-form-keeper.d.ts +7 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-form-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-grid-keeper.d.ts +14 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-grid-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-list-keeper.d.ts +13 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-list-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-radio-group-keeper.d.ts +6 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-radio-group-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-search-form-keeper.d.ts +7 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-search-form-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-table-keeper.d.ts +13 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-table-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-view-keeper.d.ts +6 -0
- package/lib/src/business/ap-keep-alive/keeper/ap-view-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/edit-grid-keeper.d.ts +6 -0
- package/lib/src/business/ap-keep-alive/keeper/edit-grid-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/edit-table-keeper.d.ts +6 -0
- package/lib/src/business/ap-keep-alive/keeper/edit-table-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/index.d.ts +3 -0
- package/lib/src/business/ap-keep-alive/keeper/index.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/step-keeper.d.ts +6 -0
- package/lib/src/business/ap-keep-alive/keeper/step-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/keeper/tab-keeper.d.ts +6 -0
- package/lib/src/business/ap-keep-alive/keeper/tab-keeper.js +1 -0
- package/lib/src/business/ap-keep-alive/utils.d.ts +22 -0
- package/lib/src/business/ap-keep-alive/utils.js +1 -0
- package/lib/src/business/ap-radio-group/ap-radio-group.vue2.js +1 -1
- package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +4 -1
- package/lib/src/business/ap-table-modal/hooks/use-table-modal.d.ts +4 -1
- package/lib/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +4 -1
- package/lib/src/business/ap-table-modal/index.d.ts +32 -5
- package/lib/src/business/ap-table-modal/table-modal.vue.d.ts +14 -3
- package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +1 -1
- package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +1 -1
- package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
- package/lib/src/business/batch-input-group/index.vue.js +2 -2
- package/lib/src/business/hooks/usePageListApTable.d.ts +4 -1
- package/lib/src/business/index.d.ts +1 -0
- package/lib/src/business/index.js +1 -1
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/full-screen/interface.d.ts +5 -6
- package/lib/src/index.js +1 -1
- package/lib/src/mask/index.vue.js +1 -1
- package/lib/src/resize-observer/interface.d.ts +2 -3
- package/lib/src/scroll-bar/interface.d.ts +7 -7
- package/lib/src/scroll-view/interface.d.ts +2 -3
- package/lib/src/splitter/SplitBar.vue2.js +1 -1
- package/lib/src/splitter/Splitter.vue2.js +1 -1
- package/lib/src/text/group.vue.js +1 -1
- package/lib/src/text/index.vue.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/lib/src/work-order-modal/work-order-modal.vue.d.ts +1 -1
- package/package.json +7 -6
- package/theme/antd-global-overwrite/admin/field.css +12 -0
- package/theme/antd-global-overwrite/admin/field.less +16 -0
- package/theme/antd-global-overwrite/admin/index.css +12 -0
- package/theme/antd-global-overwrite/aplus/field.css +12 -0
- package/theme/antd-global-overwrite/aplus/field.less +16 -0
- package/theme/antd-global-overwrite/aplus/index.css +12 -0
- package/theme/ap-action/item.css +1 -1
- package/theme/ap-action/item.less +1 -1
- package/theme/ap-card/ap-card.css +1 -1
- package/theme/ap-card/ap-card.less +1 -1
- package/theme/ap-grid/index.css +6 -1
- package/theme/ap-grid/index.less +5 -0
- package/theme/ap-table/ap-table.css +6 -1
- package/theme/ap-table/ap-table.less +5 -0
- package/theme/ap-table-modal/index.css +6 -1
- package/theme/editable-table/index.css +1 -1
- package/theme/index.css +14 -2
- package/theme/ui-mode.css +2 -0
- package/theme/ui-mode.less +4 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { Recordable } from '../../type';
|
|
3
|
+
export type PropertyKeyType = PropertyKey;
|
|
4
|
+
export interface CacheInterface {
|
|
5
|
+
get: (key: PropertyKeyType) => any;
|
|
6
|
+
set: (key: PropertyKeyType, data: any) => any;
|
|
7
|
+
has: (key: PropertyKeyType) => boolean;
|
|
8
|
+
del: (key: PropertyKeyType) => any;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
export type cacheDataArrType = [string, Recordable<any>][];
|
|
12
|
+
export type MatchPattern = string | RegExp | (string | RegExp)[];
|
|
13
|
+
export declare const ApKeepAliveProps: () => {
|
|
14
|
+
store: {
|
|
15
|
+
type: PropType<CacheInterface>;
|
|
16
|
+
};
|
|
17
|
+
debug: {
|
|
18
|
+
type: PropType<boolean>;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
max: {
|
|
22
|
+
type: PropType<number>;
|
|
23
|
+
};
|
|
24
|
+
exclude: {
|
|
25
|
+
type: PropType<MatchPattern>;
|
|
26
|
+
};
|
|
27
|
+
include: {
|
|
28
|
+
type: PropType<MatchPattern>;
|
|
29
|
+
};
|
|
30
|
+
stopTags: {
|
|
31
|
+
type: PropType<string[]>;
|
|
32
|
+
default: () => never[];
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export declare const forceStopTags: string[];
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
const e = () => ({
|
|
2
|
+
store: {
|
|
3
|
+
type: Object
|
|
4
|
+
},
|
|
5
|
+
debug: {
|
|
6
|
+
type: Boolean,
|
|
7
|
+
default: !0
|
|
8
|
+
},
|
|
9
|
+
max: {
|
|
10
|
+
type: Number
|
|
11
|
+
},
|
|
12
|
+
exclude: {
|
|
13
|
+
type: Array
|
|
14
|
+
},
|
|
15
|
+
include: {
|
|
16
|
+
type: Array
|
|
17
|
+
},
|
|
18
|
+
stopTags: {
|
|
19
|
+
type: Array,
|
|
20
|
+
default: () => []
|
|
21
|
+
}
|
|
22
|
+
}), t = [
|
|
23
|
+
"ATable",
|
|
24
|
+
"ApKeepAlive",
|
|
25
|
+
"EditableTable",
|
|
26
|
+
"EditableTableInner",
|
|
27
|
+
"ApFormSearchForm",
|
|
28
|
+
"VxeTable",
|
|
29
|
+
"RouterView",
|
|
30
|
+
"APagination",
|
|
31
|
+
"ApTablePagination",
|
|
32
|
+
"ApView",
|
|
33
|
+
"ApFormItem",
|
|
34
|
+
"AFormItem",
|
|
35
|
+
"ApTitle",
|
|
36
|
+
"ap-button",
|
|
37
|
+
"span",
|
|
38
|
+
"svg",
|
|
39
|
+
"iframe",
|
|
40
|
+
"ApTableSetting",
|
|
41
|
+
"ApDescriptions",
|
|
42
|
+
"ApList",
|
|
43
|
+
"ApTable",
|
|
44
|
+
"ApGrid",
|
|
45
|
+
"ApBatchActionGroup",
|
|
46
|
+
"ApBatchAction",
|
|
47
|
+
"EditableGrid"
|
|
48
|
+
//todo EditableGridFormItem 改名
|
|
49
|
+
// 'AForm', 不能忽略,有嵌套情况
|
|
50
|
+
];
|
|
51
|
+
export {
|
|
52
|
+
e as ApKeepAliveProps,
|
|
53
|
+
t as forceStopTags
|
|
54
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { VNode, DefineComponent, ExtractPropTypes, PropType, RendererNode, RendererElement, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
import { CacheInterface, MatchPattern } from './interface';
|
|
3
|
+
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
4
|
+
store: {
|
|
5
|
+
type: PropType<CacheInterface>;
|
|
6
|
+
};
|
|
7
|
+
debug: {
|
|
8
|
+
type: PropType<boolean>;
|
|
9
|
+
default: boolean;
|
|
10
|
+
};
|
|
11
|
+
max: {
|
|
12
|
+
type: PropType<number>;
|
|
13
|
+
};
|
|
14
|
+
exclude: {
|
|
15
|
+
type: PropType<MatchPattern>;
|
|
16
|
+
};
|
|
17
|
+
include: {
|
|
18
|
+
type: PropType<MatchPattern>;
|
|
19
|
+
};
|
|
20
|
+
stopTags: {
|
|
21
|
+
type: PropType<string[]>;
|
|
22
|
+
default: () => never[];
|
|
23
|
+
};
|
|
24
|
+
}>, () => VNode< RendererNode, RendererElement, {
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
}>[] | undefined, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
27
|
+
store: {
|
|
28
|
+
type: PropType<CacheInterface>;
|
|
29
|
+
};
|
|
30
|
+
debug: {
|
|
31
|
+
type: PropType<boolean>;
|
|
32
|
+
default: boolean;
|
|
33
|
+
};
|
|
34
|
+
max: {
|
|
35
|
+
type: PropType<number>;
|
|
36
|
+
};
|
|
37
|
+
exclude: {
|
|
38
|
+
type: PropType<MatchPattern>;
|
|
39
|
+
};
|
|
40
|
+
include: {
|
|
41
|
+
type: PropType<MatchPattern>;
|
|
42
|
+
};
|
|
43
|
+
stopTags: {
|
|
44
|
+
type: PropType<string[]>;
|
|
45
|
+
default: () => never[];
|
|
46
|
+
};
|
|
47
|
+
}>> & Readonly<{}>, {
|
|
48
|
+
debug: boolean;
|
|
49
|
+
stopTags: string[];
|
|
50
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
51
|
+
export default _default;
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { defineComponent as j, getCurrentInstance as M, ref as E, onMounted as z, onUpdated as F, onBeforeUnmount as L, onBeforeUpdate as O } from "vue";
|
|
2
|
+
import I from "./keeper/index.mjs";
|
|
3
|
+
import { matches as D, getAliveKey as T, isNoValue as W, getVNodeObjByVNodeChild as b, getVNodeObjByVNodeArrayChildren as K, getVNodeChirldren as w, getFirstVNodeChirldren as x } from "./utils.mjs";
|
|
4
|
+
import { catchWrapper as B, measureWrapper as A } from "@aplus-frontend/utils";
|
|
5
|
+
import { LruCacher as C } from "./cacher/lru-cacher.mjs";
|
|
6
|
+
import { forceStopTags as R, ApKeepAliveProps as _ } from "./interface.mjs";
|
|
7
|
+
import { throttle as S } from "lodash-unified";
|
|
8
|
+
import { useApKeepAliveProvide as $ } from "./hook.mjs";
|
|
9
|
+
const c = console, s = "|", te = j({
|
|
10
|
+
name: "ApKeepAlive",
|
|
11
|
+
inheritAttrs: !1,
|
|
12
|
+
props: _(),
|
|
13
|
+
setup(r, { slots: h }) {
|
|
14
|
+
const g = M(), v = (e) => !(r.include && (!e || !D(r.include, e)) || r.exclude && e && D(r.exclude, e)), d = r.store || new C(r.max || 50), u = E("");
|
|
15
|
+
let m = "";
|
|
16
|
+
const k = /* @__PURE__ */ new Set([...R, ...r.stopTags]), N = (e, o = "") => {
|
|
17
|
+
var f;
|
|
18
|
+
const t = [];
|
|
19
|
+
if (!e) return t;
|
|
20
|
+
const { VnodeName: i, vnodeSubPath: a } = T(
|
|
21
|
+
e,
|
|
22
|
+
u.value
|
|
23
|
+
);
|
|
24
|
+
a && (o += s + a);
|
|
25
|
+
const l = I[i];
|
|
26
|
+
if (l) {
|
|
27
|
+
const n = l.get(e);
|
|
28
|
+
!W(n) && t.push([o, n]);
|
|
29
|
+
}
|
|
30
|
+
if (k.has(i))
|
|
31
|
+
return r.debug && c.log("[ stop-VnodeName ] >", i, o), t;
|
|
32
|
+
if (e.children)
|
|
33
|
+
if (Array.isArray(e.children))
|
|
34
|
+
e.children.forEach((n) => {
|
|
35
|
+
n = b(n), n && t.push(...N(n, o));
|
|
36
|
+
});
|
|
37
|
+
else {
|
|
38
|
+
const n = K(e.children);
|
|
39
|
+
n && t.push(...N(n, o));
|
|
40
|
+
}
|
|
41
|
+
return (f = e.component) != null && f.subTree && t.push(...N(e.component.subTree, o)), t;
|
|
42
|
+
}, V = async (e, o, t = "") => {
|
|
43
|
+
var f;
|
|
44
|
+
if (!e || !o || (o == null ? void 0 : o.size) < 1) return;
|
|
45
|
+
const { VnodeName: i, vnodeSubPath: a } = T(
|
|
46
|
+
e,
|
|
47
|
+
u.value
|
|
48
|
+
);
|
|
49
|
+
a && (t += s + a);
|
|
50
|
+
const l = I[i];
|
|
51
|
+
if (l) {
|
|
52
|
+
r.debug && c.log("[ vnkeeper ] >", i, e.key);
|
|
53
|
+
const n = t.split(s).slice(-1).join(s), U = o.get(n);
|
|
54
|
+
await l.set(e, U);
|
|
55
|
+
}
|
|
56
|
+
if (k.has(i)) {
|
|
57
|
+
r.debug && c.log("[ stop VnodeName ] >", i, t);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (e.children)
|
|
61
|
+
if (Array.isArray(e.children))
|
|
62
|
+
e.children.forEach((n) => {
|
|
63
|
+
n = b(n), n && V(n, o, t);
|
|
64
|
+
});
|
|
65
|
+
else {
|
|
66
|
+
const n = K(e.children);
|
|
67
|
+
n && V(n, o, t);
|
|
68
|
+
}
|
|
69
|
+
(f = e.component) != null && f.subTree && V(e.component.subTree, o, t);
|
|
70
|
+
}, y = S(() => {
|
|
71
|
+
B(() => {
|
|
72
|
+
const e = w(g), o = x(e), t = b(o);
|
|
73
|
+
if (!t || typeof t.type == "string" || (typeof t.type == "object" && "name" in t.type && (m = t.type.name || ""), u.value = t.key || m || "", !v(m)) || !u.value)
|
|
74
|
+
return;
|
|
75
|
+
const i = d.get(u.value);
|
|
76
|
+
V(t, i), c.log(
|
|
77
|
+
"resetDataInVNode",
|
|
78
|
+
g.vnode.key,
|
|
79
|
+
u.value,
|
|
80
|
+
i
|
|
81
|
+
);
|
|
82
|
+
});
|
|
83
|
+
}, 100, {
|
|
84
|
+
trailing: !1
|
|
85
|
+
});
|
|
86
|
+
z(() => {
|
|
87
|
+
if (r.debug) {
|
|
88
|
+
r.debug && c.log("[ onMounted ] >", r.exclude), A(() => {
|
|
89
|
+
y();
|
|
90
|
+
});
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
y();
|
|
94
|
+
}), F(() => {
|
|
95
|
+
if (r.debug) {
|
|
96
|
+
r.debug && c.log("[ onUpdated ] >", r.exclude), A(() => {
|
|
97
|
+
y();
|
|
98
|
+
});
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
y();
|
|
102
|
+
});
|
|
103
|
+
const p = S(() => {
|
|
104
|
+
B(() => {
|
|
105
|
+
const e = w(g), o = x(e), t = b(o);
|
|
106
|
+
if (!t) return;
|
|
107
|
+
if (!u.value) {
|
|
108
|
+
c.warn(
|
|
109
|
+
"ap-keep-alive 子组件 key 不存在,请检查组件是否设置了 key"
|
|
110
|
+
);
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
if (!v(m)) return;
|
|
114
|
+
let i = N(t);
|
|
115
|
+
i = i.map((l) => [l[0].split(s).slice(-1).join(s), l[1]]);
|
|
116
|
+
const a = i.map((l) => l[0]);
|
|
117
|
+
a.length > new Set(a).size && c.warn(
|
|
118
|
+
"需要缓存的路径重复请合理设置组件key,保证在当前ApKeepAlive模块下唯一",
|
|
119
|
+
a
|
|
120
|
+
), d.set(u.value, new Map(i)), r.debug && c.log(
|
|
121
|
+
"[ loadDataInVNode ] >",
|
|
122
|
+
g.vnode.key,
|
|
123
|
+
u.value,
|
|
124
|
+
d.get(u.value)
|
|
125
|
+
);
|
|
126
|
+
});
|
|
127
|
+
}, 100, {
|
|
128
|
+
trailing: !1
|
|
129
|
+
});
|
|
130
|
+
return L(() => {
|
|
131
|
+
if (r.debug) {
|
|
132
|
+
A(() => {
|
|
133
|
+
p();
|
|
134
|
+
}), r.debug && c.log("[ onBeforeUnmount ] >");
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
p();
|
|
138
|
+
}), O(() => {
|
|
139
|
+
if (r.debug) {
|
|
140
|
+
A(() => {
|
|
141
|
+
p();
|
|
142
|
+
}), r.debug && c.log("[ onBeforeUpdate ] >");
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
p();
|
|
146
|
+
}), $(d, u), () => {
|
|
147
|
+
var e;
|
|
148
|
+
return (e = h.default) == null ? void 0 : e.call(h);
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
export {
|
|
153
|
+
te as default
|
|
154
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { nextTick as r } from "vue";
|
|
2
|
+
import { isNoValue as s } from "../utils.mjs";
|
|
3
|
+
const p = {
|
|
4
|
+
get(n) {
|
|
5
|
+
var o;
|
|
6
|
+
let e;
|
|
7
|
+
const t = (o = n.component) == null ? void 0 : o.exposed;
|
|
8
|
+
return t && (e = t.getFieldsValue()), e;
|
|
9
|
+
},
|
|
10
|
+
set(n, e) {
|
|
11
|
+
var o;
|
|
12
|
+
if (s(e)) return;
|
|
13
|
+
const t = (o = n.component) == null ? void 0 : o.exposed;
|
|
14
|
+
t && r(() => {
|
|
15
|
+
t.setFieldsValue(e);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
p as default
|
|
21
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
import { Recordable } from '../../../type';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
get(node: VNode): {
|
|
5
|
+
selectedKeys: any[];
|
|
6
|
+
data: Recordable | undefined;
|
|
7
|
+
pagination: Partial<{
|
|
8
|
+
current: number;
|
|
9
|
+
pageSize: number;
|
|
10
|
+
}> | undefined;
|
|
11
|
+
};
|
|
12
|
+
set(node: VNode, { data, pagination }: Recordable): void;
|
|
13
|
+
};
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { unref as g } from "vue";
|
|
2
|
+
import { isNoValue as m } from "../utils.mjs";
|
|
3
|
+
const u = {
|
|
4
|
+
get(r) {
|
|
5
|
+
var c, i, p;
|
|
6
|
+
let e, t, o = [];
|
|
7
|
+
const s = ((c = r.props) == null ? void 0 : c.rowKey) || "key", n = (i = r.component) == null ? void 0 : i.exposed;
|
|
8
|
+
return n && (e = n.getSearchFormValues(), o = g((p = n.rowSelection) == null ? void 0 : p.selectedRows).map(
|
|
9
|
+
(a) => a[s]
|
|
10
|
+
), t = n.getPaging()), {
|
|
11
|
+
selectedKeys: o,
|
|
12
|
+
data: e,
|
|
13
|
+
pagination: t
|
|
14
|
+
};
|
|
15
|
+
},
|
|
16
|
+
set(r, { data: e, pagination: t }) {
|
|
17
|
+
var s;
|
|
18
|
+
const o = (s = r.component) == null ? void 0 : s.exposed;
|
|
19
|
+
if (o) {
|
|
20
|
+
if (m(e)) return;
|
|
21
|
+
e && o.setSearchFormValues(e), t && o.setPaging(t);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
u as default
|
|
27
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
import { Recordable } from '../../../type';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
get(node: VNode): {
|
|
5
|
+
data: Recordable | undefined;
|
|
6
|
+
pagination: Partial<{
|
|
7
|
+
current: number;
|
|
8
|
+
pageSize: number;
|
|
9
|
+
}> | undefined;
|
|
10
|
+
};
|
|
11
|
+
set(node: VNode, { pagination, data }: Recordable): void;
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { isNoValue as a } from "../utils.mjs";
|
|
2
|
+
const i = {
|
|
3
|
+
get(o) {
|
|
4
|
+
var n;
|
|
5
|
+
let s, t;
|
|
6
|
+
const e = (n = o.component) == null ? void 0 : n.exposed;
|
|
7
|
+
return e && (s = e.getSearchFormValuesIfSetted(), t = e.getPaging()), { data: s, pagination: t };
|
|
8
|
+
},
|
|
9
|
+
set(o, { pagination: s, data: t }) {
|
|
10
|
+
var n;
|
|
11
|
+
if (a(t)) return;
|
|
12
|
+
const e = (n = o.component) == null ? void 0 : n.exposed;
|
|
13
|
+
e && (t && e.setSearchFormValuesIfSetted(t), s && e.setPaging(s));
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
i as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { isNoValue as r } from "../utils.mjs";
|
|
2
|
+
const a = {
|
|
3
|
+
get(t) {
|
|
4
|
+
var n;
|
|
5
|
+
let e;
|
|
6
|
+
const o = (n = t.component) == null ? void 0 : n.proxy;
|
|
7
|
+
return o && (e = o.value), e;
|
|
8
|
+
},
|
|
9
|
+
set(t, e) {
|
|
10
|
+
if (r(e)) return;
|
|
11
|
+
const o = t.component;
|
|
12
|
+
o && (o.emit("update:value", e), o.emit("change", e));
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
a as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { isNoValue as a } from "../utils.mjs";
|
|
2
|
+
const n = {
|
|
3
|
+
get(r) {
|
|
4
|
+
var t;
|
|
5
|
+
let e;
|
|
6
|
+
const o = (t = r.component) == null ? void 0 : t.exposed;
|
|
7
|
+
return o && (e = o.apForm.value.getFieldsValue()), e;
|
|
8
|
+
},
|
|
9
|
+
set(r, e) {
|
|
10
|
+
var t;
|
|
11
|
+
if (a(e)) return;
|
|
12
|
+
const o = (t = r.component) == null ? void 0 : t.exposed;
|
|
13
|
+
o && o.apForm.value.setFieldsValue(e);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
n as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
import { Recordable } from '../../../type';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
get(node: VNode): {
|
|
5
|
+
data: Recordable | undefined;
|
|
6
|
+
pagination: Partial<{
|
|
7
|
+
current: number;
|
|
8
|
+
pageSize: number;
|
|
9
|
+
}> | undefined;
|
|
10
|
+
};
|
|
11
|
+
set(node: VNode, { pagination, data }: Recordable): void;
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { isNoValue as s } from "../utils.mjs";
|
|
2
|
+
const p = {
|
|
3
|
+
get(o) {
|
|
4
|
+
var n;
|
|
5
|
+
let a, t;
|
|
6
|
+
const e = (n = o.component) == null ? void 0 : n.exposed;
|
|
7
|
+
return e && (a = e.getSearchFormValues(), t = e.getPaging()), { data: a, pagination: t };
|
|
8
|
+
},
|
|
9
|
+
set(o, { pagination: a, data: t }) {
|
|
10
|
+
var n;
|
|
11
|
+
if (s(t)) return;
|
|
12
|
+
const e = (n = o.component) == null ? void 0 : n.exposed;
|
|
13
|
+
e && (t && e.setSearchFormValues(t), a && e.setPaging(a));
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
p as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { isNoValue as a } from "../utils.mjs";
|
|
2
|
+
const i = {
|
|
3
|
+
get(n) {
|
|
4
|
+
var o;
|
|
5
|
+
let e = [];
|
|
6
|
+
const t = (o = n.component) == null ? void 0 : o.exposed;
|
|
7
|
+
return t && (e = t.getRowsData()), e;
|
|
8
|
+
},
|
|
9
|
+
set(n, e) {
|
|
10
|
+
var o;
|
|
11
|
+
if (a(e)) return;
|
|
12
|
+
const t = (o = n.component) == null ? void 0 : o.exposed;
|
|
13
|
+
t && t.setTableData(e);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
i as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { isNoValue as n } from "../utils.mjs";
|
|
2
|
+
const l = {
|
|
3
|
+
get(o) {
|
|
4
|
+
var a;
|
|
5
|
+
let e = [];
|
|
6
|
+
const t = (a = o.component) == null ? void 0 : a.exposed;
|
|
7
|
+
return t && (e = t.getRowsData()), e;
|
|
8
|
+
},
|
|
9
|
+
set(o, e) {
|
|
10
|
+
var a;
|
|
11
|
+
if (n(e)) return;
|
|
12
|
+
const t = (a = o.component) == null ? void 0 : a.exposed;
|
|
13
|
+
t && t.setTableData(e);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
l as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import r from "./ap-form-keeper.mjs";
|
|
2
|
+
import e from "./ap-grid-keeper.mjs";
|
|
3
|
+
import p from "./ap-table-keeper.mjs";
|
|
4
|
+
import o from "./ap-search-form-keeper.mjs";
|
|
5
|
+
import m from "./tab-keeper.mjs";
|
|
6
|
+
import i from "./ap-view-keeper.mjs";
|
|
7
|
+
import t from "./edit-table-keeper.mjs";
|
|
8
|
+
import a from "./ap-radio-group-keeper.mjs";
|
|
9
|
+
import f from "./edit-grid-keeper.mjs";
|
|
10
|
+
import d from "./step-keeper.mjs";
|
|
11
|
+
import K from "./ap-list-keeper.mjs";
|
|
12
|
+
const w = {
|
|
13
|
+
ApList: K,
|
|
14
|
+
ApForm: r,
|
|
15
|
+
ApGrid: e,
|
|
16
|
+
ApTable: p,
|
|
17
|
+
ATabs: m,
|
|
18
|
+
ApFormSearchForm: o,
|
|
19
|
+
ApView: i,
|
|
20
|
+
EditableTable: t,
|
|
21
|
+
ApRadioGroup: a,
|
|
22
|
+
EditableGrid: f,
|
|
23
|
+
ASteps: d
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
w as default
|
|
27
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { isNoValue as o } from "../utils.mjs";
|
|
2
|
+
const s = {
|
|
3
|
+
get(n) {
|
|
4
|
+
var r;
|
|
5
|
+
let e;
|
|
6
|
+
const t = (r = n.component) == null ? void 0 : r.proxy;
|
|
7
|
+
return t && (e = t.current), e;
|
|
8
|
+
},
|
|
9
|
+
set(n, e) {
|
|
10
|
+
if (o(e)) return;
|
|
11
|
+
const t = n.component;
|
|
12
|
+
t && (t.emit("update:current", e), t.emit("change", e));
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
s as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { isNoValue as a } from "../utils.mjs";
|
|
2
|
+
const i = {
|
|
3
|
+
get(n) {
|
|
4
|
+
var o;
|
|
5
|
+
let e;
|
|
6
|
+
const t = (o = n.component) == null ? void 0 : o.proxy;
|
|
7
|
+
return t && (e = t.activeKey), e;
|
|
8
|
+
},
|
|
9
|
+
set(n, e) {
|
|
10
|
+
if (a(e)) return;
|
|
11
|
+
const t = n.component;
|
|
12
|
+
t && (t.emit("update:activeKey", e), t.emit("change", e));
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
i as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ComponentInternalInstance, VNode, VNodeArrayChildren, VNodeChild, VNodeNormalizedChildren, RendererNode, RendererElement } from 'vue';
|
|
2
|
+
import { MatchPattern, PropertyKeyType } from './interface';
|
|
3
|
+
export declare const getVNodeChirldren: (conponentInstance: ComponentInternalInstance) => VNodeArrayChildren | undefined;
|
|
4
|
+
export declare const getFirstVNodeChirldren: (childVNodes?: VNodeArrayChildren) => string | number | true | VNodeArrayChildren | VNode< RendererNode, RendererElement, {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}> | undefined;
|
|
7
|
+
export declare const getVNodeObjByVNodeChild: (childVNode: VNodeChild) => VNode< RendererNode, RendererElement, {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}> | undefined;
|
|
10
|
+
export declare const getVNodeObjByVNodeArrayChildren: (childVNode: VNodeNormalizedChildren) => VNode | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* 获取当前组件的key,如果没有以组件name代替(兼容处理)
|
|
13
|
+
* @param node
|
|
14
|
+
* @param currentModuleKey
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
export declare const getAliveKey: (node: VNode, currentModuleKey: PropertyKeyType) => {
|
|
18
|
+
VnodeName: string;
|
|
19
|
+
vnodeSubPath: string;
|
|
20
|
+
};
|
|
21
|
+
export declare function matches(pattern: MatchPattern, name: string): boolean;
|
|
22
|
+
export declare function isNoValue(data: any): boolean;
|