bkui-vue 0.0.1-beta.139 → 0.0.1-beta.141
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 +29 -29
- package/dist/index.esm.js +58 -42
- package/dist/index.umd.js +26 -26
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/affix/affix.variable.css +11 -0
- package/lib/alert/alert.variable.css +11 -0
- package/lib/backtop/backtop.variable.css +11 -0
- package/lib/badge/badge.variable.css +11 -0
- package/lib/breadcrumb/breadcrumb.variable.css +11 -0
- package/lib/button/button.less +7 -7
- package/lib/button/button.variable.css +11 -0
- package/lib/card/card.variable.css +11 -0
- package/lib/cascader/cascader-panel.d.ts +1 -0
- package/lib/cascader/cascader.css +8 -1
- package/lib/cascader/cascader.d.ts +12 -2
- package/lib/cascader/cascader.less +9 -1
- package/lib/cascader/cascader.variable.css +19 -1
- package/lib/cascader/index.d.ts +40 -6
- package/lib/cascader/index.js +1 -1
- package/lib/cascader/interface.d.ts +4 -1
- package/lib/cascader/node.d.ts +2 -1
- package/lib/cascader/store.d.ts +3 -0
- package/lib/checkbox/checkbox.variable.css +11 -0
- package/lib/code-diff/code-diff.variable.css +11 -0
- package/lib/collapse/collapse.variable.css +11 -0
- package/lib/container/container.variable.css +11 -0
- package/lib/date-picker/date-picker.variable.css +11 -0
- package/lib/divider/divider.variable.css +11 -0
- package/lib/dropdown/dropdown.variable.css +11 -0
- package/lib/exception/exception.variable.css +11 -0
- package/lib/fixed-navbar/fixed-navbar.variable.css +11 -0
- package/lib/form/form.variable.css +11 -0
- package/lib/input/input.variable.css +11 -0
- package/lib/link/link.variable.css +11 -0
- package/lib/loading/loading.variable.css +11 -0
- package/lib/menu/menu.variable.css +11 -0
- package/lib/menu/submenu.variable.css +11 -0
- package/lib/message/index.js +1 -1
- package/lib/message/message.css +8 -1
- package/lib/message/message.less +9 -1
- package/lib/message/message.variable.css +19 -1
- package/lib/message/messageConstructor.d.ts +2 -2
- package/lib/navigation/navigation.variable.css +11 -0
- package/lib/notify/index.js +1 -1
- package/lib/notify/notify.css +7 -3
- package/lib/notify/notify.less +8 -3
- package/lib/notify/notify.variable.css +18 -3
- package/lib/notify/notifyConstructor.d.ts +2 -2
- package/lib/pagination/pagination.variable.css +11 -0
- package/lib/popover/popover.variable.css +11 -0
- package/lib/popover2/popover2.variable.css +11 -0
- package/lib/process/process.variable.css +11 -0
- package/lib/progress/progress.variable.css +11 -0
- package/lib/radio/radio.css +56 -50
- package/lib/radio/radio.less +181 -171
- package/lib/radio/radio.variable.css +70 -53
- package/lib/resize-layout/resize-layout.variable.css +11 -0
- package/lib/select/select.variable.css +11 -0
- package/lib/sideslider/index.d.ts +43 -35
- package/lib/sideslider/index.js +1 -1
- package/lib/sideslider/sideslider.css +6 -7
- package/lib/sideslider/sideslider.d.ts +21 -17
- package/lib/sideslider/sideslider.less +6 -7
- package/lib/sideslider/sideslider.variable.css +17 -7
- package/lib/slider/slider.variable.css +11 -0
- package/lib/steps/steps.variable.css +11 -0
- package/lib/styles/mixins/scroll.variable.css +11 -0
- package/lib/styles/themes/themes.less +13 -0
- package/lib/switcher/switcher.variable.css +11 -0
- package/lib/tab/tab.variable.css +11 -0
- package/lib/table/plugins/head-filter.variable.css +11 -0
- package/lib/table/plugins/head-sort.variable.css +11 -0
- package/lib/table/plugins/settings.variable.css +11 -0
- package/lib/table/table.variable.css +11 -0
- package/lib/tag/tag.variable.css +11 -0
- package/lib/tag-input/tag-input.variable.css +11 -0
- package/lib/timeline/timeline.variable.css +11 -0
- package/lib/transfer/transfer.variable.css +11 -0
- package/lib/tree/tree.variable.css +11 -0
- package/lib/upload/upload.variable.css +11 -0
- package/lib/virtual-render/virtual-render.variable.css +11 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
@@ -7960,14 +7960,6 @@ function debounce(delay = 300, fn2, immediate = false) {
|
|
7960
7960
|
};
|
7961
7961
|
return debounced;
|
7962
7962
|
}
|
7963
|
-
function filterProperty(data2, filter) {
|
7964
|
-
return JSON.parse(JSON.stringify(data2, (key2, value) => {
|
7965
|
-
if (filter.includes(key2)) {
|
7966
|
-
return void 0;
|
7967
|
-
}
|
7968
|
-
return value;
|
7969
|
-
}));
|
7970
|
-
}
|
7971
7963
|
function arrayEqual(arr1 = [], arr2 = []) {
|
7972
7964
|
if (arr1.length !== arr2.length) {
|
7973
7965
|
return false;
|
@@ -14666,14 +14658,6 @@ var Component$h = defineComponent({
|
|
14666
14658
|
BkButton
|
14667
14659
|
},
|
14668
14660
|
props: __spreadProps(__spreadValues({}, sliderPops), {
|
14669
|
-
title: {
|
14670
|
-
type: String,
|
14671
|
-
default: ""
|
14672
|
-
},
|
14673
|
-
extCls: {
|
14674
|
-
type: String,
|
14675
|
-
default: ""
|
14676
|
-
},
|
14677
14661
|
direction: {
|
14678
14662
|
type: String,
|
14679
14663
|
default: "right",
|
@@ -14742,10 +14726,10 @@ var Component$h = defineComponent({
|
|
14742
14726
|
}
|
14743
14727
|
};
|
14744
14728
|
const className = `bk-sideslider-wrapper ${props.scrollable ? "scroll-able" : ""} ${props.extCls}`;
|
14745
|
-
const maxHeight = slots.footer ? "calc(100vh -
|
14729
|
+
const maxHeight = slots.footer ? "calc(100vh - 106px)" : "calc(100vh - 52px)";
|
14746
14730
|
return createVNode(BkModal, mergeProps(props, {
|
14747
14731
|
"maxHeight": maxHeight,
|
14748
|
-
"
|
14732
|
+
"class": className,
|
14749
14733
|
"style": `${props.direction}: 0;`,
|
14750
14734
|
"onHidden": handleHidden,
|
14751
14735
|
"onShown": handleShown,
|
@@ -19077,7 +19061,7 @@ const Message$1 = (constructor, options) => {
|
|
19077
19061
|
});
|
19078
19062
|
const container2 = document.createElement("div");
|
19079
19063
|
const vm = createVNode(constructor, opts);
|
19080
|
-
vm.props.
|
19064
|
+
vm.props.onDestroy = (id2) => {
|
19081
19065
|
close(id2, position, spacing, userOnClose);
|
19082
19066
|
render$1(null, container2);
|
19083
19067
|
};
|
@@ -19124,7 +19108,7 @@ const messageProps = {
|
|
19124
19108
|
var MessageConstructor = defineComponent({
|
19125
19109
|
name: "Message",
|
19126
19110
|
props: messageProps,
|
19127
|
-
emits: ["
|
19111
|
+
emits: ["destroy"],
|
19128
19112
|
setup(props, {
|
19129
19113
|
emit
|
19130
19114
|
}) {
|
@@ -19157,7 +19141,7 @@ var MessageConstructor = defineComponent({
|
|
19157
19141
|
});
|
19158
19142
|
watch(visible, () => {
|
19159
19143
|
if (!visible.value) {
|
19160
|
-
emit("
|
19144
|
+
emit("destroy", props.id);
|
19161
19145
|
}
|
19162
19146
|
});
|
19163
19147
|
return {
|
@@ -19188,7 +19172,7 @@ var MessageConstructor = defineComponent({
|
|
19188
19172
|
}, [createVNode("div", {
|
19189
19173
|
"class": "bk-message-icon"
|
19190
19174
|
}, [renderIcon()]), this.message]), this.dismissable && createVNode(error, {
|
19191
|
-
"class": "bk-message-
|
19175
|
+
"class": "bk-message-close",
|
19192
19176
|
"onClick": this.close
|
19193
19177
|
}, null)]), [[vShow, this.visible]])]
|
19194
19178
|
});
|
@@ -19214,7 +19198,7 @@ const notifyProps = {
|
|
19214
19198
|
var NotifyConstructor = defineComponent({
|
19215
19199
|
name: "Notify",
|
19216
19200
|
props: notifyProps,
|
19217
|
-
emits: ["
|
19201
|
+
emits: ["destroy"],
|
19218
19202
|
setup(props, {
|
19219
19203
|
emit
|
19220
19204
|
}) {
|
@@ -19246,7 +19230,7 @@ var NotifyConstructor = defineComponent({
|
|
19246
19230
|
});
|
19247
19231
|
watch(visible, () => {
|
19248
19232
|
if (!visible.value) {
|
19249
|
-
emit("
|
19233
|
+
emit("destroy", props.id);
|
19250
19234
|
}
|
19251
19235
|
});
|
19252
19236
|
return {
|
@@ -19276,7 +19260,7 @@ var NotifyConstructor = defineComponent({
|
|
19276
19260
|
"class": "bk-notify-content"
|
19277
19261
|
}, [createVNode("div", {
|
19278
19262
|
"class": "bk-notify-icon"
|
19279
|
-
}, [renderIcon()]), this.title ? createVNode("
|
19263
|
+
}, [renderIcon()]), this.title ? createVNode("div", {
|
19280
19264
|
"class": "bk-notify-content-header"
|
19281
19265
|
}, [this.title]) : "", createVNode("div", {
|
19282
19266
|
"class": "bk-notify-content-text"
|
@@ -25917,6 +25901,18 @@ var CascaderPanel = defineComponent({
|
|
25917
25901
|
if ((_a = node.children) == null ? void 0 : _a.length) {
|
25918
25902
|
menus.list.push(node.children);
|
25919
25903
|
activePath.value.push(node);
|
25904
|
+
return;
|
25905
|
+
}
|
25906
|
+
if (store.config.isRemote && !node.isLeaf) {
|
25907
|
+
node.loading = true;
|
25908
|
+
const updateNodes = (nodeData) => {
|
25909
|
+
store.appendNodes(nodeData, node || null);
|
25910
|
+
menus.list.push(node.children);
|
25911
|
+
activePath.value.push(node);
|
25912
|
+
node.loading = false;
|
25913
|
+
};
|
25914
|
+
store.config.remoteMethod(node, updateNodes);
|
25915
|
+
console.log("remote fuck here");
|
25920
25916
|
}
|
25921
25917
|
};
|
25922
25918
|
const nodeEvent = (node) => {
|
@@ -25956,6 +25952,11 @@ var CascaderPanel = defineComponent({
|
|
25956
25952
|
node.setNodeCheck(value);
|
25957
25953
|
nodeCheckHandler(node);
|
25958
25954
|
};
|
25955
|
+
const iconRender = (node) => node.loading ? createVNode(spinner, {
|
25956
|
+
"class": "icon-spinner"
|
25957
|
+
}, null) : createVNode(angleRight, {
|
25958
|
+
"class": "icon-angle-right"
|
25959
|
+
}, null);
|
25959
25960
|
return {
|
25960
25961
|
menus,
|
25961
25962
|
activePath,
|
@@ -25965,7 +25966,8 @@ var CascaderPanel = defineComponent({
|
|
25965
25966
|
isCheckedNode,
|
25966
25967
|
checkValue,
|
25967
25968
|
nodeClear,
|
25968
|
-
checkNode
|
25969
|
+
checkNode,
|
25970
|
+
iconRender
|
25969
25971
|
};
|
25970
25972
|
},
|
25971
25973
|
render() {
|
@@ -25987,10 +25989,8 @@ var CascaderPanel = defineComponent({
|
|
25987
25989
|
"onUpdate:modelValue": ($event) => node.checked = $event,
|
25988
25990
|
"onChange": (val) => this.checkNode(node, val)
|
25989
25991
|
}, null), createVNode("span", {
|
25990
|
-
"class": "
|
25991
|
-
}, [node.name]), !node.isLeaf ?
|
25992
|
-
"class": "icon-angle-right"
|
25993
|
-
}, null) : ""]))]))]);
|
25992
|
+
"class": "bk-cascader-node-name"
|
25993
|
+
}, [node.name]), !node.isLeaf ? this.iconRender(node) : ""]))]))]);
|
25994
25994
|
}
|
25995
25995
|
});
|
25996
25996
|
class Node$1 {
|
@@ -25998,25 +25998,30 @@ class Node$1 {
|
|
25998
25998
|
this.data = node;
|
25999
25999
|
this.config = config;
|
26000
26000
|
this.parent = parent || null;
|
26001
|
+
this.leaf = node.leaf;
|
26001
26002
|
this.level = !this.parent ? 1 : this.parent.level + 1;
|
26002
26003
|
this.initState();
|
26003
26004
|
}
|
26004
26005
|
initState() {
|
26005
|
-
var _a;
|
26006
26006
|
const { idKey, nameKey, childrenKey } = this.config;
|
26007
26007
|
this.id = this.data[idKey];
|
26008
26008
|
this.name = this.data[nameKey];
|
26009
26009
|
this.loading = false;
|
26010
|
+
this.loaded = false;
|
26010
26011
|
this.checked = false;
|
26011
26012
|
const childrenData = this.data[childrenKey];
|
26012
26013
|
this.children = (childrenData || []).map((child) => new Node$1(child, this.config, this));
|
26013
|
-
this.hasChildren = ((_a = this.children) == null ? void 0 : _a.length) !== 0;
|
26014
26014
|
this.pathNodes = this.calculateNodesPath();
|
26015
26015
|
this.path = this.pathNodes.map((node) => node.id);
|
26016
26016
|
this.pathNames = this.pathNodes.map((node) => node.name);
|
26017
26017
|
}
|
26018
26018
|
get isLeaf() {
|
26019
|
-
|
26019
|
+
var _a;
|
26020
|
+
if (this.config.isRemote) {
|
26021
|
+
const isLeaf = this.leaf || (this.loaded ? !this.children.length : false);
|
26022
|
+
return isLeaf;
|
26023
|
+
}
|
26024
|
+
return !(Array.isArray(this.children) && ((_a = this.children) == null ? void 0 : _a.length) !== 0);
|
26020
26025
|
}
|
26021
26026
|
get isDisabled() {
|
26022
26027
|
return this.data.disabled;
|
@@ -26047,8 +26052,8 @@ class Store {
|
|
26047
26052
|
constructor(props) {
|
26048
26053
|
const { list } = props;
|
26049
26054
|
this.data = list;
|
26050
|
-
this.config = filterProperty(props, ["list"]);
|
26051
26055
|
this.nodes = this.data.map((node) => new Node$1(node, this.config));
|
26056
|
+
this.config = props;
|
26052
26057
|
}
|
26053
26058
|
getNodes() {
|
26054
26059
|
return this.nodes;
|
@@ -26064,6 +26069,14 @@ class Store {
|
|
26064
26069
|
const nodes = this.getFlattedNodes().filter((node) => arrayEqual(node.path, value));
|
26065
26070
|
return (_a = nodes[0]) != null ? _a : null;
|
26066
26071
|
}
|
26072
|
+
appendNode(nodeData, parentNode) {
|
26073
|
+
const node = new Node$1(nodeData, this.config, parentNode);
|
26074
|
+
const children = parentNode ? parentNode.children : this.nodes;
|
26075
|
+
children.push(node);
|
26076
|
+
}
|
26077
|
+
appendNodes(nodeDataList, parentNode) {
|
26078
|
+
nodeDataList.forEach((node) => this.appendNode(node, parentNode));
|
26079
|
+
}
|
26067
26080
|
}
|
26068
26081
|
var Component$5 = defineComponent({
|
26069
26082
|
name: "Cascader",
|
@@ -26094,7 +26107,7 @@ var Component$5 = defineComponent({
|
|
26094
26107
|
limitOneLine: PropTypes.bool.def(false),
|
26095
26108
|
extCls: PropTypes.string.def("")
|
26096
26109
|
},
|
26097
|
-
emits: ["update:modelValue"],
|
26110
|
+
emits: ["update:modelValue", "change", "clear", "toggle"],
|
26098
26111
|
setup(props, {
|
26099
26112
|
emit
|
26100
26113
|
}) {
|
@@ -26112,20 +26125,21 @@ var Component$5 = defineComponent({
|
|
26112
26125
|
const selectedText = ref("");
|
26113
26126
|
const selectedTags = ref([]);
|
26114
26127
|
const updateValue = (val) => {
|
26115
|
-
emit("update:modelValue", val);
|
26116
26128
|
if (multiple) {
|
26117
|
-
selectedTags.value = store.getCheckedNodes().map((
|
26118
|
-
text:
|
26119
|
-
key:
|
26129
|
+
selectedTags.value = store.getCheckedNodes().map((node) => ({
|
26130
|
+
text: node.pathNames.join(separator2),
|
26131
|
+
key: node.id
|
26120
26132
|
}));
|
26121
26133
|
return;
|
26122
26134
|
}
|
26123
26135
|
if (val.length === 0) {
|
26124
26136
|
selectedText.value = "";
|
26125
|
-
|
26137
|
+
} else {
|
26138
|
+
const node = store.getNodeByValue(val);
|
26139
|
+
selectedText.value = node.pathNames.join(separator2);
|
26126
26140
|
}
|
26127
|
-
|
26128
|
-
|
26141
|
+
emit("update:modelValue", val);
|
26142
|
+
emit("change", val);
|
26129
26143
|
};
|
26130
26144
|
const hidePopover = () => {
|
26131
26145
|
panelShow.value = false;
|
@@ -26133,10 +26147,12 @@ var Component$5 = defineComponent({
|
|
26133
26147
|
const handleClear = (e) => {
|
26134
26148
|
e.stopPropagation();
|
26135
26149
|
updateValue([]);
|
26150
|
+
emit("clear", JSON.parse(JSON.stringify(props.modelValue)));
|
26136
26151
|
};
|
26137
26152
|
const inputClickHandler = (e) => {
|
26138
26153
|
e.stopPropagation();
|
26139
26154
|
panelShow.value = !panelShow.value;
|
26155
|
+
emit("toggle", panelShow.value);
|
26140
26156
|
};
|
26141
26157
|
const removeTag = (value, index, e) => {
|
26142
26158
|
e.stopPropagation();
|