feat: 首次提交
This commit is contained in:
58
pages/component/nav/indexList-B/indexList-B.vue
Normal file
58
pages/component/nav/indexList-B/indexList-B.vue
Normal file
@ -0,0 +1,58 @@
|
||||
<!--本文件由FirstUI授权予新疆天衡创新研究院有限公司(手机号:186 14 0 7 2 549,身份证尾号:5A07X5)专用,请尊重知识产权,勿私下传播,违者追究法律责任。-->
|
||||
<template>
|
||||
<fui-index-list isSelect :listData="lists" @init="init" @click="itemClick">
|
||||
<fui-search-bar @search="search"></fui-search-bar>
|
||||
|
||||
<!--解构插槽使用,自定义内容 custom属性 设为true时生效-->
|
||||
<!-- <template v-slot:item="{ model, idx, index }">
|
||||
<fui-list-cell>
|
||||
{{model.text}}
|
||||
</fui-list-cell>
|
||||
</template> -->
|
||||
|
||||
<template v-slot:footer>
|
||||
<fui-loadmore v-if="!show"></fui-loadmore>
|
||||
<fui-divider text="已加载全部数据" v-if="show"></fui-divider>
|
||||
</template>
|
||||
</fui-index-list>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import lists from './index.list.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
lists: lists,
|
||||
show: false
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
// setTimeout(() => {
|
||||
// this.show = true;
|
||||
// }, 500)
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.show = true;
|
||||
},
|
||||
search(e) {
|
||||
this.fui.toast(`搜索:${e.detail.value}`)
|
||||
//相关逻辑自行处理
|
||||
// ...
|
||||
},
|
||||
itemClick(e) {
|
||||
console.log(e)
|
||||
//相关逻辑自行处理,如限制选择数,选择后操作等
|
||||
let obj = this.lists[e.index].data[e.subIndex]
|
||||
this.$set(obj, 'checked', !obj.checked)
|
||||
// ...
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
font-weight: normal;
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user