cnhis-design-vue 3.1.38-beta.5 → 3.1.38-beta.7
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/src/BigTable.vue2.js +4 -3
- 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/button-print/src/utils/print.js +16 -1
- package/es/components/fabric-chart/src/utils/index.d.ts +6823 -0
- package/es/components/form-config/index.d.ts +1 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +1 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +1 -0
- package/es/components/form-render/src/components/renderer/checkbox.js +83 -24
- package/es/components/form-render/src/components/renderer/combination.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/combination.js +9 -5
- package/es/components/form-render/src/components/renderer/formItem.d.ts +11 -3
- package/es/components/form-render/src/components/renderer/formItem.js +28 -20
- package/es/components/form-render/src/hooks/useComplexOptions.d.ts +8 -0
- package/es/components/form-render/src/hooks/useComplexOptions.js +137 -0
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +2 -2
- package/es/components/form-render/src/hooks/useFormField.d.ts +3 -2
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +4 -6
- package/es/components/form-render/src/types/fieldItem.d.ts +4 -3
- package/es/components/form-render/src/utils/schema.d.ts +1 -60
- package/es/components/form-render/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/scale-view/style/index.css +1 -1
- package/es/components/shortcut-setter/index.d.ts +1 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -0
- 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/index.d.ts +1 -0
- package/es/shared/utils/index.js +6 -1
- 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
|
+
```
|
|
@@ -36,6 +36,7 @@ const _hoisted_5 = {
|
|
|
36
36
|
class: "refresh-row"
|
|
37
37
|
};
|
|
38
38
|
const _hoisted_6 = {
|
|
39
|
+
key: 1,
|
|
39
40
|
class: "big-table-total"
|
|
40
41
|
};
|
|
41
42
|
const _hoisted_7 = {
|
|
@@ -2325,7 +2326,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2325
2326
|
handleFilterClearAll
|
|
2326
2327
|
});
|
|
2327
2328
|
return (_ctx, _cache) => {
|
|
2328
|
-
var _a;
|
|
2329
|
+
var _a, _b;
|
|
2329
2330
|
return openBlock(), createElementBlock(Fragment, null, [state.anchorList.length ? (openBlock(), createBlock(unref(NTabs), {
|
|
2330
2331
|
key: 0,
|
|
2331
2332
|
type: "line",
|
|
@@ -2479,7 +2480,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2479
2480
|
}, [createVNode(unref(NIcon), {
|
|
2480
2481
|
size: "14",
|
|
2481
2482
|
component: unref(SyncOutline)
|
|
2482
|
-
}, null, 8, ["component"]), createElementVNode("p", _hoisted_5, toDisplayString(_ctx.refreshRow) + "\u6761\u66F4\u65B0", 1)], 512), [[vShow, props.refreshRow > 0 && !props.isNestTable]])], 6),
|
|
2483
|
+
}, null, 8, ["component"]), createElementVNode("p", _hoisted_5, toDisplayString(_ctx.refreshRow) + "\u6761\u66F4\u65B0", 1)], 512), [[vShow, props.refreshRow > 0 && !props.isNestTable]])], 6), ((_b = props.totalList) == null ? void 0 : _b.length) ? (openBlock(), createElementBlock("div", _hoisted_6, [(openBlock(true), createElementBlock(Fragment, null, renderList(props.totalList, (item, index) => {
|
|
2483
2484
|
return openBlock(), createElementBlock("div", {
|
|
2484
2485
|
class: "big-table-total-item",
|
|
2485
2486
|
key: index
|
|
@@ -2489,7 +2490,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2489
2490
|
key: i
|
|
2490
2491
|
}, [createTextVNode(toDisplayString(price.name) + ": ", 1), createElementVNode("span", null, toDisplayString(price.value), 1)]);
|
|
2491
2492
|
}), 128))])]);
|
|
2492
|
-
}), 128))])], 64);
|
|
2493
|
+
}), 128))])) : createCommentVNode("v-if", true)], 64);
|
|
2493
2494
|
};
|
|
2494
2495
|
}
|
|
2495
2496
|
});
|
|
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,4 +1,5 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
|
+
import { isArray } from 'lodash-es';
|
|
2
3
|
import { IdentityVerificationDialog, PreviewDialog } from './dialog.js';
|
|
3
4
|
import { isIReport, useBrowserPrint } from './browserPrint.js';
|
|
4
5
|
import { getCurrentInstance } from 'vue';
|
|
@@ -317,7 +318,21 @@ class Print {
|
|
|
317
318
|
onReject(null);
|
|
318
319
|
if (isIReport(params.formatId))
|
|
319
320
|
return onResolve(res);
|
|
320
|
-
|
|
321
|
+
const _this = this;
|
|
322
|
+
const result = await getFiledir(res.filedir);
|
|
323
|
+
onResolve(result);
|
|
324
|
+
async function getFiledir(filedir) {
|
|
325
|
+
const _result = [];
|
|
326
|
+
const result2 = JSON.parse(filedir);
|
|
327
|
+
if (!isArray(result2))
|
|
328
|
+
return await _this._downloadPDF("");
|
|
329
|
+
if (result2.length === 1)
|
|
330
|
+
return await _this._downloadPDF(result2[0] || "");
|
|
331
|
+
for (let i = 0, len = result2.length; i < len; i++) {
|
|
332
|
+
_result.push(await _this._downloadPDF(result2[i] || ""));
|
|
333
|
+
}
|
|
334
|
+
return _result;
|
|
335
|
+
}
|
|
321
336
|
},
|
|
322
337
|
(err) => onReject(err),
|
|
323
338
|
"downloadPDF"
|