cnhis-design-vue 3.1.14-beta.4 → 3.1.14-beta.7
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 +22 -22
- 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 +4 -4
- package/es/packages/big-table/src/bigTableEmits.js +1 -1
- package/es/packages/big-table/src/utils.js +2 -2
- package/es/packages/button-print/index.d.ts +1 -0
- package/es/packages/button-print/index.js +1 -0
- package/es/packages/button-print/src/ButtonPrint.vue_vue_type_script_setup_true_lang.js +5 -1
- package/es/packages/button-print/src/utils/index.d.ts +1 -0
- package/es/packages/button-print/src/utils/index.js +1 -0
- package/es/packages/button-print/src/utils/print.d.ts +1 -1
- package/es/packages/button-print/src/utils/print.js +1 -1
- package/es/packages/fabric-chart/index.d.ts +5 -2
- package/es/packages/fabric-chart/src/FabricChart.vue.d.ts +6 -3
- package/es/packages/fabric-chart/src/FabricChart.vue_vue_type_script_setup_true_lang.js +24 -3
- package/es/packages/fabric-chart/src/hooks/index.d.ts +1 -1
- package/es/packages/fabric-chart/src/hooks/index.js +2 -2
- package/es/packages/fabric-chart/src/hooks/useCenter.js +19 -14
- package/es/packages/fabric-chart/src/hooks/useEvent.d.ts +6 -0
- package/es/packages/fabric-chart/src/hooks/useEvent.js +66 -1
- package/es/packages/fabric-chart/src/hooks/useTop.js +2 -11
- package/es/packages/fabric-chart/src/interface.d.ts +3 -0
- 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/hooks/useFieldListAdaptor.js +5 -3
- package/es/packages/form-render/src/types/fieldItem.d.ts +1 -0
- package/es/packages/form-render/src/utils/index.d.ts +1 -0
- package/es/packages/form-render/src/utils/index.js +4 -1
- package/es/packages/form-render/style/index.css +17 -15
- package/es/packages/index.css +17 -15
- package/es/packages/index.d.ts +1 -0
- package/es/packages/index.js +1 -0
- package/es/packages/info-header/index.d.ts +0 -2
- package/es/packages/info-header/src/InfoHeader.vue.d.ts +0 -2
- package/es/packages/info-header/src/InfoHeader.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/{packages/info-header/src → src/components/SlotRender}/SlotRender.d.ts +0 -2
- package/es/{packages/info-header/src → src/components/SlotRender}/SlotRender.js +5 -5
- package/es/src/components/SlotRender/index.d.ts +2 -0
- package/es/src/components/SlotRender/index.js +2 -0
- package/global.d.ts +8 -8
- package/package.json +1 -1
|
@@ -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: () =>
|
|
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;
|
|
@@ -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
|
|
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
|
|
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 [
|
|
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,
|
package/es/packages/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ import CShortcutSetter from './shortcut-setter';
|
|
|
22
22
|
export * from './form-render';
|
|
23
23
|
export * from './shortcut-provider';
|
|
24
24
|
export * from './big-table';
|
|
25
|
+
export * from './button-print';
|
|
25
26
|
declare function install(app: App): void;
|
|
26
27
|
export { CGrid, CBigTable, CFieldSet, CDragLayout, CButtonPrint, CSelectPerson, CSelectLabel, CLabelFormContent, CScaleView, CMap, CVodChunkUpload, CRadio, CCheckbox, CSelect, CDatetime, CFormTable, CInfoHeader, CTimeLine, CBpmnWorkflow, CStepsWheel, Editor, CFormRender, CFabricChart, CShortcutProvider, CShortcutSetter };
|
|
27
28
|
declare const _default: {
|
package/es/packages/index.js
CHANGED
|
@@ -55,6 +55,7 @@ export { useFormContext } from './form-render/src/hooks/useFormContext.js';
|
|
|
55
55
|
export { ShortcutManager, useShortcuts } from './shortcut-provider/src/hooks/useShortcuts.js';
|
|
56
56
|
export { useShortcutSignature } from './shortcut-provider/src/hooks/useShortcutSignature.js';
|
|
57
57
|
export { useColumnConfigAdaptor } from './big-table/src/hooks/useColumnConfigAdaptor.js';
|
|
58
|
+
export { Print } from './button-print/src/utils/print.js';
|
|
58
59
|
|
|
59
60
|
const components = {
|
|
60
61
|
CGrid: Grid,
|
|
@@ -1411,7 +1411,6 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1411
1411
|
};
|
|
1412
1412
|
rootSlots: {
|
|
1413
1413
|
type: import("vue").PropType<Record<string, import("../../../es/src/types").Func<any[], any>>>;
|
|
1414
|
-
required: true;
|
|
1415
1414
|
};
|
|
1416
1415
|
}, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1417
1416
|
renderer: {
|
|
@@ -1420,7 +1419,6 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1420
1419
|
};
|
|
1421
1420
|
rootSlots: {
|
|
1422
1421
|
type: import("vue").PropType<Record<string, import("../../../es/src/types").Func<any[], any>>>;
|
|
1423
|
-
required: true;
|
|
1424
1422
|
};
|
|
1425
1423
|
}>>, {}>;
|
|
1426
1424
|
HiddenContent: import("vue").DefineComponent<{
|
|
@@ -1412,7 +1412,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1412
1412
|
};
|
|
1413
1413
|
rootSlots: {
|
|
1414
1414
|
type: PropType<Record<string, import("../../../../es/src/types").Func<any[], any>>>;
|
|
1415
|
-
required: true;
|
|
1416
1415
|
};
|
|
1417
1416
|
}, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1418
1417
|
renderer: {
|
|
@@ -1421,7 +1420,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1421
1420
|
};
|
|
1422
1421
|
rootSlots: {
|
|
1423
1422
|
type: PropType<Record<string, import("../../../../es/src/types").Func<any[], any>>>;
|
|
1424
|
-
required: true;
|
|
1425
1423
|
};
|
|
1426
1424
|
}>>, {}>;
|
|
1427
1425
|
HiddenContent: import("vue").DefineComponent<{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, nextTick, onMounted, watch, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, createCommentVNode, Fragment, toDisplayString, renderList, withDirectives, createBlock, unref, withCtx, createTextVNode, vShow, createVNode } from 'vue';
|
|
2
2
|
import { NTag, NDescriptions, NDescriptionsItem, NEllipsis } from 'naive-ui';
|
|
3
3
|
import { useThrottleFn, useEventListener } from '@vueuse/core';
|
|
4
|
-
import SlotRender from '
|
|
4
|
+
import SlotRender from '../../../src/components/SlotRender';
|
|
5
5
|
import './HiddenContent.js';
|
|
6
6
|
import script$1 from './HiddenContent.vue_vue_type_script_setup_true_lang.js';
|
|
7
7
|
|
|
@@ -7,7 +7,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7
7
|
};
|
|
8
8
|
rootSlots: {
|
|
9
9
|
type: PropType<Record<string, Func<any[], any>>>;
|
|
10
|
-
required: true;
|
|
11
10
|
};
|
|
12
11
|
}, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
12
|
renderer: {
|
|
@@ -16,7 +15,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
16
15
|
};
|
|
17
16
|
rootSlots: {
|
|
18
17
|
type: PropType<Record<string, Func<any[], any>>>;
|
|
19
|
-
required: true;
|
|
20
18
|
};
|
|
21
19
|
}>>, {}>;
|
|
22
20
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isString, isFunction } from 'lodash-es';
|
|
2
2
|
import { defineComponent } from 'vue';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var script = defineComponent({
|
|
5
5
|
name: "SlotRender",
|
|
6
6
|
props: {
|
|
7
7
|
renderer: {
|
|
@@ -9,15 +9,15 @@ var SlotRender = defineComponent({
|
|
|
9
9
|
required: true
|
|
10
10
|
},
|
|
11
11
|
rootSlots: {
|
|
12
|
-
type: Object
|
|
13
|
-
required: true
|
|
12
|
+
type: Object
|
|
14
13
|
}
|
|
15
14
|
},
|
|
16
15
|
setup(props, {
|
|
17
16
|
attrs
|
|
18
17
|
}) {
|
|
19
18
|
function renderSlots(slotName) {
|
|
20
|
-
|
|
19
|
+
var _a;
|
|
20
|
+
const renderer = (_a = props.rootSlots) == null ? void 0 : _a[slotName];
|
|
21
21
|
return isFunction(renderer) ? renderer(attrs) : null;
|
|
22
22
|
}
|
|
23
23
|
function renderVNode(renderer) {
|
|
@@ -32,4 +32,4 @@ var SlotRender = defineComponent({
|
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
|
|
35
|
-
export {
|
|
35
|
+
export { script as default };
|
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 {};
|