cnhis-design-vue 3.1.14-beta.3 → 3.1.14-beta.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. package/README.md +22 -22
  2. package/es/packages/annotation-edit/index.d.ts +17 -0
  3. package/es/packages/annotation-edit/index.js +10 -0
  4. package/es/packages/annotation-edit/src/AnnotationEdit.d.ts +16 -0
  5. package/es/packages/annotation-edit/src/AnnotationEdit.js +119 -0
  6. package/es/packages/annotation-edit/style/index.css +15 -0
  7. package/es/packages/big-table/src/BigTable.vue.d.ts +3 -8
  8. package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +9 -12
  9. package/es/packages/big-table/src/utils.js +2 -2
  10. package/es/packages/button-print/src/ButtonPrint.vue_vue_type_script_setup_true_lang.js +5 -1
  11. package/es/packages/button-print/src/utils/index.d.ts +1 -0
  12. package/es/packages/button-print/src/utils/index.js +1 -0
  13. package/es/packages/button-print/src/utils/print.d.ts +1 -1
  14. package/es/packages/button-print/src/utils/print.js +1 -1
  15. package/es/packages/fabric-chart/index.d.ts +5 -2
  16. package/es/packages/fabric-chart/src/FabricChart.vue.d.ts +6 -3
  17. package/es/packages/fabric-chart/src/FabricChart.vue_vue_type_script_setup_true_lang.js +24 -3
  18. package/es/packages/fabric-chart/src/hooks/index.d.ts +1 -1
  19. package/es/packages/fabric-chart/src/hooks/index.js +2 -2
  20. package/es/packages/fabric-chart/src/hooks/useCenter.js +19 -14
  21. package/es/packages/fabric-chart/src/hooks/useEvent.d.ts +6 -0
  22. package/es/packages/fabric-chart/src/hooks/useEvent.js +66 -1
  23. package/es/packages/fabric-chart/src/hooks/useTop.js +2 -11
  24. package/es/packages/fabric-chart/src/interface.d.ts +3 -0
  25. package/es/packages/form-render/index.d.ts +1 -1
  26. package/es/packages/form-render/src/FormRender.vue.d.ts +1 -1
  27. package/es/packages/form-render/src/components/renderer/formItem.js +8 -92
  28. package/es/packages/form-render/src/hooks/useAnchor.d.ts +1 -1
  29. package/es/packages/form-render/src/hooks/useAnchor.js +3 -3
  30. package/es/packages/form-render/src/hooks/useFieldListAdaptor.js +5 -3
  31. package/es/packages/form-render/src/types/fieldItem.d.ts +1 -0
  32. package/es/packages/form-render/src/utils/index.d.ts +1 -0
  33. package/es/packages/form-render/src/utils/index.js +4 -1
  34. package/es/packages/form-render/style/index.css +17 -15
  35. package/es/packages/index.css +17 -15
  36. package/global.d.ts +8 -8
  37. package/package.json +1 -1
