fix: 修复 carousel-item 无法嵌套 v-for 渲染
This commit is contained in:
@@ -118,6 +118,45 @@ export default {
|
||||
|
||||
:::
|
||||
|
||||
::: title 动态遍历
|
||||
:::
|
||||
|
||||
::: demo
|
||||
|
||||
<template>
|
||||
<lay-carousel v-model="active">
|
||||
<lay-carousel-item :id="item.id" v-for="item in arrays">
|
||||
<div style="color: white;text-align: center;width:100%;height:300px;line-height:300px;background-color:#79C48C;">{{ item.text }}</div>
|
||||
</lay-carousel-item>
|
||||
</lay-carousel>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref } from 'vue'
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
|
||||
const active = ref("1")
|
||||
|
||||
const arrays = ref([
|
||||
{id: "1", text: ""},
|
||||
{id: "2", text: ""},
|
||||
{id: "3", text: ""},
|
||||
{id: "4", text: ""}
|
||||
])
|
||||
|
||||
return {
|
||||
active,
|
||||
arrays
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
:::
|
||||
|
||||
|
||||
::: title Carousel 属性
|
||||
:::
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
<li>[新增] page 分页组件 v-model 属性, 支持默认页设置。</li>
|
||||
<li>[新增] date-picker 日期选择组件, 支持年月, 日期, 时间。</li>
|
||||
<li>[新增] transfer 穿梭框组件 showSearch 开启搜索属性。</li>
|
||||
<li>[修复] carousel-item 轮播项使用 v-for 无法渲染。</li>
|
||||
<li>[修复] checkbox 复选框组件, 选中颜色丢失。</li>
|
||||
<li>[修复] slider 滑块组件, 默认 step 值异常。</li>
|
||||
<li>[升级] layer-vue 1.3.10 版本。</li>
|
||||
|
||||
Reference in New Issue
Block a user