@ebfe/vant-kit 0.0.1

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.
Files changed (48) hide show
  1. package/README.md +1 -0
  2. package/es/demo-button/index-sfc.css +9 -0
  3. package/es/demo-button/index-sfc.less +9 -0
  4. package/es/demo-button/index.d.ts +44 -0
  5. package/es/demo-button/index.js +52 -0
  6. package/es/demo-button/style/index.d.ts +0 -0
  7. package/es/demo-button/style/index.js +0 -0
  8. package/es/demo-button/style/less.d.ts +0 -0
  9. package/es/demo-button/style/less.js +0 -0
  10. package/es/index.d.ts +10 -0
  11. package/es/index.js +18 -0
  12. package/es/single-picker/index-sfc.css +4 -0
  13. package/es/single-picker/index-sfc.less +4 -0
  14. package/es/single-picker/index.d.ts +623 -0
  15. package/es/single-picker/index.js +249 -0
  16. package/es/single-picker/style/index.d.ts +0 -0
  17. package/es/single-picker/style/index.js +0 -0
  18. package/es/single-picker/style/less.d.ts +0 -0
  19. package/es/single-picker/style/less.js +0 -0
  20. package/es/vue-sfc-shim.d.ts +5 -0
  21. package/lib/demo-button/index-sfc.css +9 -0
  22. package/lib/demo-button/index-sfc.less +9 -0
  23. package/lib/demo-button/index.d.ts +44 -0
  24. package/lib/demo-button/index.js +76 -0
  25. package/lib/demo-button/style/index.d.ts +0 -0
  26. package/lib/demo-button/style/index.js +0 -0
  27. package/lib/demo-button/style/less.d.ts +0 -0
  28. package/lib/demo-button/style/less.js +0 -0
  29. package/lib/ebfe-vant-kit.cjs.js +301 -0
  30. package/lib/ebfe-vant-kit.es.js +312 -0
  31. package/lib/ebfe-vant-kit.js +18216 -0
  32. package/lib/ebfe-vant-kit.min.js +13064 -0
  33. package/lib/index.css +0 -0
  34. package/lib/index.d.ts +10 -0
  35. package/lib/index.js +58 -0
  36. package/lib/index.less +0 -0
  37. package/lib/single-picker/index-sfc.css +4 -0
  38. package/lib/single-picker/index-sfc.less +4 -0
  39. package/lib/single-picker/index.d.ts +623 -0
  40. package/lib/single-picker/index.js +261 -0
  41. package/lib/single-picker/style/index.d.ts +0 -0
  42. package/lib/single-picker/style/index.js +0 -0
  43. package/lib/single-picker/style/less.d.ts +0 -0
  44. package/lib/single-picker/style/less.js +0 -0
  45. package/lib/style.css +7107 -0
  46. package/lib/vue-sfc-shim.d.ts +5 -0
  47. package/lib/web-types.json +35 -0
  48. package/package.json +55 -0
