Procházet zdrojové kódy

clean: css/sass merge & cleanup

furffico před 1 rokem
rodič
revize
c6f9c7085b

+ 23 - 0
src/assets/scss/custom.scss

@@ -0,0 +1,23 @@
+.icon-button .el-button {
+  padding: 6px 10px;
+  font-size: medium;
+  border-radius: 10px;
+}
+
+.site-navbar__brand {
+  padding: 0 20px;
+}
+
+.site-sidebar--fold {
+  .site-navbar__brand {
+    padding: 0;
+  }
+}
+
+
+.icon-svg {
+  width: 1em;
+  height: 1em;
+  fill: currentColor;
+  overflow: hidden;
+}

+ 1 - 0
src/assets/scss/index.scss

@@ -1,3 +1,4 @@
 @import "normalize";       // api: https://github.com/necolas/normalize.css/
 @import "variables";       // 站点变量
 @import "base";
+@import "custom.scss";

+ 29 - 42
src/components/icon-svg/index.vue

@@ -1,51 +1,38 @@
 <template>
-  <svg
-    :class="getClassName"
-    :width="width"
-    :height="height"
-    aria-hidden="true">
+  <svg :class="getClassName" :width="width" :height="height" aria-hidden="true">
     <use :xlink:href="getName"></use>
   </svg>
 </template>
 
 <script>
-  export default {
-    name: 'icon-svg',
-    props: {
-      name: {
-        type: String,
-        required: true
-      },
-      className: {
-        type: String
-      },
-      width: {
-        type: String
-      },
-      height: {
-        type: String
-      }
+export default {
+  name: 'icon-svg',
+  props: {
+    name: {
+      type: String,
+      required: true
     },
-    computed: {
-      getName () {
-        return `#icon-${this.name}`
-      },
-      getClassName () {
-        return [
-          'icon-svg',
-          `icon-svg__${this.name}`,
-          this.className && /\S/.test(this.className) ? `${this.className}` : ''
-        ]
-      }
+    className: {
+      type: String
+    },
+    width: {
+      type: String
+    },
+    height: {
+      type: String
+    }
+  },
+  computed: {
+    getName() {
+      return `#icon-${this.name}`
+    },
+    getClassName() {
+      return [
+        'icon-svg',
+        `icon-svg__${this.name}`,
+        this.className && /\S/.test(this.className) ? `${this.className}` : ''
+      ]
     }
   }
-</script>
-
-<style>
-  .icon-svg {
-    width: 1em;
-    height: 1em;
-    fill: currentColor;
-    overflow: hidden;
-  }
-</style>
+}
+</script>

+ 1 - 7
src/views/common/home.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="mod-home">
+  <div>
     首页
   </div>
 </template>
@@ -8,9 +8,3 @@
 export default {}
 </script>
 
-<style>
-.mod-home {
-  line-height: 1.5;
-}
-</style>
-

+ 1 - 13
src/views/main-navbar.vue

@@ -90,16 +90,4 @@ export default {
     }
   }
 }
-</script>
-
-<style lang="scss">
-.site-navbar__brand {
-  padding: 0 20px;
-}
-
-.site-sidebar--fold {
-  .site-navbar__brand {
-    padding: 0;
-  }
-}
-</style>
+</script>

+ 1 - 0
src/views/modules/liveroom/liveroomEdit.vue

@@ -51,6 +51,7 @@ export default Vue.extend({
 
   computed: {
     option() {
+      //@ts-ignore
       return formOption(this.new)
     }
   },

+ 5 - 12
src/views/modules/liveroom/liveroomList.vue

@@ -7,12 +7,13 @@
       </template>
 
       <template slot-scope="scope" slot="showInList">
-        <el-switch :value="scope.row.showInList" @change="(e) => { updateShowStatus(scope.row.id, e) }" />
+        <el-switch :value="scope.row.showInList" @change="(e) => updateShowStatus(scope.row.id, e)" />
       </template>
 
       <template slot-scope="{row}" slot="startup">
         <div class="icon-button">
-          <el-button type="primary" size="small" @click="startLiveRoom(row.id)"><icon-svg name="play" /></el-button>
+          <el-button type="primary" size="small" @click="startLiveRoom(row.id)" disabled><icon-svg
+              name="play" /></el-button>
         </div>
       </template>
 
@@ -89,7 +90,7 @@ export default Vue.extend({
       this.$confirm(`确定删除直播间 “${room.title}”?`, '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
-        type: 'warning'
+        type: 'warning',
       }).then(() => {
         console.log(id)
         httpx.post("/rooms/deleteRoom", { id }
@@ -105,12 +106,4 @@ export default Vue.extend({
     }
   }
 })
-</script>
-
-<style>
-.icon-button .el-button {
-  padding: 6px 10px;
-  font-size: medium;
-  border-radius: 10px;
-}
-</style>
+</script>

+ 1 - 3
src/views/modules/order/order-BaseTable.vue

@@ -193,6 +193,4 @@ export default {
     }
   },
 };
-</script>
-
-<style lang="scss" scoped></style>
+</script>

+ 0 - 1
src/views/modules/order/order.vue

@@ -51,4 +51,3 @@ export default {
   }
 }
 </script>
-<style lang="scss"></style>

+ 3 - 9
src/views/modules/order/showDialog.vue

@@ -1,7 +1,8 @@
 <template>
     <el-dialog title="订单详情" :visible.sync="dialogVisible" width="50%" top="7vh" v-loading="loading"
         :destroy-on-close="true">
-        <el-form :model="form" :label-position="formLabelWidth" label-width="120px" size="mini" class="form-wrap">
+        <el-form :model="form" :label-position="formLabelWidth" label-width="120px" size="mini"
+            style="max-height: 66vh; overflow-y: scroll;">
             <el-form-item label="下单时间">
                 <el-input v-model="form.paidAt" disabled></el-input>
             </el-form-item>
@@ -100,11 +101,4 @@ export default {
         }
     }
 }
-</script>
-
-<style>
-.form-wrap {
-    max-height: 66vh;
-    overflow-y: scroll;
-}
-</style>
+</script>

+ 4 - 3
src/views/modules/prod/category.vue

@@ -1,6 +1,7 @@
 <template>
   <avue-crud ref="crud" :page="page" :data="dataList" :table-loading="dataListLoading" :option="tableOption"
-    @on-load="getDataList" @row-update="updateItem" @row-del="deleteItem" @row-save="addItem" @search-change="searchChange">
+    @on-load="getDataList" @row-update="updateItem" @row-del="deleteItem" @row-save="addItem"
+    @search-change="searchChange">
   </avue-crud>
 </template>
 
@@ -84,7 +85,7 @@ export default Vue.extend({
       })
     },
 
-    searchChange (params: ICategory, done?: Function) {
+    searchChange(params: ICategory, done?: Function) {
       this.getDataList(this.page, params, done)
     },
 
@@ -106,4 +107,4 @@ export default Vue.extend({
     }
   }
 })
-</script>@/avue/crud/category
+</script>