ソースを参照

修改添加新字段'

zhangwf 5 年 前
コミット
45f8d035bc

+ 39 - 2
src/components/EditPanel.vue

@@ -162,7 +162,44 @@
             </div>
           </div>
         </div>
+        <div v-show="panelState == 15" style="text-align: center;border-bottom: #E2E4EE solid 1px;padding-top: 12px;padding-bottom: 12px;">
+          <div style="font-size:12px;
+            font-family:MicrosoftYaHei;
+            color:rgba(51,51,51,1);
+            margin-left: 20px; width: 100%; text-align: left; margin-bottom: 10px;
+            line-height:16px;letter-spacing: 0; word-break:keep-all;">
+            文字颜色
+          </div>
+          <div style="width:100%; display: flex;flex-direction: row">
+            <div
+              style="display: inline-flex; overflow: hidden;cursor: pointer;width:50%;justify-content: left; margin-left: 20px;">
+              <div style="font-size:12px;
+              font-family:MicrosoftYaHei;
+              color:rgba(51,51,51,1);
+              display: flex;
+              align-items: center;
+              letter-spacing: 0; word-break:keep-all;">未选中</div>
+              <div style="font-size: 14px;color: #999999;letter-spacing: 0; word-break:keep-all; margin-left: 5px;">
+                <el-color-picker v-model="element.color" show-alpha style="width: 100%;" size='small'></el-color-picker>
+              </div>
+            </div>
+
+            <div
+              style="display: inline-flex; overflow: hidden;cursor: pointer;width:50%;justify-content: left; margin-left: 20px;">
+              <div style="font-size:12px;
+              font-family:MicrosoftYaHei;
+              color:rgba(51,51,51,1);
+              align-items: center;
+              display: flex;
+              letter-spacing: 0; word-break:keep-all;">选中</div>
+              <div style="font-size: 14px;color: #999999;letter-spacing: 0; word-break:keep-all;margin-left: 5px;">
+                <el-color-picker v-model="element.selectedColor" show-alpha style="width: 100%" size='small'>
+                </el-color-picker>
+              </div>
+            </div>
 
+          </div>
+        </div>
         <div style="vertical-align: middle;border-bottom: #E2E4EE solid 1px;padding-bottom: 12px; padding-top: 11px;">
           <div style="display: inline-flex; width:24%;text-align: left; margin-bottom: 10px;">
             <div style="font-size:12px;
@@ -232,7 +269,7 @@
 
         </div>
 
-        <div style="text-align: center;border-bottom: #E2E4EE solid 1px;padding-top: 12px;padding-bottom: 12px;">
+        <div v-show="panelState != 15" style="text-align: center;border-bottom: #E2E4EE solid 1px;padding-top: 12px;padding-bottom: 12px;">
           <div style="width:100%; display: flex;flex-direction: row">
             <div
               style="display: inline-flex; overflow: hidden;cursor: pointer;width:50%;justify-content: left; margin-left: 20px;">
@@ -1220,4 +1257,4 @@
     background: url("../../static/font/yzd_heavy.png") no-repeat center center/50% 50%;
     -moz-background-origin: content-box;
   }
-</style>
+</style>

+ 3 - 3
src/components/Element/ButtonElement.vue

@@ -62,7 +62,7 @@
       type: '',
       isOverView:Boolean
     },
-    
+
     data() {
       return {
         left: 0,
@@ -306,7 +306,7 @@
           animationDelay: this.element['delay'] + 's'
         }
       },
-     
+
       styleBasic () {
         return {
           width: this.element['width'] + 'px',
@@ -351,4 +351,4 @@
     user-select: none;
     /*-webkit-user-drag: none;*/
   }
-</style>
+</style>

+ 1 - 1
src/components/Element/FontElement.vue

@@ -105,7 +105,7 @@
           animationDelay: this.element['delay'] + 's'
         }
       },
-     
+
       styleBasic () {
         return {
           width: this.element['width'] + 'px',

+ 2 - 0
src/model/Element.js

@@ -29,6 +29,7 @@ export default class Element {
     this.fontFamily = ele.fontFamily || '默认字体'
     this.fontWeight = ele.fontWeight || 'normal'
     this.color = ele.color || '#000000'
+    this.selectedColor  = ele.selectedColor || '#000000'
     this.zindex = ele.zindex || 1
     this.backgroundColor = ele.backgroundColor || ''
     this.imgSrcMore = ele.imgSrcMore || Array
@@ -60,5 +61,6 @@ export default class Element {
     this.backgroundUnselectedImg = ele.backgroundUnselectedImg || ''
     this.questionId = ele.questionId || 0
     this.optionId = ele.optionId || 0
+    this.href = ele.href ||''
   }
 }