cnhis-design-vue 3.1.14-beta.5 → 3.1.14-beta.6
Sign up to get free protection for your applications and to get access to all the features.
- package/es/packages/annotation-edit/index.d.ts +17 -0
- package/es/packages/annotation-edit/index.js +10 -0
- package/es/packages/annotation-edit/src/AnnotationEdit.d.ts +16 -0
- package/es/packages/annotation-edit/src/AnnotationEdit.js +119 -0
- package/es/packages/annotation-edit/style/index.css +15 -0
- package/es/packages/big-table/src/BigTable.vue.d.ts +2 -12
- package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/packages/big-table/src/utils.js +2 -2
- package/es/packages/fabric-chart/src/hooks/useCenter.js +19 -14
- package/es/packages/form-render/index.d.ts +1 -1
- package/es/packages/form-render/src/FormRender.vue.d.ts +1 -1
- package/es/packages/form-render/src/components/renderer/formItem.js +8 -92
- package/es/packages/form-render/src/hooks/useAnchor.d.ts +1 -1
- package/es/packages/form-render/src/hooks/useAnchor.js +3 -3
- package/es/packages/form-render/src/types/fieldItem.d.ts +1 -1
- package/es/packages/form-render/style/index.css +17 -15
- package/es/packages/index.css +17 -15
- package/package.json +1 -1
@@ -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
|
+
}
|
@@ -1091,9 +1091,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
1091
1091
|
textColorGhostHoverSuccess: string;
|
1092
1092
|
textColorGhostPressedSuccess: string;
|
1093
1093
|
textColorGhostFocusSuccess: string;
|
1094
|
-
/**
|
1095
|
-
* 删除选中scan数据
|
1096
|
-
*/
|
1097
1094
|
textColorGhostDisabledSuccess: string;
|
1098
1095
|
borderSuccess: string;
|
1099
1096
|
borderHoverSuccess: string;
|
@@ -1136,14 +1133,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1136
1133
|
textColorHoverError: string;
|
1137
1134
|
textColorPressedError: string;
|
1138
1135
|
textColorFocusError: string;
|
1139
|
-
textColorDisabledError: string;
|
1140
|
-
* 初始化props
|
1141
|
-
* @param {*} unionItem
|
1142
|
-
* @param {*} row
|
1143
|
-
* @param {*} column
|
1144
|
-
* @param {*} $rowIndex
|
1145
|
-
* @returns
|
1146
|
-
*/
|
1136
|
+
textColorDisabledError: string;
|
1147
1137
|
textColorTextError: string;
|
1148
1138
|
textColorTextHoverError: string;
|
1149
1139
|
textColorTextPressedError: string;
|
@@ -1315,7 +1305,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1315
1305
|
colorWarning: string;
|
1316
1306
|
colorHoverWarning: string;
|
1317
1307
|
colorPressedWarning: string;
|
1318
|
-
colorFocusWarning: string;
|
1308
|
+
colorFocusWarning: string; /** string */
|
1319
1309
|
colorDisabledWarning: string;
|
1320
1310
|
textColorWarning: string;
|
1321
1311
|
textColorHoverWarning: string;
|
@@ -518,7 +518,6 @@ var script = /* @__PURE__ */ defineComponent({
|
|
518
518
|
return columns;
|
519
519
|
};
|
520
520
|
const formatterEdit = (params, col) => {
|
521
|
-
console.log(params, col);
|
522
521
|
let {
|
523
522
|
row,
|
524
523
|
column,
|
@@ -2303,7 +2302,8 @@ var script = /* @__PURE__ */ defineComponent({
|
|
2303
2302
|
visibleMethod: unref(visibleMethod),
|
2304
2303
|
trigger: "cell",
|
2305
2304
|
reserve: true,
|
2306
|
-
highlight: true
|
2305
|
+
highlight: true,
|
2306
|
+
..._ctx.$attrs.checkboxConfig || {}
|
2307
2307
|
},
|
2308
2308
|
"radio-config": {
|
2309
2309
|
checkField: "checked",
|
@@ -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 ===
|
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
|
};
|
@@ -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
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
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
|
-
|
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,
|
@@ -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: () =>
|
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: () =>
|
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,
|
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
|
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(
|
83
|
-
"class":
|
84
|
-
|
85
|
-
|
86
|
-
|
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: () =>
|
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 {
|
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(
|
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;
|
@@ -69,7 +69,7 @@ export declare type FieldItem = {
|
|
69
69
|
nameKey: string;
|
70
70
|
valueKey: string;
|
71
71
|
}>;
|
72
|
-
suffixConfig: FieldItem[];
|
72
|
+
suffixConfig: FieldItem[] | FieldItem;
|
73
73
|
fieldType: 'string' | 'object' | 'array' | 'number' | 'void' | 'boolean' | 'datetime';
|
74
74
|
content: string | FormRenderer | Record<string, FormRenderer>;
|
75
75
|
properties: FieldItem[];
|
@@ -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 [
|
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 [
|
140
|
+
.form-render .n-form-item-label:hover [annotation-hover-show='true'] {
|
139
141
|
visibility: visible;
|
140
142
|
}
|
package/es/packages/index.css
CHANGED
@@ -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 [
|
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 [
|
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,
|