setting.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <!--
  2. * @description: 标题属性设置面板
  3. * @Date: 2022-08-17 16:53:28
  4. * @Author: shiyi
  5. -->
  6. <template>
  7. <div class="bs-setting-wrap">
  8. <el-form
  9. ref="form"
  10. label-width="100px"
  11. label-position="left"
  12. :model="config"
  13. :rules="rules"
  14. class="bs-el-form"
  15. >
  16. <SettingTitle>位置</SettingTitle>
  17. <div class="lc-field-body">
  18. <PosWhSetting :config="config" />
  19. </div>
  20. <SettingTitle v-if="config.border">边框</SettingTitle>
  21. <div class="lc-field-body">
  22. <BorderSetting
  23. v-if="config.border"
  24. label-width="100px"
  25. :config="config.border"
  26. :bigTitle='config.title'
  27. />
  28. </div>
  29. <SettingTitle>基础</SettingTitle>
  30. <div class="lc-field-body">
  31. <el-form-item
  32. label="激活颜色"
  33. label-width="100px"
  34. >
  35. <el-color-picker
  36. v-model="config.customize.activeColor"
  37. popper-class="bs-el-color-picker"
  38. class="bs-el-color-picker"
  39. />
  40. </el-form-item>
  41. <el-form-item
  42. label="非激活颜色"
  43. label-width="100px"
  44. >
  45. <el-color-picker
  46. v-model="config.customize.inactiveColor"
  47. popper-class="bs-el-color-picker"
  48. class="bs-el-color-picker"
  49. />
  50. </el-form-item>
  51. </div>
  52. </el-form>
  53. </div>
  54. </template>
  55. <script>
  56. import SettingTitle from 'data-room-ui/SettingTitle/index.vue'
  57. import PosWhSetting from 'data-room-ui/BigScreenDesign/RightSetting/PosWhSetting.vue'
  58. import BorderSetting from 'data-room-ui/BigScreenDesign/RightSetting/BorderSetting.vue'
  59. export default {
  60. name: 'ThemeSwitcherSetting',
  61. components: {
  62. PosWhSetting,
  63. SettingTitle,
  64. BorderSetting
  65. },
  66. data () {
  67. return {
  68. rules: {
  69. title: [
  70. { required: true, message: '请输入标题', trigger: 'blur' }
  71. ]
  72. }
  73. }
  74. },
  75. computed: {
  76. config: {
  77. get () {
  78. return this.$store.state.bigScreen.activeItemConfig
  79. },
  80. set (val) {
  81. this.$store.state.bigScreen.activeItemConfig = val
  82. }
  83. }
  84. },
  85. watch: {
  86. },
  87. mounted () {},
  88. methods: {
  89. }
  90. }
  91. </script>
  92. <style lang="scss" scoped>
  93. @import "../../assets/style/settingWrap.scss";
  94. .bs-setting-wrap{
  95. padding-top: 16px;
  96. }
  97. .lc-field-body {
  98. padding: 12px 16px;
  99. }
  100. </style>