“dzb”
2022-09-26 ccd7b3c5b24fa115a732ea915e2e586de717ea1c
src/views/systemSetting/platform/mySetting/index.vue
@@ -13,7 +13,8 @@
                        <h4>{{item.title}}</h4>
                        <!-- 子菜单 -->
                        <ul class="menu">
                            <li class="menuItem" v-for="(son,sonIndex) in item.children" @click.stop="getContent(index,sonIndex)">
                            <li class="menuItem" v-for="(son,sonIndex) in item.children"
                                @click.stop="getContent(index,sonIndex)">
                                <span>{{son.title}}</span>
                            </li>
                        </ul>
@@ -57,12 +58,19 @@
    methods:{
        // 获取菜单列表
        getMenuList(){
            this.$axios.get('sccg/menu/treeList').then(res=>{
                console.log(res);
                const {data} = res;
                this.menuList = data;
                this.getContent(0);
            })
            // this.$axios({
            //     method: 'get',
            //     url: 'sccg/system/portal/menu/search',
            //     data: {
            //         current: 1,
            //         size: 10,
            //     }
            // }).then(res => {
            //     console.log(res);
            //     const { data } = res;
            //     this.menuList = data;
            //     this.getContent(0);
            // })
        },
        // 切换菜单内容展示
        getContent(index,sonIndex=null){
@@ -98,6 +106,7 @@
                border: 1px solid #fff;
                padding: 20px;
                height: calc(100vh - 120px);
                .asideItem {
                    h4 {
                        line-height: 40px;
@@ -120,6 +129,7 @@
            .content {
                flex: 1;
                margin-left: 100px;
                h4 {
                    margin: 0;
                    line-height: 80px;
@@ -134,6 +144,7 @@
                    .editItem {
                        line-height: 40px;
                        display: flex;
                        span{
                            margin-left: 10px;
                        }