Browse Source

样式优化

gzb
wangzhonglu 1 year ago
parent
commit
89b9225606
5 changed files with 72 additions and 11 deletions
  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 View File

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

BIN
src/assets/img/login.jpg View File


+ 8
- 4
src/views/layout.vue View File

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

+ 21
- 5
src/views/login/index.vue View File

1
 <template>
1
 <template>
2
-  <div>
2
+  <div class="login_bg">
3
     <div class="loginFormBox">
3
     <div class="loginFormBox">
4
       <Form
4
       <Form
5
         ref="loginForm"
5
         ref="loginForm"
6
         :model="loginInfo"
6
         :model="loginInfo"
7
         :rules="formRules"
7
         :rules="formRules"
8
-        :label-width="80"
8
+        :label-width="60"
9
       >
9
       >
10
         <FormItem label="账号" prop="loginname">
10
         <FormItem label="账号" prop="loginname">
11
           <Input
11
           <Input
119
 </script>
119
 </script>
120
 
120
 
121
 <style scoped lang="less">
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
 .loginFormBox {
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
   width: 400px;
139
   width: 400px;
140
+  height: 290px;
141
+  background-color: #fff;
142
+  border-radius: 10px;
127
 }
143
 }
128
 .login_btn_box {
144
 .login_btn_box {
129
   text-align: center;
145
   text-align: center;

+ 39
- 2
src/views/news/index.vue View File

96
               v-if="addForm.newspic"
96
               v-if="addForm.newspic"
97
               :src="$api.showImageUrl + addForm.newspic"
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
           </Upload>
108
           </Upload>
101
         </FormItem>
109
         </FormItem>
102
         <FormItem label="置顶" prop="newsup">
110
         <FormItem label="置顶" prop="newsup">
171
               v-if="modifyForm.newspic"
179
               v-if="modifyForm.newspic"
172
               :src="$api.showImageUrl + modifyForm.newspic"
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
           </Upload>
191
           </Upload>
176
         </FormItem>
192
         </FormItem>
177
         <FormItem label="置顶" prop="newsup">
193
         <FormItem label="置顶" prop="newsup">
600
   padding: 16px 0;
616
   padding: 16px 0;
601
   text-align: right;
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
 .news_content /deep/ img {
640
 .news_content /deep/ img {
604
   max-width: 100%;
641
   max-width: 100%;
605
 }
642
 }

Loading…
Cancel
Save