setting.vue 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <template>
  2. <div class="bs-setting-wrap">
  3. <el-form
  4. ref="form"
  5. :model="config"
  6. label-width="90px"
  7. label-position="left"
  8. class="setting-body bs-el-form"
  9. >
  10. <el-form
  11. :model="config.customize"
  12. label-position="left"
  13. class="setting-body bs-el-form"
  14. label-width="90px"
  15. >
  16. <SettingTitle>标题</SettingTitle>
  17. <el-form-item
  18. label="装饰名称"
  19. class="lc-field-body"
  20. >
  21. <el-input
  22. v-model="config.title"
  23. clearable
  24. />
  25. </el-form-item>
  26. <SettingTitle>位置</SettingTitle>
  27. <div class="lc-field-body">
  28. <PosWhSetting :config="config" />
  29. </div>
  30. <SettingTitle>基础</SettingTitle>
  31. <div class="lc-field-body">
  32. <el-form-item label="装饰主颜色">
  33. <ColorPicker
  34. v-model="config.customize.decorationColor1"
  35. :predefine="predefineThemeColors"
  36. />
  37. </el-form-item>
  38. <el-form-item label="装饰副颜色">
  39. <ColorPicker
  40. v-model="config.customize.decorationColor2"
  41. :predefine="predefineThemeColors"
  42. />
  43. </el-form-item>
  44. </div>
  45. </el-form>
  46. </el-form>
  47. </div>
  48. </template>
  49. <script>
  50. import ColorPicker from 'packages/ColorPicker/index.vue'
  51. import PosWhSetting from 'packages/BigScreenDesign/RightSetting/PosWhSetting.vue'
  52. import SettingTitle from 'packages/SettingTitle/index.vue'
  53. export default {
  54. name: 'BarSetting',
  55. components: {
  56. ColorPicker,
  57. PosWhSetting,
  58. SettingTitle
  59. },
  60. data () {
  61. return {
  62. // 预设主题色
  63. predefineThemeColors: [
  64. '#007aff',
  65. '#1aa97b',
  66. '#ff4d53',
  67. '#1890FF',
  68. '#DF0E1B',
  69. '#0086CC',
  70. '#2B74CF',
  71. '#00BC9D',
  72. '#ED7D32'
  73. ]
  74. }
  75. },
  76. computed: {
  77. config: {
  78. get () {
  79. return this.$store.state.bigScreen.activeItemConfig
  80. },
  81. set (val) {
  82. this.$store.state.bigScreen.activeItemConfig = val
  83. }
  84. }
  85. },
  86. watch: {},
  87. mounted () {
  88. },
  89. methods: {
  90. }
  91. }
  92. </script>
  93. <style lang="scss" scoped>
  94. .lc-field-body {
  95. padding: 12px 16px;
  96. }
  97. </style>