Commit 82b9014a7b25fb9ef393e99cabacab53ddebc117
1 parent
9e1c9c46
交互调整
Showing
5 changed files
with
33 additions
and
23 deletions
src/views/layout/aside/aside.vue
src/views/layout/aside/menuTree.vue
| 1 | 1 | <template> |
| 2 | - <div> | |
| 3 | - <template v-for="(child) in menuData"> | |
| 4 | - <el-submenu v-if="child.children.length > 0" :index="child.path" :key="child.path"> | |
| 5 | - <template slot="title"> | |
| 6 | - <i :class="child.iconCls?child.iconCls:[fa,fa-file]"/> | |
| 7 | - <span slot="title">{{ child.name }}</span> | |
| 8 | - </template> | |
| 9 | - <menu-tree :menuData="child.children"/> | |
| 10 | - </el-submenu> | |
| 2 | + <div> | |
| 3 | + <template v-for="child in menuData"> | |
| 4 | + <el-submenu | |
| 5 | + v-if="child.children.length > 0" | |
| 6 | + :index="child.path" | |
| 7 | + :key="child.path" | |
| 8 | + > | |
| 9 | + <template slot="title"> | |
| 10 | + <i :class="child.iconCls ? child.iconCls : [fa, fa - file]" /> | |
| 11 | + <span slot="title">{{ child.name }}</span> | |
| 12 | + </template> | |
| 13 | + <menu-tree :menuData="child.children" /> | |
| 14 | + </el-submenu> | |
| 11 | 15 | |
| 12 | - <el-menu-item v-else-if="!child.hidden" :index="child.path" :key="child.path"> | |
| 13 | - <i :class="child.iconCls?child.iconCls:[fa,fa-file]"/> | |
| 14 | - <span slot="title">{{ child.name}}</span> | |
| 15 | - </el-menu-item> | |
| 16 | - </template> | |
| 17 | - </div> | |
| 16 | + <el-menu-item | |
| 17 | + v-else-if="!child.hidden" | |
| 18 | + :index="child.path" | |
| 19 | + :key="child.path" | |
| 20 | + :class=" | |
| 21 | + child.path == '/setUpClazz' && path == '/archived' ? 'is-active' : '' | |
| 22 | + " | |
| 23 | + > | |
| 24 | + <i :class="child.iconCls ? child.iconCls : [fa, fa - file]" /> | |
| 25 | + <span slot="title">{{ child.name }}</span> | |
| 26 | + </el-menu-item> | |
| 27 | + </template> | |
| 28 | + </div> | |
| 18 | 29 | </template> |
| 19 | 30 | |
| 20 | 31 | <script> |
| 21 | 32 | export default { |
| 22 | 33 | name: "menuTree", |
| 23 | - props: ["menuData"] | |
| 24 | -} | |
| 34 | + props: ["menuData", "path"], | |
| 35 | +}; | |
| 25 | 36 | </script> |
| 26 | 37 | |
| 27 | 38 | <style scoped> |
| 28 | - | |
| 29 | 39 | </style> | ... | ... |
src/views/standard/setUp/archived.vue
| ... | ... | @@ -48,7 +48,7 @@ |
| 48 | 48 | </p> |
| 49 | 49 | </div> |
| 50 | 50 | <div class="btn-box"> |
| 51 | - <el-button class="btn" round @click="classIds = []">取消</el-button> | |
| 51 | + <el-button class="btn" round @click="toClazz">取消</el-button> | |
| 52 | 52 | <el-popconfirm |
| 53 | 53 | confirm-button-text="确定" |
| 54 | 54 | cancel-button-text="取消" |
| ... | ... | @@ -267,7 +267,7 @@ export default { |
| 267 | 267 | }); |
| 268 | 268 | this.loadingClass = false; |
| 269 | 269 | if (status === 0) { |
| 270 | - this.classList = [...data.list] || []; | |
| 270 | + this.classList = (data.list && [...data.list]) || []; | |
| 271 | 271 | this.classIds = []; |
| 272 | 272 | } else { |
| 273 | 273 | this.$message.error(info); | ... | ... |
src/views/standard/setUp/clazz.vue
src/views/standard/setUp/teacher.vue