Merge branch 'feature/store-module' into develop

# Conflicts:
#	src/pages/demo/playground/store/menu/index.vue


Former-commit-id: 77cb9e9175b35a94c8c5cbefb6981f75718bf282 [formerly 77cb9e9175b35a94c8c5cbefb6981f75718bf282 [formerly 77cb9e9175b35a94c8c5cbefb6981f75718bf282 [formerly 77cb9e9175b35a94c8c5cbefb6981f75718bf282 [formerly 6ebe5372a382d911bdbe82f5a1867f72ab58f286 [formerly f7811326ccd36bd64b92f6c3094060be390a2b76]]]]]
Former-commit-id: 1a0ec7498901cca64a7d12c2b2c8f13ae701ca21
Former-commit-id: 3531de0dd9e330312c5073676f4c3aa82d28dfb9
Former-commit-id: cc70c17a885ff8b72df8b799921e38fbcbedd3e9 [formerly 73282cfd24758da343bea77d413773d569606110]
Former-commit-id: fa461f51727fdfc67b8ae790e1f0df161f85ca8b
Former-commit-id: 10e2f2cfce4a446c01957229fe254e4c5ec211a6
Former-commit-id: 602f7a473458e6f5f0d5ec96388e608971daca34
Former-commit-id: bb4a69677e9c9a76c8f653fb2b7c714eff13fa67
Former-commit-id: 277ce50885de084a418ba885418c22e8978e3c22
This commit is contained in:
liyang
2018-08-12 08:07:35 +08:00
39 changed files with 1372 additions and 371 deletions

View File

@@ -12,14 +12,14 @@
</d2-contextmenu>
<el-tabs
class="d2-multiple-page-control"
:value="pageCurrent"
:value="current"
type="card"
:closable="true"
@tab-click="handleClick"
@edit="handleTabsEdit"
@contextmenu.native="handleContextmenu">
<el-tab-pane
v-for="(page, index) in pageOpenedList"
v-for="(page, index) in opened"
:key="index"
:label="page.meta.title || '未命名'"
:name="page.name"/>
@@ -82,17 +82,18 @@ export default {
}
},
computed: {
...mapState({
pageOpenedList: state => state.d2admin.pageOpenedList,
pageCurrent: state => state.d2admin.pageCurrent
})
...mapState('d2admin/page', [
'opened',
'current'
])
},
methods: {
...mapMutations([
'd2adminTagCloseLeft',
'd2adminTagCloseRight',
'd2adminTagCloseOther',
'd2adminTagCloseAll'
...mapMutations('d2admin/page', [
'close',
'closeLeft',
'closeRight',
'closeOther',
'closeAll'
]),
/**
* @description 右键菜单功能点击
@@ -136,16 +137,16 @@ export default {
}
switch (command) {
case 'left':
this.d2adminTagCloseLeft(params)
this.closeLeft(params)
break
case 'right':
this.d2adminTagCloseRight(params)
this.closeRight(params)
break
case 'other':
this.d2adminTagCloseOther(params)
this.closeOther(params)
break
case 'all':
this.d2adminTagCloseAll(this)
this.closeAll(this)
break
default:
this.$message.error('无效的操作')
@@ -156,14 +157,14 @@ export default {
* @description 接收点击关闭控制上按钮的事件
*/
handleControlBtnClick () {
this.d2adminTagCloseAll(this)
this.closeAll(this)
},
/**
* @description 接收点击 tab 标签的事件
*/
handleClick (tab, event) {
// 找到点击的页面在 tag 列表里是哪个
const page = this.pageOpenedList.find(page => page.name === tab.name)
const page = this.opened.find(page => page.name === tab.name)
const { name, params, query } = page
if (page) {
this.$router.push({ name, params, query })
@@ -174,7 +175,7 @@ export default {
*/
handleTabsEdit (tagName, action) {
if (action === 'remove') {
this.$store.commit('d2adminTagClose', {
this.close({
tagName,
vm: this
})