Rap 原分销系统代码Web
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88831dd3aabf14e746fe2b9fb596191c6b0b0b88.svn-base 2.2KB

5 달 전
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <template>
  2. <div class="drawer-container">
  3. <div>
  4. <h3 class="drawer-title">系统布局设置</h3>
  5. <div class="drawer-item">
  6. <span>主题颜色</span>
  7. <theme-picker style="float: right;height: 26px;margin: -3px 8px 0 0;" @change="themeChange" />
  8. </div>
  9. <div class="drawer-item">
  10. <span>显示标签</span>
  11. <el-switch v-model="tagsView" class="drawer-switch" />
  12. </div>
  13. <div class="drawer-item">
  14. <span>固定头部</span>
  15. <el-switch v-model="fixedHeader" class="drawer-switch" />
  16. </div>
  17. <div class="drawer-item">
  18. <span>显示LOGO</span>
  19. <el-switch v-model="sidebarLogo" class="drawer-switch" />
  20. </div>
  21. </div>
  22. </div>
  23. </template>
  24. <script>
  25. import ThemePicker from '@/components/ThemePicker'
  26. export default {
  27. components: { ThemePicker },
  28. data() {
  29. return {}
  30. },
  31. computed: {
  32. fixedHeader: {
  33. get() {
  34. return this.$store.state.settings.fixedHeader
  35. },
  36. set(val) {
  37. this.$store.dispatch('settings/changeSetting', {
  38. key: 'fixedHeader',
  39. value: val
  40. })
  41. }
  42. },
  43. tagsView: {
  44. get() {
  45. return this.$store.state.settings.tagsView
  46. },
  47. set(val) {
  48. this.$store.dispatch('settings/changeSetting', {
  49. key: 'tagsView',
  50. value: val
  51. })
  52. }
  53. },
  54. sidebarLogo: {
  55. get() {
  56. return this.$store.state.settings.sidebarLogo
  57. },
  58. set(val) {
  59. this.$store.dispatch('settings/changeSetting', {
  60. key: 'sidebarLogo',
  61. value: val
  62. })
  63. }
  64. }
  65. },
  66. methods: {
  67. themeChange(val) {
  68. this.$store.dispatch('settings/changeSetting', {
  69. key: 'theme',
  70. value: val
  71. })
  72. }
  73. }
  74. }
  75. </script>
  76. <style lang="scss" scoped>
  77. .drawer-container {
  78. padding: 24px;
  79. font-size: 14px;
  80. line-height: 1.5;
  81. word-wrap: break-word;
  82. .drawer-title {
  83. margin-bottom: 12px;
  84. color: rgba(0, 0, 0, .85);
  85. font-size: 14px;
  86. line-height: 22px;
  87. }
  88. .drawer-item {
  89. color: rgba(0, 0, 0, .65);
  90. font-size: 14px;
  91. padding: 12px 0;
  92. }
  93. .drawer-switch {
  94. float: right
  95. }
  96. }
  97. </style>