cnhis-design-vue 3.1.31-beta.8 → 3.1.31
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/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/FabricChart.vue.d.ts +4 -4
- package/es/components/fabric-chart/src/hooks/useCenter.js +5 -6
- package/es/components/fabric-chart/src/hooks/useGrid.js +3 -3
- package/es/components/fabric-chart/src/interface.d.ts +1 -1
- package/es/components/fabric-chart/src/utils/index.d.ts +6823 -0
- package/es/components/form-render/src/components/renderer/checkbox.js +3 -5
- package/es/components/form-render/src/components/renderer/index.js +2 -0
- package/es/components/form-render/src/components/renderer/recommendSelect.d.ts +131 -0
- package/es/components/form-render/src/components/renderer/recommendSelect.js +213 -0
- package/es/components/form-render/src/components/renderer/remoteSearch.js +0 -1
- package/es/components/form-render/src/components/renderer/select.js +0 -2
- package/es/components/form-render/src/hooks/useAsyncQueue.js +2 -1
- package/es/components/form-render/src/hooks/useAutographOptions.js +3 -5
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +7 -0
- package/es/components/form-render/src/hooks/useFormRequest.d.ts +8 -1
- package/es/components/form-render/src/hooks/useFormRequest.js +24 -1
- package/es/components/form-render/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/recommend-search/index.d.ts +586 -51
- package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +596 -59
- package/es/components/recommend-search/src/RecommendSearch.vue.js +36 -8
- package/es/components/recommend-search/src/components/BaseSearch.vue.d.ts +31 -16
- package/es/components/recommend-search/src/components/BaseSearch.vue.js +27 -23
- package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +136 -53
- package/es/components/recommend-search/src/components/RecommendInput.vue.js +66 -41
- package/es/components/recommend-search/src/components/RecommendMenu.vue.d.ts +14 -3
- package/es/components/recommend-search/src/components/RecommendMenu.vue.js +35 -25
- package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +300 -1
- package/es/components/recommend-search/src/components/RecommendSelect.vue.js +81 -51
- package/es/components/recommend-search/style/index.css +1 -1
- package/es/shared/assets/img/failure.js +1 -1
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/icon-asc.js +1 -1
- package/es/shared/assets/img/icon-desc.js +1 -1
- package/es/shared/assets/img/no-permission.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/video.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/video_hover.js +1 -1
- package/es/shared/assets/img/video_play_hover.js +1 -1
- package/es/shared/assets/img/xb_big.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
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
|
+
```
|
|
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';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
import { IData, IDate, IPointType } from './interface';
|
|
2
|
+
import { IData, IDate, IPointType, IPropItems } from './interface';
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
data: {
|
|
5
5
|
type: null;
|
|
@@ -111,7 +111,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
111
111
|
show: boolean;
|
|
112
112
|
point: import("./interface").ICoordinateValue;
|
|
113
113
|
list: string[];
|
|
114
|
-
propItems:
|
|
114
|
+
propItems: IPropItems;
|
|
115
115
|
};
|
|
116
116
|
pointStyle: import("vue").ComputedRef<{
|
|
117
117
|
top: string;
|
|
@@ -161,7 +161,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
161
161
|
type: PropType<import("./interface").ICoordinateValue>;
|
|
162
162
|
};
|
|
163
163
|
propItems: {
|
|
164
|
-
type: PropType<
|
|
164
|
+
type: PropType<IPropItems>;
|
|
165
165
|
};
|
|
166
166
|
target: {
|
|
167
167
|
type: PropType<any>;
|
|
@@ -179,7 +179,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
179
179
|
type: PropType<import("./interface").ICoordinateValue>;
|
|
180
180
|
};
|
|
181
181
|
propItems: {
|
|
182
|
-
type: PropType<
|
|
182
|
+
type: PropType<IPropItems>;
|
|
183
183
|
};
|
|
184
184
|
target: {
|
|
185
185
|
type: PropType<any>;
|
|
@@ -250,6 +250,7 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
250
250
|
});
|
|
251
251
|
}
|
|
252
252
|
function drawPolyLine(item, dataIndex, scaleValue) {
|
|
253
|
+
var _a;
|
|
253
254
|
const {
|
|
254
255
|
type,
|
|
255
256
|
riseStyle = {},
|
|
@@ -264,7 +265,7 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
264
265
|
const pointList = [];
|
|
265
266
|
const lineList = [];
|
|
266
267
|
const otherList = [];
|
|
267
|
-
item.list.forEach((v, index) => {
|
|
268
|
+
(_a = item.list) == null ? void 0 : _a.forEach((v, index) => {
|
|
268
269
|
const _item = type !== "temperature" ? item : dataList.find((_v) => _v.key === v.key);
|
|
269
270
|
const points = getPointer(v, scaleValue);
|
|
270
271
|
const otherObj = {};
|
|
@@ -311,7 +312,7 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
311
312
|
};
|
|
312
313
|
}
|
|
313
314
|
function drawOther(points, v, _item, otherObj) {
|
|
314
|
-
var
|
|
315
|
+
var _a2;
|
|
315
316
|
if (!(points == null ? void 0 : points.length) || !["temperature", "pain"].includes(type))
|
|
316
317
|
return;
|
|
317
318
|
const { lineAttr = {} } = _item;
|
|
@@ -355,7 +356,7 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
355
356
|
...reduceStyle.line,
|
|
356
357
|
...defaultStyle
|
|
357
358
|
});
|
|
358
|
-
reducePoint = drawPoint(((
|
|
359
|
+
reducePoint = drawPoint(((_a2 = reduceStyle == null ? void 0 : reduceStyle.point) == null ? void 0 : _a2.type) || "circle", {
|
|
359
360
|
left: points[0],
|
|
360
361
|
top: reduceY,
|
|
361
362
|
...reduceStyle.point,
|
|
@@ -658,9 +659,7 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
658
659
|
}
|
|
659
660
|
function redrawPoints() {
|
|
660
661
|
var _a;
|
|
661
|
-
|
|
662
|
-
return;
|
|
663
|
-
(_a = canvas.value) == null ? void 0 : _a.remove(...getRemovePoints([...gridPoints]));
|
|
662
|
+
gridPoints.size && ((_a = canvas.value) == null ? void 0 : _a.remove(...getRemovePoints([...gridPoints])));
|
|
664
663
|
shadowPointCache = [];
|
|
665
664
|
gridPoints.clear();
|
|
666
665
|
maiboPoints.clear();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { onMounted, nextTick } from 'vue';
|
|
2
2
|
import { fabric } from '../utils/index.js';
|
|
3
|
-
import { drawLine } from './useDraw.js';
|
|
3
|
+
import { drawLine, defaultBorderStyle } from './useDraw.js';
|
|
4
4
|
|
|
5
5
|
function useGrid(canvas, propItems) {
|
|
6
6
|
var _a, _b;
|
|
@@ -25,10 +25,10 @@ function useGrid(canvas, propItems) {
|
|
|
25
25
|
style = grid.subSecondLineStyle || {};
|
|
26
26
|
}
|
|
27
27
|
if (i % grid.subXCell === 0) {
|
|
28
|
-
style = ((_b = grid.mainLineStyle) == null ? void 0 : _b.y) || {};
|
|
28
|
+
style = i !== 0 && i !== gridXNumber ? ((_b = grid.mainLineStyle) == null ? void 0 : _b.y) || {} : defaultBorderStyle;
|
|
29
29
|
}
|
|
30
30
|
const line = drawLine([x, originY, x, endY], style);
|
|
31
|
-
if (i % grid.subXCell === 0) {
|
|
31
|
+
if (i % grid.subXCell === 0 && i !== 0 && i !== gridXNumber) {
|
|
32
32
|
mainList.add(line);
|
|
33
33
|
} else {
|
|
34
34
|
xList.push(line);
|