bkui-vue 2.0.2-beta.12 → 2.0.2-beta.13

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.
@@ -391,9 +391,6 @@ var tooltips = {
391
391
  hide(el);
392
392
  }, 100);
393
393
  });
394
- el.addEventListener('click', function () {
395
- hide(el);
396
- });
397
394
  popper.addEventListener('mouseleave', function () {
398
395
  clearTimeout(delayTimeout);
399
396
  hideTimeout = setTimeout(function () {
@@ -407,7 +404,7 @@ var tooltips = {
407
404
  show(el);
408
405
  clearTimeout(delayTimeout);
409
406
  }, opts.delay);
410
- } else if (popper.hasAttribute('data-show')) {
407
+ } else if (!el.contains(event.target) && popper.hasAttribute('data-show')) {
411
408
  hide(el);
412
409
  }
413
410
  });
@@ -1641,7 +1638,8 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
1641
1638
  var t = (0,config_provider_namespaceObject.useLocale)('cascader');
1642
1639
  var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
1643
1640
  resolveClassName = _usePrefix.resolveClassName;
1644
- var store = props.store;
1641
+ var _toRefs = (0,external_vue_.toRefs)(props),
1642
+ store = _toRefs.store;
1645
1643
  var menus = (0,external_vue_.reactive)({
1646
1644
  list: [props.store.getNodes()]
1647
1645
  });
@@ -1680,10 +1678,10 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
1680
1678
  // 判断是否为初始加载
1681
1679
  var isInitialLoad = checkValue.value.length === 0;
1682
1680
  // 如果是初始加载或单选情况,按原来的逻辑处理
