Quellcode durchsuchen

样式优化

gzb
wangzhonglu vor 1 Jahr
Ursprung
Commit
89b9225606
5 geänderte Dateien mit 72 neuen und 11 gelöschten Zeilen
  1. 4
    0
      src/App.vue
  2. BIN
      src/assets/img/login.jpg
  3. 8
    4
      src/views/layout.vue
  4. 21
    5
      src/views/login/index.vue
  5. 39
    2
      src/views/news/index.vue

+ 4
- 0
src/App.vue Datei anzeigen

@@ -158,6 +158,10 @@ body,
158 158
   padding: 16px 0;
159 159
   text-align: right;
160 160
 }
161
+.ivu-radio-group {
162
+  display: flex;
163
+  justify-content: flex-start;
164
+}
161 165
 .ivu-form-item-content {
162 166
   line-height: 34px;
163 167
 }

BIN
src/assets/img/login.jpg Datei anzeigen


+ 8
- 4
src/views/layout.vue Datei anzeigen

@@ -50,6 +50,9 @@ body {
50 50
   margin: 0;
51 51
   padding: 0;
52 52
 }
53
+.top_header_root {
54
+  background-color: #2d8cf0;
55
+}
53 56
 .header_html_root {
54 57
   display: flex;
55 58
   justify-content: space-between;
@@ -63,19 +66,20 @@ body {
63 66
 }
64 67
 .header_html_root .header_html_item {
65 68
   padding: 0 10px;
66
-  color: #333;
67
-  border-bottom: 4px solid transparent;
69
+  color: #fff;
70
+  // border-bottom: 4px solid transparent;
68 71
   cursor: pointer;
69 72
 }
70 73
 .header_html_root .log_out {
71 74
   padding: 0 10px;
72 75
   color: #ff001e;
73
-  border-bottom: 4px solid transparent;
76
+  // border-bottom: 4px solid transparent;
74 77
   cursor: pointer;
75 78
 }
76 79
 .header_html_root .header_html_item:hover,
77 80
 .header_html_root .header_html_item.router-link-active {
78
-  border-bottom: 4px solid #2d8cf0;
81
+  background-color: #065fbe;
82
+  // border-bottom: 4px solid #2d8cf0;
79 83
 }
80 84
 .layout_out {
81 85
   max-height: calc(100vh - 54px);

+ 21
- 5
src/views/login/index.vue Datei anzeigen

@@ -1,11 +1,11 @@
1 1
 <template>
2
-  <div>
2
+  <div class="login_bg">
3 3
     <div class="loginFormBox">
4 4
       <Form
5 5
         ref="loginForm"
6 6
         :model="loginInfo"
7 7
         :rules="formRules"
8
-        :label-width="80"
8
+        :label-width="60"
9 9
       >
10 10
         <FormItem label="账号" prop="loginname">
11 11
           <Input
@@ -119,11 +119,27 @@ export default {
119 119
 </script>
120 120
 
121 121
 <style scoped lang="less">
122
+.login_bg {
123
+  position: absolute;
124
+  left: 0;
125
+  top: 0;
126
+  right: 0;
127
+  bottom: 0;
128
+  background-color: #fff;
129
+  background-image: url("@/assets/img/login.jpg");
130
+}
122 131
 .loginFormBox {
123
-  position: relative;
124
-  margin: 0 auto;
125
-  padding-top: 150px;
132
+  position: absolute;
133
+  left: 0;
134
+  top: 0;
135
+  right: 0;
136
+  bottom: 0;
137
+  margin: auto;
138
+  padding: 40px 40px 40px 30px;
126 139
   width: 400px;
140
+  height: 290px;
141
+  background-color: #fff;
142
+  border-radius: 10px;
127 143
 }
128 144
 .login_btn_box {
129 145
   text-align: center;

+ 39
- 2
src/views/news/index.vue Datei anzeigen

@@ -96,7 +96,15 @@
96 96
               v-if="addForm.newspic"
97 97
               :src="$api.showImageUrl + addForm.newspic"
98 98
             />
99
-            <Button v-else icon="ios-cloud-upload-outline">上传封面</Button>
99
+            <!-- <Button v-else icon="ios-cloud-upload-outline">上传封面</Button> -->
100
+            <div class="upload_img" v-else>
101
+              <Icon
102
+                type="ivu-icon ivu-icon- iconfont icon-shangchuan"
103
+                size="42"
104
+                color="#e6e6e6"
105
+              />
106
+              <p class="shangchuan_btn">上传图片</p>
107
+            </div>
100 108
           </Upload>
101 109
         </FormItem>
102 110
         <FormItem label="置顶" prop="newsup">
@@ -171,7 +179,15 @@
171 179
               v-if="modifyForm.newspic"
172 180
               :src="$api.showImageUrl + modifyForm.newspic"
173 181
             />
174
-            <Button v-else icon="ios-cloud-upload-outline">上传封面</Button>
182
+            <!-- <Button v-else icon="ios-cloud-upload-outline">上传封面</Button> -->
183
+            <div class="upload_img" v-else>
184
+              <Icon
185
+                type="ivu-icon ivu-icon- iconfont icon-shangchuan"
186
+                size="42"
187
+                color="#e6e6e6"
188
+              />
189
+              <p class="shangchuan_btn">上传图片</p>
190
+            </div>
175 191
           </Upload>
176 192
         </FormItem>
177 193
         <FormItem label="置顶" prop="newsup">
@@ -600,6 +616,27 @@ export default {
600 616
   padding: 16px 0;
601 617
   text-align: right;
602 618
 }
619
+.upload_img {
620
+  padding-top: 10px;
621
+  width: 198px;
622
+  height: 98px;
623
+  text-align: center;
624
+  object-fit: cover;
625
+  border: 1px solid #dcdee2;
626
+  .shangchuan_btn {
627
+    margin-top: 10px;
628
+    font-size: 14px;
629
+    line-height: 21px;
630
+    text-align: center;
631
+  }
632
+}
633
+.upload_img:hover {
634
+  color: #2d8cf0;
635
+  border: 1px solid #2d8cf0;
636
+  .icon-shangchuan {
637
+    color: #2d8cf0 !important;
638
+  }
639
+}
603 640
 .news_content /deep/ img {
604 641
   max-width: 100%;
605 642
 }

Laden…
Abbrechen
Speichern