cnhis-design-vue 3.1.23-beta.4 → 3.1.23-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/fabric-chart/src/components/PopupMenu.js +7 -2
- package/es/components/fabric-chart/src/hooks/useCenter2.js +0 -1
- package/es/components/form-config/index.d.ts +0 -6
- package/es/components/form-config/src/FormConfig.vue.d.ts +0 -6
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +0 -6
- package/es/components/form-render/src/components/renderer/search.d.ts +1 -13
- package/es/components/form-render/src/components/renderer/searchCascader.d.ts +0 -12
- package/es/components/form-render/src/types/fieldItem.d.ts +0 -6
- package/es/components/iho-table/index.d.ts +270 -100
- package/es/components/iho-table/src/IhoTable.vue.d.ts +270 -100
- package/es/components/search-cascader/index.d.ts +0 -10
- package/es/components/search-cascader/src/SearchCascader.js +4 -11
- package/es/components/search-cascader/src/SearchCascader.vue.d.ts +3 -14
- package/es/components/shortcut-setter/index.d.ts +0 -6
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +0 -6
- package/package.json +2 -2
- package/es/components/big-table/src/components/edit-form/useCommon.d.ts +0 -4
- 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
|
+
```
|
|
@@ -87,6 +87,11 @@ var PopupMenu = defineComponent({
|
|
|
87
87
|
watch(() => props.show, (value) => {
|
|
88
88
|
if (value) {
|
|
89
89
|
setNoShow = true;
|
|
90
|
+
props.list.forEach((item) => {
|
|
91
|
+
if (typeof item === "object" && Reflect.has(item, "value")) {
|
|
92
|
+
item.value = void 0;
|
|
93
|
+
}
|
|
94
|
+
});
|
|
90
95
|
}
|
|
91
96
|
});
|
|
92
97
|
return () => {
|
|
@@ -98,12 +103,12 @@ var PopupMenu = defineComponent({
|
|
|
98
103
|
"class": "c-fabric-chart-popup-menu",
|
|
99
104
|
"style": pointStyle.value
|
|
100
105
|
}, [props.list.map((item) => {
|
|
101
|
-
return createVNode("li", {
|
|
106
|
+
return props.show ? createVNode("li", {
|
|
102
107
|
"class": {
|
|
103
108
|
"no-click": setNoClick(item)
|
|
104
109
|
},
|
|
105
110
|
"onClick": (event) => clickItem(event, item)
|
|
106
|
-
}, [getItemContent(item)]);
|
|
111
|
+
}, [getItemContent(item)]) : null;
|
|
107
112
|
})]), [[vShow, props.show]])]
|
|
108
113
|
});
|
|
109
114
|
};
|
|
@@ -138,7 +138,6 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
138
138
|
if (event2.button === 3) {
|
|
139
139
|
const { x = 0, y = 0 } = event2.pointer || {};
|
|
140
140
|
if (x >= originX && x <= endX && y >= originY && y <= endY) {
|
|
141
|
-
pointTipProps.show = false;
|
|
142
141
|
pointMenuProps.point = { x, y };
|
|
143
142
|
pointMenuProps.show = true;
|
|
144
143
|
const { type } = ((_a = event2.target) == null ? void 0 : _a.origin) || {};
|
|
@@ -940,12 +940,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
940
940
|
search_key?: string[] | undefined;
|
|
941
941
|
type?: string | undefined;
|
|
942
942
|
value_key?: string | undefined;
|
|
943
|
-
level_key?: string | undefined;
|
|
944
|
-
link_key?: string | undefined;
|
|
945
|
-
link_key_split?: string | undefined;
|
|
946
|
-
show_key?: string | undefined;
|
|
947
|
-
conObj?: import("../../../es/shared/types").AnyObject[] | undefined;
|
|
948
|
-
conObjFirstLevel?: import("../../../es/shared/types").AnyObject[] | undefined;
|
|
949
943
|
} | undefined;
|
|
950
944
|
open?: {
|
|
951
945
|
value?: any;
|
|
@@ -942,12 +942,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
942
942
|
search_key?: string[] | undefined;
|
|
943
943
|
type?: string | undefined;
|
|
944
944
|
value_key?: string | undefined;
|
|
945
|
-
level_key?: string | undefined;
|
|
946
|
-
link_key?: string | undefined;
|
|
947
|
-
link_key_split?: string | undefined;
|
|
948
|
-
show_key?: string | undefined;
|
|
949
|
-
conObj?: import("../../../../es/shared/types").AnyObject[] | undefined;
|
|
950
|
-
conObjFirstLevel?: import("../../../../es/shared/types").AnyObject[] | undefined;
|
|
951
945
|
} | undefined;
|
|
952
946
|
open?: {
|
|
953
947
|
value?: any;
|
|
@@ -69,12 +69,6 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
69
69
|
search_key?: string[] | undefined;
|
|
70
70
|
type?: string | undefined;
|
|
71
71
|
value_key?: string | undefined;
|
|
72
|
-
level_key?: string | undefined;
|
|
73
|
-
link_key?: string | undefined;
|
|
74
|
-
link_key_split?: string | undefined;
|
|
75
|
-
show_key?: string | undefined;
|
|
76
|
-
conObj?: import("../../../../../es/shared/types").AnyObject[] | undefined;
|
|
77
|
-
conObjFirstLevel?: import("../../../../../es/shared/types").AnyObject[] | undefined;
|
|
78
72
|
} | undefined;
|
|
79
73
|
open?: {
|
|
80
74
|
value?: any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Func } from '../../../../../../es/shared/types';
|
|
2
2
|
import { PropType } from 'vue';
|
|
3
3
|
export declare const SEARCH: import("vue").DefineComponent<{
|
|
4
4
|
value: {
|
|
@@ -21,12 +21,6 @@ export declare const SEARCH: import("vue").DefineComponent<{
|
|
|
21
21
|
search_key: string[];
|
|
22
22
|
type: string;
|
|
23
23
|
value_key: string;
|
|
24
|
-
level_key: string;
|
|
25
|
-
link_key: string;
|
|
26
|
-
link_key_split: string;
|
|
27
|
-
show_key: string;
|
|
28
|
-
conObj: AnyObject[];
|
|
29
|
-
conObjFirstLevel: AnyObject[];
|
|
30
24
|
}>>;
|
|
31
25
|
required: true;
|
|
32
26
|
};
|
|
@@ -55,12 +49,6 @@ export declare const SEARCH: import("vue").DefineComponent<{
|
|
|
55
49
|
search_key: string[];
|
|
56
50
|
type: string;
|
|
57
51
|
value_key: string;
|
|
58
|
-
level_key: string;
|
|
59
|
-
link_key: string;
|
|
60
|
-
link_key_split: string;
|
|
61
|
-
show_key: string;
|
|
62
|
-
conObj: AnyObject[];
|
|
63
|
-
conObjFirstLevel: AnyObject[];
|
|
64
52
|
}>>;
|
|
65
53
|
required: true;
|
|
66
54
|
};
|
|
@@ -17,12 +17,6 @@ export declare const SEARCH_CASCADE: import("vue").DefineComponent<{
|
|
|
17
17
|
search_key: string[];
|
|
18
18
|
type: string;
|
|
19
19
|
value_key: string;
|
|
20
|
-
level_key: string;
|
|
21
|
-
link_key: string;
|
|
22
|
-
link_key_split: string;
|
|
23
|
-
show_key: string;
|
|
24
|
-
conObj: AnyObject[];
|
|
25
|
-
conObjFirstLevel: AnyObject[];
|
|
26
20
|
}>>;
|
|
27
21
|
required: true;
|
|
28
22
|
};
|
|
@@ -45,12 +39,6 @@ export declare const SEARCH_CASCADE: import("vue").DefineComponent<{
|
|
|
45
39
|
search_key: string[];
|
|
46
40
|
type: string;
|
|
47
41
|
value_key: string;
|
|
48
|
-
level_key: string;
|
|
49
|
-
link_key: string;
|
|
50
|
-
link_key_split: string;
|
|
51
|
-
show_key: string;
|
|
52
|
-
conObj: AnyObject[];
|
|
53
|
-
conObjFirstLevel: AnyObject[];
|
|
54
42
|
}>>;
|
|
55
43
|
required: true;
|
|
56
44
|
};
|
|
@@ -74,12 +74,6 @@ export declare type FormWordbook = Partial<{
|
|
|
74
74
|
search_key: string[];
|
|
75
75
|
type: string;
|
|
76
76
|
value_key: string;
|
|
77
|
-
level_key: string;
|
|
78
|
-
link_key: string;
|
|
79
|
-
link_key_split: string;
|
|
80
|
-
show_key: string;
|
|
81
|
-
conObj: AnyObject[];
|
|
82
|
-
conObjFirstLevel: AnyObject[];
|
|
83
77
|
}>;
|
|
84
78
|
export declare type FieldItem = {
|
|
85
79
|
/**
|