cnhis-design-vue 3.1.33-beta.0 → 3.1.33-beta.10
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 +1 -1
- package/es/components/big-table/src/BigTable.vue.d.ts +1 -1
- package/es/components/big-table/src/BigTable.vue2.js +8 -8
- package/es/components/big-table/src/components/edit-form/edit-time.js +7 -4
- package/es/components/fabric-chart/index.d.ts +389 -181
- package/es/components/fabric-chart/src/BirthProcessChart.vue.d.ts +181 -0
- package/es/components/fabric-chart/src/BirthProcessChart.vue.js +171 -0
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +390 -182
- package/es/components/fabric-chart/src/FabricChart.vue.js +21 -327
- package/es/components/fabric-chart/src/TemperatureChart.vue.d.ts +214 -0
- package/es/components/fabric-chart/src/TemperatureChart.vue.js +358 -0
- package/es/components/fabric-chart/src/components/PopupMenu.js +2 -2
- package/es/components/fabric-chart/src/components/PopupTip.vue.d.ts +3 -2
- package/es/components/fabric-chart/src/hooks/index.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/index.js +2 -1
- package/es/components/fabric-chart/src/hooks/useBirthProcess.d.ts +26 -0
- package/es/components/fabric-chart/src/hooks/useBirthProcess.js +419 -0
- package/es/components/fabric-chart/src/hooks/useCenter.d.ts +0 -2
- package/es/components/fabric-chart/src/hooks/useCenter.js +4 -37
- package/es/components/fabric-chart/src/hooks/useCommon.d.ts +5 -0
- package/es/components/fabric-chart/src/hooks/useCommon.js +16 -0
- package/es/components/fabric-chart/src/hooks/useCumputedPoint.d.ts +9 -2
- package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +34 -1
- package/es/components/fabric-chart/src/hooks/useGrid.d.ts +2 -2
- package/es/components/fabric-chart/src/hooks/useGrid.js +28 -18
- package/es/components/fabric-chart/src/hooks/useLeft.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/useLeft.js +3 -1
- package/es/components/fabric-chart/src/interface.d.ts +24 -6
- package/es/components/fabric-chart/src/interface.js +0 -3
- package/es/components/fabric-chart/src/utils/utils.d.ts +11 -0
- package/es/components/fabric-chart/src/utils/utils.js +27 -0
- package/es/components/form-render/src/FormRender.vue.js +1 -0
- package/es/components/form-render/src/FormRenderWrapper.vue.js +5 -1
- package/es/components/form-render/src/components/renderer/radio.js +10 -3
- package/es/components/form-render/src/hooks/useBusinessBinding.js +0 -6
- package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +2 -4
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +14 -8
- package/es/components/form-render/src/types/index.d.ts +2 -1
- package/es/components/iho-table/index.d.ts +1 -0
- package/es/components/iho-table/index.js +1 -1
- package/es/components/iho-table/src/IhoTable.vue.d.ts +1 -0
- package/es/components/iho-table/src/IhoTable.vue.js +7 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +1 -0
- package/es/components/iho-table/src/hooks/tapHooks/index.js +3 -1
- package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.d.ts +11 -0
- package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.js +26 -0
- package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -2
- package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.d.ts +2 -1
- package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.js +17 -12
- package/es/components/iho-table/src/plugins/filterPlugin/index.js +16 -5
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +8 -22
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +9 -22
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +11 -24
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +8 -16
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +10 -16
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js +10 -23
- package/es/components/iho-table/src/types/index.d.ts +6 -1
- package/es/components/iho-table/src/types/index.js +1 -1
- package/es/components/iho-table/src/types/pluginType.d.ts +4 -0
- package/es/components/iho-table/src/types/pluginType.js +3 -1
- package/es/components/iho-table/src/utils/index.d.ts +10 -0
- package/es/components/iho-table/src/utils/index.js +34 -7
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +2 -0
- package/es/components/info-header/src/InfoHeader.vue.d.ts +2 -0
- package/es/components/info-header/src/InfoHeader.vue.js +72 -56
- package/es/components/info-header/style/index.css +1 -1
- package/es/components/shortcut-provider/src/utils/index.d.ts +0 -1
- package/es/components/shortcut-provider/src/utils/index.js +26 -3
- package/es/components/shortcut-setter/src/ShortcutSetterItem.vue.js +3 -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/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/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- 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
|
+
```
|
|
@@ -123,7 +123,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
123
123
|
var _a;
|
|
124
124
|
let {
|
|
125
125
|
noSetting
|
|
126
|
-
} = getOtherConfigInit()
|
|
126
|
+
} = getOtherConfigInit();
|
|
127
127
|
return noSetting || ((_a = props.showSettings) == null ? void 0 : _a.hideSettingBtn);
|
|
128
128
|
});
|
|
129
129
|
const isScanMultiTable = computed(() => {
|
|
@@ -314,7 +314,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
314
314
|
var _a, _b, _c;
|
|
315
315
|
let {
|
|
316
316
|
selectType
|
|
317
|
-
} = getOtherConfigInit()
|
|
317
|
+
} = getOtherConfigInit();
|
|
318
318
|
let {
|
|
319
319
|
isBatchSelect,
|
|
320
320
|
fieldList = [],
|
|
@@ -323,7 +323,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
323
323
|
isEdit = false,
|
|
324
324
|
editConfig = {},
|
|
325
325
|
rowConfig = {},
|
|
326
|
-
showSeq = true
|
|
326
|
+
showSeq = true,
|
|
327
|
+
seqWidth = 34
|
|
327
328
|
} = map;
|
|
328
329
|
if (isEdit) {
|
|
329
330
|
Object.assign(state.editConfig, editConfig);
|
|
@@ -373,7 +374,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
373
374
|
align: "center",
|
|
374
375
|
visible: showSeq,
|
|
375
376
|
resizable: true,
|
|
376
|
-
width:
|
|
377
|
+
width: seqWidth,
|
|
377
378
|
showOverflow: true,
|
|
378
379
|
slots: {
|
|
379
380
|
header: () => {
|
|
@@ -988,11 +989,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
988
989
|
}
|
|
989
990
|
}
|
|
990
991
|
};
|
|
991
|
-
|
|
992
|
+
function getOtherConfigInit() {
|
|
992
993
|
let tableOptions = (attr == null ? void 0 : attr.tableOptions) || props.tableOptions || {};
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
};
|
|
994
|
+
return (tableOptions == null ? void 0 : tableOptions.config) || {};
|
|
995
|
+
}
|
|
996
996
|
const refreshTable = () => {
|
|
997
997
|
state.hasRefresh = false;
|
|
998
998
|
emit("refreshTable");
|
|
@@ -38,6 +38,7 @@ var EditTime = defineComponent({
|
|
|
38
38
|
} = useCommon(props, attrs);
|
|
39
39
|
const __value = ref(attrs.formattedValue);
|
|
40
40
|
const onConfirm = (value) => {
|
|
41
|
+
__value.value = value;
|
|
41
42
|
emit("formChange", {
|
|
42
43
|
value,
|
|
43
44
|
row: props.row,
|
|
@@ -58,7 +59,7 @@ var EditTime = defineComponent({
|
|
|
58
59
|
const strInsert = (str2, length) => {
|
|
59
60
|
const reg = new RegExp("\\w{1," + length + "}", "g");
|
|
60
61
|
const ma = str2.match(reg);
|
|
61
|
-
return ma.join(":");
|
|
62
|
+
return ma == null ? void 0 : ma.join(":");
|
|
62
63
|
};
|
|
63
64
|
const result = valueFormat.includes(":") ? strInsert(str, 2) : str;
|
|
64
65
|
return result;
|
|
@@ -79,12 +80,14 @@ var EditTime = defineComponent({
|
|
|
79
80
|
}
|
|
80
81
|
return false;
|
|
81
82
|
};
|
|
83
|
+
const isTime = (curTime) => {
|
|
84
|
+
const arr = curTime.split(":");
|
|
85
|
+
return +arr[0] * 60 * 60 + +arr[1] * 60 + (arr[3] ? +arr[3] : 0) < 24 * 60 * 60;
|
|
86
|
+
};
|
|
82
87
|
if (!isValid(time)) {
|
|
83
88
|
if (!isNaN(time) && (/^\d{4}$/.test(time) || /^\d{6}$/.test(time))) {
|
|
84
89
|
const curTime = getFormatTime(time);
|
|
85
|
-
|
|
86
|
-
time = curTime;
|
|
87
|
-
}
|
|
90
|
+
time = isValid(curTime) && isTime(curTime) ? curTime : "";
|
|
88
91
|
} else {
|
|
89
92
|
time = "";
|
|
90
93
|
}
|