cnhis-design-vue 3.3.2-beta.12 → 3.3.2-beta.16
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 +87 -87
- package/es/components/audio-sdk/src/Index.vue2.js +1 -1
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +4 -0
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
- package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +4 -1
- package/es/components/fabric-chart/src/hooks/useDraw.js +19 -0
- package/es/components/field-set/src/FieldColor.vue.d.ts +1 -1
- package/es/components/field-set/src/FieldFilter.vue.d.ts +1 -1
- package/es/components/field-set/src/FieldSet.vue.d.ts +1 -1
- package/es/components/field-set/src/components/table-row.vue.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/input.js +2 -1
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/env.d.ts +25 -25
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
@@ -1,87 +1,87 @@
|
|
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.FAQ
|
65
|
-
|
66
|
-
### 3.1 项目打包后样式丢失
|
67
|
-
|
68
|
-
处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
|
69
|
-
|
70
|
-
```typescript
|
71
|
-
// vite.config.ts
|
72
|
-
import { defineConfig } from 'vite';
|
73
|
-
|
74
|
-
export default defineConfig({
|
75
|
-
build: {
|
76
|
-
rollupOptions: {
|
77
|
-
// ..otherOptions
|
78
|
-
output: {
|
79
|
-
dir: './dist',
|
80
|
-
manualChunks: {
|
81
|
-
'cnhis-vendor': ['cnhis-design-vue']
|
82
|
-
}
|
83
|
-
}
|
84
|
-
}
|
85
|
-
}
|
86
|
-
});
|
87
|
-
```
|
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.FAQ
|
65
|
+
|
66
|
+
### 3.1 项目打包后样式丢失
|
67
|
+
|
68
|
+
处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
|
69
|
+
|
70
|
+
```typescript
|
71
|
+
// vite.config.ts
|
72
|
+
import { defineConfig } from 'vite';
|
73
|
+
|
74
|
+
export default defineConfig({
|
75
|
+
build: {
|
76
|
+
rollupOptions: {
|
77
|
+
// ..otherOptions
|
78
|
+
output: {
|
79
|
+
dir: './dist',
|
80
|
+
manualChunks: {
|
81
|
+
'cnhis-vendor': ['cnhis-design-vue']
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|
86
|
+
});
|
87
|
+
```
|
@@ -130,7 +130,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
130
130
|
onEnd,
|
131
131
|
onFail: _cache[1] || (_cache[1] = (error) => emit("fail", error)),
|
132
132
|
onSuccess
|
133
|
-
}), null, 16, ["loading"])) : createCommentVNode("v-if", true), createCommentVNode(' <c-form\
|
133
|
+
}), null, 16, ["loading"])) : createCommentVNode("v-if", true), createCommentVNode(' <c-form\n v-if="isForm"\n :configs="configsAndBasicData.configs"\n :data="jsonData"\n @close="onFormClose"\n @finish="onFinish"\n /> ')], 64)) : (openBlock(), createBlock(RecordingModal$1, {
|
134
134
|
key: 1,
|
135
135
|
content: unref(content)
|
136
136
|
}, null, 8, ["content"]))], 4);
|
@@ -1054,6 +1054,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1054
1054
|
callback() {
|
1055
1055
|
if (key == "all") {
|
1056
1056
|
printAllButtonClick("button");
|
1057
|
+
return;
|
1057
1058
|
}
|
1058
1059
|
const formatIds = showSettingItems.value.map((item) => item.key);
|
1059
1060
|
const originParamsClone = state.originParams;
|
@@ -1064,6 +1065,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1064
1065
|
const printToParam = originParamsClone[curTypeItem == null ? void 0 : curTypeItem.templateCode] || [];
|
1065
1066
|
handleClickPrint(tmpParam, curTypeItem.templateCode, curTypeItem.templateId, curTypeItem.key, printToParam);
|
1066
1067
|
}
|
1068
|
+
} else {
|
1069
|
+
initShowDownList();
|
1067
1070
|
}
|
1068
1071
|
}
|
1069
1072
|
});
|
@@ -1115,6 +1118,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1115
1118
|
};
|
1116
1119
|
onMounted(() => {
|
1117
1120
|
state.isInited = false;
|
1121
|
+
handleClickBtn(false);
|
1118
1122
|
});
|
1119
1123
|
onBeforeUnmount(() => {
|
1120
1124
|
const shortcutKeys = Object.keys(shortcutFn.value);
|
@@ -109,9 +109,12 @@ function useBirthProcessCumputedPoint(propItems) {
|
|
109
109
|
}
|
110
110
|
function getYValue(key, pointY) {
|
111
111
|
const item = scaleValues.find((item2) => [item2.key, item2.type || ""].includes(key));
|
112
|
+
const {
|
113
|
+
changeByInteger
|
114
|
+
} = item;
|
112
115
|
const [minValue] = (item == null ? void 0 : item.range) || [0];
|
113
116
|
const y = (endY - pointY) / propItems[`${key}YCell`] + minValue;
|
114
|
-
return getFloorNumber(y);
|
117
|
+
return changeByInteger ? getRoundNumber(y) : getFloorNumber(y);
|
115
118
|
}
|
116
119
|
return {
|
117
120
|
computedX,
|
@@ -312,6 +312,25 @@ function drawPoint(type = "circle", style) {
|
|
312
312
|
});
|
313
313
|
return new fabric.Group([bigIcon, smallIcon], _newStyle);
|
314
314
|
}
|
315
|
+
case "arrow": {
|
316
|
+
const {
|
317
|
+
width = 10,
|
318
|
+
height = 10
|
319
|
+
} = newStyle;
|
320
|
+
return new fabric.Polyline([{
|
321
|
+
x: 0,
|
322
|
+
y: 0
|
323
|
+
}, {
|
324
|
+
x: width / 2,
|
325
|
+
y: height
|
326
|
+
}, {
|
327
|
+
x: width,
|
328
|
+
y: 0
|
329
|
+
}], {
|
330
|
+
fill: "transparent",
|
331
|
+
...omit(newStyle, ["width", "height"])
|
332
|
+
});
|
333
|
+
}
|
315
334
|
default:
|
316
335
|
style && Reflect.deleteProperty(style, "stroke");
|
317
336
|
return new fabric.Text(String(type), {
|
@@ -534,9 +534,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
534
534
|
}>;
|
535
535
|
developMode: boolean;
|
536
536
|
draggable: boolean;
|
537
|
-
isHighlightRow: boolean;
|
538
537
|
idx: number;
|
539
538
|
isHighlight: boolean;
|
539
|
+
isHighlightRow: boolean;
|
540
540
|
isFieldSet: boolean;
|
541
541
|
fieldDescribeMode: "column" | "tooltip";
|
542
542
|
hideExpressionOption: AnyObject[];
|
@@ -563,9 +563,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
563
563
|
}>;
|
564
564
|
developMode: boolean;
|
565
565
|
draggable: boolean;
|
566
|
-
isHighlightRow: boolean;
|
567
566
|
idx: number;
|
568
567
|
isHighlight: boolean;
|
568
|
+
isHighlightRow: boolean;
|
569
569
|
isFieldSet: boolean;
|
570
570
|
fieldDescribeMode: "column" | "tooltip";
|
571
571
|
hideExpressionOption: AnyObject[];
|
@@ -722,9 +722,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
722
722
|
}>;
|
723
723
|
developMode: boolean;
|
724
724
|
draggable: boolean;
|
725
|
-
isHighlightRow: boolean;
|
726
725
|
idx: number;
|
727
726
|
isHighlight: boolean;
|
727
|
+
isHighlightRow: boolean;
|
728
728
|
isFieldSet: boolean;
|
729
729
|
fieldDescribeMode: "column" | "tooltip";
|
730
730
|
hideExpressionOption: AnyObject[];
|
@@ -383,9 +383,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
383
383
|
}>;
|
384
384
|
developMode: boolean;
|
385
385
|
draggable: boolean;
|
386
|
-
isHighlightRow: boolean;
|
387
386
|
idx: number;
|
388
387
|
isHighlight: boolean;
|
388
|
+
isHighlightRow: boolean;
|
389
389
|
isFieldSet: boolean;
|
390
390
|
fieldDescribeMode: "column" | "tooltip";
|
391
391
|
hideExpressionOption: AnyObject[];
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { defineComponent, inject, computed, ref, watch, createVNode, createTextVNode, nextTick } from 'vue';
|
2
|
-
import { LifeCycleTypes } from '@formily/core';
|
2
|
+
import { isField, LifeCycleTypes } from '@formily/core';
|
3
3
|
import '../../../index.js';
|
4
4
|
import { InjectionFormGlobalProps } from '../../constants/index.js';
|
5
5
|
import { createInputSlot } from '../../utils/index.js';
|
@@ -44,6 +44,7 @@ const script = /* @__PURE__ */ defineComponent({
|
|
44
44
|
const valueRef = computed({
|
45
45
|
get: () => props.value,
|
46
46
|
set(value) {
|
47
|
+
isField(field.value) && field.value.modify();
|
47
48
|
emit("update:value", value);
|
48
49
|
field.value.notify(LifeCycleTypes.ON_FIELD_INPUT_VALUE_CHANGE);
|
49
50
|
}
|
@@ -225,7 +225,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
225
225
|
round: "",
|
226
226
|
size: 100,
|
227
227
|
onClickCapture: _cache[0] || (_cache[0] = ($event) => showLargeAvatar.value = true)
|
228
|
-
}, null, 8, ["src"]), createCommentVNode(' <n-upload abstract accept="image/*" @change="onChange">\
|
228
|
+
}, null, 8, ["src"]), createCommentVNode(' <n-upload abstract accept="image/*" @change="onChange">\n <n-upload-trigger #="{ handleClick }" abstract>\n <n-button\n circle\n secondary\n class="edit-avatar"\n v-show="userDetail.id === state.userInfo.id"\n @click="handleClick"\n >\n <template #icon>\n <n-icon size="16" color="#666666" :component="Camera" />\n </template>\n </n-button>\n </n-upload-trigger>\n </n-upload> '), createElementVNode("div", _hoisted_4, [createElementVNode("h4", null, [createElementVNode("label", _hoisted_5, toDisplayString(userDetail.name), 1), withDirectives(createElementVNode("label", {
|
229
229
|
class: normalizeClass(["iho-chatRole", unref(isDoctorRole)(userDetail.roleInfo) ? "isDoctor" : ""])
|
230
230
|
}, toDisplayString(unref(getRoleName)(userDetail.roleInfo)), 3), [[vShow, unref(getRoleName)(userDetail.roleInfo)]])]), createElementVNode("p", null, toDisplayString(userDetail.orgName), 1)]), createVNode(unref(NButton), {
|
231
231
|
strong: "",
|
@@ -193,7 +193,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
193
193
|
}]),
|
194
194
|
ref_key: "scaleViewDom",
|
195
195
|
ref: scaleViewDom
|
196
|
-
}, [createCommentVNode(' <template v-if="state.spinning">\
|
196
|
+
}, [createCommentVNode(' <template v-if="state.spinning">\n <n-spin :show="state.spinning" description="\u52A0\u8F7D\u4E2D"></n-spin>\n </template> '), !state.spinning && !state.hasFrontAddress ? (openBlock(), createElementBlock(Fragment, {
|
197
197
|
key: 0
|
198
198
|
}, [unref(noDataState).noData ? (openBlock(), createBlock(NoData, {
|
199
199
|
key: 0,
|
package/es/env.d.ts
CHANGED
@@ -1,25 +1,25 @@
|
|
1
|
-
/// <reference types="vite/client" />
|
2
|
-
|
3
|
-
interface ImportMetaEnv {
|
4
|
-
readonly VITE_APP_TYPE: string;
|
5
|
-
// 更多环境变量...
|
6
|
-
}
|
7
|
-
|
8
|
-
interface ImportMeta {
|
9
|
-
readonly env: ImportMetaEnv;
|
10
|
-
}
|
11
|
-
|
12
|
-
declare module '*.vue' {
|
13
|
-
// @ts-ignore
|
14
|
-
import type { App, defineComponent } from 'vue';
|
15
|
-
// // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
16
|
-
// // const component: DefineComponent<{}, {}, any>
|
17
|
-
const component: ReturnType<typeof defineComponent> & {
|
18
|
-
install(app: App): void;
|
19
|
-
};
|
20
|
-
// @ts-ignore
|
21
|
-
export default component;
|
22
|
-
}
|
23
|
-
|
24
|
-
declare module '*.js';
|
25
|
-
|
1
|
+
/// <reference types="vite/client" />
|
2
|
+
|
3
|
+
interface ImportMetaEnv {
|
4
|
+
readonly VITE_APP_TYPE: string;
|
5
|
+
// 更多环境变量...
|
6
|
+
}
|
7
|
+
|
8
|
+
interface ImportMeta {
|
9
|
+
readonly env: ImportMetaEnv;
|
10
|
+
}
|
11
|
+
|
12
|
+
declare module '*.vue' {
|
13
|
+
// @ts-ignore
|
14
|
+
import type { App, defineComponent } from 'vue';
|
15
|
+
// // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
16
|
+
// // const component: DefineComponent<{}, {}, any>
|
17
|
+
const component: ReturnType<typeof defineComponent> & {
|
18
|
+
install(app: App): void;
|
19
|
+
};
|
20
|
+
// @ts-ignore
|
21
|
+
export default component;
|
22
|
+
}
|
23
|
+
|
24
|
+
declare module '*.js';
|
25
|
+
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "cnhis-design-vue",
|
3
|
-
"version": "3.3.2-beta.
|
3
|
+
"version": "3.3.2-beta.16",
|
4
4
|
"license": "ISC",
|
5
5
|
"module": "./es/components/index.js",
|
6
6
|
"main": "./es/components/index.js",
|
@@ -72,5 +72,5 @@
|
|
72
72
|
"iOS 7",
|
73
73
|
"last 3 iOS versions"
|
74
74
|
],
|
75
|
-
"gitHead": "
|
75
|
+
"gitHead": "3d9608dba368f142e3f37ca71716ade98b228e90"
|
76
76
|
}
|