1683
- if (isInitialLoad || !store.config.multiple) {
1681
+ if (isInitialLoad || !store.value.config.multiple) {
1684
1682
  var targetList = [];
1685
1683
  // 处理多选情况
1686
- if (store.config.multiple) {
1684
+ if (store.value.config.multiple) {
1687
1685
  var _iterator = _createForOfIteratorHelper(value),
1688
1686
  _step;
1689
1687
  try {
@@ -1704,7 +1702,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
1704
1702
  }
1705
1703
  // 执行展开操作
1706
1704
  targetList.forEach(function (id) {
1707
- var node = store.getNodeById(id);
1705
+ var node = store.value.getNodeById(id);
1708
1706
  if (node) {
1709
1707
  // 只展开,不需要重复触发
1710
1708
  var expandNode = function expandNode(node) {
@@ -1745,7 +1743,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
1745
1743
  }
1746
1744
  if (node.config.multiple) {
1747
1745
  // 如果checkAnyLevel,返回所有check的节点; 否则只check 叶子节点
1748
- var targets = store.config.checkAnyLevel ? store.getCheckedNodes() : store.getCheckedLeafNodes();
1746
+ var targets = store.value.config.checkAnyLevel ? store.value.getCheckedNodes() : store.value.getCheckedLeafNodes();
1749
1747
  checkValue.value = targets.map(function (node) {
1750
1748
  return node.path;
1751
1749
  }); // 如果任意级别可选,当前节点即为所选内容
@@ -1768,15 +1766,15 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
1768
1766
  activePath.value.push(node);
1769
1767
  return;
1770
1768
  }
1771
- if (store.config.isRemote && !node.isLeaf) {
1769
+ if (store.value.config.isRemote && !node.isLeaf) {
1772
1770
  node.loading = true;
1773
1771
  var updateNodes = function updateNodes(nodeData) {
1774
- store.appendNodes(nodeData, node || null);
1772
+ store.value.appendNodes(nodeData, node || null);
1775
1773
  menus.list.push(node.children);
1776
1774
  activePath.value.push(node);
1777
1775
  node.loading = false;
1778
1776
  };
1779
- store.config.remoteMethod(node, updateNodes);
1777
+ store.value.config.remoteMethod(node, updateNodes);
1780
1778
  }
1781
1779
  };
1782
1780
  /**
@@ -232,7 +232,7 @@ var useCheckbox = function useCheckbox() {
232
232
  }
233
233
  (0,external_vue_namespaceObject.nextTick)(function () {
234
234
  // 选中状态保持同步
235
- if (inputRef.value.checked !== isChecked.value) {
235
+ if (inputRef.value && inputRef.value.checked !== isChecked.value) {
236
236
  inputRef.value.checked = isChecked.value;
237
237
  }
238
238
  });
@@ -385,9 +385,6 @@ var tooltips = {
385
385
  hide(el);
386
386
  }, 100);
387
387
  });
388
- el.addEventListener('click', function () {
389
- hide(el);
390
- });
391
388
  popper.addEventListener('mouseleave', function () {
392
389
  clearTimeout(delayTimeout);
393
390
  hideTimeout = setTimeout(function () {
@@ -401,7 +398,7 @@ var tooltips = {
401
398
  show(el);
402
399
  clearTimeout(delayTimeout);
403
400
  }, opts.delay);
404
- } else if (popper.hasAttribute('data-show')) {
401
+ } else if (!el.contains(event.target) && popper.hasAttribute('data-show')) {
405
402
  hide(el);
406
403
  }
407
404
  });
@@ -388,9 +388,6 @@ var tooltips = {
388
388
  hide(el);
389
389
  }, 100);
390
390
  });
391
- el.addEventListener('click', function () {
392
- hide(el);
393
- });
394
391
  popper.addEventListener('mouseleave', function () {
395
392
  clearTimeout(delayTimeout);
396
393
  hideTimeout = setTimeout(function () {
@@ -404,7 +401,7 @@ var tooltips = {
404
401
  show(el);
405
402
  clearTimeout(delayTimeout);
406
403
  }, opts.delay);
407
- } else if (popper.hasAttribute('data-show')) {
404
+ } else if (!el.contains(event.target) && popper.hasAttribute('data-show')) {
408
405
  hide(el);
409
406
  }
410
407
  });
@@ -1245,9 +1245,6 @@ var tooltips = {
1245
1245
  hide(el);
1246
1246
  }, 100);
1247
1247
  });
1248
- el.addEventListener('click', function () {
1249
- hide(el);
1250
- });
1251
1248
  popper.addEventListener('mouseleave', function () {
1252
1249
  clearTimeout(delayTimeout);
1253
1250
  hideTimeout = setTimeout(function () {
@@ -1261,7 +1258,7 @@ var tooltips = {
1261
1258
  show(el);
1262
1259
  clearTimeout(delayTimeout);
1263
1260
  }, opts.delay);
1264
- } else if (popper.hasAttribute('data-show')) {
1261
+ } else if (!el.contains(event.target) && popper.hasAttribute('data-show')) {
1265
1262
  hide(el);
1266
1263
  }
1267
1264
  });
package/lib/form/index.js CHANGED
@@ -389,9 +389,6 @@ var tooltips = {
389
389
  hide(el);
390
390
  }, 100);
391
391
  });
392
- el.addEventListener('click', function () {
393
- hide(el);
394
- });
395
392
  popper.addEventListener('mouseleave', function () {
396
393
  clearTimeout(delayTimeout);
397
394
  hideTimeout = setTimeout(function () {
@@ -405,7 +402,7 @@ var tooltips = {
405
402
  show(el);
406
403
  clearTimeout(delayTimeout);
407
404
  }, opts.delay);
408
- } else if (popper.hasAttribute('data-show')) {
405
+ } else if (!el.contains(event.target) && popper.hasAttribute('data-show')) {
409
406
  hide(el);
410
407
  }
411
408
  });
@@ -1136,9 +1136,6 @@ var tooltips = {
1136
1136
  hide(el);
1137
1137
  }, 100);
1138
1138
  });
1139
- el.addEventListener('click', function () {
1140
- hide(el);
1141
- });
1142
1139
  popper.addEventListener('mouseleave', function () {
1143
1140
  clearTimeout(delayTimeout);
1144
1141
  hideTimeout = setTimeout(function () {
@@ -1152,7 +1149,7 @@ var tooltips = {
1152
1149
  show(el);
1153
1150
  clearTimeout(delayTimeout);
1154
1151
  }, opts.delay);
1155
- } else if (popper.hasAttribute('data-show')) {
1152
+ } else if (!el.contains(event.target) && popper.hasAttribute('data-show')) {
1156
1153
  hide(el);
1157
1154
  }
1158
1155
  });
package/lib/index.js CHANGED
@@ -3,5 +3,5 @@ export * from './hooks';
3
3
  export { default } from './preset';
4
4
  export * from './config-provider';
5
5
  export * from './directives';
6
- export const version = "2.0.2-beta.12";
6
+ export const version = "2.0.2-beta.13";
7
7
  window.__bkui_vue_version__ = version;
@@ -1203,9 +1203,6 @@ var tooltips = {
1203
1203
  hide(el);
1204
1204
  }, 100);
1205
1205
  });
1206
- el.addEventListener('click', function () {
1207
- hide(el);
1208
- });
1209
1206
  popper.addEventListener('mouseleave', function () {
1210
1207
  clearTimeout(delayTimeout);
1211
1208
  hideTimeout = setTimeout(function () {
@@ -1219,7 +1216,7 @@ var tooltips = {
1219
1216
  show(el);
1220
1217
  clearTimeout(delayTimeout);
1221
1218
  }, opts.delay);
1222
- } else if (popper.hasAttribute('data-show')) {
1219
+ } else if (!el.contains(event.target) && popper.hasAttribute('data-show')) {
1223
1220
  hide(el);
1224
1221
  }
1225
1222
  });
@@ -1717,7 +1717,7 @@ var messageProps = {
1717
1717
  "class": "".concat(_this2.resolveClassName('message-icon'))
1718
1718
  }, [renderIcon()]), (0,external_vue_namespaceObject.createVNode)("div", {
1719
1719
  "class": "describe"
1720
- }, [(_this2$$slots$title = (_this2$$slots$title2 = (_this2$$slots = _this2.$slots).title) === null || _this2$$slots$title2 === void 0 ? void 0 : _this2$$slots$title2.call(_this2$$slots)) !== null && _this2$$slots$title !== void 0 ? _this2$$slots$title : "\u3010".concat(_this2.message.code, "\u3011").concat(_this2.message.overview, " ").concat(_this2.message.suggestion)])]), (0,external_vue_namespaceObject.createVNode)("div", {
1720
+ }, [(_this2$$slots$title = (_this2$$slots$title2 = (_this2$$slots = _this2.$slots).title) === null || _this2$$slots$title2 === void 0 ? void 0 : _this2$$slots$title2.call(_this2$$slots)) !== null && _this2$$slots$title !== void 0 ? _this2$$slots$title : "".concat(_this2.message.code ? "\u3010".concat(_this2.message.code, "\u3011") : '').concat(_this2.message.overview, " ").concat(_this2.message.suggestion)])]), (0,external_vue_namespaceObject.createVNode)("div", {
1721
1721
  "class": "tools"
1722
1722
  }, [_this2.renderMessageActions()])]), _this2.toolOperation.isDetailShow && (0,external_vue_namespaceObject.createVNode)("div", {
1723
1723
  "class": "message-detail"