bkui-vue 0.0.1-beta.432 → 0.0.1-beta.434
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 +30 -30
- package/dist/index.esm.js +26 -12
- package/dist/index.umd.js +30 -30
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/affix/affix.variable.css +1 -1
- package/lib/alert/alert.variable.css +1 -1
- package/lib/backtop/backtop.variable.css +1 -1
- package/lib/badge/badge.variable.css +1 -1
- package/lib/breadcrumb/breadcrumb.variable.css +1 -1
- package/lib/button/button.variable.css +1 -1
- package/lib/card/card.variable.css +1 -1
- package/lib/cascader/cascader-panel.d.ts +1 -0
- package/lib/cascader/cascader.css +7 -0
- package/lib/cascader/cascader.d.ts +1 -0
- package/lib/cascader/cascader.less +7 -0
- package/lib/cascader/cascader.variable.css +8 -1
- package/lib/cascader/index.d.ts +4 -0
- package/lib/cascader/index.js +1 -1
- package/lib/checkbox/checkbox.variable.css +1 -1
- package/lib/code-diff/code-diff.variable.css +1 -1
- package/lib/collapse/collapse.variable.css +1 -1
- package/lib/collapse-transition/collapse-transition.variable.css +1 -1
- package/lib/color-picker/color-picker.variable.css +1 -1
- package/lib/components.d.ts +1 -0
- package/lib/config-provider/config-provider.variable.css +1 -1
- package/lib/container/container.variable.css +1 -1
- package/lib/date-picker/date-picker.variable.css +1 -1
- package/lib/dialog/dialog.variable.css +1 -1
- package/lib/divider/divider.variable.css +1 -1
- package/lib/dropdown/dropdown.variable.css +1 -1
- package/lib/exception/exception.variable.css +1 -1
- package/lib/fixed-navbar/fixed-navbar.variable.css +1 -1
- package/lib/form/form-item.d.ts +1 -1
- package/lib/form/form.d.ts +1 -0
- package/lib/form/form.variable.css +1 -1
- package/lib/form/index.d.ts +4 -1
- package/lib/form/index.js +1 -1
- package/lib/form/type.d.ts +1 -1
- package/lib/info-box/info-box.variable.css +1 -1
- package/lib/input/input.variable.css +1 -1
- package/lib/link/link.variable.css +1 -1
- package/lib/loading/loading.variable.css +1 -1
- package/lib/menu/menu.variable.css +1 -1
- package/lib/menu/submenu.variable.css +1 -1
- package/lib/message/message.variable.css +1 -1
- package/lib/modal/modal.variable.css +1 -1
- package/lib/navigation/navigation.variable.css +1 -1
- package/lib/notify/notify.variable.css +1 -1
- package/lib/pagination/pagination.variable.css +1 -1
- package/lib/pop-confirm/pop-confirm.variable.css +1 -1
- package/lib/popover/popover.variable.css +1 -1
- package/lib/process/process.variable.css +1 -1
- package/lib/progress/progress.variable.css +1 -1
- package/lib/radio/index.js +1 -1
- package/lib/radio/radio.css +28 -10
- package/lib/radio/radio.less +10 -1
- package/lib/radio/radio.variable.css +29 -11
- package/lib/resize-layout/resize-layout.variable.css +1 -1
- package/lib/search-select/search-select.variable.css +1 -1
- package/lib/select/index.d.ts +4 -4
- package/lib/select/select.d.ts +1 -1
- package/lib/select/select.variable.css +1 -1
- package/lib/sideslider/sideslider.variable.css +1 -1
- package/lib/slider/slider.variable.css +1 -1
- package/lib/steps/steps.variable.css +1 -1
- package/lib/styles/mixins/popper.variable.css +1 -1
- package/lib/styles/mixins/scroll.variable.css +1 -1
- package/lib/styles/themes/themes.less +1 -1
- package/lib/switcher/switcher.variable.css +1 -1
- package/lib/tab/tab.variable.css +1 -1
- package/lib/table/index.d.ts +13 -8
- package/lib/table/plugins/head-filter.variable.css +1 -1
- package/lib/table/plugins/head-sort.variable.css +1 -1
- package/lib/table/plugins/settings.variable.css +1 -1
- package/lib/table/table.css +4 -4
- package/lib/table/table.less +3 -3
- package/lib/table/table.variable.css +5 -5
- package/lib/tag/tag.variable.css +1 -1
- package/lib/tag-input/tag-input.variable.css +1 -1
- package/lib/time-picker/time-picker.variable.css +1 -1
- package/lib/timeline/timeline.variable.css +1 -1
- package/lib/transfer/transfer.variable.css +1 -1
- package/lib/tree/tree.variable.css +1 -1
- package/lib/upload/upload.variable.css +1 -1
- package/lib/virtual-render/virtual-render.variable.css +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
@@ -14365,7 +14365,7 @@ const radioGroupProps = {
|
|
14365
14365
|
modelValue: PropTypes.oneOfType([String, Number, Boolean]),
|
14366
14366
|
disabled: PropTypes.bool,
|
14367
14367
|
withValidate: PropTypes.bool.def(true),
|
14368
|
-
type: PropTypes.oneOf(["tab", "capsule"]).def("tab")
|
14368
|
+
type: PropTypes.oneOf(["tab", "capsule", "card"]).def("tab")
|
14369
14369
|
};
|
14370
14370
|
var RadioGroup = defineComponent({
|
14371
14371
|
name: "RadioGroup",
|
@@ -31157,6 +31157,7 @@ var Form = defineComponent({
|
|
31157
31157
|
return result;
|
31158
31158
|
}, [])).then(() => Promise.resolve(props2.model));
|
31159
31159
|
};
|
31160
|
+
const getValidateResult = () => Promise.all(formItemInstanceList.map((formItem) => formItem.validate(void 0, false))).then(() => true).catch(() => false);
|
31160
31161
|
const clearValidate = (fields) => {
|
31161
31162
|
let fieldMap = {};
|
31162
31163
|
if (fields) {
|
@@ -31174,6 +31175,7 @@ var Form = defineComponent({
|
|
31174
31175
|
return {
|
31175
31176
|
handleSubmit,
|
31176
31177
|
validate,
|
31178
|
+
getValidateResult,
|
31177
31179
|
clearValidate
|
31178
31180
|
};
|
31179
31181
|
},
|
@@ -31373,7 +31375,7 @@ var FormItem = defineComponent({
|
|
31373
31375
|
const contentStyles = computed(() => ({
|
31374
31376
|
["margin-left"]: labelStyles.value.width
|
31375
31377
|
}));
|
31376
|
-
const validate = (trigger) => {
|
31378
|
+
const validate = (trigger, showError = true) => {
|
31377
31379
|
if (!props2.property || isForm && !form2.props.model) {
|
31378
31380
|
return Promise.resolve(true);
|
31379
31381
|
}
|
@@ -31408,15 +31410,19 @@ var FormItem = defineComponent({
|
|
31408
31410
|
return Promise.reject(errorMessage);
|
31409
31411
|
}
|
31410
31412
|
}).then(() => doValidate(), () => {
|
31411
|
-
|
31412
|
-
|
31413
|
+
if (showError) {
|
31414
|
+
state.isError = true;
|
31415
|
+
state.errorMessage = errorMessage;
|
31416
|
+
}
|
31413
31417
|
form2.emit("validate", props2.property, false, errorMessage);
|
31414
31418
|
return Promise.reject(state.errorMessage);
|
31415
31419
|
});
|
31416
31420
|
}
|
31417
31421
|
if (!result) {
|
31418
|
-
|
31419
|
-
|
31422
|
+
if (showError) {
|
31423
|
+
state.isError = true;
|
31424
|
+
state.errorMessage = typeof result === "string" ? result : errorMessage;
|
31425
|
+
}
|
31420
31426
|
form2.emit("validate", props2.property, false, errorMessage);
|
31421
31427
|
return Promise.reject(state.errorMessage);
|
31422
31428
|
}
|
@@ -31751,6 +31757,7 @@ var CascaderPanel = defineComponent({
|
|
31751
31757
|
setup(props2, {
|
31752
31758
|
emit
|
31753
31759
|
}) {
|
31760
|
+
const t2 = useLocale("select");
|
31754
31761
|
const {
|
31755
31762
|
store
|
31756
31763
|
} = props2;
|
@@ -31848,6 +31855,7 @@ var CascaderPanel = defineComponent({
|
|
31848
31855
|
};
|
31849
31856
|
return events;
|
31850
31857
|
};
|
31858
|
+
const noDataText = t2.value.noData;
|
31851
31859
|
const isNodeInPath = (node) => {
|
31852
31860
|
const currentLevel = activePath.value[node.level - 1] || {};
|
31853
31861
|
return currentLevel.id === node.id;
|
@@ -31890,7 +31898,8 @@ var CascaderPanel = defineComponent({
|
|
31890
31898
|
iconRender,
|
31891
31899
|
panelWidth,
|
31892
31900
|
panelHeight,
|
31893
|
-
searchPanelEvents
|
31901
|
+
searchPanelEvents,
|
31902
|
+
noDataText
|
31894
31903
|
};
|
31895
31904
|
},
|
31896
31905
|
render() {
|
@@ -31923,7 +31932,7 @@ var CascaderPanel = defineComponent({
|
|
31923
31932
|
height: this.panelHeight,
|
31924
31933
|
width: this.panelWidth
|
31925
31934
|
}
|
31926
|
-
}, [menu2.map((node) => {
|
31935
|
+
}, [menu2.length ? menu2.map((node) => {
|
31927
31936
|
var _a, _b;
|
31928
31937
|
return createVNode("li", mergeProps({
|
31929
31938
|
"class": [resolveClassName("cascader-node"), {
|
@@ -31944,7 +31953,9 @@ var CascaderPanel = defineComponent({
|
|
31944
31953
|
node,
|
31945
31954
|
data: node.data
|
31946
31955
|
}), !node.isLeaf ? this.iconRender(node) : ""]);
|
31947
|
-
})
|
31956
|
+
}) : createVNode("div", {
|
31957
|
+
"class": resolveClassName("cascader-panel-empty-wrapper")
|
31958
|
+
}, [this.noDataText])]))]);
|
31948
31959
|
}
|
31949
31960
|
});
|
31950
31961
|
function isNodeDisabled(node) {
|
@@ -32130,7 +32141,7 @@ var Component$8 = defineComponent({
|
|
32130
32141
|
props: {
|
32131
32142
|
modelValue: PropTypes.arrayOf(PropTypes.oneOfType([q(), String, Number])),
|
32132
32143
|
list: PropTypes.array.def([]),
|
32133
|
-
placeholder: PropTypes.string.def("
|
32144
|
+
placeholder: PropTypes.string.def(""),
|
32134
32145
|
behavior: PropTypes.string.def("normal"),
|
32135
32146
|
filterable: PropTypes.bool.def(false),
|
32136
32147
|
multiple: PropTypes.bool.def(false),
|
@@ -32162,6 +32173,7 @@ var Component$8 = defineComponent({
|
|
32162
32173
|
setup(props2, {
|
32163
32174
|
emit
|
32164
32175
|
}) {
|
32176
|
+
const t2 = useLocale("select");
|
32165
32177
|
const {
|
32166
32178
|
separator: separator2,
|
32167
32179
|
multiple
|
@@ -32192,6 +32204,7 @@ var Component$8 = defineComponent({
|
|
32192
32204
|
const popover2 = ref(null);
|
32193
32205
|
const bkCascaderRef = ref(null);
|
32194
32206
|
const inputRef = ref(null);
|
32207
|
+
const placeholder = computed(() => props2.placeholder ? props2.placeholder : t2.value.pleaseSelect);
|
32195
32208
|
const getShowText = (node) => props2.showCompleteName ? node.pathNames.join(separator2) : node.pathNames[node.pathNames.length - 1];
|
32196
32209
|
const updateSearchKey = () => {
|
32197
32210
|
searchKey.value = selectedText.value;
|
@@ -32296,6 +32309,7 @@ var Component$8 = defineComponent({
|
|
32296
32309
|
overflowTagIndex
|
32297
32310
|
} = useTagsOverflow(bkCascaderRef, isEditMode, tagList);
|
32298
32311
|
return {
|
32312
|
+
calcuPlaceholder: placeholder,
|
32299
32313
|
bkCascaderRef,
|
32300
32314
|
inputRef,
|
32301
32315
|
overflowTagIndex,
|
@@ -32396,7 +32410,7 @@ var Component$8 = defineComponent({
|
|
32396
32410
|
}],
|
32397
32411
|
"type": "text",
|
32398
32412
|
"onInput": this.searchInputHandler,
|
32399
|
-
"placeholder": this.
|
32413
|
+
"placeholder": this.calcuPlaceholder,
|
32400
32414
|
"value": this.searchKey,
|
32401
32415
|
"disabled": this.disabled,
|
32402
32416
|
"ref": "inputRef"
|
@@ -32432,7 +32446,7 @@ var Component$8 = defineComponent({
|
|
32432
32446
|
"is-simplicity": this.behavior === "simplicity"
|
32433
32447
|
}],
|
32434
32448
|
"tabindex": "0",
|
32435
|
-
"data-placeholder": this.
|
32449
|
+
"data-placeholder": this.calcuPlaceholder,
|
32436
32450
|
"onMouseenter": this.setHover,
|
32437
32451
|
"onMouseleave": this.cancelHover,
|
32438
32452
|
"ref": "bkCascaderRef"
|