cnhis-design-vue 3.1.20 → 3.1.21-beta.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 +1 -1
- package/es/components/big-table/src/BigTable.vue.d.ts +1 -1
- package/es/components/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +1 -1
- 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/index.d.ts +1 -1
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +1 -1
- package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +1 -1
- package/es/components/drag-layout/index.d.ts +1 -1
- package/es/components/drag-layout/src/DragLayout.vue.d.ts +1 -1
- package/es/components/fabric-chart/src/FabricChart.js +4 -3
- package/es/components/fabric-chart/src/hooks/useLeft2.js +8 -5
- package/es/components/fabric-chart/src/hooks/useRight2.js +3 -3
- package/es/components/fabric-chart/src/hooks/useTop2.js +5 -3
- package/es/components/fabric-chart/src/utils/index.d.ts +6823 -0
- package/es/components/form-config/index.d.ts +2 -2
- package/es/components/form-config/src/FormConfig.vue.d.ts +2 -2
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +1 -1
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +1 -1
- package/es/components/form-render/index.d.ts +1 -1
- package/es/components/form-render/src/FormRender.vue.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/inputGroup.d.ts +1 -1
- package/es/components/form-render/src/hooks/useBusinessBinding.d.ts +1 -0
- package/es/components/form-render/src/hooks/useBusinessBinding2.js +12 -1
- package/es/components/form-table/index.d.ts +1 -1
- package/es/components/form-table/src/FormTable.vue.d.ts +1 -1
- package/es/components/form-table/src/components/index.d.ts +1 -1
- package/es/components/form-table/src/components/table-age.vue.d.ts +1 -1
- package/es/components/info-header/index.d.ts +1 -1
- package/es/components/info-header/src/InfoHeader.vue.d.ts +1 -1
- package/es/components/scale-view/index.d.ts +1 -1
- package/es/components/scale-view/src/ScaleView.vue.d.ts +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +2 -2
- package/es/components/select-label/index.d.ts +4 -4
- package/es/components/select-label/src/LabelFormContent.vue.d.ts +2 -2
- package/es/components/select-label/src/SelectLabel.vue.d.ts +2 -2
- package/es/components/select-person/index.d.ts +1 -1
- package/es/components/select-person/src/SelectPerson.vue.d.ts +1 -1
- package/es/components/shortcut-setter/index.d.ts +1 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -1
- package/es/components/time-line/index.d.ts +1 -1
- package/es/components/time-line/src/TimeLine.vue.d.ts +1 -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
|
+
```
|
|
@@ -883,7 +883,7 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
883
883
|
style: import("vue").Ref<string | import("vue").CSSProperties | undefined>;
|
|
884
884
|
class: import("vue").Ref<string | undefined>;
|
|
885
885
|
mergedClsPrefix: import("vue").Ref<string>;
|
|
886
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
886
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
887
887
|
readonly tab: import("vue").PropType<string | number | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
888
888
|
[key: string]: any;
|
|
889
889
|
}> | (() => import("vue").VNodeChild)>;
|
|
@@ -881,7 +881,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
881
881
|
style: import("vue").Ref<string | import("vue").CSSProperties | undefined>;
|
|
882
882
|
class: import("vue").Ref<string | undefined>;
|
|
883
883
|
mergedClsPrefix: import("vue").Ref<string>;
|
|
884
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
884
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
885
885
|
readonly tab: import("vue").PropType<string | number | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
886
886
|
[key: string]: any;
|
|
887
887
|
}> | (() => import("vue").VNodeChild)>;
|
|
@@ -1464,7 +1464,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1464
1464
|
checked: setChecked,
|
|
1465
1465
|
row,
|
|
1466
1466
|
index: $rowIndex,
|
|
1467
|
-
records:
|
|
1467
|
+
records: table.getCheckboxRecords()
|
|
1468
1468
|
});
|
|
1469
1469
|
setChecked && emit("handlerClickRow", row, $rowIndex);
|
|
1470
1470
|
};
|
|
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';
|
|
@@ -383,7 +383,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
383
383
|
key: string;
|
|
384
384
|
render: () => import("vue").VNodeChild;
|
|
385
385
|
}[]>;
|
|
386
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
386
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
387
387
|
readonly label: StringConstructor;
|
|
388
388
|
readonly labelWidth: import("vue").PropType<string | number>;
|
|
389
389
|
readonly labelStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
@@ -387,7 +387,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
387
387
|
key: string;
|
|
388
388
|
render: () => import("vue").VNodeChild;
|
|
389
389
|
}[]>;
|
|
390
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
390
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
391
391
|
readonly label: StringConstructor;
|
|
392
392
|
readonly labelWidth: import("vue").PropType<string | number>;
|
|
393
393
|
readonly labelStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
@@ -210,7 +210,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
210
210
|
key: string;
|
|
211
211
|
render: () => import("vue").VNodeChild;
|
|
212
212
|
}[]>;
|
|
213
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
213
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
214
214
|
readonly label: StringConstructor;
|
|
215
215
|
readonly labelWidth: import("vue").PropType<string | number>;
|
|
216
216
|
readonly labelStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
@@ -205,7 +205,7 @@ declare const DragLayout: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
205
205
|
} | null>;
|
|
206
206
|
validate: import("naive-ui/es/form/src/interface").FormItemValidate;
|
|
207
207
|
restoreValidation: () => void;
|
|
208
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
208
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
209
209
|
readonly label: StringConstructor;
|
|
210
210
|
readonly labelWidth: import("vue").PropType<string | number>;
|
|
211
211
|
readonly labelStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
@@ -205,7 +205,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
205
205
|
} | null>;
|
|
206
206
|
validate: import("naive-ui/es/form/src/interface").FormItemValidate;
|
|
207
207
|
restoreValidation: () => void;
|
|
208
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
208
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
209
209
|
readonly label: StringConstructor;
|
|
210
210
|
readonly labelWidth: import("vue").PropType<string | number>;
|
|
211
211
|
readonly labelStyle: import("vue").PropType<string | import("vue").CSSProperties>;
|
|
@@ -45,10 +45,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
45
45
|
return ((_a = top.operationDays) == null ? void 0 : _a.show) && (top.operationDays.height || defaultHeight) || 0;
|
|
46
46
|
});
|
|
47
47
|
const xScalevalueHeight = computed(() => {
|
|
48
|
-
var _a, _b;
|
|
48
|
+
var _a, _b, _c;
|
|
49
49
|
const { top } = props.data;
|
|
50
50
|
const height = ((_a = top.xScalevalue) == null ? void 0 : _a.show) && (top.xScalevalue.height || defaultHeight) || 0;
|
|
51
|
-
const dayHeight = ((_b = top.xScalevalue) == null ? void 0 : _b.show) ? top.dayHeight
|
|
51
|
+
const dayHeight = ((_b = top.xScalevalue) == null ? void 0 : _b.show) ? (_c = top.dayHeight) != null ? _c : 0 : 0;
|
|
52
52
|
return height + dayHeight;
|
|
53
53
|
});
|
|
54
54
|
const breathingHeight = computed(() => {
|
|
@@ -89,8 +89,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
89
89
|
return height - endHeight;
|
|
90
90
|
});
|
|
91
91
|
const originY = computed(() => {
|
|
92
|
+
var _a;
|
|
92
93
|
const { top } = props.data;
|
|
93
|
-
const dayHeight = top.xScalevalue.show && (top.dayHeight
|
|
94
|
+
const dayHeight = top.xScalevalue.show && ((_a = top.dayHeight) != null ? _a : 0) || 0;
|
|
94
95
|
const xScaleHeight = top.xScalevalue.show && (top.xScalevalue.height || defaultHeight) || 0;
|
|
95
96
|
const topHeight = dateHeight.value + dayHeight + xScaleHeight + hospitalDaysHeight.value + operationDaysHeight.value;
|
|
96
97
|
return topHeight;
|
|
@@ -281,14 +281,17 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, g
|
|
|
281
281
|
}
|
|
282
282
|
onMounted(() => {
|
|
283
283
|
nextTick(() => {
|
|
284
|
-
var _a;
|
|
284
|
+
var _a, _b;
|
|
285
285
|
iconsWidth && drawIcons();
|
|
286
|
-
const yScaleValueList = left.yScaleValue.filter((v) => v.layout === "left" && v.type !== "pain");
|
|
287
|
-
if ((right == null ? void 0 : right.width) && ((_a = right == null ? void 0 : right.yScaleValue) == null ? void 0 : _a.layout) === "left") {
|
|
286
|
+
const yScaleValueList = left.yScaleValue.filter((v) => v.layout === "left" && v.type !== "pain" && v.show);
|
|
287
|
+
if ((right == null ? void 0 : right.width) && ((_a = right == null ? void 0 : right.yScaleValue) == null ? void 0 : _a.layout) === "left" && ((_b = right == null ? void 0 : right.yScaleValue) == null ? void 0 : _b.show)) {
|
|
288
288
|
yScaleValueList.push(getRightInfo);
|
|
289
289
|
}
|
|
290
|
-
painIndex
|
|
291
|
-
|
|
290
|
+
if (painIndex > 0 && left.yScaleValue[painIndex].show) {
|
|
291
|
+
const painObj = left.yScaleValue[painIndex];
|
|
292
|
+
painIndex === 0 && left.yScaleValue.length > 1 && yScaleValueList.unshift(painObj);
|
|
293
|
+
painIndex == left.yScaleValue.length - 1 && yScaleValueList.push(painObj);
|
|
294
|
+
}
|
|
292
295
|
drawScaleValue(yScaleValueList);
|
|
293
296
|
drawBorder();
|
|
294
297
|
canvas.value.renderAll();
|
|
@@ -6,9 +6,9 @@ function useRight(canvas, propItems, drawScaleValue) {
|
|
|
6
6
|
const { left, right, getRightInfo, canvasWidth, endY, endX, originY } = propItems;
|
|
7
7
|
onMounted(() => {
|
|
8
8
|
nextTick(() => {
|
|
9
|
-
var _a;
|
|
10
|
-
const yScaleValueList = left.yScaleValue.filter((v) => v.layout === "right");
|
|
11
|
-
if ((right == null ? void 0 : right.width) && ((_a = right == null ? void 0 : right.yScaleValue) == null ? void 0 : _a.layout) === "right") {
|
|
9
|
+
var _a, _b;
|
|
10
|
+
const yScaleValueList = left.yScaleValue.filter((v) => v.layout === "right" && v.show);
|
|
11
|
+
if ((right == null ? void 0 : right.width) && ((_a = right == null ? void 0 : right.yScaleValue) == null ? void 0 : _a.layout) === "right" && ((_b = right == null ? void 0 : right.yScaleValue) == null ? void 0 : _b.show)) {
|
|
12
12
|
yScaleValueList.push(getRightInfo);
|
|
13
13
|
}
|
|
14
14
|
if ((right == null ? void 0 : right.width) || yScaleValueList.length > 0) {
|
|
@@ -35,7 +35,8 @@ function useTop(canvas, propItems) {
|
|
|
35
35
|
group && canvas.value.add(group);
|
|
36
36
|
}
|
|
37
37
|
function drawTime(item, list, topY) {
|
|
38
|
-
|
|
38
|
+
var _a;
|
|
39
|
+
const dayHeight = top.xScalevalue.show ? (_a = top.dayHeight) != null ? _a : 0 : 0;
|
|
39
40
|
const height = xScalevalueHeight - dayHeight;
|
|
40
41
|
const title = drawTextGroup({
|
|
41
42
|
width: originX - iconsWidth,
|
|
@@ -61,9 +62,10 @@ function useTop(canvas, propItems) {
|
|
|
61
62
|
width: xCellWidth,
|
|
62
63
|
height
|
|
63
64
|
}, {
|
|
64
|
-
value: v,
|
|
65
|
+
value: v.value,
|
|
65
66
|
...defaultTextStyle,
|
|
66
|
-
...item.style || {}
|
|
67
|
+
...item.style || {},
|
|
68
|
+
...v.style || {}
|
|
67
69
|
}, {
|
|
68
70
|
left,
|
|
69
71
|
top: topY + dayHeight
|