cnhis-design-vue 3.1.12-beta.6 → 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/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/select.js +11 -0
- package/es/packages/form-render/src/components/renderer/simpleComponent.js +0 -1
- package/es/packages/index.css +43 -0
- package/package.json +1 -1
|
@@ -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 };
|
|
@@ -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
|
}
|
|
@@ -47,7 +47,6 @@ const buttonScript = (props) => {
|
|
|
47
47
|
const cb = propFor("onClick") || ((_a2 = propFor("componentProps")) == null ? void 0 : _a2.onClick);
|
|
48
48
|
return () => isFunction(cb) && cb(props.fieldItem);
|
|
49
49
|
}
|
|
50
|
-
console.log(props.content);
|
|
51
50
|
return createVNode(NButton, mergeProps((_a = propFor("componentProps")) != null ? _a : {}, {
|
|
52
51
|
"onClick": onClick()
|
|
53
52
|
}), _isSlot(_slot = createSlot(props.content, props)) ? _slot : {
|
package/es/packages/index.css
CHANGED
|
@@ -2732,3 +2732,46 @@ body > .vxe-table--tooltip-wrapper {
|
|
|
2732
2732
|
display: flex !important;
|
|
2733
2733
|
gap: 0 8px;
|
|
2734
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
|
+
}
|