@ibiz-template/vue3-components 0.2.0 → 0.2.2
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/dist/index.min.css +1 -1
- package/dist/index.system.min.js +5 -5
- package/dist/index.system.min.js.map +1 -1
- package/es/common/index.d.ts +1 -0
- package/es/common/index.mjs +5 -1
- package/es/common/pagination/pagination.css +1 -0
- package/es/{control/grid/grid-pagination/grid-pagination.d.ts → common/pagination/pagination.d.ts} +2 -2
- package/es/{control/grid/grid-pagination/grid-pagination.mjs → common/pagination/pagination.mjs} +5 -5
- package/es/common/sort-bar/sort-bar.css +1 -0
- package/es/common/sort-bar/sort-bar.d.ts +46 -0
- package/es/common/sort-bar/sort-bar.mjs +57 -0
- package/es/control/data-view/data-view.css +1 -1
- package/es/control/data-view/data-view.d.ts +5 -1
- package/es/control/data-view/data-view.mjs +51 -8
- package/es/control/data-view/index.d.ts +5 -1
- package/es/control/drtab/drtab.controller.mjs +12 -4
- package/es/control/form/form-detail/form-button/form-button.css +1 -1
- package/es/control/form/form-detail/form-group-panel/form-group-panel.css +1 -1
- package/es/control/form/form-detail/form-item/form-item-container/form-item-container.css +1 -1
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-container/form-mdctrl-container.css +1 -1
- package/es/control/grid/grid/grid.css +1 -1
- package/es/control/grid/grid/grid.mjs +5 -3
- package/es/control/grid/grid/index.mjs +0 -2
- package/es/control/grid/index.d.ts +0 -1
- package/es/control/grid/index.mjs +0 -1
- package/es/control/index.mjs +0 -1
- package/es/control/list/index.d.ts +3 -0
- package/es/control/list/list.d.ts +3 -0
- package/es/control/list/list.mjs +36 -6
- package/es/control/tree/el-tree-util.d.ts +112 -61
- package/es/control/tree/index.d.ts +112 -61
- package/es/control/tree/tree.d.ts +118 -62
- package/es/devtool/index.mjs +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.mjs +15 -14
- package/es/util/index.d.ts +1 -0
- package/es/util/index.mjs +1 -0
- package/es/util/pagination/use-pagination.d.ts +15 -0
- package/es/util/pagination/use-pagination.mjs +25 -0
- package/es/view-engine/index-view.engine.mjs +0 -1
- package/es/view-engine/pickup-data-view.engine.mjs +0 -4
- package/es/view-engine/pickup-grid-view.engine.mjs +0 -4
- package/lib/common/index.cjs +5 -0
- package/lib/{control/grid/grid-pagination/grid-pagination.cjs → common/pagination/pagination.cjs} +5 -5
- package/lib/common/pagination/pagination.css +1 -0
- package/lib/common/sort-bar/sort-bar.cjs +59 -0
- package/lib/common/sort-bar/sort-bar.css +1 -0
- package/lib/control/data-view/data-view.cjs +50 -7
- package/lib/control/data-view/data-view.css +1 -1
- package/lib/control/drtab/drtab.controller.cjs +12 -4
- package/lib/control/form/form-detail/form-button/form-button.css +1 -1
- package/lib/control/form/form-detail/form-group-panel/form-group-panel.css +1 -1
- package/lib/control/form/form-detail/form-item/form-item-container/form-item-container.css +1 -1
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-container/form-mdctrl-container.css +1 -1
- package/lib/control/grid/grid/grid.cjs +4 -2
- package/lib/control/grid/grid/grid.css +1 -1
- package/lib/control/grid/grid/index.cjs +0 -2
- package/lib/control/grid/index.cjs +0 -2
- package/lib/control/index.cjs +0 -2
- package/lib/control/list/list.cjs +36 -6
- package/lib/devtool/index.cjs +1 -1
- package/lib/index.cjs +161 -159
- package/lib/util/index.cjs +2 -0
- package/lib/util/pagination/use-pagination.cjs +27 -0
- package/lib/view-engine/index-view.engine.cjs +0 -1
- package/lib/view-engine/pickup-data-view.engine.cjs +0 -4
- package/lib/view-engine/pickup-grid-view.engine.cjs +0 -4
- package/package.json +8 -7
- package/es/control/grid/grid-pagination/grid-pagination.css +0 -1
- package/lib/control/grid/grid-pagination/grid-pagination.css +0 -1
- /package/es/node_modules/.pnpm/{element-plus@2.4.1_vue@3.3.6 → element-plus@2.4.1_vue@3.3.7}/node_modules/element-plus/dist/locale/zh-cn.mjs +0 -0
- /package/lib/node_modules/.pnpm/{element-plus@2.4.1_vue@3.3.6 → element-plus@2.4.1_vue@3.3.7}/node_modules/element-plus/dist/locale/zh-cn.cjs +0 -0
|
@@ -55,67 +55,39 @@ export declare const TreeControl: import("vue").DefineComponent<{
|
|
|
55
55
|
treeRef: import("vue").Ref<({
|
|
56
56
|
$: import("vue").ComponentInternalInstance;
|
|
57
57
|
$data: {};
|
|
58
|
-
$props: {
|
|
59
|
-
props
|
|
60
|
-
data
|
|
61
|
-
checkStrictly
|
|
62
|
-
lazy
|
|
63
|
-
accordion
|
|
64
|
-
draggable
|
|
65
|
-
defaultExpandAll
|
|
66
|
-
indent
|
|
67
|
-
renderAfterExpand
|
|
68
|
-
showCheckbox
|
|
69
|
-
expandOnClickNode
|
|
70
|
-
checkOnClickNode
|
|
71
|
-
checkDescendants
|
|
72
|
-
autoExpandParent
|
|
73
|
-
highlightCurrent
|
|
74
|
-
|
|
75
|
-
|
|
58
|
+
$props: Partial<{
|
|
59
|
+
props: import("element-plus/es/components/tree/src/tree.type").TreeOptionProps;
|
|
60
|
+
data: unknown[];
|
|
61
|
+
checkStrictly: boolean;
|
|
62
|
+
lazy: boolean;
|
|
63
|
+
accordion: boolean;
|
|
64
|
+
draggable: boolean;
|
|
65
|
+
defaultExpandAll: boolean;
|
|
66
|
+
indent: number;
|
|
67
|
+
renderAfterExpand: boolean;
|
|
68
|
+
showCheckbox: boolean;
|
|
69
|
+
expandOnClickNode: boolean;
|
|
70
|
+
checkOnClickNode: boolean;
|
|
71
|
+
checkDescendants: boolean;
|
|
72
|
+
autoExpandParent: boolean;
|
|
73
|
+
highlightCurrent: boolean;
|
|
74
|
+
}> & Omit<{
|
|
75
|
+
readonly props: import("element-plus/es/components/tree/src/tree.type").TreeOptionProps;
|
|
76
|
+
readonly data: unknown[];
|
|
77
|
+
readonly renderAfterExpand: boolean;
|
|
78
|
+
readonly checkStrictly: boolean;
|
|
79
|
+
readonly defaultExpandAll: boolean;
|
|
80
|
+
readonly expandOnClickNode: boolean;
|
|
81
|
+
readonly checkOnClickNode: boolean;
|
|
82
|
+
readonly checkDescendants: boolean;
|
|
83
|
+
readonly autoExpandParent: boolean;
|
|
84
|
+
readonly showCheckbox: boolean;
|
|
85
|
+
readonly draggable: boolean;
|
|
86
|
+
readonly lazy: boolean;
|
|
87
|
+
readonly highlightCurrent: boolean;
|
|
88
|
+
readonly accordion: boolean;
|
|
89
|
+
readonly indent: number;
|
|
76
90
|
readonly icon?: string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | undefined;
|
|
77
|
-
key?: string | number | symbol | undefined;
|
|
78
|
-
ref?: import("vue").VNodeRef | undefined;
|
|
79
|
-
ref_for?: boolean | undefined;
|
|
80
|
-
ref_key?: string | undefined;
|
|
81
|
-
onVnodeBeforeMount?: ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
82
|
-
[key: string]: any;
|
|
83
|
-
}>) => void) | ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
84
|
-
[key: string]: any;
|
|
85
|
-
}>) => void)[] | undefined;
|
|
86
|
-
onVnodeMounted?: ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
87
|
-
[key: string]: any;
|
|
88
|
-
}>) => void) | ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
89
|
-
[key: string]: any;
|
|
90
|
-
}>) => void)[] | undefined;
|
|
91
|
-
onVnodeBeforeUpdate?: ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
92
|
-
[key: string]: any;
|
|
93
|
-
}>, oldVNode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
94
|
-
[key: string]: any;
|
|
95
|
-
}>) => void) | ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
96
|
-
[key: string]: any;
|
|
97
|
-
}>, oldVNode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
98
|
-
[key: string]: any;
|
|
99
|
-
}>) => void)[] | undefined;
|
|
100
|
-
onVnodeUpdated?: ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
101
|
-
[key: string]: any;
|
|
102
|
-
}>, oldVNode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
103
|
-
[key: string]: any;
|
|
104
|
-
}>) => void) | ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
105
|
-
[key: string]: any;
|
|
106
|
-
}>, oldVNode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
107
|
-
[key: string]: any;
|
|
108
|
-
}>) => void)[] | undefined;
|
|
109
|
-
onVnodeBeforeUnmount?: ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
110
|
-
[key: string]: any;
|
|
111
|
-
}>) => void) | ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
112
|
-
[key: string]: any;
|
|
113
|
-
}>) => void)[] | undefined;
|
|
114
|
-
onVnodeUnmounted?: ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
115
|
-
[key: string]: any;
|
|
116
|
-
}>) => void) | ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
117
|
-
[key: string]: any;
|
|
118
|
-
}>) => void)[] | undefined;
|
|
119
91
|
readonly emptyText?: string | undefined;
|
|
120
92
|
readonly load?: import("element-plus/es/components/tree/src/tree.type").LoadFunction | undefined;
|
|
121
93
|
readonly nodeKey?: string | undefined;
|
|
@@ -126,9 +98,88 @@ export declare const TreeControl: import("vue").DefineComponent<{
|
|
|
126
98
|
readonly allowDrag?: Function | undefined;
|
|
127
99
|
readonly allowDrop?: Function | undefined;
|
|
128
100
|
readonly filterNodeMethod?: import("element-plus/es/components/tree/src/tree.type").FilterNodeMethodFunction | undefined;
|
|
101
|
+
"onCurrent-change"?: ((...args: any[]) => any) | undefined;
|
|
102
|
+
"onNode-expand"?: ((...args: any[]) => any) | undefined;
|
|
129
103
|
onCheck?: ((...args: any[]) => any) | undefined;
|
|
104
|
+
"onCheck-change"?: ((...args: any[]) => any) | undefined;
|
|
105
|
+
"onNode-click"?: ((...args: any[]) => any) | undefined;
|
|
106
|
+
"onNode-contextmenu"?: ((...args: any[]) => any) | undefined;
|
|
107
|
+
"onNode-collapse"?: ((...args: any[]) => any) | undefined;
|
|
108
|
+
"onNode-drag-start"?: ((...args: any[]) => any) | undefined;
|
|
109
|
+
"onNode-drag-end"?: ((...args: any[]) => any) | undefined;
|
|
110
|
+
"onNode-drop"?: ((...args: any[]) => any) | undefined;
|
|
111
|
+
"onNode-drag-leave"?: ((...args: any[]) => any) | undefined;
|
|
112
|
+
"onNode-drag-enter"?: ((...args: any[]) => any) | undefined;
|
|
113
|
+
"onNode-drag-over"?: ((...args: any[]) => any) | undefined;
|
|
114
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
|
|
115
|
+
data: {
|
|
116
|
+
type: ArrayConstructor;
|
|
117
|
+
default: () => never[];
|
|
118
|
+
};
|
|
119
|
+
emptyText: {
|
|
120
|
+
type: StringConstructor;
|
|
121
|
+
};
|
|
122
|
+
renderAfterExpand: {
|
|
123
|
+
type: BooleanConstructor;
|
|
124
|
+
default: boolean;
|
|
125
|
+
};
|
|
126
|
+
nodeKey: StringConstructor;
|
|
127
|
+
checkStrictly: BooleanConstructor;
|
|
128
|
+
defaultExpandAll: BooleanConstructor;
|
|
129
|
+
expandOnClickNode: {
|
|
130
|
+
type: BooleanConstructor;
|
|
131
|
+
default: boolean;
|
|
132
|
+
};
|
|
133
|
+
checkOnClickNode: BooleanConstructor;
|
|
134
|
+
checkDescendants: {
|
|
135
|
+
type: BooleanConstructor;
|
|
136
|
+
default: boolean;
|
|
137
|
+
};
|
|
138
|
+
autoExpandParent: {
|
|
139
|
+
type: BooleanConstructor;
|
|
140
|
+
default: boolean;
|
|
141
|
+
};
|
|
142
|
+
defaultCheckedKeys: PropType<import("element-plus/es/components/tree/src/tree.type").TreeKey[]>;
|
|
143
|
+
defaultExpandedKeys: PropType<import("element-plus/es/components/tree/src/tree.type").TreeKey[]>;
|
|
144
|
+
currentNodeKey: PropType<string | number>;
|
|
145
|
+
renderContent: FunctionConstructor;
|
|
146
|
+
showCheckbox: {
|
|
147
|
+
type: BooleanConstructor;
|
|
148
|
+
default: boolean;
|
|
149
|
+
};
|
|
150
|
+
draggable: {
|
|
151
|
+
type: BooleanConstructor;
|
|
152
|
+
default: boolean;
|
|
153
|
+
};
|
|
154
|
+
allowDrag: FunctionConstructor;
|
|
155
|
+
allowDrop: FunctionConstructor;
|
|
156
|
+
props: {
|
|
157
|
+
type: PropType<import("element-plus/es/components/tree/src/tree.type").TreeOptionProps>;
|
|
158
|
+
default: () => {
|
|
159
|
+
children: string;
|
|
160
|
+
label: string;
|
|
161
|
+
disabled: string;
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
lazy: {
|
|
165
|
+
type: BooleanConstructor;
|
|
166
|
+
default: boolean;
|
|
167
|
+
};
|
|
168
|
+
highlightCurrent: BooleanConstructor;
|
|
169
|
+
load: PropType<import("element-plus/es/components/tree/src/tree.type").LoadFunction>;
|
|
170
|
+
filterNodeMethod: PropType<import("element-plus/es/components/tree/src/tree.type").FilterNodeMethodFunction>;
|
|
171
|
+
accordion: BooleanConstructor;
|
|
172
|
+
indent: {
|
|
173
|
+
type: NumberConstructor;
|
|
174
|
+
default: number;
|
|
175
|
+
};
|
|
176
|
+
icon: {
|
|
177
|
+
type: PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>;
|
|
178
|
+
};
|
|
179
|
+
}>> & {
|
|
130
180
|
"onCurrent-change"?: ((...args: any[]) => any) | undefined;
|
|
131
181
|
"onNode-expand"?: ((...args: any[]) => any) | undefined;
|
|
182
|
+
onCheck?: ((...args: any[]) => any) | undefined;
|
|
132
183
|
"onCheck-change"?: ((...args: any[]) => any) | undefined;
|
|
133
184
|
"onNode-click"?: ((...args: any[]) => any) | undefined;
|
|
134
185
|
"onNode-contextmenu"?: ((...args: any[]) => any) | undefined;
|
|
@@ -139,7 +190,7 @@ export declare const TreeControl: import("vue").DefineComponent<{
|
|
|
139
190
|
"onNode-drag-leave"?: ((...args: any[]) => any) | undefined;
|
|
140
191
|
"onNode-drag-enter"?: ((...args: any[]) => any) | undefined;
|
|
141
192
|
"onNode-drag-over"?: ((...args: any[]) => any) | undefined;
|
|
142
|
-
}
|
|
193
|
+
}, "props" | "data" | "renderAfterExpand" | "checkStrictly" | "defaultExpandAll" | "expandOnClickNode" | "checkOnClickNode" | "checkDescendants" | "autoExpandParent" | "showCheckbox" | "draggable" | "lazy" | "highlightCurrent" | "accordion" | "indent">;
|
|
143
194
|
$attrs: {
|
|
144
195
|
[x: string]: unknown;
|
|
145
196
|
};
|
|
@@ -540,7 +591,12 @@ export declare const TreeControl: import("vue").DefineComponent<{
|
|
|
540
591
|
};
|
|
541
592
|
$forceUpdate: () => void;
|
|
542
593
|
$nextTick: typeof nextTick;
|
|
543
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
594
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle; /**
|
|
595
|
+
* 绘制上下文菜单触发图标
|
|
596
|
+
* @param nodeModel
|
|
597
|
+
* @param nodeData
|
|
598
|
+
* @returns
|
|
599
|
+
*/
|
|
544
600
|
} & Readonly<import("vue").ExtractPropTypes<{
|
|
545
601
|
data: {
|
|
546
602
|
type: ArrayConstructor;
|
package/es/devtool/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createApp } from 'vue';
|
|
2
2
|
import { QXEvent } from 'qx-util';
|
|
3
3
|
import ElementPlus from 'element-plus';
|
|
4
|
-
import zhCn from '../node_modules/.pnpm/element-plus@2.4.1_vue@3.3.
|
|
4
|
+
import zhCn from '../node_modules/.pnpm/element-plus@2.4.1_vue@3.3.7/node_modules/element-plus/dist/locale/zh-cn.mjs';
|
|
5
5
|
import { DevtoolAction } from './devtool-action.mjs';
|
|
6
6
|
|
|
7
7
|
"use strict";
|
package/es/index.d.ts
CHANGED
package/es/index.mjs
CHANGED
|
@@ -43,6 +43,20 @@ import { IBizKanbanControl } from './control/kanban/index.mjs';
|
|
|
43
43
|
import { IBizTreeGridExControl } from './control/tree-grid-ex/index.mjs';
|
|
44
44
|
import { IBizMEditViewPanelControl } from './control/medit-view-panel/index.mjs';
|
|
45
45
|
import { IBizChartExpBarControl } from './control/exp-bar/chart-exp-bar/index.mjs';
|
|
46
|
+
export { IBizIcon } from './common/icon/icon.mjs';
|
|
47
|
+
export { IBizRouterView } from './common/router-view/router-view.mjs';
|
|
48
|
+
export { IBizCol } from './common/col/col.mjs';
|
|
49
|
+
export { IBizRow } from './common/row/row.mjs';
|
|
50
|
+
export { IBizActionToolbar } from './common/action-toolbar/action-toolbar.mjs';
|
|
51
|
+
export { IBizControlBase } from './common/control-base/control-base.mjs';
|
|
52
|
+
export { IBizControlShell } from './common/control-shell/control-shell.mjs';
|
|
53
|
+
export { IBizViewShell } from './common/view-shell/view-shell.mjs';
|
|
54
|
+
export { IBizRawItem } from './common/rawitem/rawitem.mjs';
|
|
55
|
+
export { IBizCodeList } from './common/code-list/code-list.mjs';
|
|
56
|
+
export { ControlLoadingPlaceholder } from './common/control-loading-placeholder/control-loading-placeholder.mjs';
|
|
57
|
+
export { IBizSplit } from './common/split/split.mjs';
|
|
58
|
+
export { IBizSplitTrigger } from './common/split-trigger/split-trigger.mjs';
|
|
59
|
+
export { IBizSortBar } from './common/sort-bar/sort-bar.mjs';
|
|
46
60
|
export { AppMenuProvider } from './control/app-menu/app-menu.provider.mjs';
|
|
47
61
|
export { AppMenuIconViewProvider } from './control/app-menu-icon-view/app-menu-icon-view.provider.mjs';
|
|
48
62
|
export { GridProvider } from './control/grid/grid/grid.provider.mjs';
|
|
@@ -55,7 +69,6 @@ export { GridFieldEditColumnProvider } from './control/grid/grid-column/grid-fie
|
|
|
55
69
|
export { IBizGridFieldEditColumn } from './control/grid/grid-column/grid-field-edit-column/index.mjs';
|
|
56
70
|
export { GridGroupColumnProvider } from './control/grid/grid-column/grid-group-column/grid-group-column.provider.mjs';
|
|
57
71
|
export { IBizGridGroupColumn } from './control/grid/grid-column/grid-group-column/index.mjs';
|
|
58
|
-
export { IBizGridPagination } from './control/grid/grid-pagination/grid-pagination.mjs';
|
|
59
72
|
export { ListProvider } from './control/list/list.provider.mjs';
|
|
60
73
|
export { SearchFormProvider } from './control/form/search-form/search-form.provider.mjs';
|
|
61
74
|
export { FormGroupPanelProvider } from './control/form/form-detail/form-group-panel/form-group-panel.provider.mjs';
|
|
@@ -110,19 +123,6 @@ export { KanbanProvider } from './control/kanban/kanban.provider.mjs';
|
|
|
110
123
|
export { TreeGridExProvider } from './control/tree-grid-ex/tree-grid-ex.provider.mjs';
|
|
111
124
|
export { TreeGridProvider } from './control/tree-grid/tree-grid.provider.mjs';
|
|
112
125
|
export { MEditViewPanelProvider } from './control/medit-view-panel/medit-view-panel.provider.mjs';
|
|
113
|
-
export { IBizIcon } from './common/icon/icon.mjs';
|
|
114
|
-
export { IBizRouterView } from './common/router-view/router-view.mjs';
|
|
115
|
-
export { IBizCol } from './common/col/col.mjs';
|
|
116
|
-
export { IBizRow } from './common/row/row.mjs';
|
|
117
|
-
export { IBizActionToolbar } from './common/action-toolbar/action-toolbar.mjs';
|
|
118
|
-
export { IBizControlBase } from './common/control-base/control-base.mjs';
|
|
119
|
-
export { IBizControlShell } from './common/control-shell/control-shell.mjs';
|
|
120
|
-
export { IBizViewShell } from './common/view-shell/view-shell.mjs';
|
|
121
|
-
export { IBizRawItem } from './common/rawitem/rawitem.mjs';
|
|
122
|
-
export { IBizCodeList } from './common/code-list/code-list.mjs';
|
|
123
|
-
export { ControlLoadingPlaceholder } from './common/control-loading-placeholder/control-loading-placeholder.mjs';
|
|
124
|
-
export { IBizSplit } from './common/split/split.mjs';
|
|
125
|
-
export { IBizSplitTrigger } from './common/split-trigger/split-trigger.mjs';
|
|
126
126
|
export { PanelContainerProvider } from './panel-component/panel-container/panel-container.provider.mjs';
|
|
127
127
|
export { PanelContainerState } from './panel-component/panel-container/panel-container.state.mjs';
|
|
128
128
|
export { PanelContainerController } from './panel-component/panel-container/panel-container.controller.mjs';
|
|
@@ -193,6 +193,7 @@ export { OverlayContainer } from './util/overlay-container/overlay-container.mjs
|
|
|
193
193
|
export { OverlayController } from './util/overlay-controller/overlay-controller.mjs';
|
|
194
194
|
export { OverlayPopoverContainer } from './util/overlay-popover-container/overlay-popover-container.mjs';
|
|
195
195
|
export { routerCallback } from './util/router-callback/router-callback.mjs';
|
|
196
|
+
export { usePagination } from './util/pagination/use-pagination.mjs';
|
|
196
197
|
export { useAppStore } from './util/store/app-store/app-store.mjs';
|
|
197
198
|
export { useUIStore } from './util/store/ui-store/ui-store.mjs';
|
|
198
199
|
export { piniaInstance } from './util/store/index.mjs';
|
package/es/util/index.d.ts
CHANGED
|
@@ -9,3 +9,4 @@ export { OverlayController } from './overlay-controller/overlay-controller';
|
|
|
9
9
|
export { OverlayPopoverContainer } from './overlay-popover-container/overlay-popover-container';
|
|
10
10
|
export { routerCallback } from './router-callback/router-callback';
|
|
11
11
|
export * from './store';
|
|
12
|
+
export { usePagination } from './pagination/use-pagination';
|
package/es/util/index.mjs
CHANGED
|
@@ -9,6 +9,7 @@ export { OverlayController } from './overlay-controller/overlay-controller.mjs';
|
|
|
9
9
|
export { OverlayPopoverContainer } from './overlay-popover-container/overlay-popover-container.mjs';
|
|
10
10
|
export { routerCallback } from './router-callback/router-callback.mjs';
|
|
11
11
|
export { piniaInstance } from './store/index.mjs';
|
|
12
|
+
export { usePagination } from './pagination/use-pagination.mjs';
|
|
12
13
|
export { useAppStore } from './store/app-store/app-store.mjs';
|
|
13
14
|
export { useUIStore } from './store/ui-store/ui-store.mjs';
|
|
14
15
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IMDControlController } from '@ibiz-template/runtime';
|
|
2
|
+
/**
|
|
3
|
+
* 使用分页组件
|
|
4
|
+
*
|
|
5
|
+
* @author lxm
|
|
6
|
+
* @date 2022-09-06 17:09:09
|
|
7
|
+
* @export
|
|
8
|
+
* @param {GridController} c
|
|
9
|
+
* @returns {*}
|
|
10
|
+
*/
|
|
11
|
+
export declare function usePagination(c: IMDControlController): {
|
|
12
|
+
onPageChange: (page: number) => void;
|
|
13
|
+
onPageSizeChange: (size: number) => void;
|
|
14
|
+
onPageRefresh: () => void;
|
|
15
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function usePagination(c) {
|
|
3
|
+
function onPageChange(page) {
|
|
4
|
+
if (!page || page === c.state.curPage) {
|
|
5
|
+
return;
|
|
6
|
+
}
|
|
7
|
+
c.state.curPage = page;
|
|
8
|
+
c.load();
|
|
9
|
+
}
|
|
10
|
+
function onPageSizeChange(size) {
|
|
11
|
+
if (!size || size === c.state.size) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
c.state.size = size;
|
|
15
|
+
if (c.state.curPage === 1) {
|
|
16
|
+
c.load();
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function onPageRefresh() {
|
|
20
|
+
c.load();
|
|
21
|
+
}
|
|
22
|
+
return { onPageChange, onPageSizeChange, onPageRefresh };
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { usePagination };
|
|
@@ -20,16 +20,12 @@ class PickupDataViewEngine extends DataViewEngine {
|
|
|
20
20
|
}
|
|
21
21
|
async onMounted() {
|
|
22
22
|
await super.onMounted();
|
|
23
|
-
const { model } = this.view;
|
|
24
23
|
this.xdataControl.evt.on("onSelectionChange", async (event) => {
|
|
25
24
|
this.view.evt.emit("onSelectionChange", { ...event });
|
|
26
25
|
});
|
|
27
26
|
this.xdataControl.evt.on("onActive", async (event) => {
|
|
28
27
|
this.view.evt.emit("onDataActive", { ...event });
|
|
29
28
|
});
|
|
30
|
-
if (!this.view.state.noLoadDefault && model.loadDefault) {
|
|
31
|
-
this.load();
|
|
32
|
-
}
|
|
33
29
|
}
|
|
34
30
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
35
31
|
async call(key, args) {
|
|
@@ -25,16 +25,12 @@ class PickupGridViewEngine extends GridViewEngine {
|
|
|
25
25
|
}
|
|
26
26
|
async onMounted() {
|
|
27
27
|
await super.onMounted();
|
|
28
|
-
const { model } = this.view;
|
|
29
28
|
this.xdataControl.evt.on("onSelectionChange", async (event) => {
|
|
30
29
|
this.view.evt.emit("onSelectionChange", { ...event });
|
|
31
30
|
});
|
|
32
31
|
this.xdataControl.evt.on("onActive", async (event) => {
|
|
33
32
|
this.view.evt.emit("onDataActive", { ...event });
|
|
34
33
|
});
|
|
35
|
-
if (!this.view.state.noLoadDefault && model.loadDefault) {
|
|
36
|
-
this.load();
|
|
37
|
-
}
|
|
38
34
|
}
|
|
39
35
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
40
36
|
async call(key, args) {
|
package/lib/common/index.cjs
CHANGED
|
@@ -17,6 +17,8 @@ var split = require('./split/split.cjs');
|
|
|
17
17
|
var splitTrigger = require('./split-trigger/split-trigger.cjs');
|
|
18
18
|
var extendActionTimeline = require('./extend-action-timeline/extend-action-timeline.cjs');
|
|
19
19
|
var viewMessage = require('./view-message/view-message.cjs');
|
|
20
|
+
var pagination = require('./pagination/pagination.cjs');
|
|
21
|
+
var sortBar = require('./sort-bar/sort-bar.cjs');
|
|
20
22
|
var controlLoadingPlaceholder = require('./control-loading-placeholder/control-loading-placeholder.cjs');
|
|
21
23
|
|
|
22
24
|
"use strict";
|
|
@@ -37,6 +39,8 @@ const IBizCommonComponents = {
|
|
|
37
39
|
v.component(splitTrigger.IBizSplitTrigger.name, splitTrigger.IBizSplitTrigger);
|
|
38
40
|
v.component(extendActionTimeline.IBizExtendActionTimeLine.name, extendActionTimeline.IBizExtendActionTimeLine);
|
|
39
41
|
v.component(viewMessage.ViewMessage.name, viewMessage.ViewMessage);
|
|
42
|
+
v.component(pagination.IBizPagination.name, pagination.IBizPagination);
|
|
43
|
+
v.component(sortBar.IBizSortBar.name, sortBar.IBizSortBar);
|
|
40
44
|
}
|
|
41
45
|
};
|
|
42
46
|
|
|
@@ -52,6 +56,7 @@ exports.IBizRawItem = rawitem.IBizRawItem;
|
|
|
52
56
|
exports.IBizCodeList = codeList.IBizCodeList;
|
|
53
57
|
exports.IBizSplit = split.IBizSplit;
|
|
54
58
|
exports.IBizSplitTrigger = splitTrigger.IBizSplitTrigger;
|
|
59
|
+
exports.IBizSortBar = sortBar.IBizSortBar;
|
|
55
60
|
exports.ControlLoadingPlaceholder = controlLoadingPlaceholder.ControlLoadingPlaceholder;
|
|
56
61
|
exports.IBizCommonComponents = IBizCommonComponents;
|
|
57
62
|
exports.default = IBizCommonComponents;
|
package/lib/{control/grid/grid-pagination/grid-pagination.cjs → common/pagination/pagination.cjs}
RENAMED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
var vue = require('vue');
|
|
4
4
|
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
|
-
require('./
|
|
5
|
+
require('./pagination.css');
|
|
6
6
|
|
|
7
7
|
"use strict";
|
|
8
|
-
const
|
|
9
|
-
name: "
|
|
8
|
+
const IBizPagination = /* @__PURE__ */ vue.defineComponent({
|
|
9
|
+
name: "IBizPagination",
|
|
10
10
|
props: {
|
|
11
11
|
total: {
|
|
12
12
|
type: Number,
|
|
@@ -25,7 +25,7 @@ const IBizGridPagination = /* @__PURE__ */ vue.defineComponent({
|
|
|
25
25
|
setup(props, {
|
|
26
26
|
emit
|
|
27
27
|
}) {
|
|
28
|
-
const ns = vue3Util.useNamespace("
|
|
28
|
+
const ns = vue3Util.useNamespace("pagination");
|
|
29
29
|
const start = vue.computed(() => {
|
|
30
30
|
return (props.curPage - 1) * props.size + 1;
|
|
31
31
|
});
|
|
@@ -83,4 +83,4 @@ const IBizGridPagination = /* @__PURE__ */ vue.defineComponent({
|
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
85
|
|
|
86
|
-
exports.
|
|
86
|
+
exports.IBizPagination = IBizPagination;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-pagination{--ibiz-pagination-text-color:var(--ibiz-color-text-2);--ibiz-pagination-height:50px;--ibiz-pagination-padding:0 var(--ibiz-spacing-base-tight);display:flex;justify-content:flex-end;height:var(--ibiz-pagination-height);padding:var(--ibiz-pagination-padding)}.ibiz-pagination .el-pagination{overflow:auto;font-size:var(--ibiz-font-size-regular);font-weight:var(--ibiz-font-weight-regular);color:var(--ibiz-pagination-text-color)}.ibiz-pagination .el-pagination .ibiz-pagination-btn{margin-right:var(--ibiz-spacing-tight)}.ibiz-pagination .el-pagination .ibiz-pagination-btn .el-button{color:var(--ibiz-pagination-text-color);border:1px solid var(--ibiz-color-border)}.ibiz-pagination .el-pagination .btn-next,.ibiz-pagination .el-pagination .btn-prev{border:1px solid var(--ibiz-color-border)}.ibiz-pagination .el-pagination .el-pager li{color:var(--ibiz-pagination-text-color);border:1px solid var(--ibiz-color-border)}.ibiz-pagination .el-pagination .el-pager li.is-active{color:var(--ibiz-color-white);background-color:var(--ibiz-color-primary)}.ibiz-pagination .el-pagination .el-pagination__sizes{margin-left:var(--ibiz-spacing-tight);border:1px solid var(--ibiz-color-border)}.ibiz-pagination .el-pagination .el-pagination__sizes .el-select .el-input__wrapper{background-color:transparent}.ibiz-pagination .el-pagination .el-pagination__sizes .el-input__inner{color:var(--ibiz-pagination-text-color)}.ibiz-pagination .el-pagination .el-pagination__jump{color:var(--ibiz-pagination-text-color)}.ibiz-pagination .el-pagination .el-pagination__jump .el-pagination__editor{border:1px solid var(--ibiz-color-border)}.ibiz-pagination .el-pagination .el-pagination__jump .el-pagination__editor .el-input__wrapper{background-color:transparent}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
|
+
require('./sort-bar.css');
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
const IBizSortBar = /* @__PURE__ */ vue.defineComponent({
|
|
9
|
+
name: "IBizSortBar",
|
|
10
|
+
props: {
|
|
11
|
+
sortItems: {
|
|
12
|
+
type: Array,
|
|
13
|
+
required: true
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
emits: {
|
|
17
|
+
SortChange: (_item, _order) => true
|
|
18
|
+
},
|
|
19
|
+
setup(props, {
|
|
20
|
+
emit
|
|
21
|
+
}) {
|
|
22
|
+
const ns = vue3Util.useNamespace("sort-bar");
|
|
23
|
+
const onItemClick = (item) => {
|
|
24
|
+
if (item.order === "asc") {
|
|
25
|
+
item.order = "desc";
|
|
26
|
+
} else if (item.order === "desc") {
|
|
27
|
+
item.order = void 0;
|
|
28
|
+
} else {
|
|
29
|
+
props.sortItems.forEach((x) => {
|
|
30
|
+
x.order = void 0;
|
|
31
|
+
});
|
|
32
|
+
item.order = "asc";
|
|
33
|
+
}
|
|
34
|
+
emit("SortChange", item, item.order);
|
|
35
|
+
};
|
|
36
|
+
return {
|
|
37
|
+
ns,
|
|
38
|
+
onItemClick
|
|
39
|
+
};
|
|
40
|
+
},
|
|
41
|
+
render() {
|
|
42
|
+
return vue.createVNode("div", {
|
|
43
|
+
"class": this.ns.b()
|
|
44
|
+
}, [this.sortItems.length > 0 && this.sortItems.map((item) => {
|
|
45
|
+
return vue.createVNode("div", {
|
|
46
|
+
"onClick": () => this.onItemClick(item),
|
|
47
|
+
"class": [this.ns.b("item"), item.order === "asc" ? this.ns.bm("item", "asc") : "", item.order === "desc" ? this.ns.bm("item", "desc") : ""]
|
|
48
|
+
}, [item.caption, vue.createVNode("div", {
|
|
49
|
+
"class": this.ns.b("icon-wrapper")
|
|
50
|
+
}, [vue.createVNode("i", {
|
|
51
|
+
"class": this.ns.be("icon-wrapper", "icon-asc")
|
|
52
|
+
}, null), vue.createVNode("i", {
|
|
53
|
+
"class": this.ns.be("icon-wrapper", "icon-desc")
|
|
54
|
+
}, null)])]);
|
|
55
|
+
})]);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
exports.IBizSortBar = IBizSortBar;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-sort-bar{--ibiz-sort-bar-icon-color:var(--ibiz-color-disabled-text);--ibiz-sort-bar-border-radius:var(--ibiz-border-radius-small);display:flex;align-items:center;justify-content:flex-start;padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base)}.ibiz-sort-bar-item{padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base);margin-right:-1px;font-size:var(--ibiz-font-size-regular);line-height:1;color:var(--ibiz-color-text-2);cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--ibiz-color-bg-1);border:1px solid var(--ibiz-color-border)}.ibiz-sort-bar-item:first-child{border-top-left-radius:var(--ibiz-sort-bar-border-radius);border-bottom-left-radius:var(--ibiz-sort-bar-border-radius)}.ibiz-sort-bar-item:last-child{border-top-right-radius:var(--ibiz-sort-bar-border-radius);border-bottom-right-radius:var(--ibiz-sort-bar-border-radius)}.ibiz-sort-bar-item--asc .ibiz-sort-bar-icon-wrapper__icon-asc{border-bottom-color:var(--ibiz-color-primary)}.ibiz-sort-bar-item--desc .ibiz-sort-bar-icon-wrapper__icon-desc{border-top-color:var(--ibiz-color-primary)}.ibiz-sort-bar-icon-wrapper{position:relative;display:inline-block;width:10px;height:14px;margin-left:var(--ibiz-spacing-tight);vertical-align:middle}.ibiz-sort-bar-icon-wrapper__icon-asc{position:absolute;top:-5px;left:0;width:0;height:0;border:solid 5px transparent;border-bottom-color:var(--ibiz-sort-bar-icon-color)}.ibiz-sort-bar-icon-wrapper__icon-desc{position:absolute;bottom:-3px;left:0;width:0;height:0;border:solid 5px transparent;border-top-color:var(--ibiz-sort-bar-icon-color)}
|
|
@@ -4,8 +4,13 @@ var vue = require('vue');
|
|
|
4
4
|
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
5
|
var runtime = require('@ibiz-template/runtime');
|
|
6
6
|
require('./data-view.css');
|
|
7
|
+
require('../../util/index.cjs');
|
|
8
|
+
var usePagination = require('../../util/pagination/use-pagination.cjs');
|
|
7
9
|
|
|
8
10
|
"use strict";
|
|
11
|
+
function _isSlot(s) {
|
|
12
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
13
|
+
}
|
|
9
14
|
const DataViewControl = /* @__PURE__ */ vue.defineComponent({
|
|
10
15
|
name: "IBizDataViewControl",
|
|
11
16
|
props: {
|
|
@@ -48,9 +53,20 @@ const DataViewControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
48
53
|
setup(props) {
|
|
49
54
|
const c = vue3Util.useControlController((...args) => new runtime.DataViewControlController(...args));
|
|
50
55
|
const ns = vue3Util.useNamespace(`control-${c.model.controlType.toLowerCase()}`);
|
|
56
|
+
const classNames = vue.computed(() => {
|
|
57
|
+
return [ns.is("enable-page", c.model.enablePagingBar === true)];
|
|
58
|
+
});
|
|
51
59
|
const isLodeMoreDisabled = vue.computed(() => {
|
|
60
|
+
if (c.model.enablePagingBar === true) {
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
52
63
|
return c.state.items.length >= c.state.total || c.state.isLoading || c.state.total <= c.state.size;
|
|
53
64
|
});
|
|
65
|
+
const {
|
|
66
|
+
onPageChange,
|
|
67
|
+
onPageRefresh,
|
|
68
|
+
onPageSizeChange
|
|
69
|
+
} = usePagination.usePagination(c);
|
|
54
70
|
const onRowClick = (item, event) => {
|
|
55
71
|
event.stopPropagation();
|
|
56
72
|
return c.onRowClick(item);
|
|
@@ -89,7 +105,7 @@ const DataViewControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
89
105
|
"class": ns.be("item-content", "top")
|
|
90
106
|
}, [vue.createVNode("div", {
|
|
91
107
|
"class": ns.bem("item-content", "top", "title")
|
|
92
|
-
}, [item.srfmajortext]), vue.createVNode("div", {
|
|
108
|
+
}, [item.srfmajortext || "---"]), vue.createVNode("div", {
|
|
93
109
|
"class": ns.bem("item-content", "top", "description")
|
|
94
110
|
}, [item.content])]), c.getOptItemModel() ? vue.createVNode("div", {
|
|
95
111
|
"class": ns.be("item-content", "bottom")
|
|
@@ -162,9 +178,9 @@ const DataViewControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
162
178
|
}, [renderCard(item)]);
|
|
163
179
|
});
|
|
164
180
|
};
|
|
165
|
-
const
|
|
181
|
+
const renderHasData = () => {
|
|
166
182
|
return vue.withDirectives(vue.createVNode("div", {
|
|
167
|
-
"class": ns.b("scroll"),
|
|
183
|
+
"class": [ns.b("scroll"), ns.e("content")],
|
|
168
184
|
"infinite-scroll-distance": 10,
|
|
169
185
|
"infinite-scroll-disabled": isLodeMoreDisabled.value
|
|
170
186
|
}, [renderDataViewContent()]), [[vue.resolveDirective("infinite-scroll"), () => c.loadMore()]]);
|
|
@@ -177,6 +193,7 @@ const DataViewControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
177
193
|
return;
|
|
178
194
|
}
|
|
179
195
|
return vue.createVNode(vue.resolveComponent("iBizNoData"), {
|
|
196
|
+
"class": ns.e("content"),
|
|
180
197
|
"text": c.model.emptyText,
|
|
181
198
|
"emptyTextLanguageRes": c.model.emptyTextLanguageRes
|
|
182
199
|
}, null);
|
|
@@ -184,8 +201,12 @@ const DataViewControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
184
201
|
return {
|
|
185
202
|
c,
|
|
186
203
|
ns,
|
|
187
|
-
|
|
188
|
-
|
|
204
|
+
classNames,
|
|
205
|
+
renderHasData,
|
|
206
|
+
renderNoData,
|
|
207
|
+
onPageChange,
|
|
208
|
+
onPageRefresh,
|
|
209
|
+
onPageSizeChange
|
|
189
210
|
};
|
|
190
211
|
},
|
|
191
212
|
render() {
|
|
@@ -193,10 +214,32 @@ const DataViewControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
193
214
|
items,
|
|
194
215
|
isCreated
|
|
195
216
|
} = this.c.state;
|
|
217
|
+
const {
|
|
218
|
+
enablePagingBar
|
|
219
|
+
} = this.c.model;
|
|
220
|
+
let content = null;
|
|
221
|
+
if (isCreated) {
|
|
222
|
+
content = [this.c.state.noSort ? null : vue.createVNode(vue.resolveComponent("iBizSortBar"), {
|
|
223
|
+
"onSortChange": (item, order) => {
|
|
224
|
+
this.c.setSort(item.key, order);
|
|
225
|
+
this.c.load();
|
|
226
|
+
},
|
|
227
|
+
"sortItems": this.c.state.sortItems
|
|
228
|
+
}, null), items.length > 0 ? this.renderHasData() : this.renderNoData(), enablePagingBar ? vue.createVNode(vue.resolveComponent("iBizPagination"), {
|
|
229
|
+
"class": this.ns.e("pagination"),
|
|
230
|
+
"total": this.c.state.total,
|
|
231
|
+
"curPage": this.c.state.curPage,
|
|
232
|
+
"size": this.c.state.size,
|
|
233
|
+
"onChange": this.onPageChange,
|
|
234
|
+
"onPageSizeChange": this.onPageSizeChange,
|
|
235
|
+
"onPageRefresh": this.onPageRefresh
|
|
236
|
+
}, null) : null];
|
|
237
|
+
}
|
|
196
238
|
return vue.createVNode(vue.resolveComponent("iBizControlBase"), {
|
|
239
|
+
"class": [this.ns.is("enable-page", !!enablePagingBar)],
|
|
197
240
|
"controller": this.c
|
|
198
|
-
}, {
|
|
199
|
-
default: () => [
|
|
241
|
+
}, _isSlot(content) ? content : {
|
|
242
|
+
default: () => [content]
|
|
200
243
|
});
|
|
201
244
|
}
|
|
202
245
|
});
|