bkui-vue 2.0.2-beta.52 → 2.0.2-beta.54
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.cjs.js +18 -18
- package/dist/index.esm.js +1979 -1962
- package/dist/index.umd.js +24 -24
- package/lib/cascader/index.js +12 -4
- package/lib/index.js +1 -1
- package/lib/input/index.js +12 -1
- package/lib/modal/index.js +7 -0
- package/package.json +1 -1
package/lib/cascader/index.js
CHANGED
@@ -1946,15 +1946,20 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
1946
1946
|
};
|
1947
1947
|
return (0,external_vue_.createVNode)("div", {
|
1948
1948
|
"class": this.resolveClassName('cascader-panel-wrapper')
|
1949
|
-
}, [this.isFiltering ? searchPanelRender() : this.menus.list.map(function (menu) {
|
1949
|
+
}, [this.isFiltering ? searchPanelRender() : this.menus.list.map(function (menu, index) {
|
1950
|
+
var _this$$slots$panel, _this$$slots;
|
1950
1951
|
return (0,external_vue_.createVNode)("ul", {
|
1951
1952
|
"style": {
|
1952
1953
|
height: _this.panelHeight,
|
1953
1954
|
width: _this.panelWidth
|
1954
1955
|
},
|
1955
1956
|
"class": [_this.resolveClassName('cascader-panel'), _this.resolveClassName('scroll-y')]
|
1956
|
-
}, [
|
1957
|
-
|
1957
|
+
}, [(_this$$slots$panel = (_this$$slots = _this.$slots).panel) === null || _this$$slots$panel === void 0 ? void 0 : _this$$slots$panel.call(_this$$slots, {
|
1958
|
+
nodes: menu,
|
1959
|
+
level: index,
|
1960
|
+
activePath: _this.activePath
|
1961
|
+
}), menu.length ? menu.map(function (node) {
|
1962
|
+
var _this$$slots$default, _this$$slots2;
|
1958
1963
|
return (0,external_vue_.createVNode)("li", (0,external_vue_.mergeProps)({
|
1959
1964
|
"class": [_this.resolveClassName('cascader-node'), {
|
1960
1965
|
'is-selected': _this.isNodeInPath(node)
|
@@ -1974,7 +1979,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
1974
1979
|
"onChange": function onChange(val) {
|
1975
1980
|
return _this.checkNode(node, !!val);
|
1976
1981
|
}
|
1977
|
-
}, null), (_this$$slots$default = (_this$$
|
1982
|
+
}, null), (_this$$slots$default = (_this$$slots2 = _this.$slots)["default"]) === null || _this$$slots$default === void 0 ? void 0 : _this$$slots$default.call(_this$$slots2, {
|
1978
1983
|
node: node,
|
1979
1984
|
data: node.data
|
1980
1985
|
}), !node.isLeaf ? _this.iconRender(node) : '']);
|
@@ -2856,6 +2861,9 @@ var Store = /*#__PURE__*/function () {
|
|
2856
2861
|
return _this.$slots["default"] ? _this.$slots["default"](scope) : (0,external_vue_.createVNode)("span", {
|
2857
2862
|
"class": _this.resolveClassName('cascader-node-name')
|
2858
2863
|
}, [scope.node.name]);
|
2864
|
+
},
|
2865
|
+
panel: function panel(scope) {
|
2866
|
+
return _this.$slots.panel ? _this.$slots.panel(scope) : null;
|
2859
2867
|
}
|
2860
2868
|
}), (_this$$slots$extensio = (_this$$slots = _this.$slots).extension) === null || _this$$slots$extensio === void 0 ? void 0 : _this$$slots$extensio.call(_this$$slots)]);
|
2861
2869
|
}
|
package/lib/index.js
CHANGED
package/lib/input/index.js
CHANGED
@@ -1910,7 +1910,18 @@ var inputEmitEventsType = (_inputEmitEventsType = {}, _defineProperty(_definePro
|
|
1910
1910
|
return eventName === e;
|
1911
1911
|
})) return;
|
1912
1912
|
if (eventName === EVENTS.INPUT) {
|
1913
|
-
ctx.emit(EVENTS.UPDATE, isNumberInput.value ? handleNumber(e.target.value, 0) : e.target.value, e);
|
1913
|
+
// ctx.emit(EVENTS.UPDATE, isNumberInput.value ? handleNumber(e.target.value, 0) : e.target.value, e);
|
1914
|
+
ctx.emit(EVENTS.UPDATE, isNumberInput.value ?
|
1915
|
+
// 这里不直接使用 handleNumber,是因为 handleNumber 里有 min 和 max 的判断
|
1916
|
+
// https://github.com/TencentBlueKing/bkui-vue3/issues/2426
|
1917
|
+
function () {
|
1918
|
+
var precision = Number.isInteger(props.precision) ? props.precision : 0;
|
1919
|
+
var val = e.target.value;
|
1920
|
+
if (!Number.isNaN(val)) {
|
1921
|
+
return isNum(props.min) ? props.min : 0;
|
1922
|
+
}
|
1923
|
+
return +val.toFixed(precision);
|
1924
|
+
}() : e.target.value, e);
|
1914
1925
|
} else if (eventName === EVENTS.CHANGE && isNumberInput.value && e.target.value !== '') {
|
1915
1926
|
var _val = handleNumber(e.target.value, 0);
|
1916
1927
|
ctx.emit(EVENTS.UPDATE, _val, e);
|
package/lib/modal/index.js
CHANGED
@@ -388,6 +388,13 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
388
388
|
top: props.top
|
389
389
|
};
|
390
390
|
});
|
391
|
+
(0,external_vue_namespaceObject.watch)(function () {
|
392
|
+
return [props.zIndex];
|
393
|
+
}, function () {
|
394
|
+
if (/\d+/.test("".concat(props.zIndex))) {
|
395
|
+
zIndex.value = props.zIndex;
|
396
|
+
}
|
397
|
+
});
|
391
398
|
(0,external_vue_namespaceObject.watch)(function () {
|
392
399
|
return props.isShow;
|
393
400
|
}, function () {
|