no message
Former-commit-id: b632d6424f412c396322c6dcba4c30a9e49a1259 [formerly 9518a76bf3cc2caf82d0c7c21a7c574c326a1e7d] [formerly b632d6424f412c396322c6dcba4c30a9e49a1259 [formerly 9518a76bf3cc2caf82d0c7c21a7c574c326a1e7d] [formerly b632d6424f412c396322c6dcba4c30a9e49a1259 [formerly 9518a76bf3cc2caf82d0c7c21a7c574c326a1e7d] [formerly 9518a76bf3cc2caf82d0c7c21a7c574c326a1e7d [formerly af1a65d4356d15f94c9bc7a91ce1f4d484a80fcf [formerly efb8c71eca3e74dcae10402308de8b6bfe39153e]]]]] Former-commit-id: 4828ba46103d0a7c8e63ee8eb585ff2bf9f5884c Former-commit-id: 6e4b91c1f6f0fb38689a61a7949e1dd15579270d Former-commit-id: aae30e98a077fe2f2d117fddd1cf37c4aafadbd3 [formerly 18be65e9ba9d8a8d66a8fdc12b38e669a2a4c42b] Former-commit-id: ff755de34fb6e691b9dbbf4ce3eca9be4574da24 Former-commit-id: 9d6328bb28adeb12574a46ce9f1762ebd06c9ddd Former-commit-id: 825f14bed9c794c4d92b34b620ee5a30b910f246 Former-commit-id: 1598f53f9c914a477a9dc2d262b038449f43ecd4 Former-commit-id: ec19d1d3a4ef2346434ddbf30aaeea3c87d32601
This commit is contained in:
@@ -10,8 +10,8 @@
|
||||
<!-- 顶栏 -->
|
||||
<el-header class="d2-theme-header">
|
||||
<div class="logo-group" :style="{width: collapse ? asideWidthCollapse : asideWidth}">
|
||||
<img v-if="collapse" :src="`${$assetsPublicPath}static/image/theme/${themeActive.value}/logo/icon-only.png`">
|
||||
<img v-else :src="`${$assetsPublicPath}static/image/theme/${themeActive.value}/logo/all.png`">
|
||||
<img v-if="collapse" :src="`${$assetsPublicPath}static/image/theme/${themeActiveSetting.value}/logo/icon-only.png`">
|
||||
<img v-else :src="`${$assetsPublicPath}static/image/theme/${themeActiveSetting.value}/logo/all.png`">
|
||||
</div>
|
||||
<div class="toggle-aside-btn" @click="collapse = !collapse">
|
||||
<d2-icon name="bars"/>
|
||||
@@ -54,7 +54,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState, mapMutations } from 'vuex'
|
||||
import { mapState, mapGetters, mapMutations } from 'vuex'
|
||||
export default {
|
||||
name: 'd2-layout-main',
|
||||
components: {
|
||||
@@ -77,13 +77,15 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
themeActive: state => state.d2admin.themeActive,
|
||||
isGrayMode: state => state.d2admin.isGrayMode
|
||||
}),
|
||||
...mapGetters([
|
||||
'themeActiveSetting'
|
||||
]),
|
||||
styleLayoutMainGroup () {
|
||||
return {
|
||||
...this.themeActive.backgroundImage ? {
|
||||
backgroundImage: `url('${this.$assetsPublicPath}${this.themeActive.backgroundImage}')`
|
||||
...this.themeActiveSetting.backgroundImage ? {
|
||||
backgroundImage: `url('${this.$assetsPublicPath}${this.themeActiveSetting.backgroundImage}')`
|
||||
} : {}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-table :data="themeList" v-bind="table">
|
||||
<el-table-column prop="name" align="center" width="160"/>
|
||||
<el-table-column prop="title" align="center" width="160"/>
|
||||
<el-table-column label="预览" width="120">
|
||||
<div
|
||||
slot-scope="scope"
|
||||
@@ -10,15 +10,15 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="address" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="themeActive.value === scope.row.value" type="success" icon="el-icon-check" round>已激活</el-button>
|
||||
<el-button v-else round @click="handleSelectTheme(scope.row.value)">使用</el-button>
|
||||
<el-button v-if="themeActiveSetting.name === scope.row.name" type="success" icon="el-icon-check" round>已激活</el-button>
|
||||
<el-button v-else round @click="handleSelectTheme(scope.row.name)">使用</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState, mapMutations } from 'vuex'
|
||||
import { mapState, mapGetters, mapMutations } from 'vuex'
|
||||
export default {
|
||||
name: 'd2-theme-list',
|
||||
data () {
|
||||
@@ -31,16 +31,18 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
themeList: state => state.d2admin.themeList,
|
||||
themeActive: state => state.d2admin.themeActive
|
||||
})
|
||||
themeList: state => state.d2admin.themeList
|
||||
}),
|
||||
...mapGetters([
|
||||
'themeActiveSetting'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
...mapMutations([
|
||||
'd2adminThemeSet'
|
||||
]),
|
||||
handleSelectTheme (value) {
|
||||
this.d2adminThemeSet(value)
|
||||
handleSelectTheme (name) {
|
||||
this.d2adminThemeSet(name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user