移动位置
Former-commit-id: cf8d489b49cb34f9a52925fbb7513782983da761 [formerly faf6b83cfe94510c01bc8ea1d842c5956e3e0380] [formerly cf8d489b49cb34f9a52925fbb7513782983da761 [formerly faf6b83cfe94510c01bc8ea1d842c5956e3e0380] [formerly cf8d489b49cb34f9a52925fbb7513782983da761 [formerly faf6b83cfe94510c01bc8ea1d842c5956e3e0380] [formerly faf6b83cfe94510c01bc8ea1d842c5956e3e0380 [formerly 048d88450a3d1bdff8849f1e3a38220520a02126 [formerly 70fdb00c0efb9594eae4f140e2214db45738ce51]]]]] Former-commit-id: b7c324b407817c1e3f545eedd82ee4754caa13de Former-commit-id: 494ceafcab6bfad526bade28677259d258fcf5e9 Former-commit-id: d5c8b0a4ce0cb27f3f67f9d703d1d124af37fc97 [formerly fe98276c2e09f1bb76b86016fb2cafcd42e46174] Former-commit-id: 2ee7efdd31063ee721373265909cfad2da36ab86 Former-commit-id: 7befeb4e33a6295922ba299c8ee4f9edf8f91a2b Former-commit-id: ff277e09a7eb1b8c0b2858c5c1206925875c99e3 Former-commit-id: b197baed996eaa57bd961513443bbde3828413ad Former-commit-id: a1dd52121b4d6899c8b2c37ef7dac9a723e073f4
This commit is contained in:
24
src/pages/demo/playground/store/fullscreen/index.vue
Normal file
24
src/pages/demo/playground/store/fullscreen/index.vue
Normal file
@@ -0,0 +1,24 @@
|
||||
<template>
|
||||
<d2-container type="card" class="page-demo-playground-fullscreen">
|
||||
<template slot="header">全屏</template>
|
||||
<el-button type="primary" @click="d2adminFullScreenToggle">
|
||||
d2adminFullScreenToggle 切换全屏
|
||||
</el-button>
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState, mapMutations } from 'vuex'
|
||||
export default {
|
||||
computed: {
|
||||
...mapState({
|
||||
isFullScreen: state => state.d2admin.isFullScreen
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
...mapMutations([
|
||||
'd2adminFullScreenToggle'
|
||||
])
|
||||
}
|
||||
}
|
||||
</script>
|
||||
72
src/pages/demo/playground/store/theme/index.vue
Normal file
72
src/pages/demo/playground/store/theme/index.vue
Normal file
@@ -0,0 +1,72 @@
|
||||
<template>
|
||||
<d2-container type="card" class="page">
|
||||
<template slot="header">主题</template>
|
||||
<el-table :data="themeList" v-bind="table">
|
||||
<el-table-column prop="name" align="center" width="260"/>
|
||||
<el-table-column label="预览" width="120">
|
||||
<div
|
||||
slot-scope="scope"
|
||||
class="theme-preview"
|
||||
:style="{'backgroundImage': `url(${$baseUrl}${scope.row.preview})`}">
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column prop="address" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="themeActiveName === 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>
|
||||
<div>
|
||||
<p>尝试激活一个不存在的主题(主题不存在 <d2-icon name="arrow-right"/> 默认主题)</p>
|
||||
<el-button type="danger" @click="handleSelectTheme('err-theme')">
|
||||
<d2-icon name="hand-o-right" class="d2-mr-10"/>
|
||||
尝试激活主题 'err-theme'
|
||||
</el-button>
|
||||
</div>
|
||||
<template slot="footer">
|
||||
<el-button type="primary" size="small">当前激活主题 {{themeActiveName}}</el-button>
|
||||
</template>
|
||||
</d2-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState, mapMutations } from 'vuex'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
table: {
|
||||
showHeader: false,
|
||||
border: true
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
themeList: state => state.d2admin.themeList,
|
||||
themeActiveName: state => state.d2admin.themeActiveName
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
...mapMutations([
|
||||
'd2adminThemeSet'
|
||||
]),
|
||||
handleSelectTheme (name) {
|
||||
this.d2adminThemeSet(name)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '~@/assets/style/public.scss';
|
||||
.page {
|
||||
.theme-preview {
|
||||
height: 50px;
|
||||
width: 100px;
|
||||
border-radius: 4px;
|
||||
background-size: cover;
|
||||
border: 1px solid $color-border-1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user