package/README.md CHANGED
@@ -1,23 +1,23 @@
1
- # Vue 3 + Typescript + Vite
2
-
3
- This template should help get you started developing with Vue 3 and Typescript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
4
-
5
- ## Recommended IDE Setup
6
-
7
- - [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar)
8
-
9
- ## Type Support For `.vue` Imports in TS
10
-
11
- Since TypeScript cannot handle type information for `.vue` imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in `.vue` imports (for example to get props validation when using manual `h(...)` calls), you can enable Volar's `.vue` type support plugin by running `Volar: Switch TS Plugin on/off` from VSCode command palette.
12
-
13
- ## 使用
14
- ```JavaScript
15
- import { createApp } from "vue";
16
- import App from "./App.vue";
17
- import cui from "cnhis-design-vue";
18
- import "cnhis-design-vue/es/index.css";
19
-
20
- const app = createApp(App);
21
- app.use(cui);
22
- app.mount("#app");
1
+ # Vue 3 + Typescript + Vite
2
+
3
+ This template should help get you started developing with Vue 3 and Typescript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
4
+
5
+ ## Recommended IDE Setup
6
+
7
+ - [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar)
8
+
9
+ ## Type Support For `.vue` Imports in TS
10
+
11
+ Since TypeScript cannot handle type information for `.vue` imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in `.vue` imports (for example to get props validation when using manual `h(...)` calls), you can enable Volar's `.vue` type support plugin by running `Volar: Switch TS Plugin on/off` from VSCode command palette.
12
+
13
+ ## 使用
14
+ ```JavaScript
15
+ import { createApp } from "vue";
16
+ import App from "./App.vue";
17
+ import cui from "cnhis-design-vue";
18
+ import "cnhis-design-vue/es/index.css";
19
+
20
+ const app = createApp(App);
21
+ app.use(cui);
22
+ app.mount("#app");
23
23
  ```
@@ -0,0 +1,17 @@
1
+ import { SFCWithInstall } from '../../../es/src/types';
2
+ declare const Annotation: SFCWithInstall<import("vue").DefineComponent<{
3
+ modelValue: {
4
+ type: StringConstructor;
5
+ default: string;
6
+ };
7
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
8
+ modelValue: {
9
+ type: StringConstructor;
10
+ default: string;
11
+ };
12
+ }>> & {
13
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
14
+ }, {
15
+ modelValue: string;
16
+ }>>;
17
+ export default Annotation;
@@ -0,0 +1,10 @@
1
+ import { COMPONENT_NAMESPACE } from '../../src/global/variable';
2
+ import { safeComponentRegister } from '../../src/utils';
3
+ import script from './src/AnnotationEdit.js';
4
+
5
+ const Annotation = script;
6
+ Annotation.install = function(app) {
7
+ safeComponentRegister(app, Annotation, COMPONENT_NAMESPACE + "Annotation");
8
+ };
9
+
10
+ export { Annotation as default };
@@ -0,0 +1,16 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ modelValue: {
3
+ type: StringConstructor;
4
+ default: string;
5
+ };
6
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
7
+ modelValue: {
8
+ type: StringConstructor;
9
+ default: string;
10
+ };
11
+ }>> & {
12
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
13
+ }, {
14
+ modelValue: string;
15
+ }>;
16
+ export default _default;
@@ -0,0 +1,119 @@
1
+ import { defineComponent, computed, ref, createVNode, unref } from 'vue';
2
+ import { FileTrayFull, FileTray } from '@vicons/ionicons5';
3
+ import { NPopover, NIcon, NInput } from 'naive-ui';
4
+
5
+ var script = defineComponent({
6
+ props: {
7
+ modelValue: {
8
+ type: String,
9
+ default: ""
10
+ }
11
+ },
12
+ emits: ["update:modelValue"],
13
+ setup(props, {
14
+ emit
15
+ }) {
16
+ const modelValue = computed({
17
+ get() {
18
+ return props.modelValue;
19
+ },
20
+ set(value) {
21
+ emit("update:modelValue", value);
22
+ }
23
+ });
24
+ const __showPopper = ref(false);
25
+ const showPopper = computed({
26
+ get() {
27
+ return __showPopper.value;
28
+ },
29
+ async set(value) {
30
+ __showPopper.value = value;
31
+ if (!value && isEdit.value) {
32
+ await new Promise((resolve) => setTimeout(resolve, 200));
33
+ isEdit.value = false;
34
+ }
35
+ }
36
+ });
37
+ const isEdit = ref(false);
38
+ let clickTimer;
39
+ function iconClick() {
40
+ clearTimeout(clickTimer);
41
+ if (showPopper.value && isEdit.value) {
42
+ showPopper.value = false;
43
+ return;
44
+ }
45
+ clickTimer = setTimeout(() => {
46
+ if (!unref(modelValue)) {
47
+ isEdit.value = showPopper.value = true;
48
+ }
49
+ }, 200);
50
+ }
51
+ function iconDbClick() {
52
+ clearTimeout(clickTimer);
53
+ if (!unref(modelValue))
54
+ return;
55
+ showPopper.value = true;
56
+ isEdit.value = true;
57
+ }
58
+ function iconMouseenter() {
59
+ if (!unref(modelValue))
60
+ return;
61
+ showPopper.value = true;
62
+ }
63
+ function iconMouseleave() {
64
+ if (!unref(modelValue) || isEdit.value)
65
+ return;
66
+ showPopper.value = false;
67
+ }
68
+ function renderAnnotation() {
69
+ return createVNode("section", {
70
+ "class": ["annotation-edit", {
71
+ "is-active": !!unref(modelValue)
72
+ }],
73
+ "style": {
74
+ "--icon-right": "-5"
75
+ },
76
+ "annotation-hover-show": !unref(modelValue) && !isEdit.value
77
+ }, [createVNode(NPopover, {
78
+ "style": {
79
+ maxWidth: "200px",
80
+ wordBreak: "break-all"
81
+ },
82
+ "show": showPopper.value,
83
+ "onUpdate:show": ($event) => showPopper.value = $event,
84
+ "trigger": "manual",
85
+ "duration": 100
86
+ }, {
87
+ default: renderDefault,
88
+ trigger: renderTrigger
89
+ })]);
90
+ function renderText() {
91
+ return createVNode("span", null, [unref(modelValue)]);
92
+ }
93
+ function renderTextarea() {
94
+ return createVNode(NInput, {
95
+ "type": "textarea",
96
+ "value": modelValue.value,
97
+ "onUpdate:value": ($event) => modelValue.value = $event
98
+ }, null);
99
+ }
100
+ function renderDefault() {
101
+ return createVNode("div", null, [isEdit.value ? renderTextarea() : renderText()]);
102
+ }
103
+ function renderTrigger() {
104
+ return createVNode("div", {
105
+ "class": "annotation-edit__icon",
106
+ "onMouseleave": iconMouseleave,
107
+ "onMouseenter": iconMouseenter,
108
+ "onDblclick": iconDbClick,
109
+ "onClick": iconClick
110
+ }, [createVNode(NIcon, {
111
+ "component": unref(modelValue) ? FileTrayFull : FileTray
112
+ }, null)]);
113
+ }
114
+ }
115
+ return renderAnnotation;
116
+ }
117
+ });
118
+
119
+ export { script as default };
@@ -0,0 +1,15 @@
1
+ .annotation-edit {
2
+ cursor: pointer;
3
+ color: #0067ee;
4
+ font-size: 16px;
5
+ user-select: none;
6
+ display: inline-flex;
7
+ align-items: center;
8
+ }
9
+ .annotation-edit.is-active {
10
+ color: rgba(255, 152, 40);
11
+ }
12
+ .annotation-edit__icon {
13
+ display: inline-flex;
14
+ align-items: center;
15
+ }
@@ -1093,9 +1093,7 @@ declare const _default: import("vue").DefineComponent<{
1093
1093
  textColorGhostFocusSuccess: string;
1094
1094
  textColorGhostDisabledSuccess: string;
1095
1095
  borderSuccess: string;
1096
- borderHoverSuccess: string; /**
1097
- * 删除选中scan数据
1098
- */
1096
+ borderHoverSuccess: string;
1099
1097
  borderPressedSuccess: string;
1100
1098
  borderFocusSuccess: string;
1101
1099
  borderDisabledSuccess: string;
@@ -1210,10 +1208,7 @@ declare const _default: import("vue").DefineComponent<{
1210
1208
  textColorPressed: string;
1211
1209
  textColorFocus: string;
1212
1210
  textColorDisabled: string;
1213
- textColorText: string; /**
1214
- * 避免每次点击都查询
1215
- * 初始化查一次 行编辑 表单search用
1216
- */
1211
+ textColorText: string;
1217
1212
  textColorTextHover: string;
1218
1213
  textColorTextPressed: string;
1219
1214
  textColorTextFocus: string;
@@ -1310,7 +1305,7 @@ declare const _default: import("vue").DefineComponent<{
1310
1305
  colorWarning: string;
1311
1306
  colorHoverWarning: string;
1312
1307
  colorPressedWarning: string;
1313
- colorFocusWarning: string;
1308
+ colorFocusWarning: string; /** string */
1314
1309
  colorDisabledWarning: string;
1315
1310
  textColorWarning: string;
1316
1311
  textColorHoverWarning: string;
@@ -1338,8 +1338,7 @@ var script = /* @__PURE__ */ defineComponent({
1338
1338
  emit("checkboxChange", {
1339
1339
  checked: checked2,
1340
1340
  row,
1341
- index: $rowIndex,
1342
- records: [row]
1341
+ index: $rowIndex
1343
1342
  });
1344
1343
  return;
1345
1344
  }
@@ -1412,8 +1411,7 @@ var script = /* @__PURE__ */ defineComponent({
1412
1411
  emit("checkboxChange", {
1413
1412
  checked: setChecked,
1414
1413
  row,
1415
- index: $rowIndex,
1416
- records: checkedRow
1414
+ index: $rowIndex
1417
1415
  });
1418
1416
  setChecked && emit("handlerClickRow", row, $rowIndex);
1419
1417
  return;
@@ -1430,8 +1428,7 @@ var script = /* @__PURE__ */ defineComponent({
1430
1428
  emit("checkboxChange", {
1431
1429
  checked: setChecked,
1432
1430
  row,
1433
- index: $rowIndex,
1434
- records: checkedRow
1431
+ index: $rowIndex
1435
1432
  });
1436
1433
  setChecked && emit("handlerClickRow", row, $rowIndex);
1437
1434
  };
@@ -1451,7 +1448,6 @@ var script = /* @__PURE__ */ defineComponent({
1451
1448
  };
1452
1449
  const treeTableSelectionChange = (records) => {
1453
1450
  if (state.isTree == 0) {
1454
- emit("selectionChange", records);
1455
1451
  return false;
1456
1452
  }
1457
1453
  pubCheckChange(records);
@@ -1472,8 +1468,7 @@ var script = /* @__PURE__ */ defineComponent({
1472
1468
  emit("checkboxChange", {
1473
1469
  checked,
1474
1470
  row,
1475
- index: $rowIndex,
1476
- records
1471
+ index: $rowIndex
1477
1472
  });
1478
1473
  if (treeTableSelectionChange(records))
1479
1474
  return;
@@ -2281,7 +2276,8 @@ var script = /* @__PURE__ */ defineComponent({
2281
2276
  "show-header-overflow": "",
2282
2277
  "show-footer-overflow": "title",
2283
2278
  "keep-source": "",
2284
- "auto-resize": ""
2279
+ "auto-resize": "",
2280
+ height: props.height ? "auto" : void 0
2285
2281
  }, _ctx.$attrs, {
2286
2282
  "seq-config": unref(handleSeqConfig),
2287
2283
  "tree-config": unref(treeConfig),
@@ -2306,7 +2302,8 @@ var script = /* @__PURE__ */ defineComponent({
2306
2302
  visibleMethod: unref(visibleMethod),
2307
2303
  trigger: "cell",
2308
2304
  reserve: true,
2309
- highlight: true
2305
+ highlight: true,
2306
+ ..._ctx.$attrs.checkboxConfig || {}
2310
2307
  },
2311
2308
  "radio-config": {
2312
2309
  checkField: "checked",
@@ -2395,7 +2392,7 @@ var script = /* @__PURE__ */ defineComponent({
2395
2392
  }
2396
2393
  })]),
2397
2394
  _: 3
2398
- }, 16, ["seq-config", "tree-config", "cell-class-name", "row-config", "show-footer", "checkbox-config", "row-style", "edit-config", "expand-config", "keyboard-config", "edit-rules", "menu-config", "onScroll", "onKeydown"]), createCommentVNode(" `${refreshRow}\u6761\u66F4\u65B0` "), withDirectives(createElementVNode("div", {
2395
+ }, 16, ["height", "seq-config", "tree-config", "cell-class-name", "row-config", "show-footer", "checkbox-config", "row-style", "edit-config", "expand-config", "keyboard-config", "edit-rules", "menu-config", "onScroll", "onKeydown"]), createCommentVNode(" `${refreshRow}\u6761\u66F4\u65B0` "), withDirectives(createElementVNode("div", {
2399
2396
  class: "refresh",
2400
2397
  onClick: hanldeClickRefresh
2401
2398
  }, [createVNode(unref(NIcon), {
@@ -140,7 +140,7 @@ const reScrollFilterWrap = () => {
140
140
  });
141
141
  };
142
142
  const showFilter = (field, columnName, event, props, state) => {
143
- var _a;
143
+ var _a, _b, _c;
144
144
  if (props.isInlineOperating)
145
145
  return false;
146
146
  const target = event.target;
@@ -161,7 +161,7 @@ const showFilter = (field, columnName, event, props, state) => {
161
161
  field.top = btnRectTop + FILTER_BOX_TOP_OFFSET + (props.filterTopOffset || 0) + "px";
162
162
  field.visible = !field.visible;
163
163
  const len = (_a = state.filterFields[columnName]) == null ? void 0 : _a.CONVERT.length;
164
- field.checkAll = len === field.setting.showSetting.length;
164
+ field.checkAll = len === ((_c = (_b = state.filterFields[columnName]) == null ? void 0 : _b.filterItems) == null ? void 0 : _c.length);
165
165
  field.indeterminate = !!len && len !== field.setting.showSetting.length;
166
166
  field.searchFilterText = "";
167
167
  };
@@ -1,7 +1,8 @@
1
1
  import { defineComponent, reactive, computed, onMounted, onUnmounted, watch, openBlock, createElementBlock, Fragment, createVNode, unref, withCtx, renderSlot, withModifiers, createCommentVNode, createTextVNode, toDisplayString, mergeProps } from 'vue';
2
+ import { isObject } from '@vue/shared';
2
3
  import { useMessage, NDropdown, NButton, NIcon } from 'naive-ui';
3
4
  import { ChevronDown } from '@vicons/ionicons5';
4
- import Print from './utils/print.js';
5
+ import { Print } from './utils/print.js';
5
6
  import './components/IdentityVerification.js';
6
7
  import moment from 'moment';
7
8
  import script$1 from './components/IdentityVerification.vue_vue_type_script_setup_true_lang.js';
@@ -123,6 +124,9 @@ var script = /* @__PURE__ */ defineComponent({
123
124
  };
124
125
  const callLocalServicesErrorCb = (res) => {
125
126
  emit("error", res);
127
+ if (isObject(res) && res.type === "notInstalledApp") {
128
+ $message.error(res.message);
129
+ }
126
130
  };
127
131
  const prevFnError = () => {
128
132
  let error = {
@@ -0,0 +1 @@
1
+ export * from './print';
@@ -0,0 +1 @@
1
+ export { Print } from './print.js';
@@ -1,5 +1,5 @@
1
1
  import { AnyObject, Func } from '../../../../../es/src/types';
2
- export default class Print {
2
+ export declare class Print {
3
3
  private readonly webview;
4
4
  private currentMessageHandler?;
5
5
  constructor();
@@ -322,4 +322,4 @@ class Print {
322
322
  }
323
323
  }
324
324
 
325
- export { Print as default };
325
+ export { Print };
@@ -14,7 +14,8 @@ declare const FabricChart: SFCWithInstall<import("vue").DefineComponent<{
14
14
  data: import("./src/interface").IData;
15
15
  addRenderItem?: Function | undefined;
16
16
  };
17
- emits: (event: "change" | "add", ...args: any[]) => void;
17
+ emits: (event: "select" | "change" | "add", ...args: any[]) => void;
18
+ select: import("vue").Ref<any>;
18
19
  canvasRef: any;
19
20
  canvas: import("vue").Ref<any>;
20
21
  dateHeight: import("vue").ComputedRef<number>;
@@ -48,6 +49,7 @@ declare const FabricChart: SFCWithInstall<import("vue").DefineComponent<{
48
49
  originY: number;
49
50
  endY: number;
50
51
  }>;
52
+ topList: import("vue").ComputedRef<import("./src/interface").IDate[]>;
51
53
  propItems: any;
52
54
  cumputedX: (value: string | number) => any;
53
55
  cumputedY: (type: import("./src/interface").IPointType, scaleValueList: number[], value: string | number) => number;
@@ -180,7 +182,7 @@ declare const FabricChart: SFCWithInstall<import("vue").DefineComponent<{
180
182
  show: boolean;
181
183
  list: unknown[];
182
184
  }>;
183
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "add")[], "change" | "add", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
185
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "change" | "add")[], "select" | "change" | "add", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
184
186
  data: {
185
187
  type: null;
186
188
  required: true;
@@ -191,6 +193,7 @@ declare const FabricChart: SFCWithInstall<import("vue").DefineComponent<{
191
193
  };
192
194
  }>> & {
193
195
  onChange?: ((...args: any[]) => any) | undefined;
196
+ onSelect?: ((...args: any[]) => any) | undefined;
194
197
  onAdd?: ((...args: any[]) => any) | undefined;
195
198
  }, {}>>;
196
199
  export default FabricChart;
@@ -1,4 +1,4 @@
1
- import { IData } from './interface';
1
+ import { IData, IDate } from './interface';
2
2
  declare const _default: import("vue").DefineComponent<{
3
3
  data: {
4
4
  type: null;
@@ -14,7 +14,8 @@ declare const _default: import("vue").DefineComponent<{
14
14
  data: IData;
15
15
  addRenderItem?: Function | undefined;
16
16
  };
17
- emits: (event: "change" | "add", ...args: any[]) => void;
17
+ emits: (event: "select" | "change" | "add", ...args: any[]) => void;
18
+ select: import("vue").Ref<any>;
18
19
  canvasRef: any;
19
20
  canvas: import("vue").Ref<any>;
20
21
  dateHeight: import("vue").ComputedRef<number>;
@@ -48,6 +49,7 @@ declare const _default: import("vue").DefineComponent<{
48
49
  originY: number;
49
50
  endY: number;
50
51
  }>;
52
+ topList: import("vue").ComputedRef<IDate[]>;
51
53
  propItems: any;
52
54
  cumputedX: (value: string | number) => any;
53
55
  cumputedY: (type: import("./interface").IPointType, scaleValueList: number[], value: string | number) => number;
@@ -180,7 +182,7 @@ declare const _default: import("vue").DefineComponent<{
180
182
  show: boolean;
181
183
  list: unknown[];
182
184
  }>;
183
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "add")[], "change" | "add", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
185
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "change" | "add")[], "select" | "change" | "add", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
184
186
  data: {
185
187
  type: null;
186
188
  required: true;
@@ -191,6 +193,7 @@ declare const _default: import("vue").DefineComponent<{
191
193
  };
192
194
  }>> & {
193
195
  onChange?: ((...args: any[]) => any) | undefined;
196
+ onSelect?: ((...args: any[]) => any) | undefined;
194
197
  onAdd?: ((...args: any[]) => any) | undefined;
195
198
  }, {}>;
196
199
  export default _default;
@@ -9,7 +9,7 @@ import { useLeft } from './hooks/useLeft.js';
9
9
  import { useRight } from './hooks/useRight.js';
10
10
  import { useBottom } from './hooks/useBottom.js';
11
11
  import { useOther } from './hooks/useOther.js';
12
- import { useEvent } from './hooks/useEvent.js';
12
+ import { useEvent, useCanvasEvent } from './hooks/useEvent.js';
13
13
  import script$1 from './components/PopupTip.vue_vue_type_script_setup_true_lang.js';
14
14
  import { useCumputedPoint } from './hooks/useCumputedPoint.js';
15
15
 
@@ -19,10 +19,11 @@ var script = /* @__PURE__ */ defineComponent({
19
19
  data: { type: null, required: true },
20
20
  addRenderItem: { type: Function, required: false }
21
21
  },
22
- emits: ["change", "add"],
23
- setup(__props, { emit: emits }) {
22
+ emits: ["change", "add", "select"],
23
+ setup(__props, { expose, emit: emits }) {
24
24
  const props = __props;
25
25
  const defaultHeight = 15;
26
+ let select = ref();
26
27
  const canvasRef = ref(null);
27
28
  let canvas = ref();
28
29
  const dateHeight = computed(() => {
@@ -200,14 +201,29 @@ var script = /* @__PURE__ */ defineComponent({
200
201
  }
201
202
  return obj;
202
203
  });
204
+ const topList = computed(() => {
205
+ const { top } = props.data;
206
+ let topList2 = [];
207
+ for (let i in top) {
208
+ if (top[i].show) {
209
+ topList2.push({
210
+ ...top[i],
211
+ key: i
212
+ });
213
+ }
214
+ }
215
+ return topList2.sort((a, b) => a.seq - b.seq);
216
+ });
203
217
  const propItems = reactive({
204
218
  canvasWidth: props.data.width,
205
219
  canvasHeight: props.data.height,
206
220
  borderStyle: props.data.borderStyle || defaultBorderStyle,
221
+ selectionStyle: props.data.selectionStyle || {},
207
222
  dateHeight: dateHeight.value,
208
223
  hospitalDaysHeight: hospitalDaysHeight.value,
209
224
  operationDaysHeight: operationDaysHeight.value,
210
225
  xScalevalueHeight: xScalevalueHeight.value,
226
+ topList: topList.value,
211
227
  breathingHeight: breathingHeight.value,
212
228
  grid: props.data.grid,
213
229
  top: props.data.top,
@@ -253,11 +269,16 @@ var script = /* @__PURE__ */ defineComponent({
253
269
  fireRightClick: true
254
270
  });
255
271
  useEvent(canvasRef.value);
272
+ const { select: selectFunc } = useCanvasEvent(canvas, propItems, emits);
273
+ select.value = selectFunc;
256
274
  });
257
275
  onBeforeUnmount(() => {
258
276
  canvas.value.clear();
259
277
  canvas.value = null;
260
278
  });
279
+ expose({
280
+ select
281
+ });
261
282
  return (_ctx, _cache) => {
262
283
  return openBlock(), createElementBlock(Fragment, null, [
263
284
  createElementVNode("canvas", {
@@ -1,4 +1,4 @@
1
- export { defaultBorderStyle } from './useDraw';
1
+ export * from './useDraw';
2
2
  export * from './useCumputedPoint';
3
3
  export * from './useTop';
4
4
  export * from './useLeft';
@@ -1,4 +1,4 @@
1
- export { defaultBorderStyle } from './useDraw.js';
1
+ export { defaultBorderStyle, defaultLineStyle, defaultRectStyle, defaultStyle, defaultTextStyle, drawLine, drawPoint, drawTextGroup } from './useDraw.js';
2
2
  export { useCumputedPoint } from './useCumputedPoint.js';
3
3
  export { useTop } from './useTop.js';
4
4
  export { useLeft } from './useLeft.js';
@@ -6,4 +6,4 @@ export { useRight } from './useRight.js';
6
6
  export { useCenter } from './useCenter.js';
7
7
  export { useBottom } from './useBottom.js';
8
8
  export { useOther } from './useOther.js';
9
- export { useEvent } from './useEvent.js';
9
+ export { useCanvasEvent, useEvent } from './useEvent.js';
@@ -88,19 +88,26 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
88
88
  }
89
89
  const [data1, data2] = copyDataList;
90
90
  const getPoint = (item) => {
91
- return item.x && item.y ? {
92
- x: item.x,
93
- y: item.y
94
- } : {
95
- x: cumputedX(item.time),
96
- y: cumputedY(pulseObj.type, pulseObj.list, item.value)
97
- };
91
+ if (item.x && item.y) {
92
+ return {
93
+ x: item.x,
94
+ y: item.y
95
+ };
96
+ }
97
+ if (isEffectiveNode(item) && isLimit(item.time)) {
98
+ let y = cumputedY(pulseObj.type, pulseObj.list, item.value);
99
+ y = y < vitalSignsOriginY.originY ? vitalSignsOriginY.originY : y > vitalSignsOriginY.endY ? vitalSignsOriginY.endY : y;
100
+ return {
101
+ x: cumputedX(item.time),
102
+ y
103
+ };
104
+ }
98
105
  };
99
106
  data1.list.forEach((item, index) => {
100
107
  const point1 = getPoint(item);
101
108
  const item2 = data2.list[index];
102
109
  const point2 = item2 ? getPoint(item2) : null;
103
- if (point2 && point1.x === point2.x && point1.y !== point2.y) {
110
+ if (point1 && point2 && point1.x === point2.x && point1.y !== point2.y) {
104
111
  points1.push(point1);
105
112
  points2.push(point2);
106
113
  const itemPrev = data1.list[index - 1];
@@ -108,12 +115,12 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
108
115
  const itemNext2 = data2.list[index + 1];
109
116
  if (itemPrev && points1.length === 1) {
110
117
  const point = getPoint(itemPrev);
111
- points1.unshift(point);
118
+ point && points1.unshift(point);
112
119
  }
113
120
  if (itemNext && itemNext2) {
114
121
  const pointNext = getPoint(itemNext);
115
122
  const pointNext2 = getPoint(itemNext2);
116
- if (pointNext.x === pointNext2.x && pointNext.y === pointNext2.y) {
123
+ if (pointNext && pointNext2 && pointNext.x === pointNext2.x && pointNext.y === pointNext2.y) {
117
124
  points1.push(pointNext);
118
125
  }
119
126
  } else {
@@ -349,13 +356,11 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
349
356
  coolPoint && otherList.push(coolPoint);
350
357
  }
351
358
  }
352
- let line;
353
359
  let point;
354
- let previousLine;
355
- line = points && nextPoint && !v.breakpoint ? drawLine([...points, ...nextPoint], {
360
+ const line = points && nextPoint && !v.breakpoint ? drawLine([...points, ...nextPoint], {
356
361
  ...lineAttr
357
362
  }) : null;
358
- previousLine = lineList[index - 1];
363
+ const previousLine = lineList[index - 1];
359
364
  const pointAttrNew = {
360
365
  origin: {
361
366
  data: v,
@@ -1 +1,7 @@
1
+ import { Ref } from 'vue';
2
+ import { fabric } from '../utils';
3
+ import { IPropItems } from '../interface';
1
4
  export declare function useEvent(element: HTMLCanvasElement | any): void;
5
+ export declare function useCanvasEvent(canvas: Ref<fabric.Canvas>, propItems: IPropItems, emits: any): {
6
+ select: (key: string) => void;
7
+ };
@@ -1,4 +1,5 @@
1
1
  import { useEventListener } from '@vueuse/core';
2
+ import { fabric } from '../utils/index.js';
2
3
 
3
4
  function useEvent(element) {
4
5
  useEventListener(element.nextSibling, "contextmenu", (e) => {
@@ -6,5 +7,69 @@ function useEvent(element) {
6
7
  return false;
7
8
  });
8
9
  }
10
+ function useCanvasEvent(canvas, propItems, emits) {
11
+ const { originY, originX, endX, endY, iconsWidth, selectionStyle, topList } = propItems;
12
+ function drawRect(options, key) {
13
+ const { left, top, width, height } = options;
14
+ const rect = new fabric.Rect({
15
+ key,
16
+ left: left != null ? left : 0,
17
+ top: top != null ? top : 0,
18
+ width,
19
+ height,
20
+ stroke: "transparent",
21
+ strokeWidth: 1,
22
+ fill: "transparent",
23
+ lockMovementX: true,
24
+ lockMovementY: true,
25
+ transparentCorners: false,
26
+ ...selectionStyle
27
+ });
28
+ canvas.value.add(rect);
29
+ rect.on("mousedown", () => {
30
+ emits("select", key);
31
+ });
32
+ return rect;
33
+ }
34
+ function initSelection() {
35
+ if (typeof (selectionStyle == null ? void 0 : selectionStyle.evented) === "boolean" && !(selectionStyle == null ? void 0 : selectionStyle.evented))
36
+ return;
37
+ const selections2 = [];
38
+ selections2.push(drawRect({
39
+ left: iconsWidth,
40
+ top: originY,
41
+ width: originX - iconsWidth,
42
+ height: endY
43
+ }, "left"));
44
+ let topY = 0;
45
+ topList.forEach((item, index) => {
46
+ if (index > 0) {
47
+ topY += propItems[`${topList[index - 1].key}Height`];
48
+ }
49
+ selections2.push(drawRect({
50
+ left: iconsWidth,
51
+ top: topY,
52
+ width: endX - iconsWidth,
53
+ height: propItems[`${item.key}Height`]
54
+ }, item.key));
55
+ });
56
+ selections2.push(drawRect({
57
+ left: originX,
58
+ top: originY,
59
+ width: endX - originX,
60
+ height: endY - originY
61
+ }, "grid"));
62
+ canvas.value.renderAll();
63
+ return selections2;
64
+ }
65
+ const selections = initSelection();
66
+ function select(key) {
67
+ canvas.value.discardActiveObject();
68
+ const obj = selections == null ? void 0 : selections.find((obj2) => obj2.key === key);
69
+ obj && obj.bringToFront();
70
+ obj && canvas.value.setActiveObject(obj);
71
+ }
72
+ return { select };
73
+ }
9
74
 
10
- export { useEvent };
75
+ export { useCanvasEvent, useEvent };
@@ -14,21 +14,12 @@ function useTop(canvas, propItems) {
14
14
  hospitalDaysHeight,
15
15
  operationDaysHeight,
16
16
  xScalevalueHeight,
17
- iconsWidth
17
+ iconsWidth,
18
+ topList
18
19
  } = propItems;
19
20
  function drawTop() {
20
21
  let list = [];
21
22
  let topY = 0;
22
- let topList = [];
23
- for (let i in top) {
24
- if (top[i].show) {
25
- topList.push({
26
- ...top[i],
27
- key: i
28
- });
29
- }
30
- }
31
- topList.sort((a, b) => a.seq - b.seq);
32
23
  topList.forEach((item, index) => {
33
24
  if (index > 0) {
34
25
  topY += propItems[`${topList[index - 1].key}Height`];
@@ -23,10 +23,12 @@ export interface IPropItems {
23
23
  canvasWidth: number;
24
24
  canvasHeight: number;
25
25
  borderStyle: fabric.ILineOptions;
26
+ selectionStyle: any;
26
27
  dateHeight: number;
27
28
  hospitalDaysHeight: number;
28
29
  operationDaysHeight: number;
29
30
  xScalevalueHeight: number;
31
+ topList: IDate[];
30
32
  breathingHeight: number;
31
33
  grid: IGrid;
32
34
  top: ITop;
@@ -96,6 +98,7 @@ export interface IData {
96
98
  width: number;
97
99
  height: number;
98
100
  borderStyle?: fabric.ILineOptions;
101
+ selectionStyle?: any;
99
102
  grid: IGrid;
100
103
  other?: IOther;
101
104
  top: ITop;
@@ -409,7 +409,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{
409
409
  }[]>;
410
410
  formHeight: import("vue").ComputedRef<any>;
411
411
  scrollTo: (id: string) => Promise<void>;
412
- onScroll: () => Promise<void>;
412
+ onScroll: () => void;
413
413
  bindInfo: (info: import("../../../es/src/types").AnyObject) => import("../../../es/src/types").AnyObject;
414
414
  queryWidget: (key: string, wrapperElement: HTMLElement, fieldList: import("./src/types").FieldItem[]) => Promise<{
415
415
  widgetElement: HTMLInputElement | null | undefined;
@@ -409,7 +409,7 @@ declare const _default: import("vue").DefineComponent<{
409
409
  }[]>;
410
410
  formHeight: import("vue").ComputedRef<any>;
411
411
  scrollTo: (id: string) => Promise<void>;
412
- onScroll: () => Promise<void>;
412
+ onScroll: () => void;
413
413
  bindInfo: (info: AnyObject) => AnyObject;
414
414
  queryWidget: (key: string, wrapperElement: HTMLElement, fieldList: FieldItem[]) => Promise<{
415
415
  widgetElement: HTMLInputElement | null | undefined;
@@ -1,9 +1,9 @@
1
- import { defineComponent, inject, computed, ref, createVNode } from 'vue';
1
+ import { defineComponent, inject, computed, createVNode } from 'vue';
2
2
  import { isVoidField } from '@formily/core';
3
3
  import { connect, mapProps } from '@formily/vue';
4
- import { FileTrayFull, FileTray } from '@vicons/ionicons5';
5
4
  import { isBoolean } from 'lodash-es';
6
- import { NFormItem, NPopover, NIcon, NInput } from 'naive-ui';
5
+ import { NFormItem } from 'naive-ui';
6
+ import AnnotationEdit from '../../../../../packages/annotation-edit';
7
7
  import { InjectionAnnotation } from '../../../../../packages/form-render/src/constants';
8
8
 
9
9
  const script = defineComponent({
@@ -27,96 +27,12 @@ const script = defineComponent({
27
27
  };
28
28
  }
29
29
  });
30
- function renderTextarea() {
31
- return createVNode(NInput, {
32
- "type": "textarea",
33
- "value": annotationContent.value,
34
- "onUpdate:value": ($event) => annotationContent.value = $event
35
- }, null);
36
- }
37
- const __showPopper = ref(false);
38
- const showPopper = computed({
39
- get() {
40
- return __showPopper.value;
41
- },
42
- async set(value) {
43
- __showPopper.value = value;
44
- if (!value && isEdit.value) {
45
- await new Promise((resolve) => setTimeout(resolve, 200));
46
- isEdit.value = false;
47
- }
48
- }
49
- });
50
- const isEdit = ref(false);
51
- let clickTimer;
52
- function iconClick() {
53
- clearTimeout(clickTimer);
54
- if (showPopper.value && isEdit.value) {
55
- showPopper.value = false;
56
- return;
57
- }
58
- clickTimer = setTimeout(() => {
59
- if (!annotationContent.value) {
60
- isEdit.value = showPopper.value = true;
61
- }
62
- }, 200);
63
- }
64
- function iconDbClick() {
65
- clearTimeout(clickTimer);
66
- if (!annotationContent.value)
67
- return;
68
- showPopper.value = true;
69
- isEdit.value = true;
70
- }
71
- function iconMouseenter() {
72
- if (!annotationContent.value)
73
- return;
74
- showPopper.value = true;
75
- }
76
- function iconMouseleave() {
77
- if (!annotationContent.value || isEdit.value)
78
- return;
79
- showPopper.value = false;
80
- }
81
30
  function renderAnnotation() {
82
- return createVNode("section", {
83
- "class": ["form-render__formItemLabel--annotation", {
84
- "is-active": !!annotationContent.value
85
- }],
86
- "style": {
87
- "--icon-right": "-5"
88
- },
89
- "form-item-hover-show": !annotationContent.value && !isEdit.value
90
- }, [createVNode(NPopover, {
91
- "style": {
92
- maxWidth: "200px",
93
- wordBreak: "break-all"
94
- },
95
- "show": showPopper.value,
96
- "onUpdate:show": ($event) => showPopper.value = $event,
97
- "trigger": "manual",
98
- "duration": 100
99
- }, {
100
- default: renderDefault,
101
- trigger: renderTrigger
102
- })]);
103
- function renderText() {
104
- return createVNode("span", null, [annotationContent.value]);
105
- }
106
- function renderDefault() {
107
- return createVNode("div", null, [isEdit.value ? renderTextarea() : renderText()]);
108
- }
109
- function renderTrigger() {
110
- return createVNode("div", {
111
- "class": "form-render__formItemLabel--icon",
112
- "onMouseleave": iconMouseleave,
113
- "onMouseenter": iconMouseenter,
114
- "onDblclick": iconDbClick,
115
- "onClick": iconClick
116
- }, [createVNode(NIcon, {
117
- "component": annotationContent.value ? FileTrayFull : FileTray
118
- }, null)]);
119
- }
31
+ return createVNode(AnnotationEdit, {
32
+ "class": "form-render__formItemLabel--annotation",
33
+ "modelValue": annotationContent.value,
34
+ "onUpdate:modelValue": ($event) => annotationContent.value = $event
35
+ }, null);
120
36
  }
121
37
  const showAnnotation = computed(() => {
122
38
  return annotation.value && (!isBoolean(props.annotation) || props.annotation);
@@ -3,7 +3,7 @@ import { ISchema } from '@formily/json-schema/esm/types';
3
3
  import { FormItemDepsCollector } from '../../../../../es/packages/form-render';
4
4
  export declare function useAnchor(props: Readonly<AnyObject>, collector: FormItemDepsCollector): {
5
5
  currentAnchor: import("vue").WritableComputedRef<string>;
6
- onScroll: () => Promise<void>;
6
+ onScroll: () => void;
7
7
  formHeight: import("vue").ComputedRef<any>;
8
8
  anchorIdList: import("vue").Ref<{
9
9
  name: string;
@@ -3,7 +3,7 @@ import { useDebounceFn } from '@vueuse/core';
3
3
  import { isNumber } from 'lodash-es';
4
4
  import { ref, computed, watch, nextTick } from 'vue';
5
5
  import { FormItemLineBarDepKeyPrepend } from '../../../../packages/form-render/src/constants';
6
- import { traverseSchema, createLinebarId } from '../../../../packages/form-render/src/utils';
6
+ import { createLinebarId, traverseSchema } from '../../../../packages/form-render/src/utils';
7
7
 
8
8
  function useAnchor(props, collector) {
9
9
  const __currentAnchor = ref("");
@@ -44,13 +44,13 @@ function useAnchor(props, collector) {
44
44
  scrollLock = false;
45
45
  }
46
46
  }
47
- const onScroll = useDebounceFn(async function() {
47
+ const onScroll = useDebounceFn(function() {
48
48
  var _a;
49
49
  if (scrollLock || !scrollbarRef.value)
50
50
  return;
51
51
  const { scrollTop, clientHeight } = scrollbarRef.value;
52
52
  const result = anchorIdList.value.find((anchor) => {
53
- const node = scrollbarRef.value.querySelector(`#${anchor.name}`);
53
+ const node = scrollbarRef.value.querySelector(`#${createLinebarId(anchor.name)}`);
54
54
  if (!node)
