@opentiny/vue-renderless 3.9.2 → 3.10.0
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/vue.js +25 -2
- package/anchor/index.js +3 -3
- package/anchor/vue.js +7 -1
- package/area/index.js +4 -4
- package/button/vue.js +4 -2
- package/button-group/index.js +8 -1
- package/button-group/vue.js +5 -10
- package/calendar/index.js +14 -14
- package/calendar-bar/index.js +3 -3
- package/carousel-item/index.js +1 -1
- package/cascader/vue.js +1 -1
- package/cascader-mobile/index.js +299 -0
- package/cascader-mobile/vue.js +102 -0
- package/cascader-panel/store.js +3 -1
- package/chart-boxplot/index.js +0 -1
- package/chart-core/deps/constants.js +20 -2
- package/chart-core/index.js +9 -1
- package/chart-core/modules/extend.js +14 -1
- package/chart-gauge/index.js +3 -1
- package/chart-graph/index.js +3 -1
- package/chart-map/index.js +11 -1
- package/chart-scatter/index.js +10 -2
- package/chart-waterfall/index.js +4 -1
- package/checkbox/index.js +16 -14
- package/checkbox/vue.js +14 -10
- package/checkbox-button/vue.js +7 -3
- package/column-list-item/vue.js +10 -1
- package/common/bigInt.js +4 -11
- package/common/date.js +2 -2
- package/common/deps/ResizeObserver.js +3 -1
- package/common/deps/date-util.js +9 -1
- package/common/deps/date.js +18 -5
- package/common/deps/fastdom/async.js +41 -0
- package/common/deps/fastdom/index.js +9 -0
- package/common/deps/fastdom/sandbox.js +53 -0
- package/common/deps/fastdom/singleton.js +80 -0
- package/common/deps/fullscreen/screenfull.js +16 -2
- package/common/deps/memorize.js +3 -3
- package/common/deps/popup-manager.js +0 -1
- package/common/deps/requestAnimationFrame.js +1 -1
- package/common/deps/throttle.js +2 -2
- package/common/deps/tree-model/node.js +23 -11
- package/common/deps/tree-model/tree-store.js +28 -7
- package/common/deps/vue-popper.js +14 -2
- package/common/deps/vue-popup.js +16 -23
- package/common/index.js +7 -35
- package/common/runtime.js +1 -1
- package/common/validate/rules/type.js +3 -1
- package/credit-card-form/vue.js +2 -2
- package/date-panel/index.js +35 -31
- package/date-panel/vue.js +12 -12
- package/date-picker/index.js +9 -5
- package/date-picker/vue.js +20 -8
- package/date-picker-mobile/index.js +3 -3
- package/date-range/index.js +91 -19
- package/date-range/vue.js +19 -11
- package/date-table/index.js +39 -6
- package/date-table/vue.js +2 -2
- package/dept/index.js +1 -1
- package/detail-page/vue.js +9 -1
- package/dialog-box/index.js +11 -2
- package/dialog-box/vue.js +30 -6
- package/dialog-select/index.js +27 -5
- package/dialog-select/vue.js +11 -4
- package/drop-roles/index.js +3 -1
- package/dropdown/index.js +28 -7
- package/dropdown/vue.js +12 -7
- package/dropdown-item/index.js +9 -1
- package/dropdown-item/mf.js +3 -3
- package/dropdown-item/vue.js +12 -10
- package/dropdown-menu/index.js +13 -14
- package/dropdown-menu/vue.js +8 -7
- package/espace/vue.js +9 -1
- package/fall-menu/vue.js +12 -1
- package/file-upload/index.js +137 -89
- package/file-upload/vue.js +24 -14
- package/filter/index.js +1 -1
- package/filter/vue.js +1 -3
- package/floating-button/index.js +73 -0
- package/floating-button/vue.js +35 -0
- package/form/index.js +13 -4
- package/form/vue.js +7 -2
- package/form-item/index.js +4 -1
- package/form-item/vue.js +6 -3
- package/fullscreen/vue.js +24 -3
- package/grid/plugins/exportExcel.js +54 -8
- package/grid/static/base/helperGetHGSKeys.js +1 -4
- package/grid/utils/common.js +15 -11
- package/grid/utils/dom.js +5 -1
- package/guide/index.js +2 -3
- package/hrapprover/index.js +3 -1
- package/index-bar/vue.js +8 -1
- package/input/index.js +1 -11
- package/input/vue.js +6 -12
- package/ip-address/index.js +66 -33
- package/ip-address/vue.js +8 -1
- package/link-menu/vue.js +22 -2
- package/locales/index.js +4 -2
- package/logon-user/index.js +3 -1
- package/logout/index.js +6 -2
- package/milestone/vue.js +1 -1
- package/mini-picker/index.js +12 -10
- package/mini-picker/vue.js +10 -10
- package/modal/index.js +5 -3
- package/modal/vue.js +4 -2
- package/month-range/index.js +18 -18
- package/month-range/vue.js +16 -4
- package/month-table/index.js +7 -3
- package/multi-select/vue.js +1 -9
- package/nav-menu/index.js +33 -4
- package/nav-menu/vue.js +9 -1
- package/notify/vue.js +12 -1
- package/numeric/vue.js +6 -2
- package/option/index.js +10 -2
- package/option/vue.js +20 -9
- package/option-group/index.js +3 -1
- package/package.json +2 -1
- package/picker/index.js +88 -17
- package/picker/vue.js +42 -17
- package/picker-column/index.js +6 -6
- package/picker-column/vue.js +5 -5
- package/popconfirm/vue.js +3 -1
- package/popeditor/index.js +55 -13
- package/popeditor/vue.js +23 -7
- package/popover/vue.js +1 -2
- package/popup/vue.js +15 -2
- package/progress/index.js +9 -7
- package/progress/vue.js +12 -4
- package/pull-refresh/vue.js +10 -1
- package/query-builder/index.js +9 -0
- package/query-builder/vue.js +18 -0
- package/radio/vue.js +3 -1
- package/radio-button/vue.js +1 -1
- package/rate/index.js +8 -2
- package/rate/vue.js +27 -4
- package/recycle-scroller/index.js +0 -1
- package/scrollbar/vue-bar.js +18 -2
- package/search/index.js +12 -5
- package/search/vue.js +7 -5
- package/select/index.js +596 -304
- package/select/vue.js +167 -101
- package/select-dropdown/vue.js +8 -6
- package/select-mobile/index.js +26 -13
- package/select-mobile/vue.js +14 -5
- package/select-view/index.js +5 -21
- package/select-view/vue.js +0 -3
- package/selected-box/index.js +3 -1
- package/slider/index.js +5 -5
- package/slider/vue.js +16 -0
- package/slider-button/index.js +41 -0
- package/slider-button/vue.js +36 -0
- package/slider-button-group/slide-button.js +142 -0
- package/slider-button-group/vue.js +52 -0
- package/steps/slide-bar.js +0 -1
- package/switch/index.js +1 -1
- package/switch/vue.js +1 -1
- package/tab-bar/index.js +8 -6
- package/tab-nav/index.js +19 -13
- package/tab-nav/vue.js +10 -9
- package/tabs/index.js +21 -17
- package/tabs/vue.js +1 -4
- package/tag/vue.js +2 -1
- package/tag-group/index.js +23 -10
- package/tag-group/vue.js +5 -4
- package/time/index.js +8 -8
- package/time/vue.js +9 -9
- package/time-line/index.js +24 -2
- package/time-line/vue.js +30 -4
- package/time-panel/index.js +2 -2
- package/time-panel/vue.js +2 -2
- package/time-range/index.js +24 -21
- package/time-range/vue.js +26 -16
- package/time-spinner/index.js +32 -21
- package/time-spinner/vue.js +37 -12
- package/timeline-item/index.js +77 -0
- package/timeline-item/vue.js +44 -0
- package/toggle-menu/vue.js +0 -1
- package/tooltip/index.js +11 -12
- package/tooltip/vue.js +11 -1
- package/top-box/vue.js +13 -1
- package/tree/index.js +228 -15
- package/tree/vue.js +119 -15
- package/tree-menu/index.js +35 -0
- package/tree-menu/vue.js +27 -5
- package/tree-node/index.js +75 -10
- package/tree-node/vue.js +45 -23
- package/upload/index.js +90 -49
- package/upload/vue.js +22 -10
- package/upload-dragger/index.js +4 -3
- package/upload-list/index.js +67 -16
- package/upload-list/vue.js +26 -9
- package/user/index.js +7 -4
- package/user-link/index.js +2 -1
- package/wizard/index.js +4 -1
- package/wizard/vue.js +19 -2
- package/year-range/index.js +1 -1
- package/year-range/vue.js +3 -3
- package/year-table/index.js +2 -2
package/picker/vue.js
CHANGED
|
@@ -48,9 +48,12 @@ import {
|
|
|
48
48
|
computedFormat,
|
|
49
49
|
computedTriggerClass,
|
|
50
50
|
computedHaveTrigger,
|
|
51
|
-
|
|
51
|
+
initPopper,
|
|
52
52
|
initGlobalTimezone,
|
|
53
|
-
emitDbTime
|
|
53
|
+
emitDbTime,
|
|
54
|
+
handleEnterDisplayOnlyContent,
|
|
55
|
+
handleEnterPickerlabel,
|
|
56
|
+
setInputPaddingLeft
|
|
54
57
|
} from "./index";
|
|
55
58
|
import { DATEPICKER } from "../common";
|
|
56
59
|
const api = [
|
|
@@ -71,10 +74,18 @@ const api = [
|
|
|
71
74
|
"handlePick",
|
|
72
75
|
"handleSelectRange",
|
|
73
76
|
"handleSelectChange",
|
|
74
|
-
"popperElm"
|
|
77
|
+
"popperElm",
|
|
78
|
+
"handleEnterDisplayOnlyContent",
|
|
79
|
+
"handleEnterPickerlabel"
|
|
75
80
|
];
|
|
76
|
-
const initState = ({ api: api2, reactive,
|
|
81
|
+
const initState = ({ api: api2, reactive, vm, computed, props, utils, parent }) => {
|
|
77
82
|
const state = reactive({
|
|
83
|
+
historyValue: [],
|
|
84
|
+
historyInput: [],
|
|
85
|
+
historyUserInput: [],
|
|
86
|
+
historyUserValue: [],
|
|
87
|
+
startStatus: false,
|
|
88
|
+
endStatus: false,
|
|
78
89
|
date: null,
|
|
79
90
|
pickerVisible: false,
|
|
80
91
|
showClose: false,
|
|
@@ -83,7 +94,7 @@ const initState = ({ api: api2, reactive, refs, computed, props, utils }) => {
|
|
|
83
94
|
popperElm: null,
|
|
84
95
|
unwatchPickerOptions: null,
|
|
85
96
|
ranged: computed(() => state.type.includes(DATEPICKER.Range)),
|
|
86
|
-
reference: computed(() => refs.reference.$el || refs.reference),
|
|
97
|
+
reference: computed(() => vm.$refs.reference.$el || vm.$refs.reference),
|
|
87
98
|
formDisabled: computed(() => (parent.tinyForm || {}).disabled),
|
|
88
99
|
refInput: computed(() => state.reference ? [].slice.call(state.reference.querySelectorAll("input")) : []),
|
|
89
100
|
valueIsEmpty: computed(() => api2.getValueEmpty()),
|
|
@@ -93,13 +104,16 @@ const initState = ({ api: api2, reactive, refs, computed, props, utils }) => {
|
|
|
93
104
|
displayValue: computed(() => api2.displayValue()),
|
|
94
105
|
parsedValue: computed(() => api2.parsedValue()),
|
|
95
106
|
pickerSize: computed(() => props.size),
|
|
96
|
-
pickerDisabled: computed(() => props.disabled || state.formDisabled),
|
|
107
|
+
pickerDisabled: computed(() => props.disabled || state.formDisabled || state.isDisplayOnly),
|
|
97
108
|
firstInputId: computed(() => api2.firstInputId()),
|
|
98
109
|
secondInputId: computed(() => api2.secondInputId()),
|
|
99
110
|
type: computed(() => api2.getType()),
|
|
100
111
|
timezone: computed(() => api2.getTimezone()),
|
|
101
112
|
valueFormat: computed(() => getValueFormat({ props, utils })),
|
|
102
|
-
format: computed(() => api2.computedFormat())
|
|
113
|
+
format: computed(() => api2.computedFormat()),
|
|
114
|
+
labelTooltip: "",
|
|
115
|
+
displayOnlyTooltip: "",
|
|
116
|
+
isDisplayOnly: computed(() => props.displayOnly || (parent.auiForm || {}).displayOnly)
|
|
103
117
|
});
|
|
104
118
|
return state;
|
|
105
119
|
};
|
|
@@ -122,13 +136,15 @@ const initApi2 = ({ api: api2, props, state, t }) => {
|
|
|
122
136
|
handleMouseEnter: handleMouseEnter({ props, state }),
|
|
123
137
|
initGlobalTimezone: initGlobalTimezone({ api: api2, state, props }),
|
|
124
138
|
parseValue: parseValue({ api: api2, props, state }),
|
|
125
|
-
handleSelectRange: handleSelectRange(state)
|
|
139
|
+
handleSelectRange: handleSelectRange(state),
|
|
140
|
+
handleEnterPickerlabel: handleEnterPickerlabel({ state, props }),
|
|
141
|
+
handleEnterDisplayOnlyContent: handleEnterDisplayOnlyContent({ state, props, t })
|
|
126
142
|
});
|
|
127
143
|
};
|
|
128
144
|
const initApi = ({ api: api2, props, hooks, state, vnode, others, utils }) => {
|
|
129
|
-
const { t, emit,
|
|
145
|
+
const { t, emit, dispatch, nextTick, vm } = vnode;
|
|
130
146
|
const { TimePanel, TimeRangePanel } = others;
|
|
131
|
-
const { destroyPopper, popperElm, updatePopper } =
|
|
147
|
+
const { destroyPopper, popperElm, updatePopper } = initPopper({ props, hooks, vnode });
|
|
132
148
|
state.popperElm = popperElm;
|
|
133
149
|
state.picker = null;
|
|
134
150
|
Object.assign(api2, {
|
|
@@ -137,14 +153,14 @@ const initApi = ({ api: api2, props, hooks, state, vnode, others, utils }) => {
|
|
|
137
153
|
hidePicker: hidePicker({ destroyPopper, state }),
|
|
138
154
|
handleSelectChange: ({ tz, date }) => emit("select-change", { tz, date }),
|
|
139
155
|
getPanel: getPanel(others),
|
|
140
|
-
handleFocus: handleFocus({ emit,
|
|
156
|
+
handleFocus: handleFocus({ emit, vm, state }),
|
|
141
157
|
getTimezone: getTimezone({ props, utils }),
|
|
142
158
|
emitChange: emitChange({ api: api2, dispatch, emit, props, state }),
|
|
143
159
|
parsedValue: parsedValue({ api: api2, props, state, t }),
|
|
144
160
|
parseAsFormatAndType: parseAsFormatAndType({ api: api2 }),
|
|
145
161
|
typeValueResolveMap: typeValueResolveMap({ api: api2, t }),
|
|
146
162
|
updateOptions: updateOptions({ api: api2, props, state }),
|
|
147
|
-
focus: focus({ api: api2, props,
|
|
163
|
+
focus: focus({ api: api2, props, vm }),
|
|
148
164
|
handleChange: handleChange({ api: api2, state }),
|
|
149
165
|
isValidValue: isValidValue({ api: api2, state }),
|
|
150
166
|
emitInput: emitInput({ api: api2, emit, props, state }),
|
|
@@ -166,7 +182,8 @@ const initApi = ({ api: api2, props, hooks, state, vnode, others, utils }) => {
|
|
|
166
182
|
watchModelValue: watchModelValue({ api: api2, props, state, dispatch }),
|
|
167
183
|
computedFormat: computedFormat({ props, utils }),
|
|
168
184
|
computedTriggerClass: computedTriggerClass({ props, state }),
|
|
169
|
-
computedHaveTrigger: computedHaveTrigger({ props })
|
|
185
|
+
computedHaveTrigger: computedHaveTrigger({ props }),
|
|
186
|
+
setInputPaddingLeft: setInputPaddingLeft({ props, state, vm, nextTick })
|
|
170
187
|
});
|
|
171
188
|
initApi2({ api: api2, props, state, t });
|
|
172
189
|
};
|
|
@@ -189,17 +206,25 @@ const initWatch = ({ api: api2, state, props, watch, markRaw }) => {
|
|
|
189
206
|
watch(() => props.isRange, api2.watchIsRange);
|
|
190
207
|
watch(() => props.modelValue, api2.watchModelValue);
|
|
191
208
|
watch(() => props.pickerOptions, api2.updateOptions, { deep: true });
|
|
209
|
+
watch(() => props.label, api2.setInputPaddingLeft);
|
|
192
210
|
};
|
|
193
211
|
const renderless = (props, hooks, vnode, others) => {
|
|
194
212
|
const api2 = {};
|
|
195
|
-
const { reactive, computed, watch, onBeforeUnmount, inject, markRaw } = hooks;
|
|
196
|
-
const {
|
|
213
|
+
const { reactive, computed, watch, onBeforeUnmount, inject, markRaw, onMounted } = hooks;
|
|
214
|
+
const { vm, service, parent } = vnode;
|
|
197
215
|
const { utils = {} } = service || {};
|
|
198
|
-
const state = initState({ api: api2, reactive,
|
|
199
|
-
|
|
216
|
+
const state = initState({ api: api2, reactive, vm, computed, props, utils, parent });
|
|
217
|
+
parent.tinyForm = parent.tinyForm || inject("form", null);
|
|
200
218
|
initApi({ api: api2, props, hooks, state, vnode, others, utils });
|
|
201
219
|
initWatch({ api: api2, state, props, watch, markRaw });
|
|
202
220
|
api2.initGlobalTimezone();
|
|
221
|
+
onMounted(() => {
|
|
222
|
+
api2.setInputPaddingLeft();
|
|
223
|
+
});
|
|
224
|
+
vm.$on("handle-clear", (event) => {
|
|
225
|
+
state.showClose = true;
|
|
226
|
+
api2.handleClickIcon(event);
|
|
227
|
+
});
|
|
203
228
|
onBeforeUnmount(() => {
|
|
204
229
|
api2.destroyPopper("remove");
|
|
205
230
|
state.popperElm = null;
|
package/picker-column/index.js
CHANGED
|
@@ -49,7 +49,7 @@ const adjustIndex = (state) => (index) => {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
-
const onTouchstart = ({
|
|
52
|
+
const onTouchstart = ({ vm, state }) => (event) => {
|
|
53
53
|
state.direction = "";
|
|
54
54
|
state.deltaX = 0;
|
|
55
55
|
state.deltaY = 0;
|
|
@@ -58,7 +58,7 @@ const onTouchstart = ({ refs, state }) => (event) => {
|
|
|
58
58
|
state.startX = event.touches[0].clientX;
|
|
59
59
|
state.startY = event.touches[0].clientY;
|
|
60
60
|
if (state.moving) {
|
|
61
|
-
const style = window.getComputedStyle(refs.track);
|
|
61
|
+
const style = window.getComputedStyle(vm.$refs.track);
|
|
62
62
|
const transform = style.transform || style.webkitTransform;
|
|
63
63
|
const translateY = Number(transform.slice(7, transform.length - 1).split(", ")[5]);
|
|
64
64
|
state.offset = Math.min(0, translateY - state.baseOffset);
|
|
@@ -113,8 +113,8 @@ const onTouchend = ({ api, state }) => () => {
|
|
|
113
113
|
state.moving = false;
|
|
114
114
|
}, 0);
|
|
115
115
|
};
|
|
116
|
-
const mountedHandler = ({ api,
|
|
117
|
-
const track = refs.track;
|
|
116
|
+
const mountedHandler = ({ api, vm, state }) => () => {
|
|
117
|
+
const track = vm.$refs.track;
|
|
118
118
|
on(track, "touchstart", api.onTouchstart);
|
|
119
119
|
on(track, "touchmove", api.onTouchmove);
|
|
120
120
|
on(track, "touchend", api.onTouchend);
|
|
@@ -123,8 +123,8 @@ const mountedHandler = ({ api, refs, state }) => () => {
|
|
|
123
123
|
backgroundSize: `100% ${(state.clumnsWrapHeight - state.itemHeight) / 2}px`
|
|
124
124
|
};
|
|
125
125
|
};
|
|
126
|
-
const beforeUnmountHandler = ({ api,
|
|
127
|
-
const track = refs.track;
|
|
126
|
+
const beforeUnmountHandler = ({ api, vm }) => () => {
|
|
127
|
+
const track = vm.$refs.track;
|
|
128
128
|
off(track, "touchstart", api.onTouchstart);
|
|
129
129
|
off(track, "touchmove", api.onTouchmove);
|
|
130
130
|
off(track, "touchend", api.onTouchend);
|
package/picker-column/vue.js
CHANGED
|
@@ -49,7 +49,7 @@ const initState = ({ reactive, computed, props, api: api2 }) => {
|
|
|
49
49
|
});
|
|
50
50
|
return state;
|
|
51
51
|
};
|
|
52
|
-
const initApi = ({ api: api2, props, state,
|
|
52
|
+
const initApi = ({ api: api2, props, state, vm, emit }) => {
|
|
53
53
|
Object.assign(api2, {
|
|
54
54
|
state,
|
|
55
55
|
getValue: getValue(state),
|
|
@@ -66,8 +66,8 @@ const initApi = ({ api: api2, props, state, refs, emit }) => {
|
|
|
66
66
|
momentum: momentum({ api: api2, state, props }),
|
|
67
67
|
setIndex: setIndex({ api: api2, state, emit }),
|
|
68
68
|
onClickItem: onClickItem({ api: api2, state }),
|
|
69
|
-
mountedHandler: mountedHandler({ api: api2, state,
|
|
70
|
-
beforeUnmountHandler: beforeUnmountHandler({ api: api2,
|
|
69
|
+
mountedHandler: mountedHandler({ api: api2, state, vm }),
|
|
70
|
+
beforeUnmountHandler: beforeUnmountHandler({ api: api2, vm })
|
|
71
71
|
});
|
|
72
72
|
};
|
|
73
73
|
const initWatch = ({ watch, props, state, api: api2 }) => {
|
|
@@ -87,10 +87,10 @@ const initWatch = ({ watch, props, state, api: api2 }) => {
|
|
|
87
87
|
{ immediate: true }
|
|
88
88
|
);
|
|
89
89
|
};
|
|
90
|
-
const renderless = (props, { computed, onMounted, reactive, watch, onBeforeUnmount }, { emit,
|
|
90
|
+
const renderless = (props, { computed, onMounted, reactive, watch, onBeforeUnmount }, { emit, vm }) => {
|
|
91
91
|
const api2 = {};
|
|
92
92
|
const state = initState({ reactive, computed, props, api: api2 });
|
|
93
|
-
initApi({ api: api2, props, state,
|
|
93
|
+
initApi({ api: api2, props, state, vm, emit });
|
|
94
94
|
api2.setIndex(state.currentIndex);
|
|
95
95
|
state.columnsItem = deepClone(props.columnsItem);
|
|
96
96
|
initWatch({ watch, props, state, api: api2 });
|
package/popconfirm/vue.js
CHANGED
|
@@ -8,7 +8,9 @@ const renderless = (props, { computed, reactive }, { emit, constants, designConf
|
|
|
8
8
|
const state = reactive({
|
|
9
9
|
isLock: false,
|
|
10
10
|
showPopover: false,
|
|
11
|
-
getIcon: computed(
|
|
11
|
+
getIcon: computed(
|
|
12
|
+
() => typeof props.type === "object" ? props.type : designIcon || constants.ICON_MAP[props.type]
|
|
13
|
+
)
|
|
12
14
|
});
|
|
13
15
|
Object.assign(api2, {
|
|
14
16
|
state,
|
package/popeditor/index.js
CHANGED
|
@@ -30,7 +30,10 @@ const createSearchForm = (props) => (isRest) => props.conditions.reduce((acc, it
|
|
|
30
30
|
}, {});
|
|
31
31
|
const getColumns = ({ constants, props }) => {
|
|
32
32
|
const { columns } = props.gridOp;
|
|
33
|
-
const selectionCol = find(
|
|
33
|
+
const selectionCol = find(
|
|
34
|
+
columns,
|
|
35
|
+
(col) => col.type === constants.COLUMNS_TYPE.selection || col.type === constants.COLUMNS_TYPE.radio
|
|
36
|
+
);
|
|
34
37
|
if (selectionCol) {
|
|
35
38
|
selectionCol.type = props.multi ? constants.COLUMNS_TYPE.selection : constants.COLUMNS_TYPE.radio;
|
|
36
39
|
} else {
|
|
@@ -92,7 +95,11 @@ const handleClear = ({ constants, emit, props, state }) => () => {
|
|
|
92
95
|
state.selectedValues = [];
|
|
93
96
|
if (!isEqual(state.commitValue, props.modelValue)) {
|
|
94
97
|
emit("update:modelValue", state.commitValue);
|
|
95
|
-
emit(
|
|
98
|
+
emit(
|
|
99
|
+
"change",
|
|
100
|
+
state.commitValue,
|
|
101
|
+
props.popseletor === constants.TYPE_GRID ? state.treeSelectList : state.selectedDatas
|
|
102
|
+
);
|
|
96
103
|
}
|
|
97
104
|
};
|
|
98
105
|
const handleConfirm = ({ api, constants, emit, props, state }) => (skipBeforeClose) => {
|
|
@@ -248,13 +255,16 @@ const openDialog = ({ api, props, state, emit }) => () => {
|
|
|
248
255
|
state.closeSuggestPanelInvoker = "openDialog";
|
|
249
256
|
api.closeSuggestPanel(true);
|
|
250
257
|
state.open = true;
|
|
258
|
+
state.showContent = true;
|
|
251
259
|
emit("popup");
|
|
252
260
|
props.autoLookup && props.alwaysLoad && api.query();
|
|
253
261
|
};
|
|
254
262
|
const localFilter = ({ props, state }) => {
|
|
255
263
|
const keys = Object.keys(state.search);
|
|
256
264
|
const dataset = props.gridOp && props.gridOp.data || [];
|
|
257
|
-
return dataset.filter(
|
|
265
|
+
return dataset.filter(
|
|
266
|
+
(item) => keys.every((key) => item[key] && item[key].toString().toLowerCase().includes(state.search[key].toLowerCase()))
|
|
267
|
+
);
|
|
258
268
|
};
|
|
259
269
|
const query = ({ props, state, parent, constants }) => (page) => {
|
|
260
270
|
const { remoteSearch, dataset } = props;
|
|
@@ -263,6 +273,13 @@ const query = ({ props, state, parent, constants }) => (page) => {
|
|
|
263
273
|
state.loading = true;
|
|
264
274
|
if (remoteSearch || dataset) {
|
|
265
275
|
const { currentPage, pageSize } = state.pagerConfig;
|
|
276
|
+
let final = true;
|
|
277
|
+
const onFinally = () => {
|
|
278
|
+
if (final) {
|
|
279
|
+
final = false;
|
|
280
|
+
state.loading = false;
|
|
281
|
+
}
|
|
282
|
+
};
|
|
266
283
|
if (remoteSearch) {
|
|
267
284
|
props.remoteSearch({
|
|
268
285
|
page: { currentPage, pageSize },
|
|
@@ -272,11 +289,12 @@ const query = ({ props, state, parent, constants }) => (page) => {
|
|
|
272
289
|
state.pagerConfig.total = data.total;
|
|
273
290
|
state.loading = false;
|
|
274
291
|
resolve();
|
|
275
|
-
}).
|
|
276
|
-
state.loading = false;
|
|
277
|
-
});
|
|
292
|
+
}).then(onFinally).catch(onFinally);
|
|
278
293
|
} else {
|
|
279
|
-
getDataset(
|
|
294
|
+
getDataset(
|
|
295
|
+
{ dataset, service: parent.$service, tree: props.treeOp },
|
|
296
|
+
{ pageVO: { curPage: currentPage, pageSize } }
|
|
297
|
+
).then((data) => {
|
|
280
298
|
const { result, pageVO = {} } = data;
|
|
281
299
|
if (props.popseletor === constants.TYPE_TREE) {
|
|
282
300
|
props.treeOp.data = result || data;
|
|
@@ -286,9 +304,7 @@ const query = ({ props, state, parent, constants }) => (page) => {
|
|
|
286
304
|
}
|
|
287
305
|
state.loading = false;
|
|
288
306
|
resolve();
|
|
289
|
-
}).
|
|
290
|
-
state.loading = false;
|
|
291
|
-
});
|
|
307
|
+
}).then(onFinally).catch(onFinally);
|
|
292
308
|
}
|
|
293
309
|
} else {
|
|
294
310
|
state.fullGridData = localFilter({ state, props });
|
|
@@ -316,7 +332,7 @@ const selectedGridSelectChange = ({ constants, props, vm, state }) => ({ checked
|
|
|
316
332
|
const refs = vm.$refs;
|
|
317
333
|
if (!checked) {
|
|
318
334
|
const len = state.selectedValues.length;
|
|
319
|
-
event.target.checked = !checked;
|
|
335
|
+
event && (event.target.checked = !checked);
|
|
320
336
|
for (let i = 0; i < len; i++) {
|
|
321
337
|
if (state.selectedValues[i] == row[props.valueField]) {
|
|
322
338
|
state.selectedValues.splice(i, 1);
|
|
@@ -365,6 +381,7 @@ const sourceGridSelectAll = ({ props, state, api }) => ({ selection, checked })
|
|
|
365
381
|
api.handleConfirm();
|
|
366
382
|
}
|
|
367
383
|
copySelectDatas(state);
|
|
384
|
+
api.selectedBoxInit();
|
|
368
385
|
};
|
|
369
386
|
const sourceGridSelectChange = ({ props, state, api }) => ({ checked, row, confirm }) => {
|
|
370
387
|
if (checked) {
|
|
@@ -382,6 +399,7 @@ const sourceGridSelectChange = ({ props, state, api }) => ({ checked, row, confi
|
|
|
382
399
|
api.handleConfirm();
|
|
383
400
|
}
|
|
384
401
|
copySelectDatas(state);
|
|
402
|
+
api.selectedBoxInit();
|
|
385
403
|
};
|
|
386
404
|
const filterNode = () => (value, data) => {
|
|
387
405
|
if (!value) {
|
|
@@ -483,7 +501,7 @@ const updateSuggestWidth = ({ refs }) => () => {
|
|
|
483
501
|
let $input = refs.reference.getInput();
|
|
484
502
|
refs.popper.style.width = $input.clientWidth + "px";
|
|
485
503
|
};
|
|
486
|
-
const doSuggesst = ({ state, props, popper, api }) => (event) => {
|
|
504
|
+
const doSuggesst = ({ state, props, popper, api, nextTick }) => (event) => {
|
|
487
505
|
if (!props.suggest) {
|
|
488
506
|
return;
|
|
489
507
|
}
|
|
@@ -498,13 +516,16 @@ const doSuggesst = ({ state, props, popper, api }) => (event) => {
|
|
|
498
516
|
state.suggestList = [].concat(state.selectedDatas);
|
|
499
517
|
}
|
|
500
518
|
state.showSuggestPanel = true;
|
|
519
|
+
setTimeout(popper.updatePopper);
|
|
501
520
|
}
|
|
502
521
|
if (props.remoteSearch) {
|
|
503
522
|
const doQuery = (query3) => {
|
|
504
523
|
state.showSuggestPanel = true;
|
|
505
524
|
props.remoteSearch({ query: query3 }).then((data) => {
|
|
506
525
|
state.suggestList = data.data;
|
|
507
|
-
|
|
526
|
+
nextTick(() => {
|
|
527
|
+
popper.updatePopper();
|
|
528
|
+
});
|
|
508
529
|
});
|
|
509
530
|
};
|
|
510
531
|
if (!props.bypass && props.multi) {
|
|
@@ -572,6 +593,22 @@ const mounted = ({ api, props }) => () => {
|
|
|
572
593
|
api.initDisplay(props.modelValue);
|
|
573
594
|
}
|
|
574
595
|
};
|
|
596
|
+
const doDestroy = ({ popper }) => () => {
|
|
597
|
+
popper.doDestroy();
|
|
598
|
+
};
|
|
599
|
+
const selectedBoxInit = (refs) => () => refs.selectedBox && refs.selectedBox.init();
|
|
600
|
+
const selectedBoxClear = (api) => () => api.selectedGridSelectAll({ checked: false });
|
|
601
|
+
const selectedBoxDelete = (api) => ({ option: row }) => api.selectedGridSelectChange({ checked: false, row });
|
|
602
|
+
const selectedBoxDrag = ({ props, state }) => ({ state: { select } }) => {
|
|
603
|
+
const { valueField } = props;
|
|
604
|
+
const { selectedDatas } = state;
|
|
605
|
+
if (select && select.length) {
|
|
606
|
+
const datas = select.map((opt) => String(opt[valueField])).map((strVal) => selectedDatas.find((opt) => strVal === String(opt[valueField])));
|
|
607
|
+
const values = datas.map((opt) => opt[valueField]);
|
|
608
|
+
state.selectedDatas = datas;
|
|
609
|
+
state.selectedValues = values;
|
|
610
|
+
}
|
|
611
|
+
};
|
|
575
612
|
export {
|
|
576
613
|
closeSuggestPanel,
|
|
577
614
|
computedGetTitle,
|
|
@@ -579,6 +616,7 @@ export {
|
|
|
579
616
|
computedTreeOp,
|
|
580
617
|
createSearchForm,
|
|
581
618
|
doClear,
|
|
619
|
+
doDestroy,
|
|
582
620
|
doSearch,
|
|
583
621
|
doSuggesst,
|
|
584
622
|
filterNode,
|
|
@@ -602,6 +640,10 @@ export {
|
|
|
602
640
|
mounted,
|
|
603
641
|
openDialog,
|
|
604
642
|
query,
|
|
643
|
+
selectedBoxClear,
|
|
644
|
+
selectedBoxDelete,
|
|
645
|
+
selectedBoxDrag,
|
|
646
|
+
selectedBoxInit,
|
|
605
647
|
selectedGridSelectAll,
|
|
606
648
|
selectedGridSelectChange,
|
|
607
649
|
sourceGridSelectAll,
|
package/popeditor/vue.js
CHANGED
|
@@ -40,7 +40,12 @@ import {
|
|
|
40
40
|
updateSuggestWidth,
|
|
41
41
|
handlePager,
|
|
42
42
|
initSearchOption,
|
|
43
|
-
mounted
|
|
43
|
+
mounted,
|
|
44
|
+
doDestroy,
|
|
45
|
+
selectedBoxInit,
|
|
46
|
+
selectedBoxClear,
|
|
47
|
+
selectedBoxDelete,
|
|
48
|
+
selectedBoxDrag
|
|
44
49
|
} from "./index";
|
|
45
50
|
const api = [
|
|
46
51
|
"state",
|
|
@@ -65,10 +70,15 @@ const api = [
|
|
|
65
70
|
"closeSuggestPanel",
|
|
66
71
|
"popper",
|
|
67
72
|
"doSuggesstNow",
|
|
68
|
-
"suggestRadioChange"
|
|
73
|
+
"suggestRadioChange",
|
|
74
|
+
"doDestroy",
|
|
75
|
+
"selectedBoxClear",
|
|
76
|
+
"selectedBoxDelete",
|
|
77
|
+
"selectedBoxDrag"
|
|
69
78
|
];
|
|
70
|
-
const initState = ({ reactive, computed, props, api: api2, constants, t, parent }) => {
|
|
79
|
+
const initState = ({ reactive, computed, props, api: api2, constants, t, parent, vm }) => {
|
|
71
80
|
const state = reactive({
|
|
81
|
+
showContent: false,
|
|
72
82
|
open: false,
|
|
73
83
|
display: "",
|
|
74
84
|
getTitle: computed(() => api2.computedGetTitle({ constants, props, t })),
|
|
@@ -86,6 +96,7 @@ const initState = ({ reactive, computed, props, api: api2, constants, t, parent
|
|
|
86
96
|
historyGridDataset: [],
|
|
87
97
|
filterText: "",
|
|
88
98
|
treeOp: computed(() => api2.computedTreeOp(props, state)),
|
|
99
|
+
theme: vm.theme,
|
|
89
100
|
pagerConfig: reactive(__spreadValues({
|
|
90
101
|
currentPage: 1,
|
|
91
102
|
pageSize: 10,
|
|
@@ -138,8 +149,8 @@ const initApi = ({ api: api2, props, state, parent, refs, emit, popper, constant
|
|
|
138
149
|
doSearch: doSearch({ api: api2, state, props }),
|
|
139
150
|
doClear: doClear({ api: api2, state, props }),
|
|
140
151
|
updateSuggestWidth: updateSuggestWidth({ refs }),
|
|
141
|
-
doSuggesstNow: doSuggesst({ api: api2, state, props, popper }),
|
|
142
|
-
doSuggesst: debounce(1e3, doSuggesst({ api: api2, state, props, popper })),
|
|
152
|
+
doSuggesstNow: doSuggesst({ api: api2, state, props, popper, nextTick }),
|
|
153
|
+
doSuggesst: debounce(1e3, doSuggesst({ api: api2, state, props, popper, nextTick })),
|
|
143
154
|
closeSuggestPanel: closeSuggestPanel({ api: api2, state, refs }),
|
|
144
155
|
sourceGridSelectChange: sourceGridSelectChange({ props, state, api: api2 }),
|
|
145
156
|
sourceGridSelectAll: sourceGridSelectAll({ props, state, api: api2 }),
|
|
@@ -147,7 +158,12 @@ const initApi = ({ api: api2, props, state, parent, refs, emit, popper, constant
|
|
|
147
158
|
suggestRadioChange: suggestRadioChange({ api: api2, state }),
|
|
148
159
|
handlePager: handlePager({ api: api2, props, state }),
|
|
149
160
|
initSearchOption: initSearchOption({ api: api2, state }),
|
|
150
|
-
mounted: mounted({ api: api2, props })
|
|
161
|
+
mounted: mounted({ api: api2, props }),
|
|
162
|
+
doDestroy: doDestroy({ popper }),
|
|
163
|
+
selectedBoxInit: selectedBoxInit(refs),
|
|
164
|
+
selectedBoxClear: selectedBoxClear(api2),
|
|
165
|
+
selectedBoxDelete: selectedBoxDelete(api2),
|
|
166
|
+
selectedBoxDrag: selectedBoxDrag({ props, state })
|
|
151
167
|
});
|
|
152
168
|
state.search = api2.createSearchForm(false);
|
|
153
169
|
};
|
|
@@ -173,7 +189,7 @@ const initWatch = ({ watch, props, api: api2, state, popper }) => {
|
|
|
173
189
|
};
|
|
174
190
|
const renderless = (props, { computed, onMounted, reactive, watch, inject, toRefs, onBeforeUnmount, onDeactivated }, { t, refs, parent, emit, constants, vm, nextTick, slots }) => {
|
|
175
191
|
const api2 = {};
|
|
176
|
-
const state = initState({ reactive, computed, props, api: api2, constants, t, parent });
|
|
192
|
+
const state = initState({ reactive, computed, props, api: api2, constants, t, parent, vm });
|
|
177
193
|
const popper = userPopper({
|
|
178
194
|
emit,
|
|
179
195
|
refs,
|
package/popover/vue.js
CHANGED
package/popup/vue.js
CHANGED
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__spreadValues
|
|
3
3
|
} from "../chunk-PKUHTIDK.js";
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
getStyle,
|
|
6
|
+
watchValue,
|
|
7
|
+
open,
|
|
8
|
+
opened,
|
|
9
|
+
closed,
|
|
10
|
+
onTouchMove,
|
|
11
|
+
close,
|
|
12
|
+
renderOverlay,
|
|
13
|
+
clickOverlay,
|
|
14
|
+
updateZIndex
|
|
15
|
+
} from "./index";
|
|
5
16
|
const api = ["state", "open", "close", "clickOverlay", "onTouchMove", "opened", "closed"];
|
|
6
17
|
const initState = ({ reactive, computed, props, api: api2 }) => {
|
|
7
18
|
const state = reactive({
|
|
8
|
-
transitionName: computed(
|
|
19
|
+
transitionName: computed(
|
|
20
|
+
() => props.transition || props.position === "center" ? "tiny-fade" : `tiny-popup-slide-${props.position}`
|
|
21
|
+
),
|
|
9
22
|
style: computed(() => api2.getStyle()),
|
|
10
23
|
inited: computed(() => state.inited || props.modelValue),
|
|
11
24
|
opened: false,
|
package/progress/index.js
CHANGED
|
@@ -6,9 +6,9 @@ const computedBarStyle = ({ api, props }) => () => ({
|
|
|
6
6
|
const computedRelativeStrokeWidth = ({ constants, state }) => () => {
|
|
7
7
|
if (state.width === 0 || state.strokeWidth === 0)
|
|
8
8
|
return constants.REL_STROKE_WIDTH;
|
|
9
|
-
return (state.strokeWidth / state.width * 100).toFixed(1);
|
|
9
|
+
return Number((state.strokeWidth / state.width * 100).toFixed(1));
|
|
10
10
|
};
|
|
11
|
-
const computedRadius = ({ constants, props, state }) => () => props.type === constants.PROGRESS_TYPE.CIRCLE || props.type === constants.PROGRESS_TYPE.DASHBOARD ? parseInt(50 - parseFloat(state.relativeStrokeWidth) / 2, 10) : 0;
|
|
11
|
+
const computedRadius = ({ constants, props, state }) => () => props.type === constants.PROGRESS_TYPE.CIRCLE || props.type === constants.PROGRESS_TYPE.DASHBOARD ? parseInt(String(50 - parseFloat(state.relativeStrokeWidth) / 2), 10) : 0;
|
|
12
12
|
const computedTrackPath = ({ constants, props, state }) => () => {
|
|
13
13
|
const radiusValue = state.radius;
|
|
14
14
|
const isDashboardType = props.type === constants.PROGRESS_TYPE.DASHBOARD;
|
|
@@ -42,6 +42,8 @@ const computedIconClass = ({ constants, props, mode }) => () => {
|
|
|
42
42
|
} else if (props.status === constants.PROGRESS_STATUS.EXCEPTION) {
|
|
43
43
|
const iconClasses = props.type === constants.PROGRESS_TYPE.LINE ? [constants.ICON_EXCEPTION, constants.ICON_CIRCLE_EXCEPTION] : [constants.ICON_CIRCLE_EXCEPTION, constants.ICON_EXCEPTION];
|
|
44
44
|
return mode === "mobile-first" ? iconClasses[1] : iconClasses[0];
|
|
45
|
+
} else {
|
|
46
|
+
return "";
|
|
45
47
|
}
|
|
46
48
|
};
|
|
47
49
|
const computedIconStyle = ({ constants, props, state }) => () => {
|
|
@@ -84,7 +86,7 @@ const getCurrentColor = ({ api, props }) => (percentage) => {
|
|
|
84
86
|
return api.getLevelColor(percentage);
|
|
85
87
|
}
|
|
86
88
|
};
|
|
87
|
-
const getLevelColor = (api) => (percentage) => {
|
|
89
|
+
const getLevelColor = ({ api }) => (percentage) => {
|
|
88
90
|
const colorArray = api.getColorArray().sort((a, b) => a.percentage - b.percentage);
|
|
89
91
|
for (let i = 0; i < colorArray.length; i++) {
|
|
90
92
|
if (colorArray[i].percentage > percentage) {
|
|
@@ -93,7 +95,7 @@ const getLevelColor = (api) => (percentage) => {
|
|
|
93
95
|
}
|
|
94
96
|
return colorArray[colorArray.length - 1].color;
|
|
95
97
|
};
|
|
96
|
-
const getColorArray = (props) => () => {
|
|
98
|
+
const getColorArray = ({ props }) => () => {
|
|
97
99
|
const color = props.color;
|
|
98
100
|
const span = 100 / color.length;
|
|
99
101
|
return color.map((seriesColor, index) => {
|
|
@@ -108,9 +110,9 @@ const getColorArray = (props) => () => {
|
|
|
108
110
|
};
|
|
109
111
|
const customBeforeAppearHook = ({ props, state }) => (el) => {
|
|
110
112
|
if (props.type === "line") {
|
|
111
|
-
el.style.width = 0;
|
|
113
|
+
el.style.width = String(0);
|
|
112
114
|
} else if (props.type === "circle") {
|
|
113
|
-
el.style.strokeDasharray = state.perimeter * state.content;
|
|
115
|
+
el.style.strokeDasharray = String(state.perimeter * state.content);
|
|
114
116
|
el.style.strokeDashoffset = state.perimeter;
|
|
115
117
|
}
|
|
116
118
|
};
|
|
@@ -121,7 +123,7 @@ const customAfterAppearHook = ({ state, props }) => (el) => {
|
|
|
121
123
|
if (props.type === "line") {
|
|
122
124
|
el.style.width = state.barStyle.width;
|
|
123
125
|
} else if (props.type === "circle") {
|
|
124
|
-
el.style.strokeDashoffset = 0;
|
|
126
|
+
el.style.strokeDashoffset = String(0);
|
|
125
127
|
}
|
|
126
128
|
};
|
|
127
129
|
export {
|
package/progress/vue.js
CHANGED
|
@@ -22,7 +22,15 @@ import {
|
|
|
22
22
|
customAppearHook,
|
|
23
23
|
customAfterAppearHook
|
|
24
24
|
} from "./index";
|
|
25
|
-
const api = [
|
|
25
|
+
const api = [
|
|
26
|
+
"state",
|
|
27
|
+
"getCurrentColor",
|
|
28
|
+
"getLevelColor",
|
|
29
|
+
"getColorArray",
|
|
30
|
+
"customBeforeAppearHook",
|
|
31
|
+
"customAppearHook",
|
|
32
|
+
"customAfterAppearHook"
|
|
33
|
+
];
|
|
26
34
|
const renderless = (props, { computed, reactive }, { constants, mode }) => {
|
|
27
35
|
const api2 = {};
|
|
28
36
|
const state = reactive({
|
|
@@ -51,14 +59,14 @@ const renderless = (props, { computed, reactive }, { constants, mode }) => {
|
|
|
51
59
|
state,
|
|
52
60
|
customAppearHook,
|
|
53
61
|
computedContent: computedContent({ props }),
|
|
54
|
-
getColorArray: getColorArray(props),
|
|
62
|
+
getColorArray: getColorArray({ props }),
|
|
55
63
|
computedRate: computedRate({ constants, props }),
|
|
56
64
|
computedPerimeter: computedPerimeter({ state }),
|
|
57
65
|
computedRadius: computedRadius({ constants, props, state }),
|
|
58
66
|
computedTrackPath: computedTrackPath({ constants, props, state }),
|
|
59
67
|
computedIconClass: computedIconClass({ constants, props, mode }),
|
|
60
68
|
computedIconStyle: computedIconStyle({ constants, props, state }),
|
|
61
|
-
computedCircleStyle: computedCircleStyle({
|
|
69
|
+
computedCircleStyle: computedCircleStyle({ state }),
|
|
62
70
|
computedCirclePathStyle: computedCirclePathStyle({ props, state }),
|
|
63
71
|
computedStrokeDashoffset: computedStrokeDashoffset({ state }),
|
|
64
72
|
computedTrailPathStyle: computedTrailPathStyle({ state }),
|
|
@@ -66,7 +74,7 @@ const renderless = (props, { computed, reactive }, { constants, mode }) => {
|
|
|
66
74
|
computedProgressTextSize: computedProgressTextSize({ state, constants, props, mode }),
|
|
67
75
|
customAfterAppearHook: customAfterAppearHook({ state, props }),
|
|
68
76
|
customBeforeAppearHook: customBeforeAppearHook({ props, state }),
|
|
69
|
-
getLevelColor: getLevelColor(api2),
|
|
77
|
+
getLevelColor: getLevelColor({ api: api2 }),
|
|
70
78
|
computedBarStyle: computedBarStyle({ api: api2, props }),
|
|
71
79
|
getCurrentColor: getCurrentColor({ api: api2, props }),
|
|
72
80
|
computedStroke: computedStroke({ api: api2, constants, props })
|
package/pull-refresh/vue.js
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import "../chunk-PKUHTIDK.js";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
mountedHandler,
|
|
4
|
+
beforeUnmountHandler,
|
|
5
|
+
handlerModelValue,
|
|
6
|
+
onTouchstart,
|
|
7
|
+
onTouchmove,
|
|
8
|
+
onTouchend,
|
|
9
|
+
initPullRefresh,
|
|
10
|
+
clearPullRefresh
|
|
11
|
+
} from "./index";
|
|
3
12
|
const api = ["state"];
|
|
4
13
|
const renderless = (props, { watch, onMounted, reactive, onBeforeUnmount }, { t, refs }) => {
|
|
5
14
|
const api2 = {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import "../chunk-PKUHTIDK.js";
|
|
2
|
+
import { filter } from "./index";
|
|
3
|
+
const api = ["state", "filter"];
|
|
4
|
+
const renderless = (props, { reactive }, { emit, vm }) => {
|
|
5
|
+
const api2 = {};
|
|
6
|
+
const state = reactive({
|
|
7
|
+
fields: null
|
|
8
|
+
});
|
|
9
|
+
Object.assign(api2, {
|
|
10
|
+
state,
|
|
11
|
+
filter: filter({ emit, vm })
|
|
12
|
+
});
|
|
13
|
+
return api2;
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
api,
|
|
17
|
+
renderless
|
|
18
|
+
};
|