<script src="./node_modules/vue/dist/vue.global.js"></script>
<script src="./node_modules/vue3-seamless-scroll/dist/vue3-seamless-scroll.js"></script>
<div class="scroll">
<div>默认配置</div>
<vue3-seamless-scroll v-if="list2.length>0" :list="list2" hover v-model="scroll">
<div class="item" v-for="(item, index) in list2" :key="index">
<span>{{ item.id }}</span>
<span>{{ item.province }}</span>
</div>
</vue3-seamless-scroll>
</div>
Vue.createApp({
components: {
'vue3SeamlessScroll': Vue3SeamlessScroll.Vue3SeamlessScroll
},
data: function () {
return {
list2: [],
}
},
created: function () {
this.getData()
},
methods: {
getData() {
axios.get("").then((res) => {
var data = res.data
this.list2 = data.provList
})
},
}
}).mount("#app")
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。