bkui-vue 0.0.1-beta.135 → 0.0.1-beta.138

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/dist/index.esm.js CHANGED
@@ -9211,7 +9211,7 @@ const inputType = {
9211
9211
  showControl: PropTypes.bool.def(true),
9212
9212
  showClearOnlyHover: PropTypes.bool.def(false),
9213
9213
  precision: PropTypes.number.def(0).validate((val) => val >= 0 && val < 20),
9214
- modelValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).def(""),
9214
+ modelValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
9215
9215
  size: PropTypes.size(),
9216
9216
  rows: PropTypes.number
9217
9217
  };
@@ -9232,11 +9232,8 @@ let EVENTS$2;
9232
9232
  EVENTS2["COMPOSITIONUPDATE"] = "compositionupdate";
9233
9233
  EVENTS2["COMPOSITIONEND"] = "compositionend";
9234
9234
  })(EVENTS$2 || (EVENTS$2 = {}));
9235
- function EventFunction(value, evt) {
9236
- return {
9237
- value,
9238
- evt
9239
- };
9235
+ function EventFunction(_value, _evt) {
9236
+ return true;
9240
9237
  }
9241
9238
  function CompositionEventFunction(evt) {
9242
9239
  return evt;
@@ -9275,6 +9272,7 @@ var Component$y = defineComponent({
9275
9272
  "class",
9276
9273
  "style"
9277
9274
  ]);
9275
+ console.log(inputAttrs, 333, ctx.attrs);
9278
9276
  const inputRef = ref();
9279
9277
  const inputCls = computed(() => classes({
9280
9278
  [`${inputClsPrefix.value}--${props.size}`]: !!props.size,
@@ -9350,6 +9348,7 @@ var Component$y = defineComponent({
9350
9348
  function eventHandler(eventName) {
9351
9349
  return (e) => {
9352
9350
  var _a2;
9351
+ e.stopPropagation();
9353
9352
  if (eventName === EVENTS$2.KEYDOWN && (e.code === "Enter" || e.key === "Enter" || e.keyCode === 13)) {
9354
9353
  ctx.emit(EVENTS$2.ENTER, e.target.value, e);
9355
9354
  }
@@ -9404,12 +9403,18 @@ var Component$y = defineComponent({
9404
9403
  function handleVisibleChange() {
9405
9404
  pwdVisible.value = !pwdVisible.value;
9406
9405
  }
9407
- const bindProps = computed(() => ({
9408
- value: props.modelValue,
9409
- maxlength: props.maxlength,
9410
- placeholder: props.placeholder,
9411
- readonly: props.readonly,
9412
- disabled: props.disabled,
9406
+ const bindProps = computed(() => {
9407
+ const val = typeof props.modelValue === "undefined" || props.modelValue === null ? {} : {
9408
+ value: props.modelValue
9409
+ };
9410
+ return __spreadProps(__spreadValues({}, val), {
9411
+ maxlength: props.maxlength,
9412
+ placeholder: props.placeholder,
9413
+ readonly: props.readonly,
9414
+ disabled: props.disabled
9415
+ });
9416
+ });
9417
+ const eventListener = {
9413
9418
  onInput: handleInput,
9414
9419
  onFocus: handleFocus,
9415
9420
  onBlur: handleBlur,
@@ -9420,7 +9425,7 @@ var Component$y = defineComponent({
9420
9425
  onKeyup: handleKeyup,
9421
9426
  onCompositionstart: handleCompositionStart,
9422
9427
  onCompositionend: handleCompositionEnd
9423
- }));
9428
+ };
9424
9429
  return () => {
9425
9430
  var _a2, _b, _c, _d, _e, _f;
9426
9431
  return createVNode("div", {
@@ -9433,7 +9438,7 @@ var Component$y = defineComponent({
9433
9438
  }, [props.prefix])]), isTextArea.value ? createVNode("textarea", mergeProps({
9434
9439
  "ref": inputRef,
9435
9440
  "spellcheck": false
9436
- }, inputAttrs, bindProps.value, {
9441
+ }, inputAttrs, eventListener, bindProps.value, {
9437
9442
  "rows": props.rows
9438
9443
  }), null) : createVNode("input", mergeProps({
9439
9444
  "spellcheck": false
@@ -9444,7 +9449,7 @@ var Component$y = defineComponent({
9444
9449
  "step": props.step,
9445
9450
  "max": props.max,
9446
9451
  "min": props.min
9447
- }, bindProps.value), null), !isTextArea.value && props.clearable && !!props.modelValue && createVNode(close$1, {
9452
+ }, eventListener, bindProps.value), null), !isTextArea.value && props.clearable && !!props.modelValue && createVNode(close$1, {
9448
9453
  "onClick": clear,
9449
9454
  "class": clearCls.value
9450
9455
  }, null), suffixIcon.value, typeof props.maxlength === "number" && (props.showWordLimit || isTextArea.value) && createVNode("p", {
@@ -11023,11 +11028,15 @@ function show(el) {
11023
11028
  nodeList.get(el).popperInstance = popperInstance;
11024
11029
  }
11025
11030
  function hide$1(el) {
11031
+ if (!nodeList.get(el))
11032
+ return;
11026
11033
  const { popper: popper2, popperInstance, opts: { onHide } } = nodeList.get(el);
11027
- popper2.removeAttribute("data-show");
11028
- popperInstance == null ? void 0 : popperInstance.destroy();
11029
- popper2 && document.body.removeChild(popper2);
11030
- onHide();
11034
+ if (popper2 && document.body.contains(popper2)) {
11035
+ popper2.removeAttribute("data-show");
11036
+ popperInstance == null ? void 0 : popperInstance.destroy();
11037
+ document.body.removeChild(popper2);
11038
+ onHide();
11039
+ }
11031
11040
  }
11032
11041
  var Arrow = defineComponent({
11033
11042
  name: "PopArrow",