@@ -0,0 +1,301 @@
1
+ 'use strict';
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
3
+ const vue = require('vue');
4
+ const lodash = require('lodash');
5
+ const vant = require('vant');
6
+ const ebfeVhooks = require('ebfe-vhooks');
7
+ const ebfeUtils = require('ebfe-utils');
8
+ var __defProp$1 = Object.defineProperty;
9
+ var __defProps$1 = Object.defineProperties;
10
+ var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
11
+ var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
12
+ var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
13
+ var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
14
+ var __defNormalProp$1 = (obj, key, value) =>
15
+ key in obj
16
+ ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value })
17
+ : (obj[key] = value);
18
+ var __spreadValues$1 = (a, b) => {
19
+ for (var prop in b || (b = {})) if (__hasOwnProp$1.call(b, prop)) __defNormalProp$1(a, prop, b[prop]);
20
+ if (__getOwnPropSymbols$1)
21
+ for (var prop of __getOwnPropSymbols$1(b)) {
22
+ if (__propIsEnum$1.call(b, prop)) __defNormalProp$1(a, prop, b[prop]);
23
+ }
24
+ return a;
25
+ };
26
+ var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
27
+ const __default__$1 = {
28
+ name: 'DemoButton',
29
+ };
30
+ const __vue_sfc__$1 = /* @__PURE__ */ vue.defineComponent(
31
+ __spreadProps$1(__spreadValues$1({}, __default__$1), {
32
+ props: {
33
+ bgColor: { type: String, required: false, default: '#f44' },
34
+ },
35
+ setup(__props, { expose: __expose }) {
36
+ __expose();
37
+ vue.useCssVars((_ctx) => ({
38
+ '5ccde05a-computedBgColor': computedBgColor.value,
39
+ }));
40
+ const Props = __props;
41
+ const computedBgColor = vue.computed(() => Props.bgColor);
42
+ const __returned__ = { Props, computedBgColor };
43
+ Object.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true });
44
+ return __returned__;
45
+ },
46
+ })
47
+ );
48
+ const _hoisted_1 = { class: 'demo-button' };
49
+ function __vue_render__$1(_ctx, _cache, $props, $setup, $data, $options) {
50
+ return (vue.openBlock(), vue.createElementBlock('button', _hoisted_1, [vue.renderSlot(_ctx.$slots, 'default')]));
51
+ }
52
+ __vue_sfc__$1.render = __vue_render__$1;
53
+ __vue_sfc__$1.__scopeId = 'data-v-5ccde05a';
54
+ var stdin_default$2 = __vue_sfc__$1;
55
+ var __defProp = Object.defineProperty;
56
+ var __defProps = Object.defineProperties;
57
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
58
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
59
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
60
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
61
+ var __defNormalProp = (obj, key, value) =>
62
+ key in obj
63
+ ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value })
64
+ : (obj[key] = value);
65
+ var __spreadValues = (a, b) => {
66
+ for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]);
67
+ if (__getOwnPropSymbols)
68
+ for (var prop of __getOwnPropSymbols(b)) {
69
+ if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]);
70
+ }
71
+ return a;
72
+ };
73
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
74
+ const __default__ = {
75
+ name: 'SinglePicker',
76
+ };
77
+ const __vue_sfc__ = /* @__PURE__ */ vue.defineComponent(
78
+ __spreadProps(__spreadValues({}, __default__), {
79
+ props: {
80
+ showSearch: { type: Boolean, required: false, default: false },
81
+ modelValue: { type: null, required: true },
82
+ pickerProps: { type: Object, required: true },
83
+ },
84
+ emits: ['search', 'confirm', 'update:modelValue'],
85
+ setup(__props, { expose: __expose, emit: __emit }) {
86
+ const Props = __props;
87
+ const columnsFieldNames = vue.computed(() => {
88
+ var _a, _b;
89
+ return Object.assign(
90
+ { text: 'label', value: 'value' },
91
+ (_b = (_a = Props == null ? void 0 : Props.pickerProps) == null ? void 0 : _a.columnsFieldNames) != null
92
+ ? _b
93
+ : {}
94
+ );
95
+ });
96
+ const computedPickerProps = vue.computed(() => {
97
+ var _a;
98
+ return Object.assign((_a = Props == null ? void 0 : Props.pickerProps) != null ? _a : {}, {
99
+ columnsFieldNames: columnsFieldNames.value,
100
+ });
101
+ });
102
+ const Emitter = __emit;
103
+ const [popupShow, setPopupShow] = ebfeVhooks.useWrapperRef(false);
104
+ const triggerPopupShow = () => {
105
+ setPopupShow(true);
106
+ };
107
+ const [modelFieldValue, setModelFieldValue] = ebfeVhooks.useWrapperRef(Props.modelValue);
108
+ vue.watch(() => Props.modelValue, setModelFieldValue, { immediate: true });
109
+ const updateModelFieldValue = (newValue) => {
110
+ setModelFieldValue(newValue);
111
+ Emitter('update:modelValue', newValue);
112
+ };
113
+ const [columnsIdMapDataCache, setColumnsIdMapDataCache] = ebfeVhooks.useWrapperRef({});
114
+ const patchColumnsIdMapDataCache = (columns) => {
115
+ var _a;
116
+ const newColumns = __spreadValues({}, (_a = columnsIdMapDataCache.value) != null ? _a : {});
117
+ columns.forEach((item) => {
118
+ const id = item[columnsFieldNames.value.value];
119
+ newColumns[id] = item;
120
+ });
121
+ setColumnsIdMapDataCache(__spreadValues({}, newColumns));
122
+ };
123
+ vue.watch(
124
+ () => {
125
+ var _a;
126
+ return (_a = computedPickerProps.value) == null ? void 0 : _a.columns;
127
+ },
128
+ (columns) => {
129
+ patchColumnsIdMapDataCache(columns != null ? columns : []);
130
+ },
131
+ { immediate: true }
132
+ );
133
+ const [selectedOption, setSelectedOption] = ebfeVhooks.useWrapperRef('');
134
+ vue.watch(
135
+ [modelFieldValue, columnsIdMapDataCache],
136
+ ([newValue, columnsIdMapData]) => {
137
+ setSelectedOption(columnsIdMapData == null ? void 0 : columnsIdMapData[newValue]);
138
+ },
139
+ { immediate: true }
140
+ );
141
+ const showValue = vue.computed(() => {
142
+ var _a;
143
+ return (_a = selectedOption.value) == null ? void 0 : _a[columnsFieldNames.value.text];
144
+ });
145
+ const onConfirmPicker = (confirmInfo) => {
146
+ var _a, _b, _c;
147
+ const { selectedOptions, selectedValues } = confirmInfo;
148
+ if ((_b = (_a = computedPickerProps.value) == null ? void 0 : _a.columns) == null ? void 0 : _b.length) {
149
+ const option = ebfeUtils.array2Single(selectedOptions);
150
+ Emitter('confirm', option);
151
+ const newValue = option == null ? void 0 : option[columnsFieldNames.value.value];
152
+ updateModelFieldValue(newValue);
153
+ setPopupShow(false);
154
+ } else {
155
+ const selectedValue = ebfeUtils.array2Single(selectedValues);
156
+ const option = (_c = columnsIdMapDataCache.value) == null ? void 0 : _c[selectedValue];
157
+ Emitter('confirm', option);
158
+ const newValue = option == null ? void 0 : option[columnsFieldNames.value.value];
159
+ updateModelFieldValue(newValue);
160
+ setPopupShow(false);
161
+ }
162
+ };
163
+ const [keywords, _] = ebfeVhooks.useWrapperRef(void 0);
164
+ const onSearch = lodash.debounce((keywords2) => {
165
+ Emitter('search', keywords2);
166
+ }, 300);
167
+ __expose({});
168
+ const __returned__ = {
169
+ Props,
170
+ columnsFieldNames,
171
+ computedPickerProps,
172
+ Emitter,
173
+ popupShow,
174
+ setPopupShow,
175
+ triggerPopupShow,
176
+ modelFieldValue,
177
+ setModelFieldValue,
178
+ updateModelFieldValue,
179
+ columnsIdMapDataCache,
180
+ setColumnsIdMapDataCache,
181
+ patchColumnsIdMapDataCache,
182
+ selectedOption,
183
+ setSelectedOption,
184
+ showValue,
185
+ onConfirmPicker,
186
+ keywords,
187
+ _,
188
+ onSearch,
189
+ get VanPopup() {
190
+ return vant.Popup;
191
+ },
192
+ get VanPicker() {
193
+ return vant.Picker;
194
+ },
195
+ get VanSearch() {
196
+ return vant.Search;
197
+ },
198
+ };
199
+ Object.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true });
200
+ return __returned__;
201
+ },
202
+ })
203
+ );
204
+ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
205
+ return (
206
+ vue.openBlock(),
207
+ vue.createElementBlock('div', null, [
208
+ vue.renderSlot(_ctx.$slots, 'trigger', {
209
+ triggerPopupShow: $setup.triggerPopupShow,
210
+ showValue: $setup.showValue,
211
+ selectedOption: $setup.selectedOption,
212
+ }),
213
+ vue.createVNode(
214
+ $setup['VanPopup'],
215
+ {
216
+ show: $setup.popupShow,
217
+ 'onUpdate:show': _cache[3] || (_cache[3] = ($event) => ($setup.popupShow = $event)),
218
+ position: 'bottom',
219
+ round: '',
220
+ },
221
+ {
222
+ default: vue.withCtx(() => [
223
+ vue.createVNode(
224
+ $setup['VanPicker'],
225
+ vue.mergeProps($setup.computedPickerProps, {
226
+ onConfirm: _cache[1] || (_cache[1] = (value) => $setup.onConfirmPicker(value)),
227
+ onCancel: _cache[2] || (_cache[2] = ($event) => $setup.setPopupShow(false)),
228
+ }),
229
+ vue.createSlots(
230
+ {
231
+ title: vue.withCtx(() => [
232
+ $props.showSearch
233
+ ? (vue.openBlock(),
234
+ vue.createBlock(
235
+ $setup['VanSearch'],
236
+ {
237
+ key: 0,
238
+ shape: 'round',
239
+ placeholder: '请输入搜索关键词',
240
+ modelValue: $setup.keywords,
241
+ 'onUpdate:modelValue': [
242
+ _cache[0] || (_cache[0] = ($event) => ($setup.keywords = $event)),
243
+ $setup.onSearch,
244
+ ],
245
+ },
246
+ null,
247
+ 8,
248
+ ['modelValue', 'onUpdate:modelValue']
249
+ ))
250
+ : vue.createCommentVNode('v-if', true),
251
+ ]),
252
+ _: 2,
253
+ /* DYNAMIC */
254
+ },
255
+ [
256
+ vue.renderList(_ctx.$slots, (_slot, name) => {
257
+ return {
258
+ name,
259
+ fn: vue.withCtx((slotData) => [
260
+ vue.renderSlot(_ctx.$slots, name, vue.normalizeProps(vue.guardReactiveProps(slotData))),
261
+ ]),
262
+ };
263
+ }),
264
+ ]
265
+ ),
266
+ 1040
267
+ /* FULL_PROPS, DYNAMIC_SLOTS */
268
+ ),
269
+ ]),
270
+ _: 3,
271
+ /* FORWARDED */
272
+ },
273
+ 8,
274
+ ['show']
275
+ ),
276
+ ])
277
+ );
278
+ }
279
+ __vue_sfc__.render = __vue_render__;
280
+ __vue_sfc__.__scopeId = 'data-v-f2b42cbe';
281
+ var stdin_default$1 = __vue_sfc__;
282
+ const version = '0.0.0';
283
+ function install(app) {
284
+ const components = [stdin_default$2, stdin_default$1];
285
+ components.forEach((item) => {
286
+ if (item.install) {
287
+ app.use(item);
288
+ } else if (item.name) {
289
+ app.component(item.name, item);
290
+ }
291
+ });
292
+ }
293
+ var stdin_default = {
294
+ install,
295
+ version,
296
+ };
297
+ exports.DemoButton = stdin_default$2;
298
+ exports.SinglePicker = stdin_default$1;
299
+ exports.default = stdin_default;
300
+ exports.install = install;
301
+ exports.version = version;
@@ -0,0 +1,312 @@
1
+ import {
2
+ defineComponent,
3
+ createElementBlock,
4
+ openBlock,
5
+ renderSlot,
6
+ useCssVars,
7
+ computed,
8
+ createVNode,
9
+ withCtx,
10
+ mergeProps,
11
+ createSlots,
12
+ createBlock,
13
+ createCommentVNode,
14
+ renderList,
15
+ normalizeProps,
16
+ guardReactiveProps,
17
+ watch,
18
+ } from 'vue';
19
+ import { debounce } from 'lodash';
20
+ import { Search, Picker, Popup } from 'vant';
21
+ import { useWrapperRef } from 'ebfe-vhooks';
22
+ import { array2Single } from 'ebfe-utils';
23
+ var __defProp$1 = Object.defineProperty;
24
+ var __defProps$1 = Object.defineProperties;
25
+ var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
26
+ var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
27
+ var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
28
+ var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
29
+ var __defNormalProp$1 = (obj, key, value) =>
30
+ key in obj
31
+ ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value })
32
+ : (obj[key] = value);
33
+ var __spreadValues$1 = (a, b) => {
34
+ for (var prop in b || (b = {})) if (__hasOwnProp$1.call(b, prop)) __defNormalProp$1(a, prop, b[prop]);
35
+ if (__getOwnPropSymbols$1)
36
+ for (var prop of __getOwnPropSymbols$1(b)) {
37
+ if (__propIsEnum$1.call(b, prop)) __defNormalProp$1(a, prop, b[prop]);
38
+ }
39
+ return a;
40
+ };
41
+ var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
42
+ const __default__$1 = {
43
+ name: 'DemoButton',
44
+ };
45
+ const __vue_sfc__$1 = /* @__PURE__ */ defineComponent(
46
+ __spreadProps$1(__spreadValues$1({}, __default__$1), {
47
+ props: {
48
+ bgColor: { type: String, required: false, default: '#f44' },
49
+ },
50
+ setup(__props, { expose: __expose }) {
51
+ __expose();
52
+ useCssVars((_ctx) => ({
53
+ '5ccde05a-computedBgColor': computedBgColor.value,
54
+ }));
55
+ const Props = __props;
56
+ const computedBgColor = computed(() => Props.bgColor);
57
+ const __returned__ = { Props, computedBgColor };
58
+ Object.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true });
59
+ return __returned__;
60
+ },
61
+ })
62
+ );
63
+ const _hoisted_1 = { class: 'demo-button' };
64
+ function __vue_render__$1(_ctx, _cache, $props, $setup, $data, $options) {
65
+ return (openBlock(), createElementBlock('button', _hoisted_1, [renderSlot(_ctx.$slots, 'default')]));
66
+ }
67
+ __vue_sfc__$1.render = __vue_render__$1;
68
+ __vue_sfc__$1.__scopeId = 'data-v-5ccde05a';
69
+ var stdin_default$2 = __vue_sfc__$1;
70
+ var __defProp = Object.defineProperty;
71
+ var __defProps = Object.defineProperties;
72
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
73
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
74
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
75
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
76
+ var __defNormalProp = (obj, key, value) =>
77
+ key in obj
78
+ ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value })
79
+ : (obj[key] = value);
80
+ var __spreadValues = (a, b) => {
81
+ for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]);
82
+ if (__getOwnPropSymbols)
83
+ for (var prop of __getOwnPropSymbols(b)) {
84
+ if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]);
85
+ }
86
+ return a;
87
+ };
88
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
89
+ const __default__ = {
90
+ name: 'SinglePicker',
91
+ };
92
+ const __vue_sfc__ = /* @__PURE__ */ defineComponent(
93
+ __spreadProps(__spreadValues({}, __default__), {
94
+ props: {
95
+ showSearch: { type: Boolean, required: false, default: false },
96
+ modelValue: { type: null, required: true },
97
+ pickerProps: { type: Object, required: true },
98
+ },
99
+ emits: ['search', 'confirm', 'update:modelValue'],
100
+ setup(__props, { expose: __expose, emit: __emit }) {
101
+ const Props = __props;
102
+ const columnsFieldNames = computed(() => {
103
+ var _a, _b;
104
+ return Object.assign(
105
+ { text: 'label', value: 'value' },
106
+ (_b = (_a = Props == null ? void 0 : Props.pickerProps) == null ? void 0 : _a.columnsFieldNames) != null
107
+ ? _b
108
+ : {}
109
+ );
110
+ });
111
+ const computedPickerProps = computed(() => {
112
+ var _a;
113
+ return Object.assign((_a = Props == null ? void 0 : Props.pickerProps) != null ? _a : {}, {
114
+ columnsFieldNames: columnsFieldNames.value,
115
+ });
116
+ });
117
+ const Emitter = __emit;
118
+ const [popupShow, setPopupShow] = useWrapperRef(false);
119
+ const triggerPopupShow = () => {
120
+ setPopupShow(true);
121
+ };
122
+ const [modelFieldValue, setModelFieldValue] = useWrapperRef(Props.modelValue);
123
+ watch(() => Props.modelValue, setModelFieldValue, { immediate: true });
124
+ const updateModelFieldValue = (newValue) => {
125
+ setModelFieldValue(newValue);
126
+ Emitter('update:modelValue', newValue);
127
+ };
128
+ const [columnsIdMapDataCache, setColumnsIdMapDataCache] = useWrapperRef({});
129
+ const patchColumnsIdMapDataCache = (columns) => {
130
+ var _a;
131
+ const newColumns = __spreadValues({}, (_a = columnsIdMapDataCache.value) != null ? _a : {});
132
+ columns.forEach((item) => {
133
+ const id = item[columnsFieldNames.value.value];
134
+ newColumns[id] = item;
135
+ });
136
+ setColumnsIdMapDataCache(__spreadValues({}, newColumns));
137
+ };
138
+ watch(
139
+ () => {
140
+ var _a;
141
+ return (_a = computedPickerProps.value) == null ? void 0 : _a.columns;
142
+ },
143
+ (columns) => {
144
+ patchColumnsIdMapDataCache(columns != null ? columns : []);
145
+ },
146
+ { immediate: true }
147
+ );
148
+ const [selectedOption, setSelectedOption] = useWrapperRef('');
149
+ watch(
150
+ [modelFieldValue, columnsIdMapDataCache],
151
+ ([newValue, columnsIdMapData]) => {
152
+ setSelectedOption(columnsIdMapData == null ? void 0 : columnsIdMapData[newValue]);
153
+ },
154
+ { immediate: true }
155
+ );
156
+ const showValue = computed(() => {
157
+ var _a;
158
+ return (_a = selectedOption.value) == null ? void 0 : _a[columnsFieldNames.value.text];
159
+ });
160
+ const onConfirmPicker = (confirmInfo) => {
161
+ var _a, _b, _c;
162
+ const { selectedOptions, selectedValues } = confirmInfo;
163
+ if ((_b = (_a = computedPickerProps.value) == null ? void 0 : _a.columns) == null ? void 0 : _b.length) {
164
+ const option = array2Single(selectedOptions);
165
+ Emitter('confirm', option);
166
+ const newValue = option == null ? void 0 : option[columnsFieldNames.value.value];
167
+ updateModelFieldValue(newValue);
168
+ setPopupShow(false);
169
+ } else {
170
+ const selectedValue = array2Single(selectedValues);
171
+ const option = (_c = columnsIdMapDataCache.value) == null ? void 0 : _c[selectedValue];
172
+ Emitter('confirm', option);
173
+ const newValue = option == null ? void 0 : option[columnsFieldNames.value.value];
174
+ updateModelFieldValue(newValue);
175
+ setPopupShow(false);
176
+ }
177
+ };
178
+ const [keywords, _] = useWrapperRef(void 0);
179
+ const onSearch = debounce((keywords2) => {
180
+ Emitter('search', keywords2);
181
+ }, 300);
182
+ __expose({});
183
+ const __returned__ = {
184
+ Props,
185
+ columnsFieldNames,
186
+ computedPickerProps,
187
+ Emitter,
188
+ popupShow,
189
+ setPopupShow,
190
+ triggerPopupShow,
191
+ modelFieldValue,
192
+ setModelFieldValue,
193
+ updateModelFieldValue,
194
+ columnsIdMapDataCache,
195
+ setColumnsIdMapDataCache,
196
+ patchColumnsIdMapDataCache,
197
+ selectedOption,
198
+ setSelectedOption,
199
+ showValue,
200
+ onConfirmPicker,
201
+ keywords,
202
+ _,
203
+ onSearch,
204
+ get VanPopup() {
205
+ return Popup;
206
+ },
207
+ get VanPicker() {
208
+ return Picker;
209
+ },
210
+ get VanSearch() {
211
+ return Search;
212
+ },
213
+ };
214
+ Object.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true });
215
+ return __returned__;
216
+ },
217
+ })
218
+ );
219
+ function __vue_render__(_ctx, _cache, $props, $setup, $data, $options) {
220
+ return (
221
+ openBlock(),
222
+ createElementBlock('div', null, [
223
+ renderSlot(_ctx.$slots, 'trigger', {
224
+ triggerPopupShow: $setup.triggerPopupShow,
225
+ showValue: $setup.showValue,
226
+ selectedOption: $setup.selectedOption,
227
+ }),
228
+ createVNode(
229
+ $setup['VanPopup'],
230
+ {
231
+ show: $setup.popupShow,
232
+ 'onUpdate:show': _cache[3] || (_cache[3] = ($event) => ($setup.popupShow = $event)),
233
+ position: 'bottom',
234
+ round: '',
235
+ },
236
+ {
237
+ default: withCtx(() => [
238
+ createVNode(
239
+ $setup['VanPicker'],
240
+ mergeProps($setup.computedPickerProps, {
241
+ onConfirm: _cache[1] || (_cache[1] = (value) => $setup.onConfirmPicker(value)),
242
+ onCancel: _cache[2] || (_cache[2] = ($event) => $setup.setPopupShow(false)),
243
+ }),
244
+ createSlots(
245
+ {
246
+ title: withCtx(() => [
247
+ $props.showSearch
248
+ ? (openBlock(),
249
+ createBlock(
250
+ $setup['VanSearch'],
251
+ {
252
+ key: 0,
253
+ shape: 'round',
254
+ placeholder: '请输入搜索关键词',
255
+ modelValue: $setup.keywords,
256
+ 'onUpdate:modelValue': [
257
+ _cache[0] || (_cache[0] = ($event) => ($setup.keywords = $event)),
258
+ $setup.onSearch,
259
+ ],
260
+ },
261
+ null,
262
+ 8,
263
+ ['modelValue', 'onUpdate:modelValue']
264
+ ))
265
+ : createCommentVNode('v-if', true),
266
+ ]),
267
+ _: 2,
268
+ /* DYNAMIC */
269
+ },
270
+ [
271
+ renderList(_ctx.$slots, (_slot, name) => {
272
+ return {
273
+ name,
274
+ fn: withCtx((slotData) => [
275
+ renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotData))),
276
+ ]),
277
+ };
278
+ }),
279
+ ]
280
+ ),
281
+ 1040
282
+ /* FULL_PROPS, DYNAMIC_SLOTS */
283
+ ),
284
+ ]),
285
+ _: 3,
286
+ /* FORWARDED */
287
+ },
288
+ 8,
289
+ ['show']
290
+ ),
291
+ ])
292
+ );
293
+ }
294
+ __vue_sfc__.render = __vue_render__;
295
+ __vue_sfc__.__scopeId = 'data-v-f2b42cbe';
296
+ var stdin_default$1 = __vue_sfc__;
297
+ const version = '0.0.0';
298
+ function install(app) {
299
+ const components = [stdin_default$2, stdin_default$1];
300
+ components.forEach((item) => {
301
+ if (item.install) {
302
+ app.use(item);
303
+ } else if (item.name) {
304
+ app.component(item.name, item);
305
+ }
306
+ });
307
+ }
308
+ var stdin_default = {
309
+ install,
310
+ version,
311
+ };
312
+ export { stdin_default$2 as DemoButton, stdin_default$1 as SinglePicker, stdin_default as default, install, version };