cnhis-design-vue 3.1.21-beta.5 → 3.1.21-beta.6
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/README.md +123 -123
- package/es/components/big-table/index.d.ts +9 -8
- package/es/components/big-table/src/BigTable.vue.d.ts +9 -8
- package/es/components/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +11 -10
- package/es/components/big-table/src/bigTableProps.d.ts +1 -1
- package/es/components/big-table/src/hooks/useFormat.d.ts +3 -1
- package/es/components/big-table/src/hooks/useFormat2.js +11 -2
- package/es/components/button-print/index.d.ts +1 -1
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +1 -1
- package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +1 -1
- package/es/components/drag-layout/index.d.ts +1 -1
- package/es/components/drag-layout/src/DragLayout.vue.d.ts +1 -1
- package/es/components/fabric-chart/src/components/PopupMenu.js +9 -2
- package/es/components/fabric-chart/src/hooks/useCenter2.js +19 -19
- package/es/components/fabric-chart/src/hooks/useLeft2.js +2 -2
- package/es/components/form-config/index.d.ts +2 -2
- package/es/components/form-config/src/FormConfig.vue.d.ts +2 -2
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +1 -1
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +1 -1
- package/es/components/form-render/index.d.ts +1 -1
- package/es/components/form-render/src/FormRender.vue.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/inputGroup.d.ts +1 -1
- package/es/components/info-header/index.d.ts +1 -1
- package/es/components/info-header/src/InfoHeader.vue.d.ts +1 -1
- package/es/components/scale-view/index.d.ts +1 -1
- package/es/components/scale-view/src/ScaleView.vue.d.ts +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +2 -2
- package/es/components/select-label/index.d.ts +4 -4
- package/es/components/select-label/src/LabelFormContent.vue.d.ts +2 -2
- package/es/components/select-label/src/SelectLabel.vue.d.ts +2 -2
- package/es/components/select-person/index.d.ts +1 -1
- package/es/components/select-person/src/SelectPerson.vue.d.ts +1 -1
- package/es/components/shortcut-setter/index.d.ts +1 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -1
- package/es/components/time-line/index.d.ts +1 -1
- package/es/components/time-line/src/TimeLine.vue.d.ts +1 -1
- package/package.json +2 -2
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
- package/es/components/fabric-chart/src/utils/index.d.ts +0 -6823
- package/es/shared/utils/tapable/index.d.ts +0 -139
package/README.md
CHANGED
|
@@ -1,123 +1,123 @@
|
|
|
1
|
-
# 安装
|
|
2
|
-
|
|
3
|
-
```shell
|
|
4
|
-
npm i cnhis-design-vue@[版本号]
|
|
5
|
-
# or
|
|
6
|
-
yarn add cnhis-design-vue@[版本号] #推荐
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
## 1.全局引入
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
// main.ts
|
|
13
|
-
import { createApp } from 'vue';
|
|
14
|
-
import App from './App.vue';
|
|
15
|
-
import 'cnhis-design-vue/es/packages/index.css';
|
|
16
|
-
import cui from 'cnhis-design-vue';
|
|
17
|
-
|
|
18
|
-
const app = createApp(App);
|
|
19
|
-
app.use(cui).mount('#app');
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## 2. 按需引入
|
|
23
|
-
|
|
24
|
-
组件现在支持了自动按需引入, 但是样式文件需要额外的处理
|
|
25
|
-
|
|
26
|
-
### 2.1 样式处理方式 1(按需引入样式)
|
|
27
|
-
|
|
28
|
-
```shell
|
|
29
|
-
# 安装自动导入样式的插件
|
|
30
|
-
npm i -d vite-plugin-style-import
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
```typescript
|
|
34
|
-
// vite.config.ts
|
|
35
|
-
import { defineConfig } from 'vite';
|
|
36
|
-
import { createStyleImportPlugin } from 'vite-plugin-style-import';
|
|
37
|
-
|
|
38
|
-
export default defineConfig({
|
|
39
|
-
plugins: [
|
|
40
|
-
// ...otherPlugins
|
|
41
|
-
createStyleImportPlugin({
|
|
42
|
-
libs: [
|
|
43
|
-
{
|
|
44
|
-
libraryName: 'cnhis-design-vue',
|
|
45
|
-
esModule: true,
|
|
46
|
-
ensureStyleFile: true,
|
|
47
|
-
resolveStyle: name => {
|
|
48
|
-
return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
]
|
|
52
|
-
})
|
|
53
|
-
]
|
|
54
|
-
});
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### 2.2 样式处理方式 2(全局引入样式)
|
|
58
|
-
|
|
59
|
-
```typescript
|
|
60
|
-
// main.ts
|
|
61
|
-
import 'cnhis-design-vue/es/components/index.css';
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## 3. 注意
|
|
65
|
-
|
|
66
|
-
由于 vxe-table 目前的引入方式是由组件 install 触发的,所以如果需要使用 c-grid/c-big-table 组件,需要全局注册二者任意一个
|
|
67
|
-
|
|
68
|
-
```typescript
|
|
69
|
-
// main.ts
|
|
70
|
-
import { createApp } from 'vue';
|
|
71
|
-
import App from './App.vue';
|
|
72
|
-
|
|
73
|
-
import { CGrid } from 'cnhis-design-vue';
|
|
74
|
-
// 或者
|
|
75
|
-
import { CBigTable } from 'cnhis-design-vue';
|
|
76
|
-
|
|
77
|
-
const app = createApp(App);
|
|
78
|
-
app.use(CGrid);
|
|
79
|
-
// 或者
|
|
80
|
-
app.use(CBigTable);
|
|
81
|
-
app.mount('#app');
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
## 4.FAQ
|
|
85
|
-
|
|
86
|
-
### 4.1 项目打包后样式丢失
|
|
87
|
-
|
|
88
|
-
> 处理方法, 将 cnhis-design-vue 从 vendor 包中移除
|
|
89
|
-
|
|
90
|
-
```typescript
|
|
91
|
-
// vite.config.ts
|
|
92
|
-
import { defineConfig } from 'vite';
|
|
93
|
-
|
|
94
|
-
export default defineConfig({
|
|
95
|
-
rollupOptions: {
|
|
96
|
-
// ..otherOptions
|
|
97
|
-
output: {
|
|
98
|
-
dir: './dist',
|
|
99
|
-
manualChunks(id: string) {
|
|
100
|
-
if (id.includes('node_modules') && !id.includes('cnhis-design-vue')) {
|
|
101
|
-
return 'vendor';
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### 4.2 找不到文件
|
|
110
|
-
|
|
111
|
-
> 由于组件库输出文件类型由 js 修改成了 mjs, 如果配置了 resolve 属性的项目, 需要将 mjs 文件类型添加至 extensions 中
|
|
112
|
-
|
|
113
|
-
```javascript
|
|
114
|
-
// vite.config.ts
|
|
115
|
-
const config = {
|
|
116
|
-
// ...otherOptions
|
|
117
|
-
resolve: {
|
|
118
|
-
// ...otherOptions
|
|
119
|
-
// 如果没有配置, 则不用考虑
|
|
120
|
-
extensions: ['.js', '.ts', '.vue', '.json', '.mjs']
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
```
|
|
1
|
+
# 安装
|
|
2
|
+
|
|
3
|
+
```shell
|
|
4
|
+
npm i cnhis-design-vue@[版本号]
|
|
5
|
+
# or
|
|
6
|
+
yarn add cnhis-design-vue@[版本号] #推荐
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## 1.全局引入
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
// main.ts
|
|
13
|
+
import { createApp } from 'vue';
|
|
14
|
+
import App from './App.vue';
|
|
15
|
+
import 'cnhis-design-vue/es/packages/index.css';
|
|
16
|
+
import cui from 'cnhis-design-vue';
|
|
17
|
+
|
|
18
|
+
const app = createApp(App);
|
|
19
|
+
app.use(cui).mount('#app');
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## 2. 按需引入
|
|
23
|
+
|
|
24
|
+
组件现在支持了自动按需引入, 但是样式文件需要额外的处理
|
|
25
|
+
|
|
26
|
+
### 2.1 样式处理方式 1(按需引入样式)
|
|
27
|
+
|
|
28
|
+
```shell
|
|
29
|
+
# 安装自动导入样式的插件
|
|
30
|
+
npm i -d vite-plugin-style-import
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
// vite.config.ts
|
|
35
|
+
import { defineConfig } from 'vite';
|
|
36
|
+
import { createStyleImportPlugin } from 'vite-plugin-style-import';
|
|
37
|
+
|
|
38
|
+
export default defineConfig({
|
|
39
|
+
plugins: [
|
|
40
|
+
// ...otherPlugins
|
|
41
|
+
createStyleImportPlugin({
|
|
42
|
+
libs: [
|
|
43
|
+
{
|
|
44
|
+
libraryName: 'cnhis-design-vue',
|
|
45
|
+
esModule: true,
|
|
46
|
+
ensureStyleFile: true,
|
|
47
|
+
resolveStyle: name => {
|
|
48
|
+
return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
});
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### 2.2 样式处理方式 2(全局引入样式)
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
// main.ts
|
|
61
|
+
import 'cnhis-design-vue/es/components/index.css';
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## 3. 注意
|
|
65
|
+
|
|
66
|
+
由于 vxe-table 目前的引入方式是由组件 install 触发的,所以如果需要使用 c-grid/c-big-table 组件,需要全局注册二者任意一个
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
// main.ts
|
|
70
|
+
import { createApp } from 'vue';
|
|
71
|
+
import App from './App.vue';
|
|
72
|
+
|
|
73
|
+
import { CGrid } from 'cnhis-design-vue';
|
|
74
|
+
// 或者
|
|
75
|
+
import { CBigTable } from 'cnhis-design-vue';
|
|
76
|
+
|
|
77
|
+
const app = createApp(App);
|
|
78
|
+
app.use(CGrid);
|
|
79
|
+
// 或者
|
|
80
|
+
app.use(CBigTable);
|
|
81
|
+
app.mount('#app');
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## 4.FAQ
|
|
85
|
+
|
|
86
|
+
### 4.1 项目打包后样式丢失
|
|
87
|
+
|
|
88
|
+
> 处理方法, 将 cnhis-design-vue 从 vendor 包中移除
|
|
89
|
+
|
|
90
|
+
```typescript
|
|
91
|
+
// vite.config.ts
|
|
92
|
+
import { defineConfig } from 'vite';
|
|
93
|
+
|
|
94
|
+
export default defineConfig({
|
|
95
|
+
rollupOptions: {
|
|
96
|
+
// ..otherOptions
|
|
97
|
+
output: {
|
|
98
|
+
dir: './dist',
|
|
99
|
+
manualChunks(id: string) {
|
|
100
|
+
if (id.includes('node_modules') && !id.includes('cnhis-design-vue')) {
|
|
101
|
+
return 'vendor';
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### 4.2 找不到文件
|
|
110
|
+
|
|
111
|
+
> 由于组件库输出文件类型由 js 修改成了 mjs, 如果配置了 resolve 属性的项目, 需要将 mjs 文件类型添加至 extensions 中
|
|
112
|
+
|
|
113
|
+
```javascript
|
|
114
|
+
// vite.config.ts
|
|
115
|
+
const config = {
|
|
116
|
+
// ...otherOptions
|
|
117
|
+
resolve: {
|
|
118
|
+
// ...otherOptions
|
|
119
|
+
// 如果没有配置, 则不用考虑
|
|
120
|
+
extensions: ['.js', '.ts', '.vue', '.json', '.mjs']
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
```
|
|
@@ -200,7 +200,7 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
200
200
|
resetInlineBatchEdit: FunctionConstructor;
|
|
201
201
|
resetBatchEditRowStatus: FunctionConstructor;
|
|
202
202
|
anchor: {
|
|
203
|
-
type:
|
|
203
|
+
type: import("vue").PropType<import("../../../es/shared/types").AnyObject[]>;
|
|
204
204
|
default: () => never[];
|
|
205
205
|
};
|
|
206
206
|
}, {
|
|
@@ -547,12 +547,15 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
547
547
|
resetInlineBatchEdit: FunctionConstructor;
|
|
548
548
|
resetBatchEditRowStatus: FunctionConstructor;
|
|
549
549
|
anchor: {
|
|
550
|
-
type:
|
|
550
|
+
type: import("vue").PropType<import("../../../es/shared/types").AnyObject[]>;
|
|
551
551
|
default: () => never[];
|
|
552
552
|
};
|
|
553
553
|
}>> & {
|
|
554
554
|
[x: `on${string}`]: ((...args: any[]) => any) | undefined;
|
|
555
555
|
}>>;
|
|
556
|
+
attr: {
|
|
557
|
+
[x: string]: unknown;
|
|
558
|
+
};
|
|
556
559
|
formatData: (data?: {
|
|
557
560
|
tableList: any[];
|
|
558
561
|
fieldList: any[];
|
|
@@ -579,6 +582,7 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
579
582
|
'border-color': any;
|
|
580
583
|
color?: undefined;
|
|
581
584
|
};
|
|
585
|
+
getAttr: (field: string) => any;
|
|
582
586
|
imgs2imgArr: (imgs: any) => any;
|
|
583
587
|
parseDurationValue: (v: any, duration: any) => string | undefined;
|
|
584
588
|
parseCombinationValue: (value: any, setting: any) => any;
|
|
@@ -621,9 +625,6 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
621
625
|
$event: KeyboardEvent;
|
|
622
626
|
}) => void;
|
|
623
627
|
scroll: (params: any) => void;
|
|
624
|
-
attr: {
|
|
625
|
-
[x: string]: unknown;
|
|
626
|
-
};
|
|
627
628
|
currentCheckedKeys: import("vue").ComputedRef<never[]>;
|
|
628
629
|
visibleCancelCheckAllBtn: import("vue").ComputedRef<boolean>;
|
|
629
630
|
singleCheckedKey: import("vue").ComputedRef<string>;
|
|
@@ -883,7 +884,7 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
883
884
|
style: import("vue").Ref<string | import("vue").CSSProperties | undefined>;
|
|
884
885
|
class: import("vue").Ref<string | undefined>;
|
|
885
886
|
mergedClsPrefix: import("vue").Ref<string>;
|
|
886
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
887
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
887
888
|
readonly tab: import("vue").PropType<string | number | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
888
889
|
[key: string]: any;
|
|
889
890
|
}> | (() => import("vue").VNodeChild)>;
|
|
@@ -1116,13 +1117,13 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1116
1117
|
resetInlineBatchEdit: FunctionConstructor;
|
|
1117
1118
|
resetBatchEditRowStatus: FunctionConstructor;
|
|
1118
1119
|
anchor: {
|
|
1119
|
-
type:
|
|
1120
|
+
type: import("vue").PropType<import("../../../es/shared/types").AnyObject[]>;
|
|
1120
1121
|
default: () => never[];
|
|
1121
1122
|
};
|
|
1122
1123
|
}>> & {
|
|
1123
1124
|
[x: `on${string}`]: ((...args: any[]) => any) | undefined;
|
|
1124
1125
|
}, {
|
|
1125
|
-
anchor:
|
|
1126
|
+
anchor: import("../../../es/shared/types").AnyObject[];
|
|
1126
1127
|
data: unknown[];
|
|
1127
1128
|
showFooter: boolean;
|
|
1128
1129
|
columnConfig: Record<string, any>;
|
|
@@ -198,7 +198,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
198
198
|
resetInlineBatchEdit: FunctionConstructor;
|
|
199
199
|
resetBatchEditRowStatus: FunctionConstructor;
|
|
200
200
|
anchor: {
|
|
201
|
-
type:
|
|
201
|
+
type: import("vue").PropType<import("../../../shared/types").AnyObject[]>;
|
|
202
202
|
default: () => never[];
|
|
203
203
|
};
|
|
204
204
|
}, {
|
|
@@ -545,12 +545,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
545
545
|
resetInlineBatchEdit: FunctionConstructor;
|
|
546
546
|
resetBatchEditRowStatus: FunctionConstructor;
|
|
547
547
|
anchor: {
|
|
548
|
-
type:
|
|
548
|
+
type: import("vue").PropType<import("../../../shared/types").AnyObject[]>;
|
|
549
549
|
default: () => never[];
|
|
550
550
|
};
|
|
551
551
|
}>> & {
|
|
552
552
|
[x: `on${string}`]: ((...args: any[]) => any) | undefined;
|
|
553
553
|
}>>;
|
|
554
|
+
attr: {
|
|
555
|
+
[x: string]: unknown;
|
|
556
|
+
};
|
|
554
557
|
formatData: (data?: {
|
|
555
558
|
tableList: any[];
|
|
556
559
|
fieldList: any[];
|
|
@@ -577,6 +580,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
577
580
|
'border-color': any;
|
|
578
581
|
color?: undefined;
|
|
579
582
|
};
|
|
583
|
+
getAttr: (field: string) => any;
|
|
580
584
|
imgs2imgArr: (imgs: any) => any;
|
|
581
585
|
parseDurationValue: (v: any, duration: any) => string | undefined;
|
|
582
586
|
parseCombinationValue: (value: any, setting: any) => any;
|
|
@@ -619,9 +623,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
619
623
|
$event: KeyboardEvent;
|
|
620
624
|
}) => void;
|
|
621
625
|
scroll: (params: any) => void;
|
|
622
|
-
attr: {
|
|
623
|
-
[x: string]: unknown;
|
|
624
|
-
};
|
|
625
626
|
currentCheckedKeys: import("vue").ComputedRef<never[]>;
|
|
626
627
|
visibleCancelCheckAllBtn: import("vue").ComputedRef<boolean>;
|
|
627
628
|
singleCheckedKey: import("vue").ComputedRef<string>;
|
|
@@ -881,7 +882,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
881
882
|
style: import("vue").Ref<string | import("vue").CSSProperties | undefined>;
|
|
882
883
|
class: import("vue").Ref<string | undefined>;
|
|
883
884
|
mergedClsPrefix: import("vue").Ref<string>;
|
|
884
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
885
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
885
886
|
readonly tab: import("vue").PropType<string | number | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
886
887
|
[key: string]: any;
|
|
887
888
|
}> | (() => import("vue").VNodeChild)>;
|
|
@@ -1114,13 +1115,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1114
1115
|
resetInlineBatchEdit: FunctionConstructor;
|
|
1115
1116
|
resetBatchEditRowStatus: FunctionConstructor;
|
|
1116
1117
|
anchor: {
|
|
1117
|
-
type:
|
|
1118
|
+
type: import("vue").PropType<import("../../../shared/types").AnyObject[]>;
|
|
1118
1119
|
default: () => never[];
|
|
1119
1120
|
};
|
|
1120
1121
|
}>> & {
|
|
1121
1122
|
[x: `on${string}`]: ((...args: any[]) => any) | undefined;
|
|
1122
1123
|
}, {
|
|
1123
|
-
anchor:
|
|
1124
|
+
anchor: import("../../../shared/types").AnyObject[];
|
|
1124
1125
|
data: unknown[];
|
|
1125
1126
|
showFooter: boolean;
|
|
1126
1127
|
columnConfig: Record<string, any>;
|
|
@@ -57,11 +57,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
57
57
|
const xGrid = ref({});
|
|
58
58
|
const copyState = XEUtils.clone(bigTableState, true);
|
|
59
59
|
const state = reactive(copyState);
|
|
60
|
+
const attr = useAttrs();
|
|
60
61
|
const {
|
|
61
62
|
formatData,
|
|
62
63
|
htmlToText,
|
|
63
|
-
getBtnStyle
|
|
64
|
-
|
|
64
|
+
getBtnStyle,
|
|
65
|
+
getAttr
|
|
66
|
+
} = useFormat(state, attr);
|
|
65
67
|
const {
|
|
66
68
|
imgs2imgArr,
|
|
67
69
|
parseDurationValue,
|
|
@@ -104,7 +106,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
104
106
|
keyDown,
|
|
105
107
|
scroll
|
|
106
108
|
} = useEvent(props, state, emit, xGrid, anchorEvent);
|
|
107
|
-
const attr = useAttrs();
|
|
108
109
|
const currentCheckedKeys = computed(() => {
|
|
109
110
|
var _a;
|
|
110
111
|
return ((_a = state.checkedRows) == null ? void 0 : _a.map((row) => row[props.primaryKey])) || [];
|
|
@@ -2334,20 +2335,20 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2334
2335
|
"cell-class-name": _ctx.columnConfig.cellClassName || null,
|
|
2335
2336
|
"row-config": {
|
|
2336
2337
|
...state.rowConfig,
|
|
2337
|
-
...
|
|
2338
|
+
...unref(getAttr)("row-config")
|
|
2338
2339
|
},
|
|
2339
2340
|
"show-footer": _ctx.showFooter && !props.isInlineOperating,
|
|
2340
2341
|
"footer-method": footerMethod,
|
|
2341
2342
|
"sort-config": {
|
|
2342
2343
|
trigger: "cell",
|
|
2343
2344
|
remote: true,
|
|
2344
|
-
...
|
|
2345
|
+
...unref(getAttr)("sort-config")
|
|
2345
2346
|
},
|
|
2346
2347
|
"span-method": colspanMethod,
|
|
2347
2348
|
"footer-span-method": footerRowspanMethod,
|
|
2348
2349
|
"tooltip-config": {
|
|
2349
2350
|
enterable: false,
|
|
2350
|
-
...
|
|
2351
|
+
...unref(getAttr)("tooltip-config")
|
|
2351
2352
|
},
|
|
2352
2353
|
"checkbox-config": {
|
|
2353
2354
|
checkField: "checked",
|
|
@@ -2357,18 +2358,18 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2357
2358
|
trigger: "cell",
|
|
2358
2359
|
reserve: true,
|
|
2359
2360
|
highlight: true,
|
|
2360
|
-
...
|
|
2361
|
+
...unref(getAttr)("checkbox-config")
|
|
2361
2362
|
},
|
|
2362
2363
|
"radio-config": {
|
|
2363
2364
|
checkField: "checked",
|
|
2364
2365
|
trigger: "cell",
|
|
2365
2366
|
reserve: true,
|
|
2366
2367
|
highlight: true,
|
|
2367
|
-
...
|
|
2368
|
+
...unref(getAttr)("radio-config")
|
|
2368
2369
|
},
|
|
2369
2370
|
"scroll-y": {
|
|
2370
2371
|
gt: 50,
|
|
2371
|
-
...
|
|
2372
|
+
...unref(getAttr)("scroll-y")
|
|
2372
2373
|
},
|
|
2373
2374
|
"row-style": unref(getRowStyle),
|
|
2374
2375
|
"edit-config": state.editConfig,
|
|
@@ -2379,7 +2380,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2379
2380
|
toggleMethod: unref(toggleExpandMethod),
|
|
2380
2381
|
iconOpen: "iconfont icon-a-xitongtubiaozhediejian",
|
|
2381
2382
|
iconClose: "iconfont icon-a-xitongtubiaotianjia",
|
|
2382
|
-
...
|
|
2383
|
+
...unref(getAttr)("expand-config")
|
|
2383
2384
|
},
|
|
2384
2385
|
"keyboard-config": _ctx.columnConfig.keyboardConfig || {},
|
|
2385
2386
|
"edit-rules": _ctx.columnConfig.editRules || {},
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { AnyObject } from '../../../../../es/shared/types';
|
|
2
|
+
export declare const useFormat: (state: any, attr: AnyObject) => {
|
|
2
3
|
formatData: (data?: {
|
|
3
4
|
tableList: any[];
|
|
4
5
|
fieldList: any[];
|
|
@@ -25,4 +26,5 @@ export declare const useFormat: (state: any) => {
|
|
|
25
26
|
'border-color': any;
|
|
26
27
|
color?: undefined;
|
|
27
28
|
};
|
|
29
|
+
getAttr: (field: string) => any;
|
|
28
30
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils';
|
|
2
2
|
import 'moment';
|
|
3
3
|
|
|
4
|
-
const useFormat = (state) => {
|
|
4
|
+
const useFormat = (state, attr) => {
|
|
5
5
|
const formatData = (data = {
|
|
6
6
|
tableList: [],
|
|
7
7
|
fieldList: [],
|
|
@@ -482,10 +482,19 @@ const useFormat = (state) => {
|
|
|
482
482
|
"border-color": v.color
|
|
483
483
|
};
|
|
484
484
|
};
|
|
485
|
+
function getAttr(field) {
|
|
486
|
+
if (attr[field])
|
|
487
|
+
return attr[field];
|
|
488
|
+
const newField = field.replace(/-(\w)/g, ($0, $1) => {
|
|
489
|
+
return $1.toUpperCase();
|
|
490
|
+
});
|
|
491
|
+
return attr[newField] || {};
|
|
492
|
+
}
|
|
485
493
|
return {
|
|
486
494
|
formatData,
|
|
487
495
|
htmlToText,
|
|
488
|
-
getBtnStyle
|
|
496
|
+
getBtnStyle,
|
|
497
|
+
getAttr
|
|
489
498
|
};
|
|
490
499
|
};
|
|
491
500
|
|
|
@@ -383,7 +383,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
383
383
|
key: string;
|
|
384
384
|
render: () => import("vue").VNodeChild;
|
|
385
385
|
}[]>;
|
|
386
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
386
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
387
387
|
readonly label: StringConstructor;
|
|
388
388
|
readonly labelWidth: import("vue").PropType<string | number>;
|
|
389
389
|
readonly labelStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
@@ -387,7 +387,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
387
387
|
key: string;
|
|
388
388
|
render: () => import("vue").VNodeChild;
|
|
389
389
|
}[]>;
|
|
390
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
390
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
391
391
|
readonly label: StringConstructor;
|
|
392
392
|
readonly labelWidth: import("vue").PropType<string | number>;
|
|
393
393
|
readonly labelStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
@@ -210,7 +210,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
210
210
|
key: string;
|
|
211
211
|
render: () => import("vue").VNodeChild;
|
|
212
212
|
}[]>;
|
|
213
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
213
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
214
214
|
readonly label: StringConstructor;
|
|
215
215
|
readonly labelWidth: import("vue").PropType<string | number>;
|
|
216
216
|
readonly labelStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
@@ -205,7 +205,7 @@ declare const DragLayout: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
205
205
|
} | null>;
|
|
206
206
|
validate: import("naive-ui/es/form/src/interface").FormItemValidate;
|
|
207
207
|
restoreValidation: () => void;
|
|
208
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
208
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
209
209
|
readonly label: StringConstructor;
|
|
210
210
|
readonly labelWidth: import("vue").PropType<string | number>;
|
|
211
211
|
readonly labelStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
@@ -205,7 +205,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
205
205
|
} | null>;
|
|
206
206
|
validate: import("naive-ui/es/form/src/interface").FormItemValidate;
|
|
207
207
|
restoreValidation: () => void;
|
|
208
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
208
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
209
209
|
readonly label: StringConstructor;
|
|
210
210
|
readonly labelWidth: import("vue").PropType<string | number>;
|
|
211
211
|
readonly labelStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, createVNode, Teleport, withDirectives, vShow } from 'vue';
|
|
1
|
+
import { defineComponent, ref, watch, createVNode, Teleport, withDirectives, vShow } from 'vue';
|
|
2
2
|
import { NSpace, NInputNumber } from 'naive-ui';
|
|
3
3
|
import useStyle from './useStyle2.js';
|
|
4
4
|
import { onClickOutside } from '@vueuse/core';
|
|
@@ -31,9 +31,11 @@ var PopupMenu = defineComponent({
|
|
|
31
31
|
slots,
|
|
32
32
|
emit
|
|
33
33
|
}) {
|
|
34
|
+
let setNoShow = false;
|
|
34
35
|
const popupRef = ref(null);
|
|
35
36
|
onClickOutside(popupRef, (event) => {
|
|
36
|
-
emit("update:show", false);
|
|
37
|
+
!setNoShow && emit("update:show", false);
|
|
38
|
+
setNoShow = false;
|
|
37
39
|
});
|
|
38
40
|
const {
|
|
39
41
|
left
|
|
@@ -81,6 +83,11 @@ var PopupMenu = defineComponent({
|
|
|
81
83
|
});
|
|
82
84
|
}
|
|
83
85
|
}
|
|
86
|
+
watch(() => props.show, (value) => {
|
|
87
|
+
if (value) {
|
|
88
|
+
setNoShow = true;
|
|
89
|
+
}
|
|
90
|
+
});
|
|
84
91
|
return () => {
|
|
85
92
|
return createVNode(Teleport, {
|
|
86
93
|
"to": ".c-fabric-chart"
|