Bläddra i källkod

删除MyColorPicker组件的defaultColor

萤火科技 1 år sedan
förälder
incheckning
58fdde549f
2 ändrade filer med 39 tillägg och 57 borttagningar
  1. 35 35
      src/views/page/modules/editor/Editor.vue
  2. 4 22
      src/views/store/style/Theme.vue

+ 35 - 35
src/views/page/modules/editor/Editor.vue

@@ -51,7 +51,7 @@
                   class="rest-color"
                   @click="onEditorResetColor(data.page.style, 'titleBackgroundColor', '#fff')"
                 >重置</span>
-                <colorPicker v-model="data.page.style.titleBackgroundColor" defaultColor="#fff" />
+                <colorPicker v-model="data.page.style.titleBackgroundColor" />
               </div>
             </div>
           </div>
@@ -108,7 +108,7 @@
                     class="rest-color"
                     @click="onEditorResetColor(curItem.style, 'searchBg', '#fff')"
                   >重置</span>
-                  <colorPicker v-model="curItem.style.searchBg" defaultColor="#fff" />
+                  <colorPicker v-model="curItem.style.searchBg" />
                 </div>
               </div>
               <div class="block-item">
@@ -118,7 +118,7 @@
                     class="rest-color"
                     @click="onEditorResetColor(curItem.style, 'searchFontColor', '#999999')"
                   >重置</span>
-                  <colorPicker v-model="curItem.style.searchFontColor" defaultColor="#999999" />
+                  <colorPicker v-model="curItem.style.searchFontColor" />
                 </div>
               </div>
             </div>
@@ -131,7 +131,7 @@
                     class="rest-color"
                     @click="onEditorResetColor(curItem.style, 'background', '#f1f1f2')"
                   >重置</span>
-                  <colorPicker v-model="curItem.style.background" defaultColor="#f1f1f2" />
+                  <colorPicker v-model="curItem.style.background" />
                 </div>
               </div>
               <div class="block-item">
@@ -180,7 +180,7 @@
                 class="rest-color"
                 @click="onEditorResetColor(curItem.style, 'background', '#fff')"
               >重置</span>
-              <colorPicker v-model="curItem.style.background" defaultColor="#fff" />
+              <colorPicker v-model="curItem.style.background" />
             </div>
           </div>
         </div>
@@ -205,7 +205,7 @@
                 class="rest-color"
                 @click="onEditorResetColor(curItem.style, 'lineColor', '#000')"
               >重置</span>
-              <colorPicker v-model="curItem.style.lineColor" defaultColor="#000" />
+              <colorPicker v-model="curItem.style.lineColor" />
             </div>
           </div>
           <div class="block-item">
@@ -235,7 +235,7 @@
                 class="rest-color"
                 @click="onEditorResetColor(curItem.style, 'background', '#fff')"
               >重置</span>
-              <colorPicker v-model="curItem.style.background" defaultColor="#fff" />
+              <colorPicker v-model="curItem.style.background" />
             </div>
           </div>
         </div>
@@ -282,7 +282,7 @@
                     class="rest-color"
                     @click="onEditorResetColor(curItem.style, 'background', '#fff')"
                   >重置</span>
-                  <colorPicker v-model="curItem.style.background" defaultColor="#fff" />
+                  <colorPicker v-model="curItem.style.background" />
                 </div>
               </div>
             </div>
@@ -328,7 +328,7 @@
                     class="rest-color"
                     @click="onEditorResetColor(curItem.style, 'textColor', '#000')"
                   >重置</span>
-                  <colorPicker v-model="curItem.style.textColor" defaultColor="#000" />
+                  <colorPicker v-model="curItem.style.textColor" />
                 </div>
               </div>
               <div class="block-item">
@@ -338,7 +338,7 @@
                     class="rest-color"
                     @click="onEditorResetColor(curItem.style, 'background', '#fff')"
                   >重置</span>
-                  <colorPicker v-model="curItem.style.background" defaultColor="#fff" />
+                  <colorPicker v-model="curItem.style.background" />
                 </div>
               </div>
             </div>
@@ -520,7 +520,7 @@
                     class="rest-color"
                     @click="onEditorResetColor(curItem.style, 'background', '#ffffff')"
                   >重置</span>
-                  <colorPicker v-model="curItem.style.background" defaultColor="#ffffff" />
+                  <colorPicker v-model="curItem.style.background" />
                 </div>
               </div>
             </div>
@@ -597,7 +597,7 @@
                     class="rest-color"
                     @click="onEditorResetColor(curItem.style, 'background', '#fff')"
                   >重置</span>
-                  <colorPicker v-model="curItem.style.background" defaultColor="#fff" />
+                  <colorPicker v-model="curItem.style.background" />
                 </div>
               </div>
             </div>
@@ -697,7 +697,7 @@
                     class="rest-color"
                     @click="onEditorResetColor(curItem.style, 'background', '#fff')"
                   >重置</span>
-                  <colorPicker v-model="curItem.style.background" defaultColor="#fff" />
+                  <colorPicker v-model="curItem.style.background" />
                 </div>
               </div>
             </div>