55
55
  return;
56
56
  return node.offsetTop >= scrollTop || node.offsetTop < scrollTop && node.clientHeight + node.offsetTop > scrollTop + clientHeight;
@@ -1,7 +1,7 @@
1
1
  import { isObject } from '@vueuse/core';
2
2
  import { isArray, pick } from 'lodash-es';
3
3
  import { useFormValidator, useTypeNormalize } from '../../../../packages/form-render';
4
- import { createLinebarId, arrayed, transformDateFormat } from '../utils/index.js';
4
+ import { fieldKeyEscape, createLinebarId, arrayed, transformDateFormat } from '../utils/index.js';
5
5
 
6
6
  function useFieldListAdaptor(collector, uuid) {
7
7
  const { createValidatorSchema } = useFormValidator();
@@ -174,13 +174,15 @@ function useFieldListAdaptor(collector, uuid) {
174
174
  return creator(item);
175
175
  };
176
176
  const createWidgetCombinationSchema = (item) => {
177
+ if (!item.suffixConfig)
178
+ return createWidgetSchema(item);
177
179
  const suffixList = arrayed(item.suffixConfig);
178
180
  const fieldList = [{ ...item, suffixConfig: void 0 }].concat(suffixList.map((suffix) => {
179
181
  return { ...suffix, is_show: item.is_show, alias: " " };
180
182
  }));
181
183
  return {
182
184
  type: "void",
183
- name: fieldList.map((f) => f.val_key).join("-"),
185
+ name: fieldKeyEscape(fieldList),
184
186
  title: item.alias || item.name,
185
187
  "x-component": "INPUT_GROUP",
186
188
  "x-component-props": { span: item.elem_width },
@@ -212,7 +214,7 @@ function useFieldListAdaptor(collector, uuid) {
212
214
  }
213
215
  function createFieldName(fieldItem) {
214
216
  if (isArray(fieldItem.suffixConfig)) {
215
- return [fieldItem.val_key, fieldItem.suffixConfig.map((f) => f.val_key)].join("-");
217
+ return fieldKeyEscape([fieldItem, ...fieldItem.suffixConfig]);
216
218
  }
217
219
  return fieldItem.val_key;
218
220
  }
@@ -69,6 +69,7 @@ export declare type FieldItem = {
69
69
  nameKey: string;
70
70
  valueKey: string;
71
71
  }>;
72
+ suffixConfig: FieldItem[] | FieldItem;
72
73
  fieldType: 'string' | 'object' | 'array' | 'number' | 'void' | 'boolean' | 'datetime';
73
74
  content: string | FormRenderer | Record<string, FormRenderer>;
74
75
  properties: FieldItem[];
@@ -27,3 +27,4 @@ export declare function queryInput(decoratorElement?: HTMLElement | null): {
27
27
  };
28
28
  export declare function getParentLinebar(key: string, fieldList: FieldItem[]): string | null;
29
29
  export declare function createLinebarId(id: string): string;
30
+ export declare function fieldKeyEscape(fieldList: FieldItem[]): string;
@@ -139,5 +139,8 @@ function getParentLinebar(key, fieldList) {
139
139
  function createLinebarId(id) {
140
140
  return `id-${id}`;
141
141
  }
142
+ function fieldKeyEscape(fieldList) {
143
+ return fieldList.map((f) => f.val_key).join("-").replace(/[.]/g, "_");
144
+ }
142
145
 
143
- export { arrayed, assignUpdateValue, createLinebarId, createSlot, formRenderLog, generateUrlParams, getParentLinebar, injectOrProvide, isIdCard, isMobile, parseBirthday, parseIdCard, queryDecorator, queryInput, transformDateFormat, traverseSchema, uuidGenerator };
146
+ export { arrayed, assignUpdateValue, createLinebarId, createSlot, fieldKeyEscape, formRenderLog, generateUrlParams, getParentLinebar, injectOrProvide, isIdCard, isMobile, parseBirthday, parseIdCard, queryDecorator, queryInput, transformDateFormat, traverseSchema, uuidGenerator };
@@ -1,3 +1,18 @@
1
+ .annotation-edit {
2
+ cursor: pointer;
3
+ color: #0067ee;
4
+ font-size: 16px;
5
+ user-select: none;
6
+ display: inline-flex;
7
+ align-items: center;
8
+ }
9
+ .annotation-edit.is-active {
10
+ color: rgba(255, 152, 40);
11
+ }
12
+ .annotation-edit__icon {
13
+ display: inline-flex;
14
+ align-items: center;
15
+ }
1
16
  .form-render__wrapper {
2
17
  display: grid !important;
3
18
  grid-template-columns: repeat(var(--column), minmax(0px, 1fr));
@@ -21,24 +36,11 @@
21
36
  .form-render__formItemLabel--text.has-annotation {
22
37
  margin-right: 15px;
23
38
  }
24
- .form-render__formItemLabel--icon {
25
- display: inline-flex;
26
- align-items: center;
27
- }
28
39
  .form-render__formItemLabel--annotation {
29
40
  position: absolute;
30
41
  top: 50%;
31
42
  transform: translateY(-50%);
32
43
  right: calc(var(--icon-right) * 1px);
33
- cursor: pointer;
34
- color: #0067ee;
35
- font-size: 16px;
36
- user-select: none;
37
- display: inline-flex;
38
- align-items: center;
39
- }
40
- .form-render__formItemLabel--annotation.is-active {
41
- color: rgba(255, 152, 40);
42
44
  }
43
45
  .form-render__linebar {
44
46
  grid-column: span var(--column) / span var(--column);
@@ -132,9 +134,9 @@
132
134
  .form-render .n-form-item-label {
133
135
  display: inline-flex;
134
136
  }
135
- .form-render .n-form-item-label [form-item-hover-show='true'] {
137
+ .form-render .n-form-item-label [annotation-hover-show='true'] {
136
138
  visibility: hidden;
137
139
  }
138
- .form-render .n-form-item-label:hover [form-item-hover-show='true'] {
140
+ .form-render .n-form-item-label:hover [annotation-hover-show='true'] {
139
141
  visibility: visible;
140
142
  }
@@ -2646,6 +2646,21 @@ body > .vxe-table--tooltip-wrapper {
2646
2646
  font-size: 14px;
2647
2647
  text-decoration: none !important;
2648
2648
  }
2649
+ .annotation-edit {
2650
+ cursor: pointer;
2651
+ color: #0067ee;
2652
+ font-size: 16px;
2653
+ user-select: none;
2654
+ display: inline-flex;
2655
+ align-items: center;
2656
+ }
2657
+ .annotation-edit.is-active {
2658
+ color: rgba(255, 152, 40);
2659
+ }
2660
+ .annotation-edit__icon {
2661
+ display: inline-flex;
2662
+ align-items: center;
2663
+ }
2649
2664
  .form-render__wrapper {
2650
2665
  display: grid !important;
2651
2666
  grid-template-columns: repeat(var(--column), minmax(0px, 1fr));
@@ -2669,24 +2684,11 @@ body > .vxe-table--tooltip-wrapper {
2669
2684
  .form-render__formItemLabel--text.has-annotation {
2670
2685
  margin-right: 15px;
2671
2686
  }
2672
- .form-render__formItemLabel--icon {
2673
- display: inline-flex;
2674
- align-items: center;
2675
- }
2676
2687
  .form-render__formItemLabel--annotation {
2677
2688
  position: absolute;
2678
2689
  top: 50%;
2679
2690
  transform: translateY(-50%);
2680
2691
  right: calc(var(--icon-right) * 1px);
2681
- cursor: pointer;
2682
- color: #0067ee;
2683
- font-size: 16px;
2684
- user-select: none;
2685
- display: inline-flex;
2686
- align-items: center;
2687
- }
2688
- .form-render__formItemLabel--annotation.is-active {
2689
- color: rgba(255, 152, 40);
2690
2692
  }
2691
2693
  .form-render__linebar {
2692
2694
  grid-column: span var(--column) / span var(--column);
@@ -2780,10 +2782,10 @@ body > .vxe-table--tooltip-wrapper {
2780
2782
  .form-render .n-form-item-label {
2781
2783
  display: inline-flex;
2782
2784
  }
2783
- .form-render .n-form-item-label [form-item-hover-show='true'] {
2785
+ .form-render .n-form-item-label [annotation-hover-show='true'] {
2784
2786
  visibility: hidden;
2785
2787
  }
2786
- .form-render .n-form-item-label:hover [form-item-hover-show='true'] {
2788
+ .form-render .n-form-item-label:hover [annotation-hover-show='true'] {
2787
2789
  visibility: visible;
2788
2790
  }
2789
2791
  .c-fabric-chart-popup-tip,
package/global.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import * as NaiveUI from 'naive-ui';
2
-
3
- declare module 'naive-ui' {
4
- // @ts-ignore
5
- export const NTree: any;
6
- }
7
-
8
- export {};
1
+ import * as NaiveUI from 'naive-ui';
2
+
3
+ declare module 'naive-ui' {
4
+ // @ts-ignore
5
+ export const NTree: any;
6
+ }
7
+
8
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
3
  "private": false,
4
- "version": "3.1.14-beta.3",
4
+ "version": "3.1.14-beta.6",
5
5
  "license": "ISC",
6
6
  "module": "es/packages/index.js",
7
7
  "main": "es/packages/index.js",