bkui-vue 0.0.1-beta.145 → 0.0.1-beta.146
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 +1 -1
- package/dist/index.esm.js +25 -19
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/collapse/collapse-panel.d.ts +11 -0
- package/lib/collapse/collapse.css +14 -14
- package/lib/collapse/collapse.d.ts +3 -1
- package/lib/collapse/collapse.less +34 -29
- package/lib/collapse/collapse.variable.css +14 -14
- package/lib/collapse/index.d.ts +20 -3
- package/lib/collapse/index.js +1 -1
- package/lib/collapse/props.d.ts +9 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
@@ -33,7 +33,7 @@ var __publicField = (obj, key2, value) => {
|
|
33
33
|
__defNormalProp(obj, typeof key2 !== "symbol" ? key2 + "" : key2, value);
|
34
34
|
return value;
|
35
35
|
};
|
36
|
-
import { inject, createVNode, h as h$1, mergeProps, defineComponent, reactive, ref, computed, watch, onMounted, onBeforeUnmount, getCurrentInstance, nextTick, Transition, provide, createTextVNode, isVNode, withDirectives, vShow, Fragment, toRefs, onUnmounted, Teleport, resolveDirective, customRef, onBeforeMount, toRef, vModelText, watchEffect, onUpdated, render as render$1, shallowRef, createApp, toRaw, withModifiers, TransitionGroup } from "vue";
|
36
|
+
import { inject, createVNode, h as h$1, mergeProps, defineComponent, reactive, ref, computed, watch, onMounted, onBeforeUnmount, getCurrentInstance, nextTick, Transition, provide, createTextVNode, isVNode, withDirectives, vShow, renderSlot, Fragment, toRefs, onUnmounted, Teleport, resolveDirective, customRef, onBeforeMount, toRef, vModelText, watchEffect, onUpdated, render as render$1, shallowRef, createApp, toRaw, withModifiers, TransitionGroup } from "vue";
|
37
37
|
var reset = "";
|
38
38
|
var alert = "";
|
39
39
|
var affix = "";
|
@@ -9784,6 +9784,7 @@ const propsCollapsePanel = __spreadValues({
|
|
9784
9784
|
title: PropTypes.any,
|
9785
9785
|
content: PropTypes.string,
|
9786
9786
|
disabled: PropTypes.bool.def(false),
|
9787
|
+
isFormList: PropTypes.bool.def(false),
|
9787
9788
|
renderDirective: PropTypes.commonType(["if", "show"], "render").def("show"),
|
9788
9789
|
modelValue: PropTypes.bool.def(false)
|
9789
9790
|
}, CollapsePanelEventProps);
|
@@ -9878,6 +9879,7 @@ var CollapsePanel = defineComponent({
|
|
9878
9879
|
slots
|
9879
9880
|
}) {
|
9880
9881
|
const localActiveItems = inject("localActiveItems");
|
9882
|
+
const handleItemClick = inject("handleItemClick");
|
9881
9883
|
const isActive = ref(props2.modelValue);
|
9882
9884
|
watch(() => props2.modelValue, (newVal) => {
|
9883
9885
|
isActive.value = newVal;
|
@@ -9889,7 +9891,7 @@ var CollapsePanel = defineComponent({
|
|
9889
9891
|
}, {
|
9890
9892
|
immediate: true
|
9891
9893
|
});
|
9892
|
-
function
|
9894
|
+
function clickItem(props3) {
|
9893
9895
|
const {
|
9894
9896
|
disabled,
|
9895
9897
|
name,
|
@@ -9904,14 +9906,14 @@ var CollapsePanel = defineComponent({
|
|
9904
9906
|
isActive.value = !isActive.value;
|
9905
9907
|
emit("change", data2);
|
9906
9908
|
emit("update:modelValue", isActive.value);
|
9909
|
+
handleItemClick({
|
9910
|
+
name
|
9911
|
+
});
|
9907
9912
|
}
|
9908
9913
|
const transition = ref(collapseMotion$1(emit));
|
9909
|
-
const {
|
9910
|
-
content
|
9911
|
-
} = props2;
|
9912
9914
|
function getContent() {
|
9913
|
-
if (content) {
|
9914
|
-
return content;
|
9915
|
+
if (props2.content) {
|
9916
|
+
return props2.content;
|
9915
9917
|
}
|
9916
9918
|
if (typeof slots.content === "function") {
|
9917
9919
|
return slots.content(h$1);
|
@@ -9943,7 +9945,9 @@ var CollapsePanel = defineComponent({
|
|
9943
9945
|
} else {
|
9944
9946
|
title = props2.title;
|
9945
9947
|
}
|
9946
|
-
return createVNode(
|
9948
|
+
return createVNode("div", {
|
9949
|
+
"class": "bk-collapse-header"
|
9950
|
+
}, [createVNode("span", {
|
9947
9951
|
"class": "bk-collapse-title"
|
9948
9952
|
}, [title]), createVNode(angleRight, {
|
9949
9953
|
"class": `bk-collapse-icon ${isActive.value && "rotate-icon" || ""}`
|
@@ -9954,8 +9958,7 @@ var CollapsePanel = defineComponent({
|
|
9954
9958
|
return createVNode("div", {
|
9955
9959
|
"class": `bk-collapse-item ${props2.disabled ? "is-disabled" : ""} ${isActive.value ? "bk-collapse-item-active" : ""}`
|
9956
9960
|
}, [createVNode("div", {
|
9957
|
-
"
|
9958
|
-
"onClick": () => handleItemClick(props2)
|
9961
|
+
"onClick": () => clickItem(props2)
|
9959
9962
|
}, [renderHeader()]), createVNode(Transition, transition.value, _isSlot$8(_slot = renderPanel()) ? _slot : {
|
9960
9963
|
default: () => [_slot]
|
9961
9964
|
})]);
|
@@ -9983,7 +9986,6 @@ var Collapse = defineComponent({
|
|
9983
9986
|
}, {
|
9984
9987
|
immediate: true
|
9985
9988
|
});
|
9986
|
-
provide("localActiveItems", localActiveItems.value);
|
9987
9989
|
const handleItemClick = (item) => {
|
9988
9990
|
const {
|
9989
9991
|
name
|
@@ -10006,14 +10008,17 @@ var Collapse = defineComponent({
|
|
10006
10008
|
emit("item-click", item);
|
10007
10009
|
emit("update:modelValue", localActiveItems.value);
|
10008
10010
|
};
|
10011
|
+
provide("localActiveItems", localActiveItems.value);
|
10012
|
+
provide("handleItemClick", handleItemClick);
|
10009
10013
|
const className = "bk-collapse-wrapper";
|
10010
10014
|
if (!Array.isArray(props2.list) || !props2.list.length) {
|
10011
|
-
return () => {
|
10012
|
-
|
10013
|
-
|
10014
|
-
|
10015
|
-
|
10016
|
-
|
10015
|
+
return () => createVNode("div", {
|
10016
|
+
class: className
|
10017
|
+
}, [renderSlot(slots, "default", {
|
10018
|
+
props: {
|
10019
|
+
isList: true
|
10020
|
+
}
|
10021
|
+
})]);
|
10017
10022
|
}
|
10018
10023
|
const collapseData = computed(() => (props2.list || []).map((item, index) => {
|
10019
10024
|
if (typeof item === "string" || typeof item === "number" || typeof item === "boolean") {
|
@@ -10041,6 +10046,7 @@ var Collapse = defineComponent({
|
|
10041
10046
|
"item-click": handleItemClick,
|
10042
10047
|
"disabled": item.disabled,
|
10043
10048
|
"name": name,
|
10049
|
+
"isFormList": true,
|
10044
10050
|
"title": title,
|
10045
10051
|
"content": item[props2.contentField]
|
10046
10052
|
}, null);
|
@@ -18918,7 +18924,7 @@ var TabNav = defineComponent({
|
|
18918
18924
|
"onClick": () => this.handleTabRemove(index, item)
|
18919
18925
|
}, null)]);
|
18920
18926
|
});
|
18921
|
-
const
|
18927
|
+
const renderSlot2 = () => {
|
18922
18928
|
var _a, _b;
|
18923
18929
|
const list = [];
|
18924
18930
|
if (typeof this.$slots.add === "function") {
|
@@ -18948,7 +18954,7 @@ var TabNav = defineComponent({
|
|
18948
18954
|
"class": "bk-tab-header"
|
18949
18955
|
}, [createVNode("div", {
|
18950
18956
|
"class": "bk-tab-header-nav"
|
18951
|
-
}, [renderNavs()]),
|
18957
|
+
}, [renderNavs()]), renderSlot2(), typeof this.$slots.setting === "function" && createVNode("div", {
|
18952
18958
|
"class": "bk-tab-header-setting"
|
18953
18959
|
}, [this.$slots.setting()])]);
|
18954
18960
|
}
|