@opentiny/vue-renderless 3.6.8 → 3.8.2
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/action-sheet/index.js +28 -1
- package/action-sheet/vue.js +10 -4
- package/alert/index.js +24 -2
- package/alert/vue.js +15 -11
- package/amount/index.js +4 -4
- package/anchor/index.js +1 -1
- package/autocomplete/vue.js +3 -3
- package/autonavi-map/index.js +1 -1
- package/badge/vue.js +6 -6
- package/baidu-map/index.js +1 -1
- package/bulletin-board/index.js +1 -1
- package/button-group/vue.js +5 -4
- package/calendar/index.js +2 -2
- package/calendar-bar/index.js +268 -0
- package/calendar-bar/vue.js +87 -0
- package/card/index.js +84 -0
- package/card/vue.js +70 -0
- package/card-group/index.js +16 -0
- package/card-group/vue.js +21 -0
- package/card-template/index.js +1 -1
- package/carousel/index.js +89 -2
- package/carousel/vue.js +14 -5
- package/carousel-item/index.js +8 -0
- package/carousel-item/vue.js +7 -3
- package/cascader/index.js +6 -6
- package/cascader/vue.js +3 -3
- package/cascader-menu/vue.js +2 -2
- package/cascader-panel/index.js +4 -4
- package/cascader-panel/node.js +4 -4
- package/cascader-panel/vue.js +2 -2
- package/cascader-select/index.js +179 -0
- package/cascader-select/vue.js +74 -0
- package/cell/vue.js +16 -0
- package/chart-bar/index.js +3 -3
- package/chart-boxplot/index.js +2 -2
- package/chart-candle/index.js +3 -3
- package/chart-core/deps/utils.js +7 -7
- package/chart-core/index.js +2 -2
- package/chart-funnel/index.js +3 -3
- package/chart-gauge/index.js +3 -3
- package/chart-graph/index.js +1 -1
- package/chart-heatmap/index.js +2 -2
- package/chart-line/index.js +3 -3
- package/chart-liquidfill/index.js +2 -2
- package/chart-map/index.js +3 -3
- package/chart-pie/index.js +3 -3
- package/chart-radar/index.js +3 -3
- package/chart-sankey/index.js +3 -3
- package/chart-scatter/index.js +4 -4
- package/chart-sunburst/index.js +1 -1
- package/chart-tree/index.js +2 -2
- package/chart-waterfall/index.js +3 -3
- package/chart-wordcloud/index.js +2 -2
- package/checkbox/index.js +21 -0
- package/checkbox/vue.js +16 -3
- package/checkbox-button/vue.js +1 -1
- package/collapse-item/vue.js +1 -1
- package/column-list-group/index.js +0 -0
- package/column-list-group/vue.js +14 -0
- package/column-list-item/index.js +50 -0
- package/column-list-item/vue.js +39 -0
- package/common/array.js +3 -3
- package/common/bigInt.js +5 -2
- package/common/dataset/index.js +3 -3
- package/common/date.js +2 -2
- package/common/deps/ResizeObserver.js +1 -1
- package/common/deps/clickoutside.js +1 -1
- package/common/deps/date-util.js +4 -4
- package/common/deps/date.js +2 -2
- package/common/deps/debounce.js +1 -1
- package/common/deps/dom.js +1 -1
- package/common/deps/fullscreen/apis.js +3 -3
- package/common/deps/fullscreen/screenfull.js +1 -1
- package/common/deps/infinite-scroll.js +176 -0
- package/common/deps/letter-only.js +1 -1
- package/common/deps/number-only.js +1 -1
- package/common/deps/observe-visibility.js +106 -0
- package/common/deps/popper.js +20 -22
- package/common/deps/popup-manager.js +2 -2
- package/common/deps/repeat-click.js +1 -1
- package/common/deps/resize-event.js +1 -1
- package/common/deps/tree-model/node.js +5 -5
- package/common/deps/tree-model/tree-store.js +3 -3
- package/common/deps/upload-ajax.js +2 -2
- package/common/deps/vue-popper.js +6 -6
- package/common/deps/vue-popup.js +4 -4
- package/common/index.js +2 -2
- package/common/object.js +1 -1
- package/common/runtime.js +24 -24
- package/common/string.js +23 -4
- package/common/validate/rules/range.js +2 -2
- package/common/validate/rules/required.js +1 -1
- package/common/validate/rules/type.js +3 -3
- package/common/validate/schema.js +1 -1
- package/common/validate/util.js +1 -1
- package/common/validate/validations/array.js +1 -1
- package/common/validate/validations/date.js +1 -1
- package/common/validate/validations/enum.js +1 -1
- package/common/validate/validations/float.js +1 -1
- package/common/validate/validations/integer.js +1 -1
- package/common/validate/validations/method.js +1 -1
- package/common/validate/validations/number.js +1 -1
- package/common/validate/validations/pattern.js +1 -1
- package/common/validate/validations/string.js +1 -1
- package/common/validate/validations/type.js +1 -1
- package/container/index.js +1 -1
- package/crop/index.js +2 -2
- package/currency/index.js +2 -2
- package/date-panel/index.js +7 -7
- package/date-panel/vue.js +3 -2
- package/date-picker-mobile/index.js +250 -0
- package/date-picker-mobile/vue.js +86 -0
- package/date-range/index.js +1 -1
- package/date-range/vue.js +1 -1
- package/date-table/index.js +3 -3
- package/date-table/vue.js +1 -1
- package/dialog-box/index.js +6 -4
- package/dialog-box/vue.js +1 -1
- package/dialog-select/index.js +345 -0
- package/dialog-select/vue.js +110 -0
- package/drawer/index.js +83 -0
- package/drawer/vue.js +51 -0
- package/drop-times/index.js +1 -1
- package/dropdown/index.js +2 -2
- package/dropdown/vue.js +4 -3
- package/dropdown-item/index.js +5 -1
- package/dropdown-item/mf.js +79 -0
- package/dropdown-item/vue.js +9 -6
- package/dropdown-menu/index.js +30 -1
- package/dropdown-menu/vue.js +17 -7
- package/dynamic-scroller/index.js +117 -0
- package/dynamic-scroller/vue.js +88 -0
- package/dynamic-scroller-item/index.js +147 -0
- package/dynamic-scroller-item/vue.js +92 -0
- package/espace/index.js +1 -1
- package/espace/vue.js +1 -1
- package/exception/vue.js +3 -1
- package/fall-menu/index.js +4 -4
- package/file-upload/index.js +872 -408
- package/file-upload/vue.js +87 -36
- package/filter/index.js +131 -0
- package/filter/tag-group.js +43 -0
- package/filter/vue.js +73 -0
- package/filter-bar/index.js +9 -0
- package/filter-bar/vue.js +16 -0
- package/filter-box/index.js +17 -0
- package/filter-box/vue.js +19 -0
- package/filter-panel/index.js +42 -0
- package/filter-panel/vue.js +33 -0
- package/floatbar/index.js +1 -1
- package/flowchart/index.js +721 -0
- package/flowchart/vue.js +81 -0
- package/form/index.js +15 -1
- package/form/vue.js +10 -4
- package/form-item/index.js +46 -6
- package/form-item/vue.js +27 -3
- package/fullscreen/index.js +1 -1
- package/fullscreen/vue.js +1 -1
- package/grid/plugins/export.js +2 -2
- package/grid/plugins/exportExcel.js +2 -2
- package/grid/plugins/resize.js +1 -1
- package/grid/static/base/helperEqualCompare.js +1 -1
- package/grid/static/base/isPlainObject.js +1 -1
- package/grid/utils/common.js +3 -3
- package/grid/utils/dom.js +3 -3
- package/grid/utils/event.js +2 -2
- package/guide/index.js +168 -0
- package/guide/vue.js +36 -0
- package/hrapprover/index.js +1 -1
- package/image/index.js +8 -4
- package/image/vue.js +12 -6
- package/image-viewer/index.js +3 -3
- package/image-viewer/vue.js +16 -6
- package/input/index.js +34 -1
- package/input/vue.js +22 -6
- package/ip-address/index.js +1 -1
- package/ip-address/vue.js +1 -1
- package/link-menu/index.js +2 -2
- package/link-menu/vue.js +2 -2
- package/loading/index.js +2 -2
- package/loading/vue.js +2 -1
- package/locales/index.js +1 -1
- package/logout/index.js +1 -1
- package/milestone/index.js +5 -1
- package/modal/index.js +68 -39
- package/modal/vue.js +15 -12
- package/month-range/index.js +1 -1
- package/month-range/vue.js +1 -1
- package/month-table/index.js +5 -5
- package/month-table/vue.js +1 -1
- package/multi-select/index.js +5 -2
- package/multi-select/vue.js +4 -5
- package/nav-menu/index.js +6 -6
- package/notify/index.js +3 -3
- package/numeric/index.js +15 -5
- package/numeric/vue.js +15 -6
- package/option/index.js +1 -1
- package/package.json +2 -1
- package/pager/vue.js +10 -0
- package/pager-item/index.js +1 -1
- package/panel/index.js +1 -1
- package/picker/index.js +7 -7
- package/picker/vue.js +1 -1
- package/picker-column/index.js +1 -1
- package/popconfirm/index.js +25 -0
- package/popconfirm/vue.js +22 -0
- package/popeditor/index.js +7 -7
- package/popeditor/vue.js +2 -2
- package/popover/index.js +11 -3
- package/popover/vue.js +33 -10
- package/popup/index.js +4 -4
- package/pull-refresh/index.js +8 -11
- package/pull-refresh/vue.js +7 -7
- package/radio/index.js +17 -0
- package/radio/vue.js +18 -3
- package/radio-button/index.js +8 -0
- package/radio-button/vue.js +19 -4
- package/radio-group/index.js +1 -1
- package/radio-group/vue.js +5 -2
- package/rate/index.js +4 -2
- package/rate/vue.js +1 -1
- package/record/index.js +190 -0
- package/record/vue.js +44 -0
- package/recycle-scroller/index.js +470 -0
- package/recycle-scroller/vue.js +135 -0
- package/river/index.js +371 -0
- package/river/river.js +352 -0
- package/river/vue.js +77 -0
- package/roles/index.js +1 -1
- package/scrollbar/vue-bar.js +1 -1
- package/scrollbar/vue.js +1 -1
- package/search/index.js +3 -3
- package/select/index.js +21 -14
- package/select/vue.js +38 -15
- package/select-dropdown/vue.js +1 -1
- package/select-mobile/index.js +111 -0
- package/select-mobile/vue.js +58 -0
- package/select-view/index.js +170 -0
- package/select-view/vue.js +82 -0
- package/selected-box/index.js +216 -0
- package/selected-box/vue.js +98 -0
- package/slide-bar/index.js +1 -1
- package/slider/index.js +49 -4
- package/slider/vue.js +15 -4
- package/split/vue.js +1 -1
- package/standard-list-item/index.js +18 -0
- package/standard-list-item/vue.js +22 -0
- package/steps/index.js +30 -0
- package/steps/slide-bar.js +122 -0
- package/steps/vue.js +15 -3
- package/switch/index.js +1 -1
- package/switch/vue.js +2 -1
- package/tab-bar/index.js +2 -2
- package/tab-item/index.js +3 -3
- package/tab-item/vue.js +4 -3
- package/tab-item-mf/index.js +0 -0
- package/tab-item-mf/vue.js +16 -0
- package/tab-nav/index.js +78 -4
- package/tab-nav/vue.js +11 -3
- package/tabbar-item/index.js +1 -1
- package/tabbar-item/vue.js +1 -1
- package/tabs/index.js +8 -9
- package/tabs/vue.js +1 -1
- package/tabs-mf/index.js +109 -0
- package/tabs-mf/vue-bar.js +49 -0
- package/tabs-mf/vue-nav-item.js +22 -0
- package/tabs-mf/vue-nav.js +13 -0
- package/tabs-mf/vue.js +45 -0
- package/tabs-mf/wheel.js +71 -0
- package/tag/index.js +8 -2
- package/tag/vue.js +13 -5
- package/tag-group/index.js +24 -0
- package/tag-group/vue.js +29 -0
- package/tall-storage/index.js +1 -1
- package/tall-storage/vue.js +1 -1
- package/time/index.js +1 -1
- package/time/vue.js +2 -2
- package/time-line/index.js +28 -7
- package/time-line/vue.js +9 -4
- package/time-panel/index.js +2 -2
- package/time-panel/vue.js +1 -1
- package/time-picker-mobile/index.js +30 -0
- package/time-picker-mobile/vue.js +30 -0
- package/time-range/index.js +1 -1
- package/time-range/vue.js +1 -1
- package/time-spinner/index.js +2 -2
- package/time-spinner/vue.js +1 -1
- package/toggle-menu/index.js +2 -2
- package/toggle-menu/vue.js +1 -1
- package/tooltip/index.js +30 -3
- package/tooltip/vue.js +34 -13
- package/top-box/index.js +3 -3
- package/transfer/index.js +1 -1
- package/transfer-panel/index.js +2 -2
- package/tree/index.js +6 -6
- package/tree/vue.js +1 -1
- package/tree-node/index.js +1 -1
- package/upload/index.js +1 -1
- package/upload/vue.js +2 -2
- package/upload-dragger/index.js +5 -1
- package/upload-dragger/vue.js +9 -3
- package/upload-list/index.js +158 -8
- package/upload-list/vue.js +77 -25
- package/user/index.js +86 -70
- package/user/vue.js +15 -5
- package/user-account/vue.js +1 -1
- package/user-contact/index.js +49 -3
- package/user-contact/vue.js +17 -8
- package/user-head-group/vue.js +17 -0
- package/user-link/index.js +10 -2
- package/user-link/vue.js +11 -6
- package/wheel/index.js +1 -1
- package/wizard/index.js +3 -3
- package/year-range/index.js +125 -0
- package/year-range/vue.js +88 -0
- package/year-table/index.js +175 -11
- package/year-table/vue.js +17 -5
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__spreadProps,
|
|
3
|
+
__spreadValues
|
|
4
|
+
} from "../chunk-PKUHTIDK.js";
|
|
5
|
+
const normalRange = (value, min, max) => value < min ? min : value > max ? max : value;
|
|
6
|
+
const sliceValue = (value, min, max, count, cycleRoll) => {
|
|
7
|
+
value = normalRange(value, min, max);
|
|
8
|
+
const values = [value];
|
|
9
|
+
const tmpArr = Array.from({ length: rightShift(count) });
|
|
10
|
+
const prev = () => cycleRoll ? tVal + max - min + 1 : null;
|
|
11
|
+
const next = () => cycleRoll ? tVal - max + min - 1 : null;
|
|
12
|
+
let tVal;
|
|
13
|
+
tmpArr.map((v, i) => values.unshift((tVal = value - i - 1) < min ? prev() : tVal));
|
|
14
|
+
tmpArr.map((v, i) => values.push((tVal = value + i + 1) > max ? next() : tVal));
|
|
15
|
+
return values;
|
|
16
|
+
};
|
|
17
|
+
const validArr = (arr) => Array.isArray(arr) && arr.length;
|
|
18
|
+
const validProps = (props) => {
|
|
19
|
+
const { modelValue, options } = props;
|
|
20
|
+
return validArr(modelValue) && validArr(options) && modelValue.length === options.length;
|
|
21
|
+
};
|
|
22
|
+
const rightShift = (count) => count >>> 1;
|
|
23
|
+
const getFont = (pos, count) => Math.abs(rightShift(count) + 1 - pos);
|
|
24
|
+
const parseType = (props) => (values) => {
|
|
25
|
+
const { valueType } = props;
|
|
26
|
+
return values.map(valueType === "number" ? Number : valueType === "string" ? String : (i) => i);
|
|
27
|
+
};
|
|
28
|
+
const init = ({ api, props, state }) => (valuesCopy) => {
|
|
29
|
+
if (!validProps(props))
|
|
30
|
+
return;
|
|
31
|
+
const { modelValue, options, cycleRoll, valueField, textField } = props;
|
|
32
|
+
const { visibleOptionCount } = state;
|
|
33
|
+
let { disabled } = props;
|
|
34
|
+
disabled = typeof disabled === "function" ? disabled : () => false;
|
|
35
|
+
const values = api.parseType(valuesCopy || modelValue.slice(0));
|
|
36
|
+
const types = Array.from({ length: values.length });
|
|
37
|
+
const ranges = Array.from({ length: values.length });
|
|
38
|
+
const indices = Array.from({ length: values.length });
|
|
39
|
+
const visibleOptions = options.map((opt, i) => {
|
|
40
|
+
let slicedValues, existOption;
|
|
41
|
+
if (Array.isArray(opt)) {
|
|
42
|
+
if (opt.length === 0)
|
|
43
|
+
return [];
|
|
44
|
+
let index = opt.findIndex((item) => item[valueField] === values[i]);
|
|
45
|
+
index = index === -1 ? 0 : index;
|
|
46
|
+
types[i] = "a";
|
|
47
|
+
ranges[i] = [0, opt.length - 1];
|
|
48
|
+
indices[i] = index;
|
|
49
|
+
slicedValues = sliceValue(index, 0, opt.length - 1, visibleOptionCount, cycleRoll);
|
|
50
|
+
existOption = (i2) => __spreadProps(__spreadValues({}, opt[i2]), { disabled: disabled(opt[i2][valueField], ...values) });
|
|
51
|
+
} else if (opt && typeof opt === "object") {
|
|
52
|
+
let range;
|
|
53
|
+
if (Array.isArray(opt.range)) {
|
|
54
|
+
range = opt.range.slice(0, 2);
|
|
55
|
+
} else if (typeof opt.rangeMethod === "function") {
|
|
56
|
+
range = opt.rangeMethod(...values);
|
|
57
|
+
}
|
|
58
|
+
types[i] = "o";
|
|
59
|
+
ranges[i] = api.parseType(range);
|
|
60
|
+
slicedValues = sliceValue(values[i], ranges[i][0], ranges[i][1], visibleOptionCount, cycleRoll);
|
|
61
|
+
existOption = (i2) => opt.optionMethod(i2, ...values);
|
|
62
|
+
}
|
|
63
|
+
if (!slicedValues || !existOption)
|
|
64
|
+
return [];
|
|
65
|
+
return slicedValues.map((slicedValue, i2) => {
|
|
66
|
+
const option = slicedValue === null ? { [valueField]: null, [textField]: "" } : existOption(slicedValue);
|
|
67
|
+
option._$font = getFont(i2 + 1, visibleOptionCount);
|
|
68
|
+
option._$status = option.disabled ? "disabled" : option._$font === 0 ? "focus" : "normal";
|
|
69
|
+
return option;
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
state.selectorCount = values.length;
|
|
73
|
+
values.map((value, i) => {
|
|
74
|
+
const index = indices[i];
|
|
75
|
+
const opts = options[i];
|
|
76
|
+
const vOpts = visibleOptions[i];
|
|
77
|
+
state[`selector${i}`] = { index, options: opts, ranges, types, value, values, visibleOptions: vOpts };
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
const calcSelector = (api) => (cycleRoll, dy, pos, selector, valueField) => {
|
|
81
|
+
const { index, options, ranges, types, value, values } = selector;
|
|
82
|
+
const valuesCopy = values.slice(0);
|
|
83
|
+
const sRange = ranges[pos];
|
|
84
|
+
const sType = types[pos];
|
|
85
|
+
let sVal = sType === "o" ? value : sType === "a" ? index : null;
|
|
86
|
+
const f = (arr) => arr[0];
|
|
87
|
+
const l = (arr) => arr[arr.length - 1];
|
|
88
|
+
const noop = () => sVal;
|
|
89
|
+
const prev = () => cycleRoll && sVal === f(sRange) ? l(sRange) : sVal - 1;
|
|
90
|
+
const next = () => cycleRoll && sVal === l(sRange) ? f(sRange) : sVal + 1;
|
|
91
|
+
sVal = dy > 0 ? prev() : dy < 0 ? next() : noop();
|
|
92
|
+
sVal = normalRange(sVal, ...sRange);
|
|
93
|
+
if (sType === "a") {
|
|
94
|
+
sVal = options[sVal][valueField];
|
|
95
|
+
}
|
|
96
|
+
if (sVal !== value) {
|
|
97
|
+
valuesCopy.splice(pos, 1, sVal);
|
|
98
|
+
api.init(valuesCopy);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
const handleTouchstart = (state) => (e) => {
|
|
102
|
+
const { clientY } = e.changedTouches[0];
|
|
103
|
+
state.touching = true;
|
|
104
|
+
state.touchStartPos = state.touchPos = { clientY };
|
|
105
|
+
state.accrueDy = 0;
|
|
106
|
+
};
|
|
107
|
+
const handleTouchend = (state) => () => {
|
|
108
|
+
state.touching = false;
|
|
109
|
+
state.touchStartPos = state.touchPos = {};
|
|
110
|
+
state.accrueDy = 0;
|
|
111
|
+
};
|
|
112
|
+
const handleTouchmove = ({ api, props, state }) => (e, pos) => {
|
|
113
|
+
if (!state.touching)
|
|
114
|
+
return;
|
|
115
|
+
const { cycleRoll, valueField } = props;
|
|
116
|
+
const { touchPos, optionHeight } = state;
|
|
117
|
+
const { clientY } = e.changedTouches[0];
|
|
118
|
+
const dy = clientY - touchPos.clientY;
|
|
119
|
+
state.touchPos = { clientY };
|
|
120
|
+
state.accrueDy += dy;
|
|
121
|
+
const absDy = Math.abs(state.accrueDy);
|
|
122
|
+
const threshold = optionHeight / 4;
|
|
123
|
+
if (absDy > threshold) {
|
|
124
|
+
const selector = state[`selector${pos}`];
|
|
125
|
+
api.calcSelector(cycleRoll, state.accrueDy, pos, selector, valueField);
|
|
126
|
+
state.accrueDy = 0;
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
const watchActionSheetVisible = ({ emit, state, vm }) => (visible) => {
|
|
130
|
+
emit("update:visible", visible);
|
|
131
|
+
if (!visible)
|
|
132
|
+
return;
|
|
133
|
+
setTimeout(() => {
|
|
134
|
+
const optionRef = vm.$el.querySelector('[data-tag="tiny-mobile-cs-option"]');
|
|
135
|
+
optionRef && (state.optionHeight = optionRef.offsetHeight);
|
|
136
|
+
});
|
|
137
|
+
};
|
|
138
|
+
const close = (state) => () => state.actionSheetVisible && (state.actionSheetVisible = false);
|
|
139
|
+
const confirm = ({ api, emit, props, state, vm }) => () => {
|
|
140
|
+
const { confirmDisabled } = state;
|
|
141
|
+
if (confirmDisabled)
|
|
142
|
+
return;
|
|
143
|
+
const { modelValue } = props;
|
|
144
|
+
let focusOpts = vm.$el.querySelectorAll('[date-status="focus"]');
|
|
145
|
+
let values;
|
|
146
|
+
if (focusOpts && focusOpts.length) {
|
|
147
|
+
focusOpts = [...focusOpts];
|
|
148
|
+
values = focusOpts.map((focusOpt) => focusOpt.dataset.option);
|
|
149
|
+
values = api.parseType(values);
|
|
150
|
+
}
|
|
151
|
+
if (validArr(values) && validArr(modelValue) && values.length === modelValue.length && values.join() !== modelValue.join()) {
|
|
152
|
+
emit("update:modelValue", values);
|
|
153
|
+
}
|
|
154
|
+
api.close();
|
|
155
|
+
};
|
|
156
|
+
const styleOpt = (option) => option._$font;
|
|
157
|
+
const statusOpt = (option) => option._$status;
|
|
158
|
+
const computedConfirmDisabled = (state) => () => {
|
|
159
|
+
const { selectorCount, visibleOptionCount } = state;
|
|
160
|
+
const interOpts = Array.from({ length: selectorCount }).map((v, i) => {
|
|
161
|
+
const vOpts = state[`selector${i}`].visibleOptions;
|
|
162
|
+
return vOpts[rightShift(visibleOptionCount)];
|
|
163
|
+
});
|
|
164
|
+
return interOpts.some((opt) => opt.disabled);
|
|
165
|
+
};
|
|
166
|
+
export {
|
|
167
|
+
calcSelector,
|
|
168
|
+
close,
|
|
169
|
+
computedConfirmDisabled,
|
|
170
|
+
confirm,
|
|
171
|
+
handleTouchend,
|
|
172
|
+
handleTouchmove,
|
|
173
|
+
handleTouchstart,
|
|
174
|
+
init,
|
|
175
|
+
parseType,
|
|
176
|
+
statusOpt,
|
|
177
|
+
styleOpt,
|
|
178
|
+
watchActionSheetVisible
|
|
179
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import "../chunk-PKUHTIDK.js";
|
|
2
|
+
import {
|
|
3
|
+
init,
|
|
4
|
+
handleTouchstart,
|
|
5
|
+
handleTouchend,
|
|
6
|
+
handleTouchmove,
|
|
7
|
+
watchActionSheetVisible,
|
|
8
|
+
calcSelector,
|
|
9
|
+
close,
|
|
10
|
+
confirm,
|
|
11
|
+
styleOpt,
|
|
12
|
+
statusOpt,
|
|
13
|
+
computedConfirmDisabled,
|
|
14
|
+
parseType
|
|
15
|
+
} from "./index";
|
|
16
|
+
import throttle from "../common/deps/throttle";
|
|
17
|
+
const api = [
|
|
18
|
+
"state",
|
|
19
|
+
"handleTouchstart",
|
|
20
|
+
"handleTouchend",
|
|
21
|
+
"throttledHandleTouchmove",
|
|
22
|
+
"close",
|
|
23
|
+
"confirm",
|
|
24
|
+
"styleOpt",
|
|
25
|
+
"statusOpt"
|
|
26
|
+
];
|
|
27
|
+
const renderless = (props, { reactive, computed, onBeforeMount, watch }, { emit, vm }) => {
|
|
28
|
+
const state = reactive({
|
|
29
|
+
actionSheetVisible: false,
|
|
30
|
+
visibleOptionCount: 5,
|
|
31
|
+
selectorCount: 1,
|
|
32
|
+
selector0: {},
|
|
33
|
+
selector1: {},
|
|
34
|
+
selector2: {},
|
|
35
|
+
confirmDisabled: computed(() => api2.computedConfirmDisabled())
|
|
36
|
+
});
|
|
37
|
+
const api2 = {
|
|
38
|
+
state,
|
|
39
|
+
styleOpt,
|
|
40
|
+
statusOpt,
|
|
41
|
+
handleTouchstart: handleTouchstart(state),
|
|
42
|
+
handleTouchend: handleTouchend(state),
|
|
43
|
+
watchActionSheetVisible: watchActionSheetVisible({ emit, state, vm }),
|
|
44
|
+
close: close(state),
|
|
45
|
+
computedConfirmDisabled: computedConfirmDisabled(state),
|
|
46
|
+
parseType: parseType(props)
|
|
47
|
+
};
|
|
48
|
+
Object.assign(api2, {
|
|
49
|
+
init: init({ api: api2, props, state }),
|
|
50
|
+
throttledHandleTouchmove: throttle(20, handleTouchmove({ api: api2, props, state })),
|
|
51
|
+
calcSelector: calcSelector(api2),
|
|
52
|
+
confirm: confirm({ api: api2, emit, props, state, vm })
|
|
53
|
+
});
|
|
54
|
+
onBeforeMount(() => {
|
|
55
|
+
api2.init();
|
|
56
|
+
});
|
|
57
|
+
watch(
|
|
58
|
+
() => props.visible,
|
|
59
|
+
(value) => state.actionSheetVisible = value
|
|
60
|
+
);
|
|
61
|
+
watch(
|
|
62
|
+
() => props.modelValue,
|
|
63
|
+
(value) => api2.init(value)
|
|
64
|
+
);
|
|
65
|
+
watch(
|
|
66
|
+
() => state.actionSheetVisible,
|
|
67
|
+
(value) => api2.watchActionSheetVisible(value)
|
|
68
|
+
);
|
|
69
|
+
return api2;
|
|
70
|
+
};
|
|
71
|
+
export {
|
|
72
|
+
api,
|
|
73
|
+
renderless
|
|
74
|
+
};
|
package/cell/vue.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "../chunk-PKUHTIDK.js";
|
|
2
|
+
const api = ["state"];
|
|
3
|
+
const renderless = (props, { reactive, computed, inject }, { parent }) => {
|
|
4
|
+
parent.tinyForm = parent.tinyForm || inject("form", null);
|
|
5
|
+
const state = reactive({
|
|
6
|
+
isDisplayOnly: computed(() => (parent.tinyForm || {}).displayOnly)
|
|
7
|
+
});
|
|
8
|
+
const api2 = {
|
|
9
|
+
state
|
|
10
|
+
};
|
|
11
|
+
return api2;
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
api,
|
|
15
|
+
renderless
|
|
16
|
+
};
|
package/chart-bar/index.js
CHANGED
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
__spreadProps,
|
|
3
3
|
__spreadValues
|
|
4
4
|
} from "../chunk-PKUHTIDK.js";
|
|
5
|
-
import { getFormated, getStackMap, get, set, cloneDeep } from "
|
|
6
|
-
import { itemPoint, itemLabel, itemContent } from "
|
|
7
|
-
import { isNull } from "
|
|
5
|
+
import { getFormated, getStackMap, get, set, cloneDeep } from "../chart-core/deps/utils";
|
|
6
|
+
import { itemPoint, itemLabel, itemContent } from "../chart-core/deps/constants";
|
|
7
|
+
import { isNull } from "../common/type";
|
|
8
8
|
const VALUE_AXIS_OPACITY = 0.5;
|
|
9
9
|
const getValueAxisData = (dims) => {
|
|
10
10
|
const max = Math.max(...dims);
|
package/chart-boxplot/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__spreadValues
|
|
3
3
|
} from "../chunk-PKUHTIDK.js";
|
|
4
|
-
import { getFormated, htmlHandler, getLegend } from "
|
|
5
|
-
import { itemPoint, itemLabel, itemContent } from "
|
|
4
|
+
import { getFormated, htmlHandler, getLegend } from "../chart-core/deps/utils";
|
|
5
|
+
import { itemPoint, itemLabel, itemContent } from "../chart-core/deps/constants";
|
|
6
6
|
const getXAxis = (args) => {
|
|
7
7
|
const { columns, xAxisName, axisVisible, xAxisType } = args;
|
|
8
8
|
return [
|
package/chart-candle/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../chunk-PKUHTIDK.js";
|
|
2
|
-
import { getFormated } from "
|
|
3
|
-
import { itemPoint, itemLabel, itemContent } from "
|
|
4
|
-
import { isNull } from "
|
|
2
|
+
import { getFormated } from "../chart-core/deps/utils";
|
|
3
|
+
import { itemPoint, itemLabel, itemContent } from "../chart-core/deps/constants";
|
|
4
|
+
import { isNull } from "../common/type";
|
|
5
5
|
const DEF_MA = [5, 10, 20, 30];
|
|
6
6
|
const DEF_DOWN_COLOR = "#eb171f";
|
|
7
7
|
const DEF_UP_COLOR = "#00a874";
|
package/chart-core/deps/utils.js
CHANGED
|
@@ -2,14 +2,14 @@ import {
|
|
|
2
2
|
__spreadProps,
|
|
3
3
|
__spreadValues
|
|
4
4
|
} from "../../chunk-PKUHTIDK.js";
|
|
5
|
-
import { extend, copyArray } from "
|
|
6
|
-
import { isObject, typeOf as getType, isNull } from "
|
|
7
|
-
import _debounce from "
|
|
5
|
+
import { extend, copyArray } from "../../common/object";
|
|
6
|
+
import { isObject, typeOf as getType, isNull } from "../../common/type";
|
|
7
|
+
import _debounce from "../../common/deps/debounce";
|
|
8
8
|
import _numerify from "./numerify";
|
|
9
|
-
import { escapeHtml } from "
|
|
10
|
-
import { xss } from "
|
|
11
|
-
import { setObj, getObj, isEqual } from "
|
|
12
|
-
import { typeOf, isObject as isObject2 } from "
|
|
9
|
+
import { escapeHtml } from "../../common/string";
|
|
10
|
+
import { xss } from "../../common";
|
|
11
|
+
import { setObj, getObj, isEqual } from "../../common/object";
|
|
12
|
+
import { typeOf, isObject as isObject2 } from "../../common/type";
|
|
13
13
|
const debounce = (callback, delay) => _debounce(delay, false, callback);
|
|
14
14
|
const camelToKebab = (str) => str.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
15
15
|
const cloneDeep = (data) => {
|
package/chart-core/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__spreadValues
|
|
3
3
|
} from "../chunk-PKUHTIDK.js";
|
|
4
|
-
import { on, off } from "
|
|
4
|
+
import { on, off } from "../common/deps/dom";
|
|
5
5
|
import { DEFAULT_COLORS, DEFAULT_THEME, STATIC_PROPS, ECHARTS_SETTINGS, SAAS_DEFAULT_COLORS_10, SAAS_DEFAULT_COLORS_18, DEFAULT_CONFIG } from "./deps/constants";
|
|
6
6
|
import { getType, debounce, isObject, cloneDeep, isEqual, htmlHandler } from "./deps/utils";
|
|
7
7
|
import setAnimation from "./modules/animation";
|
|
@@ -230,7 +230,7 @@ const init = ({ state, props, api, refs, echartsLib, markRaw }) => () => {
|
|
|
230
230
|
ictThemeName.line = settings.line;
|
|
231
231
|
}
|
|
232
232
|
const themeName = props.themeName || props.theme || DEFAULT_THEME;
|
|
233
|
-
state.echarts = markRaw(echartsLib.init(refs.canvas,
|
|
233
|
+
state.echarts = markRaw(echartsLib.init(refs.canvas, __spreadValues(__spreadValues({}, themeName), ictThemeName), props.initOptions));
|
|
234
234
|
if (props.data) {
|
|
235
235
|
api.changeHandler();
|
|
236
236
|
}
|
package/chart-funnel/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../chunk-PKUHTIDK.js";
|
|
2
|
-
import { getFormated } from "
|
|
3
|
-
import { itemPoint, itemLabel, itemContent } from "
|
|
4
|
-
import { isNull } from "
|
|
2
|
+
import { getFormated } from "../chart-core/deps/utils";
|
|
3
|
+
import { itemPoint, itemLabel, itemContent } from "../chart-core/deps/constants";
|
|
4
|
+
import { isNull } from "../common/type";
|
|
5
5
|
const getFunnelTooltip = (dataType, digit) => {
|
|
6
6
|
function formatter(item) {
|
|
7
7
|
let tpl = [];
|
package/chart-gauge/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../chunk-PKUHTIDK.js";
|
|
2
|
-
import { getFormated, isObject } from "
|
|
3
|
-
import { isNull } from "
|
|
4
|
-
import { itemLabel, itemContent } from "
|
|
2
|
+
import { getFormated, isObject } from "../chart-core/deps/utils";
|
|
3
|
+
import { isNull } from "../common/type";
|
|
4
|
+
import { itemLabel, itemContent } from "../chart-core/deps/constants";
|
|
5
5
|
const getTooltip = (args) => {
|
|
6
6
|
const { dataType, digit, tooltipFormatter } = args;
|
|
7
7
|
return {
|
package/chart-graph/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../chunk-PKUHTIDK.js";
|
|
2
|
-
import { itemPoint, itemLabel, itemContent } from "
|
|
2
|
+
import { itemPoint, itemLabel, itemContent } from "../chart-core/deps/constants";
|
|
3
3
|
const getTooltip = () => ({
|
|
4
4
|
trigger: "item",
|
|
5
5
|
formatter(item) {
|
package/chart-heatmap/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__spreadValues
|
|
3
3
|
} from "../chunk-PKUHTIDK.js";
|
|
4
|
-
import { getFormated, getBmap, getAmap, getMapJSON } from "
|
|
5
|
-
import { HEAT_MAP_COLOR, itemPoint, itemLabel, itemContent } from "
|
|
4
|
+
import { getFormated, getBmap, getAmap, getMapJSON } from "../chart-core/deps/utils";
|
|
5
|
+
import { HEAT_MAP_COLOR, itemPoint, itemLabel, itemContent } from "../chart-core/deps/constants";
|
|
6
6
|
const getAxisList = (rows, label) => {
|
|
7
7
|
const result = [];
|
|
8
8
|
rows.forEach((row) => !result.includes(row[label]) && result.push(row[label]));
|
package/chart-line/index.js
CHANGED
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
__spreadProps,
|
|
3
3
|
__spreadValues
|
|
4
4
|
} from "../chunk-PKUHTIDK.js";
|
|
5
|
-
import { getFormated, getStackMap, getLegend, hexToRgb, set } from "
|
|
6
|
-
import { isNull } from "
|
|
7
|
-
import { itemPoint, itemLabel, itemContent, SAAS_DEFAULT_COLORS_10 } from "
|
|
5
|
+
import { getFormated, getStackMap, getLegend, hexToRgb, set } from "../chart-core/deps/utils";
|
|
6
|
+
import { isNull } from "../common/type";
|
|
7
|
+
import { itemPoint, itemLabel, itemContent, SAAS_DEFAULT_COLORS_10 } from "../chart-core/deps/constants";
|
|
8
8
|
const getLineXAxis = (args) => {
|
|
9
9
|
const { xAxisType, dimension, rows, xAxisName, axisVisible } = args;
|
|
10
10
|
return dimension.map((item, idx) => ({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../chunk-PKUHTIDK.js";
|
|
2
|
-
import { getFormated, isObject } from "
|
|
3
|
-
import { itemLabel, itemContent } from "
|
|
2
|
+
import { getFormated, isObject } from "../chart-core/deps/utils";
|
|
3
|
+
import { itemLabel, itemContent } from "../chart-core/deps/constants";
|
|
4
4
|
const isArr = Array.isArray;
|
|
5
5
|
const getTooltip = (args) => {
|
|
6
6
|
const { tooltipFormatter, dataType, digit } = args;
|
package/chart-map/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__spreadValues
|
|
3
3
|
} from "../chunk-PKUHTIDK.js";
|
|
4
|
-
import { getFormated, getMapJSON, getLegend as getLegendMap } from "
|
|
5
|
-
import { itemPoint, itemLabel, itemContent } from "
|
|
6
|
-
import { isNull } from "
|
|
4
|
+
import { getFormated, getMapJSON, getLegend as getLegendMap } from "../chart-core/deps/utils";
|
|
5
|
+
import { itemPoint, itemLabel, itemContent } from "../chart-core/deps/constants";
|
|
6
|
+
import { isNull } from "../common/type";
|
|
7
7
|
const getTooltip = ({ dataType, digit, dataStore, metrics, color, labelMap }) => {
|
|
8
8
|
function formatter(item) {
|
|
9
9
|
let tplt = [];
|
package/chart-pie/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__spreadValues
|
|
3
3
|
} from "../chunk-PKUHTIDK.js";
|
|
4
|
-
import { getFormated, setArrayValue, cloneDeep } from "
|
|
5
|
-
import { itemPoint, itemLabel, itemContent } from "
|
|
6
|
-
import { isNull } from "
|
|
4
|
+
import { getFormated, setArrayValue, cloneDeep } from "../chart-core/deps/utils";
|
|
5
|
+
import { itemPoint, itemLabel, itemContent } from "../chart-core/deps/constants";
|
|
6
|
+
import { isNull } from "../common/type";
|
|
7
7
|
const pieRadius = 100;
|
|
8
8
|
const ringRadius = [90, 100];
|
|
9
9
|
const roseRingRadius = [20, 100];
|
package/chart-radar/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../chunk-PKUHTIDK.js";
|
|
2
|
-
import { getFormated } from "
|
|
3
|
-
import { itemPoint, itemLabel, itemContent } from "
|
|
4
|
-
import { isNull } from "
|
|
2
|
+
import { getFormated } from "../chart-core/deps/utils";
|
|
3
|
+
import { itemPoint, itemLabel, itemContent } from "../chart-core/deps/constants";
|
|
4
|
+
import { isNull } from "../common/type";
|
|
5
5
|
const getRadarLegend = (rows, dimension, legendName) => {
|
|
6
6
|
let legendData = rows.map((row) => row[dimension]);
|
|
7
7
|
function formatter(name) {
|
package/chart-sankey/index.js
CHANGED
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
__spreadProps,
|
|
3
3
|
__spreadValues
|
|
4
4
|
} from "../chunk-PKUHTIDK.js";
|
|
5
|
-
import { getFormated } from "
|
|
6
|
-
import { itemPoint, itemLabel, itemContent } from "
|
|
7
|
-
import { isNull } from "
|
|
5
|
+
import { getFormated } from "../chart-core/deps/utils";
|
|
6
|
+
import { itemPoint, itemLabel, itemContent } from "../chart-core/deps/constants";
|
|
7
|
+
import { isNull } from "../common/type";
|
|
8
8
|
const getTooltip = (args) => {
|
|
9
9
|
const { digit, itemDataType, linksDataType } = args;
|
|
10
10
|
const formatter = function(item) {
|
package/chart-scatter/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__spreadValues
|
|
3
3
|
} from "../chunk-PKUHTIDK.js";
|
|
4
|
-
import { getFormated, hexToRgb } from "
|
|
5
|
-
import { itemPoint, itemLabel, itemContent } from "
|
|
6
|
-
import { line } from "
|
|
7
|
-
import { isNull } from "
|
|
4
|
+
import { getFormated, hexToRgb } from "../chart-core/deps/utils";
|
|
5
|
+
import { itemPoint, itemLabel, itemContent } from "../chart-core/deps/constants";
|
|
6
|
+
import { line } from "../chart-line";
|
|
7
|
+
import { isNull } from "../common/type";
|
|
8
8
|
const getScatterLegend = (dataLabels, legendName) => {
|
|
9
9
|
function formatter(name) {
|
|
10
10
|
return isNull(legendName[name]) ? name : legendName[name];
|
package/chart-sunburst/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../chunk-PKUHTIDK.js";
|
|
2
|
-
import { itemPoint, itemLabel, itemContent } from "
|
|
2
|
+
import { itemPoint, itemLabel, itemContent } from "../chart-core/deps/constants";
|
|
3
3
|
const getTooltip = () => ({
|
|
4
4
|
trigger: "item",
|
|
5
5
|
formatter(item) {
|
package/chart-tree/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../chunk-PKUHTIDK.js";
|
|
2
|
-
import { isObject } from "
|
|
3
|
-
import { itemLabel, itemContent, SAAS_DEFAULT_COLORS_10 } from "
|
|
2
|
+
import { isObject } from "../chart-core/deps/utils";
|
|
3
|
+
import { itemLabel, itemContent, SAAS_DEFAULT_COLORS_10 } from "../chart-core/deps/constants";
|
|
4
4
|
const getTreeLegend = (args) => {
|
|
5
5
|
const { dimension, rows } = args;
|
|
6
6
|
const result = rows.map((row) => row[dimension]);
|
package/chart-waterfall/index.js
CHANGED
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
__spreadProps,
|
|
3
3
|
__spreadValues
|
|
4
4
|
} from "../chunk-PKUHTIDK.js";
|
|
5
|
-
import { getFormated } from "
|
|
6
|
-
import { isNull } from "
|
|
7
|
-
import { itemLabel, itemContent, SAAS_DEFAULT_COLORS_10 } from "
|
|
5
|
+
import { getFormated } from "../chart-core/deps/utils";
|
|
6
|
+
import { isNull } from "../common/type";
|
|
7
|
+
import { itemLabel, itemContent, SAAS_DEFAULT_COLORS_10 } from "../chart-core/deps/constants";
|
|
8
8
|
const getWaterfallTooltip = (dataType, digit) => {
|
|
9
9
|
let trigger = "axis";
|
|
10
10
|
let axisPointer = { type: "shadow" };
|
package/chart-wordcloud/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../chunk-PKUHTIDK.js";
|
|
2
|
-
import { random } from "
|
|
3
|
-
import { itemLabel, itemContent } from "
|
|
2
|
+
import { random } from "../common/string";
|
|
3
|
+
import { itemLabel, itemContent } from "../chart-core/deps/constants";
|
|
4
4
|
const isArr = Array.isArray;
|
|
5
5
|
const getSeries = (args) => {
|
|
6
6
|
const { color, dimension, metrics, rows, shape, sizeMax, sizeMin } = args;
|
package/checkbox/index.js
CHANGED
|
@@ -77,6 +77,23 @@ const toggleEvent = ({ parent, props, type }) => {
|
|
|
77
77
|
const inputEl = parent.$el;
|
|
78
78
|
Object.keys(props.events).forEach((ev) => inputEl[type + "EventListener"](ev, props.events[ev]));
|
|
79
79
|
};
|
|
80
|
+
const dispatchDisplayedValue = ({ state, api, dispatch }) => () => {
|
|
81
|
+
if (state.isDisplayOnly) {
|
|
82
|
+
dispatch("FormItem", "displayed-value-changed", {
|
|
83
|
+
type: "checkbox",
|
|
84
|
+
val: api.getDisplayedValue()
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
const getDisplayedValue = ({ vm, state, props }) => () => {
|
|
89
|
+
if (state.isChecked) {
|
|
90
|
+
return vm.$refs.label && vm.$refs.label.innerText || props.text || props.label;
|
|
91
|
+
} else {
|
|
92
|
+
return "";
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
const computedIsDisplayOnly = ({ state, props }) => () => props.displayOnly || state.formDisplayOnly;
|
|
96
|
+
const computedIsGroupDisplayOnly = ({ state }) => () => state.isGroup && (state.checkboxGroup.displayOnly || state.formDisplayOnly);
|
|
80
97
|
export {
|
|
81
98
|
addToStore,
|
|
82
99
|
computedCheckboxSize,
|
|
@@ -85,9 +102,13 @@ export {
|
|
|
85
102
|
computedGetModelSet,
|
|
86
103
|
computedIsChecked,
|
|
87
104
|
computedIsDisabled,
|
|
105
|
+
computedIsDisplayOnly,
|
|
88
106
|
computedIsGroup,
|
|
107
|
+
computedIsGroupDisplayOnly,
|
|
89
108
|
computedIsLimitDisabled,
|
|
90
109
|
computedStore,
|
|
110
|
+
dispatchDisplayedValue,
|
|
111
|
+
getDisplayedValue,
|
|
91
112
|
handleChange,
|
|
92
113
|
mounted,
|
|
93
114
|
toggleEvent
|
package/checkbox/vue.js
CHANGED
|
@@ -15,10 +15,14 @@ import {
|
|
|
15
15
|
computedFormItemSize,
|
|
16
16
|
computedCheckboxSize,
|
|
17
17
|
mounted,
|
|
18
|
-
toggleEvent
|
|
18
|
+
toggleEvent,
|
|
19
|
+
dispatchDisplayedValue,
|
|
20
|
+
getDisplayedValue,
|
|
21
|
+
computedIsDisplayOnly,
|
|
22
|
+
computedIsGroupDisplayOnly
|
|
19
23
|
} from "./index";
|
|
20
24
|
const api = ["state", "handleChange"];
|
|
21
|
-
const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, watch, inject }, { parent, emit, constants, nextTick, dispatch }) => {
|
|
25
|
+
const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, watch, inject }, { vm, parent, emit, constants, nextTick, dispatch }) => {
|
|
22
26
|
parent.tinyForm = parent.tinyForm || inject("form", null);
|
|
23
27
|
const api2 = { dispatch };
|
|
24
28
|
const state = reactive(__spreadProps(__spreadValues({}, { focus: false, selfModel: false, isLimitExceeded: false }), {
|
|
@@ -29,6 +33,9 @@ const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, wat
|
|
|
29
33
|
checkboxSize: computed(() => api2.computedCheckboxSize()),
|
|
30
34
|
isLimitDisabled: computed(() => api2.computedIsLimitDisabled()),
|
|
31
35
|
formDisabled: computed(() => (parent.tinyForm || {}).disabled),
|
|
36
|
+
formDisplayOnly: computed(() => (parent.tinyForm || {}).displayOnly),
|
|
37
|
+
isDisplayOnly: computed(() => api2.computedIsDisplayOnly()),
|
|
38
|
+
isGroupDisplayOnly: computed(() => api2.computedIsGroupDisplayOnly()),
|
|
32
39
|
model: computed({ get: () => api2.computedGetModelGet(), set: (value) => api2.computedGetModelSet(value) })
|
|
33
40
|
}));
|
|
34
41
|
Object.assign(api2, {
|
|
@@ -39,6 +46,8 @@ const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, wat
|
|
|
39
46
|
computedIsChecked: computedIsChecked({ state, props }),
|
|
40
47
|
computedIsLimitDisabled: computedIsLimitDisabled(state),
|
|
41
48
|
computedIsDisabled: computedIsDisabled({ state, props }),
|
|
49
|
+
computedIsDisplayOnly: computedIsDisplayOnly({ state, props }),
|
|
50
|
+
computedIsGroupDisplayOnly: computedIsGroupDisplayOnly({ state }),
|
|
42
51
|
computedGetModelGet: computedGetModelGet({ state, props }),
|
|
43
52
|
computedIsGroup: computedIsGroup({ state, parent, constants }),
|
|
44
53
|
computedGetModelSet: computedGetModelSet({ state, dispatch, emit, constants })
|
|
@@ -47,18 +56,22 @@ const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, wat
|
|
|
47
56
|
api2.computedCheckboxSize = computedCheckboxSize({ state, props, formItemSize });
|
|
48
57
|
Object.assign(api2, {
|
|
49
58
|
mounted: mounted({ emit, props, api: api2, parent }),
|
|
50
|
-
handleChange: handleChange({ state, props, emit, nextTick, dispatch: api2.dispatch, constants })
|
|
59
|
+
handleChange: handleChange({ state, props, emit, nextTick, dispatch: api2.dispatch, constants }),
|
|
60
|
+
dispatchDisplayedValue: dispatchDisplayedValue({ state, api: api2, dispatch }),
|
|
61
|
+
getDisplayedValue: getDisplayedValue({ state, props, vm })
|
|
51
62
|
});
|
|
52
63
|
watch(
|
|
53
64
|
() => props.modelValue,
|
|
54
65
|
(value) => props.validateEvent && api2.dispatch(constants.FORM_ITEM, constants.FORM_CHANGE, value)
|
|
55
66
|
);
|
|
67
|
+
watch(() => state.isDisplayOnly, api2.dispatchDisplayedValue);
|
|
56
68
|
onBeforeUnmount(() => {
|
|
57
69
|
toggleEvent({ parent, props, type: "remove" });
|
|
58
70
|
});
|
|
59
71
|
onMounted(() => {
|
|
60
72
|
dispatch("Tooltip", "tooltip-update");
|
|
61
73
|
toggleEvent({ parent, props, type: "add" });
|
|
74
|
+
api2.dispatchDisplayedValue();
|
|
62
75
|
api2.mounted();
|
|
63
76
|
});
|
|
64
77
|
return api2;
|
package/checkbox-button/vue.js
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
computedIsDisabled,
|
|
11
11
|
toggleEvent
|
|
12
12
|
} from "./index";
|
|
13
|
-
import { addToStore, computedIsChecked, computedStore, computedIsLimitDisabled } from "
|
|
13
|
+
import { addToStore, computedIsChecked, computedStore, computedIsLimitDisabled } from "../checkbox";
|
|
14
14
|
const api = ["state", "handleChange"];
|
|
15
15
|
const initState = ({ reactive, computed, api: api2 }) => {
|
|
16
16
|
const state = reactive({
|
package/collapse-item/vue.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../chunk-PKUHTIDK.js";
|
|
2
2
|
import { handleFocus, handleEnterClick, handleHeaderClick } from "./index";
|
|
3
|
-
import { guid } from "
|
|
3
|
+
import { guid } from "../common/string";
|
|
4
4
|
const api = ["state", "isActive", "handleFocus", "handleEnterClick", "handleHeaderClick"];
|
|
5
5
|
const renderless = (props, { computed, reactive }, { parent, constants, dispatch }) => {
|
|
6
6
|
const _constants = parent.collapse._constants;
|