@@ -718,7 +718,7 @@
                     class="rest-color"
                     @click="onEditorResetColor(curItem.style, 'btnColor', '#fff')"
                   >重置</span>
-                  <colorPicker v-model="curItem.style.btnColor" defaultColor="#fff" />
+                  <colorPicker v-model="curItem.style.btnColor" />
                 </div>
               </div>
               <div class="block-item">
@@ -831,7 +831,7 @@
                     class="rest-color"
                     @click="onEditorResetColor(curItem.style, 'priceColor', '#ff1051')"
                   >重置</span>
-                  <colorPicker v-model="curItem.style.priceColor" defaultColor="#ff1051" />
+                  <colorPicker v-model="curItem.style.priceColor" />
                 </div>
               </div>
               <div class="block-item">
@@ -841,7 +841,7 @@
                     class="rest-color"
                     @click="onEditorResetColor(curItem.style, 'sellingColor', '#e3771f')"
                   >重置</span>
-                  <colorPicker v-model="curItem.style.sellingColor" defaultColor="#e3771f" />
+                  <colorPicker v-model="curItem.style.sellingColor" />
                 </div>
               </div>
               <div class="block-item">
@@ -867,7 +867,7 @@
                       class="rest-color"
                       @click="onEditorResetColor(curItem.style, 'btnCartColor', '#27c29a')"
                     >重置</span>
-                    <colorPicker v-model="curItem.style.btnCartColor" defaultColor="#27c29a" />
+                    <colorPicker v-model="curItem.style.btnCartColor" />
                   </div>
                 </div>
               </template>
@@ -931,7 +931,7 @@
                     class="rest-color"
                     @click="onEditorResetColor(curItem.style, 'background', '#ffffff')"
                   >重置</span>
-                  <colorPicker v-model="curItem.style.background" defaultColor="#ffffff" />
+                  <colorPicker v-model="curItem.style.background" />
                 </div>
               </div>
             </div>
@@ -1002,7 +1002,7 @@
                     class="rest-color"
                     @click="onEditorResetColor(curItem.style, 'textColor', '#000')"
                   >重置</span>
-                  <colorPicker v-model="curItem.style.textColor" defaultColor="#000" />
+                  <colorPicker v-model="curItem.style.textColor" />
                 </div>
               </div>
             </div>
@@ -1025,7 +1025,7 @@
                     class="rest-color"
                     @click="onEditorResetColor(curItem.style, 'background', '#fff')"
                   >重置</span>
-                  <colorPicker v-model="curItem.style.background" defaultColor="#fff" />
+                  <colorPicker v-model="curItem.style.background" />
                 </div>
               </div>
             </div>
@@ -1110,7 +1110,7 @@
                     class="rest-color"
                     @click="onEditorResetColor(curItem.style, 'background', '#fff')"
                   >重置</span>
-                  <colorPicker v-model="curItem.style.background" defaultColor="#fff" />
+                  <colorPicker v-model="curItem.style.background" />
                 </div>
               </div>
             </div>
@@ -1178,7 +1178,7 @@
                     class="rest-color"
                     @click="onEditorResetColor(curItem.style, 'background', '#fff')"
                   >重置</span>
-                  <colorPicker v-model="curItem.style.background" defaultColor="#fff" />
+                  <colorPicker v-model="curItem.style.background" />
                 </div>
               </div>
             </div>
@@ -1268,7 +1268,7 @@
                     class="rest-color"
                     @click="onEditorResetColor(curItem.style, 'background', '#fff')"
                   >重置</span>
-                  <MyColorPicker v-model="curItem.style.background" defaultColor="#fff" />
+                  <MyColorPicker v-model="curItem.style.background" />
                 </div>
               </div>
             </div>
@@ -1291,7 +1291,7 @@
                     class="rest-color"
                     @click="onEditorResetColor(curItem.style, 'couponBgColor', '#ffa708')"
                   >重置</span>
-                  <MyColorPicker v-model="curItem.style.couponBgColor" defaultColor="#ffa708" />
+                  <MyColorPicker v-model="curItem.style.couponBgColor" />
                 </div>
               </div>
               <div class="block-item">
@@ -1301,7 +1301,7 @@
                     class="rest-color"
                     @click="onEditorResetColor(curItem.style, 'couponTextColor', '#ffffff')"
                   >重置</span>
-                  <MyColorPicker v-model="curItem.style.couponTextColor" defaultColor="#ffffff" />
+                  <MyColorPicker v-model="curItem.style.couponTextColor" />
                 </div>
               </div>
               <div class="block-item">
@@ -1311,7 +1311,7 @@
                     class="rest-color"
                     @click="onEditorResetColor(curItem.style, 'receiveBgColor', '#717070')"
                   >重置</span>
-                  <MyColorPicker v-model="curItem.style.receiveBgColor" defaultColor="#717070" />
+                  <MyColorPicker v-model="curItem.style.receiveBgColor" />
                 </div>
               </div>
               <div class="block-item">
@@ -1321,7 +1321,7 @@
                     class="rest-color"
                     @click="onEditorResetColor(curItem.style, 'receiveTextColor', '#ffffff')"
                   >重置</span>
