@varlet/ui 2.8.5 → 2.8.6-alpha.1677756540023

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.
@@ -235,7 +235,7 @@ import './time-picker/style/index.mjs'
235
235
  import './tooltip/style/index.mjs'
236
236
  import './uploader/style/index.mjs'
237
237
 
238
- const version = '2.8.5'
238
+ const version = '2.8.6-alpha.1677756540023'
239
239
 
240
240
  function install(app) {
241
241
  ActionSheet.install && app.use(ActionSheet)
package/es/index.mjs CHANGED
@@ -156,7 +156,7 @@ export * from './time-picker/index.mjs'
156
156
  export * from './tooltip/index.mjs'
157
157
  export * from './uploader/index.mjs'
158
158
 
159
- const version = '2.8.5'
159
+ const version = '2.8.6-alpha.1677756540023'
160
160
 
161
161
  function install(app) {
162
162
  ActionSheet.install && app.use(ActionSheet)
@@ -24,7 +24,7 @@ function __render__(_ctx, _cache) {
24
24
 
25
25
  return _openBlock(), _createElementBlock("div", {
26
26
  class: _normalizeClass(_ctx.classes(_ctx.n(), _ctx.n('$--box'), [_ctx.disabled, _ctx.n('--disabled')])),
27
- onClick: _cache[10] || (_cache[10] = function () {
27
+ onClick: _cache[14] || (_cache[14] = function () {
28
28
  return _ctx.handleClick && _ctx.handleClick(...arguments);
29
29
  })
30
30
  }, [_createElementVNode("div", {
@@ -73,6 +73,12 @@ function __render__(_ctx, _cache) {
73
73
  }),
74
74
  onTouchstart: _cache[4] || (_cache[4] = function () {
75
75
  return _ctx.handleTouchstart && _ctx.handleTouchstart(...arguments);
76
+ }),
77
+ onCompositionstart: _cache[5] || (_cache[5] = function () {
78
+ return _ctx.handleCompositionStart && _ctx.handleCompositionStart(...arguments);
79
+ }),
80
+ onCompositionend: _cache[6] || (_cache[6] = function () {
81
+ return _ctx.handleCompositionEnd && _ctx.handleCompositionEnd(...arguments);
76
82
  })
77
83
  }, "\n ", 46
78
84
  /* CLASS, STYLE, PROPS, HYDRATE_EVENTS */
@@ -90,20 +96,26 @@ function __render__(_ctx, _cache) {
90
96
  color: _ctx.textColor,
91
97
  caretColor: !_ctx.errorMessage ? _ctx.focusColor : undefined
92
98
  }),
93
- onFocus: _cache[5] || (_cache[5] = function () {
99
+ onFocus: _cache[7] || (_cache[7] = function () {
94
100
  return _ctx.handleFocus && _ctx.handleFocus(...arguments);
95
101
  }),
96
- onBlur: _cache[6] || (_cache[6] = function () {
102
+ onBlur: _cache[8] || (_cache[8] = function () {
97
103
  return _ctx.handleBlur && _ctx.handleBlur(...arguments);
98
104
  }),
99
- onInput: _cache[7] || (_cache[7] = function () {
105
+ onInput: _cache[9] || (_cache[9] = function () {
100
106
  return _ctx.handleInput && _ctx.handleInput(...arguments);
101
107
  }),
102
- onChange: _cache[8] || (_cache[8] = function () {
108
+ onChange: _cache[10] || (_cache[10] = function () {
103
109
  return _ctx.handleChange && _ctx.handleChange(...arguments);
104
110
  }),
105
- onTouchstart: _cache[9] || (_cache[9] = function () {
111
+ onTouchstart: _cache[11] || (_cache[11] = function () {
106
112
  return _ctx.handleTouchstart && _ctx.handleTouchstart(...arguments);
113
+ }),
114
+ onCompositionstart: _cache[12] || (_cache[12] = function () {
115
+ return _ctx.handleCompositionStart && _ctx.handleCompositionStart(...arguments);
116
+ }),
117
+ onCompositionend: _cache[13] || (_cache[13] = function () {
118
+ return _ctx.handleCompositionEnd && _ctx.handleCompositionEnd(...arguments);
107
119
  })
108
120
  }, null, 46
109
121
  /* CLASS, STYLE, PROPS, HYDRATE_EVENTS */
@@ -241,7 +253,7 @@ var __sfc__ = defineComponent({
241
253
  validateWithTrigger('onBlur');
242
254
  };
243
255
 
244
- var handleInput = e => {
256
+ var updateValue = e => {
245
257
  var target = e.target;
246
258
  var {
247
259
  value
@@ -253,18 +265,42 @@ var __sfc__ = defineComponent({
253
265
 
254
266
  value = withMaxlength(withTrim(value));
255
267
  target.value = value;
268
+ return value;
269
+ };
270
+
271
+ var handleCompositionStart = e => {
272
+ Object.assign(e.target, {
273
+ composing: true
274
+ });
275
+ };
276
+
277
+ var handleCompositionEnd = e => {
278
+ var target = e.target;
279
+
280
+ if (target.composing) {
281
+ target.composing = false;
282
+ target.dispatchEvent(new Event('input'));
283
+ }
284
+ };
285
+
286
+ var handleInput = e => {
287
+ var {
288
+ composing
289
+ } = e.target;
290
+ console.log(composing);
291
+
292
+ if (composing) {
293
+ return;
294
+ }
295
+
296
+ var value = updateValue(e);
256
297
  call(props['onUpdate:modelValue'], value);
257
298
  call(props.onInput, value, e);
258
299
  validateWithTrigger('onInput');
259
300
  };
260
301
 
261
302
  var handleChange = e => {
262
- var target = e.target;
263
- var {
264
- value
265
- } = target;
266
- value = withMaxlength(withTrim(value));
267
- target.value = value;
303
+ var value = updateValue(e);
268
304
  call(props.onChange, value, e);
269
305
  validateWithTrigger('onChange');
270
306
  };
@@ -386,6 +422,8 @@ var __sfc__ = defineComponent({
386
422
  handleClear,
387
423
  handleClick,
388
424
  handleTouchstart,
425
+ handleCompositionStart,
426
+ handleCompositionEnd,
389
427
  validate,
390
428
  resetValidation,
391
429
  reset,
@@ -1,8 +1,8 @@
1
1
  import '../../styles/common.css'
2
- import '../SnackbarSfc.css'
3
2
  import '../../styles/elevation.css'
4
3
  import '../../loading/loading.css'
5
4
  import '../../button/button.css'
6
5
  import '../../icon/icon.css'
7
6
  import '../snackbar.css'
8
7
  import '../coreSfc.css'
8
+ import '../SnackbarSfc.css'