setting.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  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="bs-setting-wrap">
  18. <el-form-item
  19. label="标题"
  20. label-width="100px"
  21. prop="title"
  22. >
  23. <el-input
  24. v-model="config.title"
  25. placeholder="请输入标题"
  26. clearable
  27. />
  28. </el-form-item>
  29. </div>
  30. <SettingTitle>位置</SettingTitle>
  31. <div class="lc-field-body">
  32. <PosWhSetting :config="config" />
  33. </div>
  34. <SettingTitle v-if="config.border">
  35. 边框
  36. </SettingTitle>
  37. <div class="lc-field-body">
  38. <BorderSetting
  39. v-if="config.border"
  40. label-width="100px"
  41. :config="config.border"
  42. :big-title="config.title"
  43. />
  44. </div>
  45. <SettingTitle>旋转</SettingTitle>
  46. <div class="lc-field-body">
  47. <RotateSetting
  48. :config="config"
  49. />
  50. </div>
  51. <SettingTitle>基础</SettingTitle>
  52. <div class="lc-field-body">
  53. <el-form-item
  54. label="数字大小"
  55. label-width="100px"
  56. >
  57. <el-input
  58. v-model="config.customize.fontSize"
  59. placeholder="请输入数字大小"
  60. clearable
  61. >
  62. <template slot="append">
  63. px
  64. </template>
  65. </el-input>
  66. </el-form-item>
  67. <el-form-item
  68. label="数字权重"
  69. label-width="100px"
  70. >
  71. <el-input-number
  72. v-model="config.customize.fontWeight"
  73. class="bs-el-input-number"
  74. placeholder="请输入数字权重"
  75. />
  76. </el-form-item>
  77. <el-form-item
  78. label="数字类型"
  79. label-width="100px"
  80. >
  81. <el-select
  82. v-model="config.customize.fontFamily"
  83. popper-class="bs-el-select"
  84. class="bs-el-select"
  85. >
  86. <el-option
  87. v-for="item in fontFamilyList"
  88. :key="item.value"
  89. :label="item.label"
  90. :value="item.value"
  91. />
  92. </el-select>
  93. </el-form-item>
  94. <TextGradient
  95. v-model="config.customize.color"
  96. label="数字"
  97. />
  98. </div>
  99. </el-form>
  100. </div>
  101. </template>
  102. <script>
  103. import SettingTitle from 'data-room-ui/SettingTitle/index.vue'
  104. import BorderSetting from 'data-room-ui/BigScreenDesign/RightSetting/BorderSetting.vue'
  105. import TextGradient from 'data-room-ui/BigScreenDesign/RightSetting/TextGradient/index'
  106. import PosWhSetting from 'data-room-ui/BigScreenDesign/RightSetting/PosWhSetting.vue'
  107. import RotateSetting from 'data-room-ui/BigScreenDesign/RightSetting/RotateSetting.vue'
  108. export default {
  109. name: 'TextSetting',
  110. components: {
  111. TextGradient,
  112. PosWhSetting,
  113. SettingTitle,
  114. BorderSetting,
  115. RotateSetting
  116. },
  117. data () {
  118. return {
  119. fontFamilyList: [
  120. {
  121. label: '默认',
  122. value: ''
  123. },
  124. {
  125. label: '时钟加粗倾斜',
  126. value: 'ds-digitalbold_italic'
  127. },
  128. {
  129. label: '时钟加粗正常',
  130. value: 'ds-digitalbold'
  131. },
  132. {
  133. label: '时钟倾斜',
  134. value: 'ds-digitalitalic'
  135. },
  136. {
  137. label: '时钟正常',
  138. value: 'ds-digitalnormal'
  139. }],
  140. rules: {
  141. title: [
  142. { required: true, message: '请输入标题', trigger: 'blur' }
  143. ]
  144. }
  145. }
  146. },
  147. computed: {
  148. config: {
  149. get () {
  150. return this.$store.state.bigScreen.activeItemConfig
  151. },
  152. set (val) {
  153. this.$store.state.bigScreen.activeItemConfig = val
  154. }
  155. }
  156. },
  157. watch: {
  158. },
  159. mounted () {},
  160. methods: {
  161. }
  162. }
  163. </script>
  164. <style lang="scss" scoped>
  165. @import "../../assets/style/settingWrap.scss";
  166. .bs-setting-wrap{
  167. padding-top: 16px;
  168. }
  169. .lc-field-body {
  170. padding: 12px 16px;
  171. }
  172. </style>