cnhis-design-vue 3.1.22-beta.1 → 3.1.22-beta.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +123 -123
- package/es/components/big-table/index.d.ts +0 -8
- package/es/components/big-table/index2.js +0 -2
- package/es/components/big-table/src/BigTable.vue.d.ts +0 -8
- package/es/components/big-table/src/components/edit-form/useCommon.d.ts +4 -0
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/fabric-chart/src/utils/index.d.ts +6823 -0
- package/es/components/form-render/src/components/renderer/combination.d.ts +7 -0
- package/es/components/form-render/src/components/renderer/combination.js +4 -1
- package/es/components/grid/index2.js +0 -2
- package/es/components/iho-table/index.d.ts +4011 -11
- package/es/components/iho-table/index2.js +1 -0
- package/es/components/iho-table/src/IhoTable.js +13 -5
- package/es/components/iho-table/src/IhoTable.vue.d.ts +4011 -11
- package/es/components/iho-table/src/constants/index.d.ts +5 -0
- package/es/components/iho-table/src/constants/index.js +1 -1
- package/es/components/iho-table/src/constants/index2.js +66 -1
- package/es/components/iho-table/src/hooks/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +2 -0
- package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index2.js +34 -3
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +14 -0
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks2.js +39 -1
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +61 -60
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks2.js +3 -1
- package/es/components/iho-table/src/plugins/defaultConfigPlugin/index2.js +1 -1
- package/es/components/iho-table/src/plugins/index.js +7 -5
- package/es/components/iho-table/src/plugins/index2.js +7 -5
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index2.js +2 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/index.d.ts +2 -5
- package/es/components/iho-table/src/plugins/rendererPlugins/index.js +7 -5
- package/es/components/iho-table/src/plugins/rendererPlugins/inputs/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/inputs/index.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/inputs/inputRendererPlugins.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/inputs/inputRendererPlugins.js +44 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/{checkRendererPlugin.d.ts → widgets/checkRendererPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/{checkRendererPlugin.js → widgets/checkRendererPlugin.js} +2 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/{colorRendererPlugin.d.ts → widgets/colorRendererPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/{colorRendererPlugin.js → widgets/colorRendererPlugin.js} +6 -8
- package/es/components/iho-table/src/plugins/rendererPlugins/{defaultRendererPlugin.d.ts → widgets/defaultRendererPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/{defaultRendererPlugin.js → widgets/defaultRendererPlugin.js} +4 -4
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/index.d.ts +6 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/index.js +6 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/{labelRendererPlugin.d.ts → widgets/labelRendererPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/{labelRendererPlugin.js → widgets/labelRendererPlugin.js} +3 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.d.ts +2 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +89 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/{seqRendererPlugin.d.ts → widgets/seqRendererPlugin.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/{seqRendererPlugin.js → widgets/seqRendererPlugin.js} +3 -3
- package/es/components/iho-table/src/types/index.d.ts +7 -0
- package/es/components/iho-table/src/types/pluginType.d.ts +14 -0
- package/es/components/iho-table/src/utils/index.d.ts +1 -0
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/iho-table/src/utils/index2.js +12 -1
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +4 -4
- package/es/shared/utils/loadVxe.d.ts +0 -2
- package/es/shared/utils/loadVxe.js +0 -1
- package/es/shared/utils/loadVxe2.js +0 -12
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
|
+
```
|
|
@@ -329,14 +329,6 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
329
329
|
showInsertStatus?: boolean | undefined;
|
|
330
330
|
showAsterisk?: boolean | undefined;
|
|
331
331
|
autoClear?: boolean | undefined;
|
|
332
|
-
beforeEditMethod?: ((params: {
|
|
333
|
-
row: any;
|
|
334
|
-
rowIndex: number;
|
|
335
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
336
|
-
columnIndex: number;
|
|
337
|
-
$table: import("vxe-table").VxeTableConstructor & import("vxe-table").VxeTablePrivateMethods;
|
|
338
|
-
$grid: import("vxe-table").VxeGridConstructor | null | undefined;
|
|
339
|
-
}) => boolean) | undefined;
|
|
340
332
|
activeMethod?: ((params: {
|
|
341
333
|
row: any;
|
|
342
334
|
rowIndex: number;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { COMPONENT_NAMESPACE } from '../../shared/global/variable2.js';
|
|
2
2
|
import { safeComponentRegister } from '../../shared/utils/index2.js';
|
|
3
|
-
import { loadVxeTable } from '../../shared/utils/loadVxe2.js';
|
|
4
3
|
import { expandXEUtils } from '../../shared/utils/utilExpand.js';
|
|
5
4
|
import '../index2.js';
|
|
6
5
|
import script from './src/BigTable.js';
|
|
@@ -12,7 +11,6 @@ const BigTable = script;
|
|
|
12
11
|
BigTable.install = function(app) {
|
|
13
12
|
safeComponentRegister(app, BigTable, COMPONENT_NAMESPACE + "BigTable");
|
|
14
13
|
safeComponentRegister(app, Grid, COMPONENT_NAMESPACE + "Grid");
|
|
15
|
-
loadVxeTable(app);
|
|
16
14
|
return expandXEUtils();
|
|
17
15
|
};
|
|
18
16
|
|
|
@@ -327,14 +327,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
327
327
|
showInsertStatus?: boolean | undefined;
|
|
328
328
|
showAsterisk?: boolean | undefined;
|
|
329
329
|
autoClear?: boolean | undefined;
|
|
330
|
-
beforeEditMethod?: ((params: {
|
|
331
|
-
row: any;
|
|
332
|
-
rowIndex: number;
|
|
333
|
-
column: import("vxe-table").VxeTableDefines.ColumnInfo;
|
|
334
|
-
columnIndex: number;
|
|
335
|
-
$table: import("vxe-table").VxeTableConstructor & import("vxe-table").VxeTablePrivateMethods;
|
|
336
|
-
$grid: import("vxe-table").VxeGridConstructor | null | undefined;
|
|
337
|
-
}) => boolean) | undefined;
|
|
338
330
|
activeMethod?: ((params: {
|
|
339
331
|
row: any;
|
|
340
332
|
rowIndex: number;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'bpmn-js/lib/Viewer';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'bpmn-js/lib/features/modeling';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'diagram-js/lib/navigation/movecanvas';
|