cnhis-design-vue 3.1.12-beta.4 → 3.1.12-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/es/packages/big-table/index.d.ts +0 -8
- package/es/packages/big-table/src/BigTable.vue.d.ts +0 -8
- package/es/packages/big-table/src/bigTableState.js +1 -1
- package/es/packages/fabric-chart/index.d.ts +195 -1
- package/es/packages/fabric-chart/src/FabricChart.vue.d.ts +196 -1
- package/es/packages/fabric-chart/src/FabricChart.vue_vue_type_script_setup_true_lang.js +269 -6
- package/es/packages/fabric-chart/src/components/PopupMenu.d.ts +46 -0
- package/es/packages/fabric-chart/src/components/PopupMenu.js +105 -0
- package/es/packages/fabric-chart/src/components/PopupTip.js +4 -0
- package/es/packages/fabric-chart/src/components/PopupTip.vue.d.ts +63 -0
- package/es/packages/fabric-chart/src/components/PopupTip.vue_vue_type_script_setup_true_lang.js +32 -0
- package/es/packages/fabric-chart/src/components/useStyle.d.ts +7 -0
- package/es/packages/fabric-chart/src/components/useStyle.js +36 -0
- package/es/packages/fabric-chart/src/hooks/constant.d.ts +14 -0
- package/es/packages/fabric-chart/src/hooks/constant.js +36 -0
- package/es/packages/fabric-chart/src/hooks/index.d.ts +9 -0
- package/es/packages/fabric-chart/src/hooks/index.js +9 -0
- package/es/packages/fabric-chart/src/hooks/useBottom.d.ts +4 -0
- package/es/packages/fabric-chart/src/hooks/useBottom.js +86 -0
- package/es/packages/fabric-chart/src/hooks/useCenter.d.ts +29 -0
- package/es/packages/fabric-chart/src/hooks/useCenter.js +475 -0
- package/es/packages/fabric-chart/src/hooks/useCumputedPoint.d.ts +7 -0
- package/es/packages/fabric-chart/src/hooks/useCumputedPoint.js +53 -0
- package/es/packages/fabric-chart/src/hooks/useDraw.d.ts +42 -0
- package/es/packages/fabric-chart/src/hooks/useDraw.js +86 -0
- package/es/packages/fabric-chart/src/hooks/useEvent.d.ts +1 -0
- package/es/packages/fabric-chart/src/hooks/useEvent.js +10 -0
- package/es/packages/fabric-chart/src/hooks/useGrid.d.ts +4 -0
- package/es/packages/fabric-chart/src/hooks/useGrid.js +44 -0
- package/es/packages/fabric-chart/src/hooks/useLeft.d.ts +4 -0
- package/es/packages/fabric-chart/src/hooks/useLeft.js +180 -0
- package/es/packages/fabric-chart/src/hooks/useOther.d.ts +4 -0
- package/es/packages/fabric-chart/src/hooks/useOther.js +34 -0
- package/es/packages/fabric-chart/src/hooks/useRight.d.ts +4 -0
- package/es/packages/fabric-chart/src/hooks/useRight.js +87 -0
- package/es/packages/fabric-chart/src/hooks/useShadow.d.ts +6 -0
- package/es/packages/fabric-chart/src/hooks/useShadow.js +127 -0
- package/es/packages/fabric-chart/src/hooks/useTop.d.ts +4 -0
- package/es/packages/fabric-chart/src/hooks/useTop.js +148 -0
- package/es/packages/fabric-chart/src/interface.d.ts +115 -0
- package/es/packages/fabric-chart/src/interface.js +3 -0
- package/es/packages/fabric-chart/src/utils/index.d.ts +2 -0
- package/es/packages/fabric-chart/src/utils/index.js +15334 -0
- package/es/packages/fabric-chart/style/index.css +43 -0
- package/es/packages/form-render/src/components/renderer/cascader.js +14 -0
- package/es/packages/form-render/src/components/renderer/checkbox.d.ts +2 -0
- package/es/packages/form-render/src/components/renderer/checkbox.js +4 -5
- package/es/packages/form-render/src/components/renderer/date.js +42 -10
- package/es/packages/form-render/src/components/renderer/index.d.ts +1 -0
- package/es/packages/form-render/src/components/renderer/index.js +1 -0
- package/es/packages/form-render/src/components/renderer/linebar.js +1 -1
- package/es/packages/form-render/src/components/renderer/select.js +11 -0
- package/es/packages/form-render/src/components/renderer/simpleComponent.d.ts +2 -0
- package/es/packages/form-render/src/components/renderer/simpleComponent.js +64 -0
- package/es/packages/form-render/src/components/renderer/slider.js +1 -1
- package/es/packages/form-render/src/hooks/useFieldListAdaptor.d.ts +1 -1
- package/es/packages/form-render/src/hooks/useFieldListAdaptor.js +24 -15
- package/es/packages/index.css +50 -2
- package/es/packages/scale-view/src/components/formitem/r-collection.d.ts +1 -1
- package/es/packages/scale-view/src/components/formitem/r-collection.js +2 -4
- package/es/packages/scale-view/src/hooks/scaleview-computed.js +1 -1
- package/es/packages/scale-view/src/hooks/scaleview-init.js +3 -1
- package/es/packages/scale-view/src/hooks/use-component.d.ts +5 -5
- package/es/packages/scale-view/style/index.css +0 -2
- package/es/packages/select-label/style/index.css +7 -0
- package/package.json +2 -2
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
.c-fabric-chart-popup-tip,
|
|
2
|
+
.c-fabric-chart-popup-menu {
|
|
3
|
+
position: absolute;
|
|
4
|
+
z-index: 1001;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-flow: column nowrap;
|
|
7
|
+
margin: 0;
|
|
8
|
+
padding: 8px 12px;
|
|
9
|
+
font-size: 12px;
|
|
10
|
+
}
|
|
11
|
+
.c-fabric-chart-popup-tip > li,
|
|
12
|
+
.c-fabric-chart-popup-menu > li {
|
|
13
|
+
list-style: none;
|
|
14
|
+
}
|
|
15
|
+
.c-fabric-chart-popup-tip {
|
|
16
|
+
border-radius: 4px;
|
|
17
|
+
background: rgba(0, 0, 0, 0.7);
|
|
18
|
+
}
|
|
19
|
+
.c-fabric-chart-popup-tip > li {
|
|
20
|
+
color: #fff;
|
|
21
|
+
}
|
|
22
|
+
.c-fabric-chart-popup-menu {
|
|
23
|
+
padding: 8px 5px !important;
|
|
24
|
+
z-index: 1001;
|
|
25
|
+
background: #fff;
|
|
26
|
+
box-shadow: 0 2px 12px 0 rgba(56, 56, 56, 0.2);
|
|
27
|
+
border: 1px solid #e2e6ed;
|
|
28
|
+
border-radius: 2px;
|
|
29
|
+
}
|
|
30
|
+
.c-fabric-chart-popup-menu > li {
|
|
31
|
+
padding: 5px;
|
|
32
|
+
background: #fff;
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
}
|
|
35
|
+
.c-fabric-chart-popup-menu > li:hover {
|
|
36
|
+
background: #f0f7ff;
|
|
37
|
+
}
|
|
38
|
+
.c-fabric-chart-popup-menu > li.no-click {
|
|
39
|
+
cursor: default;
|
|
40
|
+
}
|
|
41
|
+
.c-fabric-chart-popup-menu > li.no-click:hover {
|
|
42
|
+
background: #fff;
|
|
43
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { defineComponent, ref, inject, computed, watch, createVNode } from 'vue';
|
|
2
|
+
import { isField } from '@formily/core';
|
|
2
3
|
import { isObject, isString } from 'lodash-es';
|
|
3
4
|
import { InjectAsyncQueue } from '../../constants/index.js';
|
|
4
5
|
import { assignUpdateValue, formRenderLog, arrayed } from '../../utils/index.js';
|
|
@@ -33,6 +34,9 @@ const script = defineComponent({
|
|
|
33
34
|
title
|
|
34
35
|
} = useFormField();
|
|
35
36
|
const asyncQueue = inject(InjectAsyncQueue);
|
|
37
|
+
const {
|
|
38
|
+
field
|
|
39
|
+
} = useFormField();
|
|
36
40
|
async function fetchData(option) {
|
|
37
41
|
var _a;
|
|
38
42
|
if (!option && _options.value)
|
|
@@ -99,9 +103,13 @@ const script = defineComponent({
|
|
|
99
103
|
return _options.value || props.options || [];
|
|
100
104
|
});
|
|
101
105
|
watch(() => props.value, (n, o) => {
|
|
106
|
+
var _a, _b;
|
|
102
107
|
if (n != null && o == null) {
|
|
103
108
|
fetchData();
|
|
104
109
|
}
|
|
110
|
+
if (isField(field.value) && field.value.visited) {
|
|
111
|
+
(_b = (_a = field.value).validate) == null ? void 0 : _b.call(_a);
|
|
112
|
+
}
|
|
105
113
|
}, {
|
|
106
114
|
immediate: true
|
|
107
115
|
});
|
|
@@ -139,6 +147,11 @@ const script = defineComponent({
|
|
|
139
147
|
show.value = !!v;
|
|
140
148
|
v && fetchData();
|
|
141
149
|
}
|
|
150
|
+
function onFocus() {
|
|
151
|
+
if (isField(field.value)) {
|
|
152
|
+
field.value.visited = true;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
142
155
|
return () => {
|
|
143
156
|
return createVNode(NCascader, {
|
|
144
157
|
"value": _value.value,
|
|
@@ -150,6 +163,7 @@ const script = defineComponent({
|
|
|
150
163
|
"options": renderOptions.value,
|
|
151
164
|
"checkStrategy": "child",
|
|
152
165
|
"onLoad": fetchData,
|
|
166
|
+
"onFocus": onFocus,
|
|
153
167
|
"onUpdate:show": updateShow
|
|
154
168
|
}, slots);
|
|
155
169
|
};
|
|
@@ -9,6 +9,7 @@ export declare const CHECKBOX: import("vue").DefineComponent<{
|
|
|
9
9
|
type: BooleanConstructor;
|
|
10
10
|
default: boolean;
|
|
11
11
|
};
|
|
12
|
+
onChange: {};
|
|
12
13
|
}, () => JSX.Element, 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
14
|
options: {
|
|
14
15
|
type: PropType<AnyObject[]>;
|
|
@@ -18,6 +19,7 @@ export declare const CHECKBOX: import("vue").DefineComponent<{
|
|
|
18
19
|
type: BooleanConstructor;
|
|
19
20
|
default: boolean;
|
|
20
21
|
};
|
|
22
|
+
onChange: {};
|
|
21
23
|
}>>, {
|
|
22
24
|
options: AnyObject[];
|
|
23
25
|
vertical: boolean;
|
|
@@ -13,12 +13,11 @@ const script = defineComponent({
|
|
|
13
13
|
vertical: {
|
|
14
14
|
type: Boolean,
|
|
15
15
|
default: false
|
|
16
|
-
}
|
|
16
|
+
},
|
|
17
|
+
onChange: {}
|
|
17
18
|
},
|
|
18
|
-
setup(props
|
|
19
|
-
|
|
20
|
-
}) {
|
|
21
|
-
return () => createVNode(NCheckboxGroup, attrs, {
|
|
19
|
+
setup(props) {
|
|
20
|
+
return () => createVNode(NCheckboxGroup, null, {
|
|
22
21
|
default: () => [createVNode(NSpace, {
|
|
23
22
|
"vertical": props.vertical
|
|
24
23
|
}, {
|
|
@@ -32,20 +32,52 @@ const DATE = connect(script, mapProps((props, field) => {
|
|
|
32
32
|
max_date
|
|
33
33
|
} = props.validate;
|
|
34
34
|
if (min_date || max_date) {
|
|
35
|
-
_props.isDateDisabled =
|
|
36
|
-
|
|
37
|
-
if (min_date === "currTime") {
|
|
38
|
-
disabled = time < Date.now();
|
|
39
|
-
}
|
|
40
|
-
if (max_date === "currTime") {
|
|
41
|
-
disabled = time > Date.now();
|
|
42
|
-
}
|
|
43
|
-
return disabled;
|
|
44
|
-
};
|
|
35
|
+
_props.isDateDisabled = isDateDisabled;
|
|
36
|
+
_props.isTimeDisabled = isTimeDisabled;
|
|
45
37
|
}
|
|
46
38
|
}
|
|
47
39
|
}
|
|
48
40
|
return _props;
|
|
41
|
+
function minCurrentDate() {
|
|
42
|
+
var _a;
|
|
43
|
+
return ((_a = props.validate) == null ? void 0 : _a.min_date) === "currTime";
|
|
44
|
+
}
|
|
45
|
+
function maxCurrentDate() {
|
|
46
|
+
var _a;
|
|
47
|
+
return ((_a = props.validate) == null ? void 0 : _a.max_date) === "currTime";
|
|
48
|
+
}
|
|
49
|
+
function isDateDisabled(time) {
|
|
50
|
+
return minCurrentDate() && time < yesterday() || maxCurrentDate() && time > Date.now();
|
|
51
|
+
function yesterday() {
|
|
52
|
+
return Date.now() - 24 * 60 * 60 * 1e3;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function isTimeDisabled(time) {
|
|
56
|
+
const checkDate = new Date(time);
|
|
57
|
+
const currentDate = new Date();
|
|
58
|
+
return {
|
|
59
|
+
isHourDisabled,
|
|
60
|
+
isMinuteDisabled
|
|
61
|
+
};
|
|
62
|
+
function checkHour() {
|
|
63
|
+
return checkDate.getHours();
|
|
64
|
+
}
|
|
65
|
+
function currentHour() {
|
|
66
|
+
return currentDate.getHours();
|
|
67
|
+
}
|
|
68
|
+
function currentMinute() {
|
|
69
|
+
return currentDate.getMinutes();
|
|
70
|
+
}
|
|
71
|
+
function isHourDisabled(hour) {
|
|
72
|
+
return minCurrentDate() && hour < currentHour() || maxCurrentDate() && hour > currentHour();
|
|
73
|
+
}
|
|
74
|
+
function isMinuteDisabled(minute) {
|
|
75
|
+
if (checkHour() === currentHour()) {
|
|
76
|
+
return minCurrentDate() && minute < currentMinute() || maxCurrentDate() && minute > currentMinute();
|
|
77
|
+
}
|
|
78
|
+
return minCurrentDate() && checkHour() < currentHour() || maxCurrentDate() && checkHour() > currentHour();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
49
81
|
}));
|
|
50
82
|
|
|
51
83
|
export { DATE };
|
|
@@ -58,7 +58,7 @@ const script = defineComponent({
|
|
|
58
58
|
}) : createVNode("header", {
|
|
59
59
|
"class": "form-render__linebarHeader",
|
|
60
60
|
"onClick": toggleShow
|
|
61
|
-
}, [
|
|
61
|
+
}, [props.title]), createVNode(NCollapseTransition, {
|
|
62
62
|
"class": "form-render__linebarItem",
|
|
63
63
|
"show": _show.value
|
|
64
64
|
}, slots)]);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { defineComponent, ref, inject, computed, watch, createVNode } from 'vue';
|
|
2
|
+
import { isField } from '@formily/core';
|
|
2
3
|
import { cloneDeep } from 'lodash-es';
|
|
3
4
|
import { InjectAsyncQueue, InjectionFormItemDepsCollector, InjectionChangeContextCollector } from '../../constants/index.js';
|
|
4
5
|
import { assignUpdateValue, formRenderLog, generateUrlParams } from '../../utils/index.js';
|
|
@@ -97,9 +98,13 @@ const script = defineComponent({
|
|
|
97
98
|
immediate: true
|
|
98
99
|
});
|
|
99
100
|
watch(() => props.value, (n, o) => {
|
|
101
|
+
var _a, _b;
|
|
100
102
|
if (o == null && n != null) {
|
|
101
103
|
fetchData();
|
|
102
104
|
}
|
|
105
|
+
if (isField(field.value) && field.value.visited) {
|
|
106
|
+
(_b = (_a = field.value).validate) == null ? void 0 : _b.call(_a);
|
|
107
|
+
}
|
|
103
108
|
}, {
|
|
104
109
|
immediate: true
|
|
105
110
|
});
|
|
@@ -116,6 +121,11 @@ const script = defineComponent({
|
|
|
116
121
|
var _a, _b;
|
|
117
122
|
return (_b = (_a = props.urlConfig) == null ? void 0 : _a.valueKey) != null ? _b : "value";
|
|
118
123
|
});
|
|
124
|
+
function onFocus() {
|
|
125
|
+
if (isField(field.value)) {
|
|
126
|
+
field.value.visited = true;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
119
129
|
return () => createVNode(NSelect, {
|
|
120
130
|
"value": props.value,
|
|
121
131
|
"onUpdate:value": update,
|
|
@@ -125,6 +135,7 @@ const script = defineComponent({
|
|
|
125
135
|
"valueField": valueKey.value,
|
|
126
136
|
"onSearch": fetchData,
|
|
127
137
|
"onUpdate:show": (show) => show && fetchData(),
|
|
138
|
+
"onFocus": onFocus,
|
|
128
139
|
"options": parsedOptions.value
|
|
129
140
|
}, slots);
|
|
130
141
|
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { createVNode, mergeProps, isVNode } from 'vue';
|
|
2
|
+
import { connect, mapProps } from '@formily/vue';
|
|
3
|
+
import { isObject, isFunction } from 'lodash-es';
|
|
4
|
+
import { NButton } from 'naive-ui';
|
|
5
|
+
|
|
6
|
+
function _isSlot(s) {
|
|
7
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
8
|
+
}
|
|
9
|
+
function createPropFor(props) {
|
|
10
|
+
return (property) => {
|
|
11
|
+
var _a;
|
|
12
|
+
return (_a = props.fieldItem) == null ? void 0 : _a[property];
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function createSlot(renderer, props) {
|
|
16
|
+
if (isObject(renderer)) {
|
|
17
|
+
const result = {};
|
|
18
|
+
Object.entries(renderer).forEach(([key, renderer2]) => {
|
|
19
|
+
isFunction(renderer2) && (result[key] = () => renderer2(props));
|
|
20
|
+
});
|
|
21
|
+
return result;
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
default() {
|
|
25
|
+
return isFunction(renderer) ? renderer(props) : renderer;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
const textScript = (props) => {
|
|
30
|
+
var _a, _b, _c;
|
|
31
|
+
const propFor = createPropFor(props);
|
|
32
|
+
return createVNode("div", (_a = propFor("componentProps")) != null ? _a : {}, [(_c = (_b = createSlot(props.content, props)).default) == null ? void 0 : _c.call(_b)]);
|
|
33
|
+
};
|
|
34
|
+
const TEXT = connect(textScript, mapProps((props) => {
|
|
35
|
+
var _a;
|
|
36
|
+
return {
|
|
37
|
+
...props,
|
|
38
|
+
content: (_a = props.fieldItem) == null ? void 0 : _a.content
|
|
39
|
+
};
|
|
40
|
+
}));
|
|
41
|
+
const buttonScript = (props) => {
|
|
42
|
+
var _a;
|
|
43
|
+
let _slot;
|
|
44
|
+
const propFor = createPropFor(props);
|
|
45
|
+
function onClick() {
|
|
46
|
+
var _a2;
|
|
47
|
+
const cb = propFor("onClick") || ((_a2 = propFor("componentProps")) == null ? void 0 : _a2.onClick);
|
|
48
|
+
return () => isFunction(cb) && cb(props.fieldItem);
|
|
49
|
+
}
|
|
50
|
+
return createVNode(NButton, mergeProps((_a = propFor("componentProps")) != null ? _a : {}, {
|
|
51
|
+
"onClick": onClick()
|
|
52
|
+
}), _isSlot(_slot = createSlot(props.content, props)) ? _slot : {
|
|
53
|
+
default: () => [_slot]
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
const BUTTON = connect(buttonScript, mapProps((props) => {
|
|
57
|
+
var _a;
|
|
58
|
+
return {
|
|
59
|
+
...props,
|
|
60
|
+
content: (_a = props.fieldItem) == null ? void 0 : _a.content
|
|
61
|
+
};
|
|
62
|
+
}));
|
|
63
|
+
|
|
64
|
+
export { BUTTON, TEXT };
|
|
@@ -6,7 +6,7 @@ const SLIDER = connect(NSlider, mapProps((props, field) => {
|
|
|
6
6
|
const _props = assignUpdateValue(props, field);
|
|
7
7
|
if (Array.isArray(_props.option)) {
|
|
8
8
|
_props.marks = _props.option.reduce((fin, option) => {
|
|
9
|
-
fin[option.value] = option.text;
|
|
9
|
+
fin[+option.value] = option.text;
|
|
10
10
|
return fin;
|
|
11
11
|
}, {});
|
|
12
12
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { isObject } from '@vueuse/core';
|
|
1
2
|
import { isArray, pick } from 'lodash-es';
|
|
2
|
-
import { arrayed, transformDateFormat } from '../utils/index.js';
|
|
3
3
|
import { useFormValidator, useTypeNormalize } from '../../../../packages/form-render';
|
|
4
|
-
import {
|
|
4
|
+
import { arrayed, transformDateFormat } from '../utils/index.js';
|
|
5
5
|
|
|
6
6
|
function useFieldListAdaptor(collector, uuid) {
|
|
7
7
|
const { createValidatorSchema } = useFormValidator();
|
|
@@ -10,12 +10,6 @@ function useFieldListAdaptor(collector, uuid) {
|
|
|
10
10
|
name: item.val_key,
|
|
11
11
|
type: "string",
|
|
12
12
|
title: item.alias || item.name,
|
|
13
|
-
"x-decorator": "FORM_ITEM",
|
|
14
|
-
"x-decorator-props": {
|
|
15
|
-
span: item.elem_width,
|
|
16
|
-
showLabel: item.hide_title !== "1",
|
|
17
|
-
id: `${uuid}-${item.val_key}`
|
|
18
|
-
},
|
|
19
13
|
"x-component": item.html_type,
|
|
20
14
|
"x-component-props": {
|
|
21
15
|
placeholder: item.placeholder,
|
|
@@ -28,6 +22,17 @@ function useFieldListAdaptor(collector, uuid) {
|
|
|
28
22
|
if (isObject(item.reactions)) {
|
|
29
23
|
result["x-reactions"] = item.reactions;
|
|
30
24
|
}
|
|
25
|
+
if (!item.noDecorator) {
|
|
26
|
+
Object.assign(result, {
|
|
27
|
+
"x-decorator": "FORM_ITEM",
|
|
28
|
+
"x-decorator-props": {
|
|
29
|
+
span: item.elem_width,
|
|
30
|
+
showLabel: item.hide_title !== "1",
|
|
31
|
+
id: `${uuid}-${item.val_key}`,
|
|
32
|
+
...item.decoratorProps || {}
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
31
36
|
const rules = createValidatorSchema(item);
|
|
32
37
|
rules && (result["x-validator"] = rules);
|
|
33
38
|
item.is_null === "0" && (result.required = true);
|
|
@@ -108,9 +113,9 @@ function useFieldListAdaptor(collector, uuid) {
|
|
|
108
113
|
const createSliderSchema = (item) => {
|
|
109
114
|
const schema = createStandardSchema(item);
|
|
110
115
|
Object.assign(schema["x-component-props"], {
|
|
111
|
-
step: item.step_length,
|
|
112
|
-
max: item.max_length,
|
|
113
|
-
min: item.min_length,
|
|
116
|
+
step: +item.step_length,
|
|
117
|
+
max: +item.max_length,
|
|
118
|
+
min: +item.min_length,
|
|
114
119
|
option: item.option
|
|
115
120
|
});
|
|
116
121
|
return schema;
|
|
@@ -183,22 +188,26 @@ function useFieldListAdaptor(collector, uuid) {
|
|
|
183
188
|
const { normalize } = useTypeNormalize();
|
|
184
189
|
function schemaAdaptor(fieldList) {
|
|
185
190
|
let prevLinebar = null;
|
|
186
|
-
return fieldList.reduce((fin, cur) => {
|
|
191
|
+
return fieldList.reduce((fin, cur, idx) => {
|
|
187
192
|
var _a;
|
|
188
193
|
normalize(cur);
|
|
189
194
|
const obj_type = (_a = cur.validate) == null ? void 0 : _a.obj_type;
|
|
190
195
|
obj_type && collector.collect(obj_type, cur.val_key);
|
|
191
196
|
if (cur.html_type === "LINEBAR") {
|
|
192
|
-
fin[createFieldName(cur)] = createLinebarSchema(cur);
|
|
197
|
+
fin[createFieldName(cur)] = bindIndex(createLinebarSchema(cur), idx);
|
|
193
198
|
prevLinebar = fin[createFieldName(cur)].properties = {};
|
|
194
199
|
} else if (prevLinebar) {
|
|
195
|
-
prevLinebar[createFieldName(cur)] = createWidgetSchema(cur);
|
|
200
|
+
prevLinebar[createFieldName(cur)] = bindIndex(createWidgetSchema(cur), idx);
|
|
196
201
|
} else {
|
|
197
202
|
prevLinebar = null;
|
|
198
|
-
fin[createFieldName(cur)] = createWidgetSchema(cur);
|
|
203
|
+
fin[createFieldName(cur)] = bindIndex(createWidgetSchema(cur), idx);
|
|
199
204
|
}
|
|
200
205
|
return fin;
|
|
201
206
|
}, {});
|
|
207
|
+
function bindIndex(schema, idx) {
|
|
208
|
+
schema["x-index"] = idx;
|
|
209
|
+
return schema;
|
|
210
|
+
}
|
|
202
211
|
function createFieldName(fieldItem) {
|
|
203
212
|
if (isArray(fieldItem.suffixConfig)) {
|
|
204
213
|
return [fieldItem.val_key, fieldItem.suffixConfig.map((f) => f.val_key)].join("-");
|
package/es/packages/index.css
CHANGED
|
@@ -1129,6 +1129,13 @@ body > .vxe-table--tooltip-wrapper {
|
|
|
1129
1129
|
.n-dialog__title .svg-wrap {
|
|
1130
1130
|
margin: 0 0 0 auto;
|
|
1131
1131
|
}
|
|
1132
|
+
.n-dialog__title .svg-wrap .svg-icon {
|
|
1133
|
+
width: 1em;
|
|
1134
|
+
height: 1em;
|
|
1135
|
+
vertical-align: -0.15em;
|
|
1136
|
+
fill: currentColor;
|
|
1137
|
+
overflow: hidden;
|
|
1138
|
+
}
|
|
1132
1139
|
.n-dialog__title .svg-wrap svg {
|
|
1133
1140
|
font-size: 14px;
|
|
1134
1141
|
cursor: pointer;
|
|
@@ -1764,8 +1771,6 @@ body > .vxe-table--tooltip-wrapper {
|
|
|
1764
1771
|
}
|
|
1765
1772
|
.n-dialog.n-modal.c-evatip-dialog-wrap .n-base-icon {
|
|
1766
1773
|
position: absolute;
|
|
1767
|
-
right: 16px;
|
|
1768
|
-
top: 16px;
|
|
1769
1774
|
margin: 0;
|
|
1770
1775
|
color: #666666;
|
|
1771
1776
|
}
|
|
@@ -2727,3 +2732,46 @@ body > .vxe-table--tooltip-wrapper {
|
|
|
2727
2732
|
display: flex !important;
|
|
2728
2733
|
gap: 0 8px;
|
|
2729
2734
|
}
|
|
2735
|
+
.c-fabric-chart-popup-tip,
|
|
2736
|
+
.c-fabric-chart-popup-menu {
|
|
2737
|
+
position: absolute;
|
|
2738
|
+
z-index: 1001;
|
|
2739
|
+
display: flex;
|
|
2740
|
+
flex-flow: column nowrap;
|
|
2741
|
+
margin: 0;
|
|
2742
|
+
padding: 8px 12px;
|
|
2743
|
+
font-size: 12px;
|
|
2744
|
+
}
|
|
2745
|
+
.c-fabric-chart-popup-tip > li,
|
|
2746
|
+
.c-fabric-chart-popup-menu > li {
|
|
2747
|
+
list-style: none;
|
|
2748
|
+
}
|
|
2749
|
+
.c-fabric-chart-popup-tip {
|
|
2750
|
+
border-radius: 4px;
|
|
2751
|
+
background: rgba(0, 0, 0, 0.7);
|
|
2752
|
+
}
|
|
2753
|
+
.c-fabric-chart-popup-tip > li {
|
|
2754
|
+
color: #fff;
|
|
2755
|
+
}
|
|
2756
|
+
.c-fabric-chart-popup-menu {
|
|
2757
|
+
padding: 8px 5px !important;
|
|
2758
|
+
z-index: 1001;
|
|
2759
|
+
background: #fff;
|
|
2760
|
+
box-shadow: 0 2px 12px 0 rgba(56, 56, 56, 0.2);
|
|
2761
|
+
border: 1px solid #e2e6ed;
|
|
2762
|
+
border-radius: 2px;
|
|
2763
|
+
}
|
|
2764
|
+
.c-fabric-chart-popup-menu > li {
|
|
2765
|
+
padding: 5px;
|
|
2766
|
+
background: #fff;
|
|
2767
|
+
cursor: pointer;
|
|
2768
|
+
}
|
|
2769
|
+
.c-fabric-chart-popup-menu > li:hover {
|
|
2770
|
+
background: #f0f7ff;
|
|
2771
|
+
}
|
|
2772
|
+
.c-fabric-chart-popup-menu > li.no-click {
|
|
2773
|
+
cursor: default;
|
|
2774
|
+
}
|
|
2775
|
+
.c-fabric-chart-popup-menu > li.no-click:hover {
|
|
2776
|
+
background: #fff;
|
|
2777
|
+
}
|
|
@@ -11,7 +11,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
11
11
|
type: BooleanConstructor;
|
|
12
12
|
default: boolean;
|
|
13
13
|
};
|
|
14
|
-
}, () => JSX.Element
|
|
14
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, never[], never, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
15
15
|
form: {
|
|
16
16
|
type: ObjectConstructor;
|
|
17
17
|
default: () => {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, createVNode, resolveComponent, createTextVNode } from 'vue';
|
|
1
|
+
import { defineComponent, computed, createVNode, withDirectives, vShow, resolveComponent, createTextVNode } from 'vue';
|
|
2
2
|
import { NDivider, NIcon } from 'naive-ui';
|
|
3
3
|
import { AlertCircleOutline } from '@vicons/ionicons5';
|
|
4
4
|
|
|
@@ -59,11 +59,9 @@ var RCollection = defineComponent({
|
|
|
59
59
|
}, [describe])]);
|
|
60
60
|
};
|
|
61
61
|
const renderLinebar = () => {
|
|
62
|
-
if (!props.item.title)
|
|
63
|
-
return null;
|
|
64
62
|
return createVNode("div", {
|
|
65
63
|
"class": "linebar-div"
|
|
66
|
-
}, [createVNode("span", null, [props.item.title]), createVNode(resolveComponent("n-divider"), null, null)]);
|
|
64
|
+
}, [withDirectives(createVNode("span", null, [props.item.title]), [[vShow, props.item.title]]), createVNode(resolveComponent("n-divider"), null, null)]);
|
|
67
65
|
};
|
|
68
66
|
const renderPrompt = () => {
|
|
69
67
|
return createVNode("div", {
|
|
@@ -32,7 +32,7 @@ const ScaleViewComputed = (props, state, config) => {
|
|
|
32
32
|
XS: "extrasmall"
|
|
33
33
|
};
|
|
34
34
|
fontSize = keyValue[fontSize];
|
|
35
|
-
const scale = fontSize &&
|
|
35
|
+
const scale = fontSize && (props == null ? void 0 : props.fontSizeObj[fontSize]) || 1;
|
|
36
36
|
const size = 1e4;
|
|
37
37
|
const value = Math.floor(100 / scale * size) / size;
|
|
38
38
|
return {
|
|
@@ -197,6 +197,9 @@ const ScaleViewInit = (props, state, emit, config) => {
|
|
|
197
197
|
var _a, _b;
|
|
198
198
|
if (!list || !list.length)
|
|
199
199
|
return;
|
|
200
|
+
let query = handleQueryParams();
|
|
201
|
+
if ((props == null ? void 0 : props.noBtn) || (query == null ? void 0 : query.noBtn))
|
|
202
|
+
return;
|
|
200
203
|
let matchItem = list.find((item) => item.type === "FRONT_ADDRESS");
|
|
201
204
|
if (!matchItem || !Object.keys(matchItem).length)
|
|
202
205
|
return;
|
|
@@ -206,7 +209,6 @@ const ScaleViewInit = (props, state, emit, config) => {
|
|
|
206
209
|
}
|
|
207
210
|
if (!setting || !Object.keys(setting).length)
|
|
208
211
|
return;
|
|
209
|
-
let query = handleQueryParams();
|
|
210
212
|
if ((query == null ? void 0 : query.redirect) == 1 || ((_a = props.params) == null ? void 0 : _a.redirect) == 1 || query.isEdit == 3 || ((_b = props.params) == null ? void 0 : _b.isEdit) == 3)
|
|
211
213
|
return;
|
|
212
214
|
let { frontAddress } = setting;
|
|
@@ -13,7 +13,7 @@ export declare const componentMap: {
|
|
|
13
13
|
type: BooleanConstructor;
|
|
14
14
|
default: boolean;
|
|
15
15
|
};
|
|
16
|
-
}, () => JSX.Element
|
|
16
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, never[], never, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
17
|
form: {
|
|
18
18
|
type: ObjectConstructor;
|
|
19
19
|
default: () => {};
|
|
@@ -44,7 +44,7 @@ export declare const componentMap: {
|
|
|
44
44
|
type: BooleanConstructor;
|
|
45
45
|
default: boolean;
|
|
46
46
|
};
|
|
47
|
-
}, () => JSX.Element
|
|
47
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, never[], never, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
48
48
|
form: {
|
|
49
49
|
type: ObjectConstructor;
|
|
50
50
|
default: () => {};
|
|
@@ -10190,7 +10190,7 @@ export declare const componentMap: {
|
|
|
10190
10190
|
type: BooleanConstructor;
|
|
10191
10191
|
default: boolean;
|
|
10192
10192
|
};
|
|
10193
|
-
}, () => JSX.Element
|
|
10193
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, never[], never, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10194
10194
|
form: {
|
|
10195
10195
|
type: ObjectConstructor;
|
|
10196
10196
|
default: () => {};
|
|
@@ -10221,7 +10221,7 @@ export declare const componentMap: {
|
|
|
10221
10221
|
type: BooleanConstructor;
|
|
10222
10222
|
default: boolean;
|
|
10223
10223
|
};
|
|
10224
|
-
}, () => JSX.Element
|
|
10224
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, never[], never, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10225
10225
|
form: {
|
|
10226
10226
|
type: ObjectConstructor;
|
|
10227
10227
|
default: () => {};
|
|
@@ -10252,7 +10252,7 @@ export declare const componentMap: {
|
|
|
10252
10252
|
type: BooleanConstructor;
|
|
10253
10253
|
default: boolean;
|
|
10254
10254
|
};
|
|
10255
|
-
}, () => JSX.Element
|
|
10255
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, never[], never, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10256
10256
|
form: {
|
|
10257
10257
|
type: ObjectConstructor;
|
|
10258
10258
|
default: () => {};
|
|
@@ -148,6 +148,13 @@
|
|
|
148
148
|
.n-dialog__title .svg-wrap {
|
|
149
149
|
margin: 0 0 0 auto;
|
|
150
150
|
}
|
|
151
|
+
.n-dialog__title .svg-wrap .svg-icon {
|
|
152
|
+
width: 1em;
|
|
153
|
+
height: 1em;
|
|
154
|
+
vertical-align: -0.15em;
|
|
155
|
+
fill: currentColor;
|
|
156
|
+
overflow: hidden;
|
|
157
|
+
}
|
|
151
158
|
.n-dialog__title .svg-wrap svg {
|
|
152
159
|
font-size: 14px;
|
|
153
160
|
cursor: pointer;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "3.1.12-beta.
|
|
4
|
+
"version": "3.1.12-beta.7",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"module": "es/packages/index.js",
|
|
7
7
|
"main": "es/packages/index.js",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"vue": "^3.2.0",
|
|
60
60
|
"vue-simple-uploader": "^1.0.0-beta.5",
|
|
61
61
|
"vuedraggable": "4.1.0",
|
|
62
|
-
"vxe-table": "
|
|
62
|
+
"vxe-table": "4.2.5",
|
|
63
63
|
"xe-utils": "^3.5.4"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|