@oinone/kunlun-vue-admin-base 6.3.2 → 6.3.4
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/oinone-kunlun-vue-admin-base.css +1 -1
- package/dist/oinone-kunlun-vue-admin-base.esm.js +8736 -8708
- package/dist/oinone-kunlun-vue-admin-base.scss +1 -1
- package/dist/types/src/field/form/float/Plat.vue.d.ts +2 -2
- package/dist/types/src/field/transfer/FormTransferFieldWidget.d.ts +1 -1
- package/dist/types/src/tags/index.d.ts +1 -2
- package/dist/types/src/tags/mixin/index.d.ts +1 -0
- package/dist/types/src/tags/resolve/internal/widget-resolve.d.ts +1 -1
- package/dist/types/src/view/table/DefaultTable.vue.d.ts +33 -0
- package/dist/types/src/view/table/TableWidget.d.ts +5 -1
- package/package.json +8 -8
- package/src/container/media/text-info/DefaultTextInfoValue.vue +2 -3
- package/src/field/transfer/FormTransferFieldWidget.ts +2 -2
- package/src/field/tree/DefaultFieldTree.vue +3 -0
- package/src/tags/Field.vue +1 -1
- package/src/tags/index.ts +2 -3
- package/src/tags/mixin/index.ts +1 -0
- package/src/tags/resolve/internal/widget-resolve.ts +1 -1
- package/src/view/table/DefaultTable.vue +21 -3
- package/src/view/table/TableWidget.ts +26 -38
|
@@ -47,7 +47,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
47
47
|
default: boolean;
|
|
48
48
|
};
|
|
49
49
|
layout: {
|
|
50
|
-
type: PropType<import("@oinone/kunlun-vue-ui-
|
|
50
|
+
type: PropType<import("@oinone/kunlun-vue-ui-common").FormLayout>;
|
|
51
51
|
};
|
|
52
52
|
label: {
|
|
53
53
|
type: (BooleanConstructor | StringConstructor)[];
|
|
@@ -141,7 +141,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
141
141
|
default: boolean;
|
|
142
142
|
};
|
|
143
143
|
layout: {
|
|
144
|
-
type: PropType<import("@oinone/kunlun-vue-ui-
|
|
144
|
+
type: PropType<import("@oinone/kunlun-vue-ui-common").FormLayout>;
|
|
145
145
|
};
|
|
146
146
|
label: {
|
|
147
147
|
type: (BooleanConstructor | StringConstructor)[];
|
|
@@ -24,7 +24,7 @@ export declare class FormTransferFieldWidget extends FormM2MFieldSelectWidget {
|
|
|
24
24
|
submit(submitValue: SubmitValue): Promise<Record<string, unknown> | undefined>;
|
|
25
25
|
protected queryPage<T = Record<string, unknown>>(option: IQueryPageOption, variables?: ObjectValue, context?: ObjectValue): Promise<QueryPageResult<T>>;
|
|
26
26
|
protected generatorFullOptions(content: any): ActiveRecord[];
|
|
27
|
-
protected originOptions:
|
|
27
|
+
protected originOptions: ActiveRecord[];
|
|
28
28
|
protected insertOptions(options: any, back?: boolean): void;
|
|
29
29
|
protected backfillSelectedValues(): void;
|
|
30
30
|
protected get leftColumns(): any;
|
|
@@ -2,7 +2,6 @@ import Action from './Action.vue';
|
|
|
2
2
|
import ActionBar from './ActionBar.vue';
|
|
3
3
|
import ActionColumn from './ActionColumn.vue';
|
|
4
4
|
import Col from './Col.vue';
|
|
5
|
-
import { Tabs } from './combination';
|
|
6
5
|
import Container from './Container.vue';
|
|
7
6
|
import Containers from './Containers.vue';
|
|
8
7
|
import Custom from './Custom.vue';
|
|
@@ -21,7 +20,7 @@ import TextInfo from './TextInfo.vue';
|
|
|
21
20
|
import Tree from './Tree.vue';
|
|
22
21
|
import View from './View.vue';
|
|
23
22
|
export declare function install(): void;
|
|
24
|
-
export { View, Field, Action, Element, Pack, Custom, ActionBar, ActionColumn, Col, Container, Containers, Dropdown, Group, Icon, Paragraph, Picture, Row, Search, Table, TextInfo, Tree
|
|
23
|
+
export { View, Field, Action, Element, Pack, Custom, ActionBar, ActionColumn, Col, Container, Containers, Dropdown, Group, Icon, Paragraph, Picture, Row, Search, Table, TextInfo, Tree };
|
|
25
24
|
export * from './combination';
|
|
26
25
|
export * from './context';
|
|
27
26
|
export * from './mixin';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RenderWidget, VueWidget } from '@oinone/kunlun-vue-widget';
|
|
2
|
-
import { DefaultColWidget, DefaultRowWidget } from '../../../container';
|
|
2
|
+
import { DefaultColWidget, DefaultRowWidget } from '../../../container/block';
|
|
3
3
|
import { CustomWidgetProps } from '../typing';
|
|
4
4
|
import { ActionWidgetProps, ElementWidgetProps, FieldWidgetProps, PackWidgetProps, ViewWidgetProps } from './typing';
|
|
5
5
|
export declare function createDefaultCol(rowWidget: DefaultRowWidget, props: PackWidgetProps): DefaultColWidget;
|
|
@@ -234,6 +234,21 @@ declare const __default__: import("vue").DefineComponent<{
|
|
|
234
234
|
type: BooleanConstructor;
|
|
235
235
|
default: undefined;
|
|
236
236
|
};
|
|
237
|
+
border: {
|
|
238
|
+
type: StringConstructor;
|
|
239
|
+
};
|
|
240
|
+
stripe: {
|
|
241
|
+
type: BooleanConstructor;
|
|
242
|
+
default: boolean;
|
|
243
|
+
};
|
|
244
|
+
isCurrent: {
|
|
245
|
+
type: BooleanConstructor;
|
|
246
|
+
default: boolean;
|
|
247
|
+
};
|
|
248
|
+
isHover: {
|
|
249
|
+
type: BooleanConstructor;
|
|
250
|
+
default: boolean;
|
|
251
|
+
};
|
|
237
252
|
}, {
|
|
238
253
|
defaultTableRef: import("vue").Ref<HTMLElement>;
|
|
239
254
|
table: import("vue").Ref<OioTableInstance | undefined>;
|
|
@@ -477,6 +492,21 @@ declare const __default__: import("vue").DefineComponent<{
|
|
|
477
492
|
type: BooleanConstructor;
|
|
478
493
|
default: undefined;
|
|
479
494
|
};
|
|
495
|
+
border: {
|
|
496
|
+
type: StringConstructor;
|
|
497
|
+
};
|
|
498
|
+
stripe: {
|
|
499
|
+
type: BooleanConstructor;
|
|
500
|
+
default: boolean;
|
|
501
|
+
};
|
|
502
|
+
isCurrent: {
|
|
503
|
+
type: BooleanConstructor;
|
|
504
|
+
default: boolean;
|
|
505
|
+
};
|
|
506
|
+
isHover: {
|
|
507
|
+
type: BooleanConstructor;
|
|
508
|
+
default: boolean;
|
|
509
|
+
};
|
|
480
510
|
}>>, {
|
|
481
511
|
checkbox: boolean;
|
|
482
512
|
loading: boolean;
|
|
@@ -494,5 +524,8 @@ declare const __default__: import("vue").DefineComponent<{
|
|
|
494
524
|
emptyImage: string;
|
|
495
525
|
autoLineHeight: boolean;
|
|
496
526
|
enableSequence: boolean;
|
|
527
|
+
stripe: boolean;
|
|
528
|
+
isCurrent: boolean;
|
|
529
|
+
isHover: boolean;
|
|
497
530
|
}>;
|
|
498
531
|
export default __default__;
|
|
@@ -14,10 +14,14 @@ export declare class TableWidget<Props extends TableWidgetProps = TableWidgetPro
|
|
|
14
14
|
initialize(props: Props): this;
|
|
15
15
|
protected get cellWidth(): "auto" | undefined;
|
|
16
16
|
protected get cellMinWidth(): string | undefined;
|
|
17
|
-
protected get tableConfig():
|
|
17
|
+
protected get tableConfig(): Record<string, any>;
|
|
18
18
|
protected get checkbox(): boolean;
|
|
19
19
|
protected get lineHeight(): number | undefined;
|
|
20
20
|
protected get minLineHeight(): number | undefined;
|
|
21
|
+
protected get border(): any;
|
|
22
|
+
protected get stripe(): any;
|
|
23
|
+
protected get isCurrent(): any;
|
|
24
|
+
protected get isHover(): any;
|
|
21
25
|
/**
|
|
22
26
|
* 表格行高是否自适应,默认开启
|
|
23
27
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oinone/kunlun-vue-admin-base",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.4",
|
|
4
4
|
"main": "index.ts",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prebuild": "rimraf dist",
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
"doc": "typedoc --out docs src/index.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@oinone/kunlun-vue-admin-layout": "6.3.
|
|
18
|
-
"@oinone/kunlun-vue-router": "6.3.
|
|
19
|
-
"@oinone/kunlun-vue-ui": "6.3.
|
|
20
|
-
"@oinone/kunlun-vue-ui-antd": "6.3.
|
|
21
|
-
"@oinone/kunlun-vue-ui-common": "6.3.
|
|
22
|
-
"@oinone/kunlun-vue-ui-el": "6.3.
|
|
23
|
-
"@oinone/kunlun-vue-widget": "6.3.
|
|
17
|
+
"@oinone/kunlun-vue-admin-layout": "6.3.4",
|
|
18
|
+
"@oinone/kunlun-vue-router": "6.3.4",
|
|
19
|
+
"@oinone/kunlun-vue-ui": "6.3.4",
|
|
20
|
+
"@oinone/kunlun-vue-ui-antd": "6.3.4",
|
|
21
|
+
"@oinone/kunlun-vue-ui-common": "6.3.4",
|
|
22
|
+
"@oinone/kunlun-vue-ui-el": "6.3.4",
|
|
23
|
+
"@oinone/kunlun-vue-widget": "6.3.4",
|
|
24
24
|
"@wangeditor/editor": "5.1.23",
|
|
25
25
|
"@wangeditor/editor-for-vue": "5.1.11",
|
|
26
26
|
"@wangeditor/plugin-upload-attachment": "1.1.0",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
import Field from '../../../tags
|
|
4
|
-
import { TextInfoJustifyContent } from './typing';
|
|
2
|
+
import { createVNode, defineComponent, PropType } from 'vue';
|
|
3
|
+
import { Field } from '../../../tags';
|
|
5
4
|
|
|
6
5
|
export default defineComponent({
|
|
7
6
|
name: 'DefaultTextInfoValue',
|
|
@@ -218,7 +218,7 @@ export class FormTransferFieldWidget extends FormM2MFieldSelectWidget {
|
|
|
218
218
|
return options;
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
protected originOptions = [];
|
|
221
|
+
protected originOptions: ActiveRecord[] = [];
|
|
222
222
|
|
|
223
223
|
protected insertOptions(options, back = false) {
|
|
224
224
|
if (!options?.length) {
|
|
@@ -233,7 +233,7 @@ export class FormTransferFieldWidget extends FormM2MFieldSelectWidget {
|
|
|
233
233
|
});
|
|
234
234
|
this.options = this.generatorFullOptions(finalOptions);
|
|
235
235
|
if (!back) {
|
|
236
|
-
this.originOptions = options;
|
|
236
|
+
this.originOptions = this.generatorFullOptions(options);
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
|
package/src/tags/Field.vue
CHANGED
package/src/tags/index.ts
CHANGED
|
@@ -5,7 +5,7 @@ import Action from './Action.vue';
|
|
|
5
5
|
import ActionBar from './ActionBar.vue';
|
|
6
6
|
import ActionColumn from './ActionColumn.vue';
|
|
7
7
|
import Col from './Col.vue';
|
|
8
|
-
import { PackCombination
|
|
8
|
+
import { PackCombination } from './combination';
|
|
9
9
|
import Container from './Container.vue';
|
|
10
10
|
import Containers from './Containers.vue';
|
|
11
11
|
import Custom from './Custom.vue';
|
|
@@ -93,8 +93,7 @@ export {
|
|
|
93
93
|
Search,
|
|
94
94
|
Table,
|
|
95
95
|
TextInfo,
|
|
96
|
-
Tree
|
|
97
|
-
Tabs
|
|
96
|
+
Tree
|
|
98
97
|
};
|
|
99
98
|
|
|
100
99
|
export * from './combination';
|
package/src/tags/mixin/index.ts
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
BaseViewOptions,
|
|
24
24
|
CustomWidget as CommonCustomWidget
|
|
25
25
|
} from '../../../basic';
|
|
26
|
-
import { DefaultColWidget, DefaultContainerColWidget, DefaultRowWidget } from '../../../container';
|
|
26
|
+
import { DefaultColWidget, DefaultContainerColWidget, DefaultRowWidget } from '../../../container/block';
|
|
27
27
|
import { FieldMixinComponentOptions, selectorFieldMixinComponent } from '../../../spi';
|
|
28
28
|
import { ActiveLayoutEffectOpt } from '../../context/active';
|
|
29
29
|
import { isCreateFlexElement } from '../helper';
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
watch
|
|
39
39
|
} from 'vue';
|
|
40
40
|
import { VxeTableDefines, VxeTablePropTypes } from 'vxe-table';
|
|
41
|
-
import {
|
|
41
|
+
import { ManualWidget } from '../../basic';
|
|
42
42
|
import { UserTablePrefer } from '../../typing';
|
|
43
43
|
import { TableRowClickMode } from './typing';
|
|
44
44
|
|
|
@@ -336,6 +336,21 @@ export default defineComponent({
|
|
|
336
336
|
enableSequence: {
|
|
337
337
|
type: Boolean,
|
|
338
338
|
default: undefined
|
|
339
|
+
},
|
|
340
|
+
border: {
|
|
341
|
+
type: String
|
|
342
|
+
},
|
|
343
|
+
stripe: {
|
|
344
|
+
type: Boolean,
|
|
345
|
+
default: false
|
|
346
|
+
},
|
|
347
|
+
isCurrent: {
|
|
348
|
+
type: Boolean,
|
|
349
|
+
default: true
|
|
350
|
+
},
|
|
351
|
+
isHover: {
|
|
352
|
+
type: Boolean,
|
|
353
|
+
default: false
|
|
339
354
|
}
|
|
340
355
|
},
|
|
341
356
|
setup(props) {
|
|
@@ -729,9 +744,12 @@ export default defineComponent({
|
|
|
729
744
|
|
|
730
745
|
emptyText,
|
|
731
746
|
emptyImage,
|
|
732
|
-
pageSizeOptions
|
|
747
|
+
pageSizeOptions,
|
|
748
|
+
stripe,
|
|
749
|
+
isCurrent,
|
|
750
|
+
isHover
|
|
733
751
|
} = this;
|
|
734
|
-
let { border = false
|
|
752
|
+
let { border = false } = this;
|
|
735
753
|
const VEX_TABLE_BORDER_MODE = [true, false, 'default', 'outer', 'full', 'inner'];
|
|
736
754
|
let tableCustomClass = '';
|
|
737
755
|
if (!VEX_TABLE_BORDER_MODE.includes(border)) {
|
|
@@ -32,7 +32,6 @@ import { BaseElementListViewWidgetProps, BaseElementWidget, BaseTableColumnWidge
|
|
|
32
32
|
import { ExpandColumnWidgetNames } from '../../field';
|
|
33
33
|
import { ActiveCountEnum, fetchPageSize, fetchPageSizeNullable, TABLE_WIDGET, UserTablePrefer } from '../../typing';
|
|
34
34
|
import { TreeUtils } from '../../util';
|
|
35
|
-
import { TableConfigManager } from './config';
|
|
36
35
|
import DefaultTable from './DefaultTable.vue';
|
|
37
36
|
import { TableRowClickMode } from './typing';
|
|
38
37
|
|
|
@@ -78,7 +77,7 @@ export class TableWidget<Props extends TableWidgetProps = TableWidgetProps> exte
|
|
|
78
77
|
}
|
|
79
78
|
|
|
80
79
|
protected get tableConfig() {
|
|
81
|
-
return
|
|
80
|
+
return this.getMergeConfig('table');
|
|
82
81
|
}
|
|
83
82
|
|
|
84
83
|
@Widget.Reactive()
|
|
@@ -88,32 +87,32 @@ export class TableWidget<Props extends TableWidgetProps = TableWidgetProps> exte
|
|
|
88
87
|
|
|
89
88
|
@Widget.Reactive()
|
|
90
89
|
protected get lineHeight(): number | undefined {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
if (lineHeight) {
|
|
94
|
-
return lineHeight;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
if (typeof this.tableConfig.lineHeight === 'number') {
|
|
98
|
-
return this.tableConfig.lineHeight;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
return undefined;
|
|
90
|
+
return NumberHelper.toNumber(this.tableConfig.lineHeight) as number | undefined;
|
|
102
91
|
}
|
|
103
92
|
|
|
104
93
|
@Widget.Reactive()
|
|
105
94
|
protected get minLineHeight(): number | undefined {
|
|
106
|
-
|
|
95
|
+
return NumberHelper.toNumber(this.tableConfig.minLineHeight) as number | undefined;
|
|
96
|
+
}
|
|
107
97
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
98
|
+
@Widget.Reactive()
|
|
99
|
+
protected get border() {
|
|
100
|
+
return this.tableConfig.border || false;
|
|
101
|
+
}
|
|
111
102
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
103
|
+
@Widget.Reactive()
|
|
104
|
+
protected get stripe() {
|
|
105
|
+
return this.tableConfig.stripe || false;
|
|
106
|
+
}
|
|
115
107
|
|
|
116
|
-
|
|
108
|
+
@Widget.Reactive()
|
|
109
|
+
protected get isCurrent() {
|
|
110
|
+
return this.tableConfig.isCurrent || true;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@Widget.Reactive()
|
|
114
|
+
protected get isHover() {
|
|
115
|
+
return this.tableConfig.isHover || false;
|
|
117
116
|
}
|
|
118
117
|
|
|
119
118
|
/**
|
|
@@ -121,19 +120,8 @@ export class TableWidget<Props extends TableWidgetProps = TableWidgetProps> exte
|
|
|
121
120
|
*/
|
|
122
121
|
@Widget.Reactive()
|
|
123
122
|
protected get autoLineHeight(): boolean {
|
|
124
|
-
const autoLineHeight =
|
|
125
|
-
|
|
126
|
-
.orElse(undefined);
|
|
127
|
-
|
|
128
|
-
if (typeof autoLineHeight === 'boolean') {
|
|
129
|
-
return autoLineHeight;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
if (typeof this.tableConfig.autoLineHeight === 'boolean') {
|
|
133
|
-
return this.tableConfig.autoLineHeight;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
return true;
|
|
123
|
+
const { autoLineHeight } = this.tableConfig;
|
|
124
|
+
return Optional.ofNullable(autoLineHeight).map(BooleanHelper.toBoolean).orElse(true)!;
|
|
137
125
|
}
|
|
138
126
|
|
|
139
127
|
@Widget.Reactive()
|
|
@@ -153,11 +141,11 @@ export class TableWidget<Props extends TableWidgetProps = TableWidgetProps> exte
|
|
|
153
141
|
@Widget.Reactive()
|
|
154
142
|
@Widget.Provide()
|
|
155
143
|
protected get activeCount(): number | undefined {
|
|
156
|
-
const { activeCount } = this.
|
|
144
|
+
const { activeCount } = this.tableConfig;
|
|
157
145
|
if (isNil(activeCount)) {
|
|
158
146
|
return undefined;
|
|
159
147
|
}
|
|
160
|
-
const activeCountNumber = NumberHelper.toNumber(activeCount);
|
|
148
|
+
const activeCountNumber = NumberHelper.toNumber(activeCount as number | undefined | string);
|
|
161
149
|
if (isNil(activeCountNumber)) {
|
|
162
150
|
return ActiveCountEnum[activeCount as string];
|
|
163
151
|
}
|
|
@@ -170,14 +158,14 @@ export class TableWidget<Props extends TableWidgetProps = TableWidgetProps> exte
|
|
|
170
158
|
@Widget.Reactive()
|
|
171
159
|
@Widget.Provide()
|
|
172
160
|
protected get inlineActiveCount(): number | undefined {
|
|
173
|
-
let { inlineActiveCount } = this.
|
|
161
|
+
let { inlineActiveCount } = this.tableConfig;
|
|
174
162
|
if (isNil(inlineActiveCount)) {
|
|
175
163
|
inlineActiveCount = this.metadataRuntimeContext.viewTemplate?.inlineActiveCount;
|
|
176
164
|
if (isNil(inlineActiveCount)) {
|
|
177
165
|
return undefined;
|
|
178
166
|
}
|
|
179
167
|
}
|
|
180
|
-
const inlineActiveCountNumber = NumberHelper.toNumber(inlineActiveCount);
|
|
168
|
+
const inlineActiveCountNumber = NumberHelper.toNumber(inlineActiveCount as number | string);
|
|
181
169
|
if (isNil(inlineActiveCountNumber)) {
|
|
182
170
|
return ActiveCountEnum[inlineActiveCount as string];
|
|
183
171
|
}
|