-                  <MyColorPicker v-model="curItem.style.receiveTextColor" defaultColor="#ffffff" />
+                  <MyColorPicker v-model="curItem.style.receiveTextColor" />
                 </div>
               </div>
             </div>
@@ -1375,7 +1375,7 @@
                     class="rest-color"
                     @click="onEditorResetColor(curItem.style, 'textColor', '#000')"
                   >重置</span>
-                  <colorPicker v-model="curItem.style.textColor" defaultColor="#000" />
+                  <colorPicker v-model="curItem.style.textColor" />
                 </div>
               </div>
               <div class="block-item">
@@ -1385,7 +1385,7 @@
                     class="rest-color"
                     @click="onEditorResetColor(curItem.style, 'background', '#fff')"
                   >重置</span>
-                  <colorPicker v-model="curItem.style.background" defaultColor="#fff" />
+                  <colorPicker v-model="curItem.style.background" />
                 </div>
               </div>
             </div>
@@ -1451,7 +1451,7 @@
                     class="rest-color"
                     @click="onEditorResetColor(curItem.style, 'textColor', '#696969')"
                   >重置</span>
-                  <colorPicker v-model="curItem.style.textColor" defaultColor="#696969" />
+                  <colorPicker v-model="curItem.style.textColor" />
                 </div>
               </div>
             </div>
@@ -1484,7 +1484,7 @@
                     class="rest-color"
                     @click="onEditorResetColor(curItem.style, 'background', '#fff')"
                   >重置</span>
-                  <colorPicker v-model="curItem.style.background" defaultColor="#fff" />
+                  <colorPicker v-model="curItem.style.background" />
                 </div>
               </div>
             </div>
@@ -1587,7 +1587,7 @@
                     class="rest-color"
                     @click="onEditorResetColor(curItem.style, 'titleTextColor', '#323233')"
                   >重置</span>
-                  <colorPicker v-model="curItem.style.titleTextColor" defaultColor="#323233" />
+                  <colorPicker v-model="curItem.style.titleTextColor" />
                 </div>
               </div>
               <div class="block-item">
@@ -1597,7 +1597,7 @@
                     class="rest-color"
                     @click="onEditorResetColor(curItem.style, 'descTextColor', '#969799')"
                   >重置</span>
-                  <colorPicker v-model="curItem.style.descTextColor" defaultColor="#969799" />
+                  <colorPicker v-model="curItem.style.descTextColor" />
                 </div>
               </div>
               <div class="block-item">
@@ -1607,7 +1607,7 @@
                     class="rest-color"
                     @click="onEditorResetColor(curItem.style, 'moreTextColor', '#969799')"
                   >重置</span>
-                  <colorPicker v-model="curItem.style.moreTextColor" defaultColor="#969799" />
+                  <colorPicker v-model="curItem.style.moreTextColor" />
                 </div>
               </div>
             </div>
@@ -1630,7 +1630,7 @@
                     class="rest-color"
                     @click="onEditorResetColor(curItem.style, 'background', '#fff')"
                   >重置</span>
-                  <colorPicker v-model="curItem.style.background" defaultColor="#fff" />
+                  <colorPicker v-model="curItem.style.background" />
                 </div>
               </div>
             </div>

+ 4 - 22
src/views/store/style/Theme.vue

@@ -36,50 +36,32 @@
               </a-form-model-item>
               <a-form-model-item label="主背景">
                 <div class="color-picker-row">
-                  <MyColorPicker
-                    v-model="record.data.mainBg"
-                    defaultColor="#fff"
-                    horizontal="left"
-                  />
+                  <MyColorPicker v-model="record.data.mainBg" horizontal="left" />
                   <MyColorPicker
                     v-if="record.data.gradualChange"
                     v-model="record.data.mainBg2"
-                    defaultColor="#fff"
                     horizontal="left"
                   />
                 </div>
               </a-form-model-item>
               <a-form-model-item label="主文字">
                 <div class="color-picker-row">
-                  <MyColorPicker
-                    v-model="record.data.mainText"
-                    defaultColor="#fff"
-                    horizontal="left"
-                  />
+                  <MyColorPicker v-model="record.data.mainText" horizontal="left" />
                 </div>
               </a-form-model-item>
               <a-form-model-item label="副背景">
                 <div class="color-picker-row">
-                  <MyColorPicker
-                    v-model="record.data.viceBg"
-                    defaultColor="#fff"
-                    horizontal="left"
-                  />
+                  <MyColorPicker v-model="record.data.viceBg" horizontal="left" />
                   <MyColorPicker
                     v-if="record.data.gradualChange"
                     v-model="record.data.viceBg2"
-                    defaultColor="#fff"
                     horizontal="left"
                   />
                 </div>
               </a-form-model-item>
               <a-form-model-item label="副文字">
                 <div class="color-picker-row">
-                  <MyColorPicker
-                    v-model="record.data.viceText"
-                    defaultColor="#fff"
-                    horizontal="left"
-                  />
+                  <MyColorPicker v-model="record.data.viceText" horizontal="left" />
                 </div>
               </a-form-model-item>
             </div>