@varlet/ui 2.9.1-alpha.1678874318012 → 2.9.1-alpha.1678893658852

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.
@@ -241,7 +241,7 @@ import './time-picker/style/index.mjs'
241
241
  import './tooltip/style/index.mjs'
242
242
  import './uploader/style/index.mjs'
243
243
 
244
- const version = '2.9.1-alpha.1678874318012'
244
+ const version = '2.9.1-alpha.1678893658852'
245
245
 
246
246
  function install(app) {
247
247
  ActionSheet.install && app.use(ActionSheet)
package/es/index.mjs CHANGED
@@ -160,7 +160,7 @@ export * from './time-picker/index.mjs'
160
160
  export * from './tooltip/index.mjs'
161
161
  export * from './uploader/index.mjs'
162
162
 
163
- const version = '2.9.1-alpha.1678874318012'
163
+ const version = '2.9.1-alpha.1678893658852'
164
164
 
165
165
  function install(app) {
166
166
  ActionSheet.install && app.use(ActionSheet)
@@ -181,6 +181,7 @@ var __sfc__ = defineComponent({
181
181
  var id = ref("var-input-" + getCurrentInstance().uid);
182
182
  var el = ref(null);
183
183
  var isFocus = ref(false);
184
+ var isComposing = ref(false);
184
185
  var type = computed(() => {
185
186
  if (props.type === 'number') {
186
187
  return 'text';
@@ -233,7 +234,7 @@ var __sfc__ = defineComponent({
233
234
  modelValue
234
235
  } = props;
235
236
 
236
- if (!hint && !isEmpty(modelValue)) {
237
+ if (!hint && (!isEmpty(modelValue) || isComposing.value)) {
237
238
  return n('--placeholder-hidden');
238
239
  }
239
240
 
@@ -267,27 +268,21 @@ var __sfc__ = defineComponent({
267
268
  return withMaxlength(withTrim(value));
268
269
  };
269
270
 
270
- var handleCompositionStart = e => {
271
- Object.assign(e.target, {
272
- composing: true
273
- });
271
+ var handleCompositionStart = () => {
272
+ isComposing.value = true;
274
273
  };
275
274
 
276
275
  var handleCompositionEnd = e => {
277
- var target = e.target;
278
-
279
- if (target.composing) {
280
- target.composing = false;
281
- target.dispatchEvent(new Event('input'));
276
+ if (!isComposing.value) {
277
+ return;
282
278
  }
279
+
280
+ isComposing.value = false;
281
+ e.target.dispatchEvent(new Event('input'));
283
282
  };
284
283
 
285
284
  var handleInput = e => {
286
- var {
287
- composing
288
- } = e.target;
289
-
290
- if (composing) {
285
+ if (isComposing.value) {
291
286
  return;
292
287
  }
293
288
 
@@ -404,6 +399,7 @@ var __sfc__ = defineComponent({
404
399
  el,
405
400
  id,
406
401
  isFocus,
402
+ isComposing,
407
403
  errorMessage,
408
404
  type,
409
405
  maxlengthText,
@@ -1,8 +1,8 @@
1
1
  import '../../styles/common.css'
2
+ import '../SnackbarSfc.css'
2
3
  import '../../styles/elevation.css'
3
4
  import '../../loading/loading.css'
4
5
  import '../../button/button.css'
5
6
  import '../../icon/icon.css'
6
7
  import '../snackbar.css'
7
8
  import '../coreSfc.css'
8
- import '../SnackbarSfc.css'