🐛(component): [carouse]修复更新

This commit is contained in:
sight 2022-09-22 12:52:25 +08:00
parent dc52add9ee
commit fc55d43586
3 changed files with 9 additions and 4 deletions

View File

@ -89,7 +89,7 @@ watch(
childrens.value = []; childrens.value = [];
setItemInstanceBySlot((slot.default && slot.default()) as VNode[]); setItemInstanceBySlot((slot.default && slot.default()) as VNode[]);
}, },
{ immediate: true } { immediate: true, deep: true }
); );
provide("active", active); provide("active", active);

View File

@ -86,7 +86,7 @@ export interface LayCascaderProps {
replaceFields?: { label: string; value: string; children: string }; replaceFields?: { label: string; value: string; children: string };
allowClear?: boolean; allowClear?: boolean;
size?: "lg" | "md" | "sm" | "xs"; size?: "lg" | "md" | "sm" | "xs";
trigger: DropdownTrigger | DropdownTrigger[] trigger: DropdownTrigger | DropdownTrigger[];
} }
const props = withDefaults(defineProps<LayCascaderProps>(), { const props = withDefaults(defineProps<LayCascaderProps>(), {
options: null, options: null,

View File

@ -169,12 +169,16 @@ export default {
const active4 = ref("1") const active4 = ref("1")
const arrays = ref([ const arrays = ref([])
setTimeout(() => {
arrays.value = [
{id: "1", text: "1⃣"}, {id: "1", text: "1⃣"},
{id: "2", text: "2⃣"}, {id: "2", text: "2⃣"},
{id: "3", text: "3⃣"}, {id: "3", text: "3⃣"},
{id: "4", text: "4⃣"} {id: "4", text: "4⃣"}
]) ]
},1000)
return { return {
active4, active4,
@ -199,6 +203,7 @@ export default {
| arrow | 切换按钮状态 | `string` | `hover` |`hover` `always` `none` | | arrow | 切换按钮状态 | `string` | `hover` |`hover` `always` `none` |
| autoplay | 自动播放 | `boolean` | `true` | `true` `false` | | autoplay | 自动播放 | `boolean` | `true` | `true` `false` |
| interval | 轮播间隔 | `number` | `3000` | -- | | interval | 轮播间隔 | `number` | `3000` | -- |
| pauseOnHover| 鼠标悬停时暂停切换| `boolean`| `true` | `true` `false`|
::: :::