允许小程序自由设置底部导航栏个数

This commit is contained in:
aixianling
2022-11-02 14:42:18 +08:00
parent f1534ffc71
commit 48dc4a3d33

View File

@@ -109,12 +109,15 @@
</el-form-item>
<ai-title title="底部导航栏"/>
<ai-table :tableData="tabBar.list" :colConfigs="colConfigs" tableSize="mini" :isShowPagination="false" border>
<el-table-column slot="options" label="操作" width="80" align="center">
<template slot-scope="{row}">
<ai-dialog-btn text="更换" dialogTitle="选择应用">
<ai-lib-table :meta="appList" v-model="row.id" @select="v=>handleTabbarChange(row,v)" :isShowPagination="false" v-bind="$props"
:border="false"/>
</ai-dialog-btn>
<el-table-column slot="options" label="操作" width="140" align="center">
<template slot-scope="{row,$index}">
<el-row type="flex" justify="center">
<ai-dialog-btn text="更换" dialogTitle="选择应用">
<ai-lib-table :meta="appList" v-model="row.id" @select="v=>handleTabbarChange(row,v)" :isShowPagination="false" v-bind="$props"
:border="false"/>
</ai-dialog-btn>
<el-button type="text" @click="handleTabbarDelete($index)">删除</el-button>
</el-row>
</template>
</el-table-column>
</ai-table>
@@ -298,6 +301,9 @@ export default {
handleTabbarChange(row, {name, label}) {
row.text = label
row.pagePath = `pages/${name}/${name}`
},
handleTabbarDelete(i) {
this.tabBar.list?.splice(i, 1)
}
},
created() {