refactor(Dashboard): 将样式从vue文件移动到单独的less文件
将Dashboard页面的样式从vue文件中提取到单独的index.less文件,提高代码可维护性
Showing
3 changed files
with
24 additions
and
32 deletions
| 1 | +.points-rule-tip { | ||
| 2 | + position: absolute; | ||
| 3 | + // background-color: white; | ||
| 4 | + top: 0rpx; | ||
| 5 | + right: 0rpx; | ||
| 6 | + display: flex; | ||
| 7 | + flex-direction: column; | ||
| 8 | + align-items: center; | ||
| 9 | + justify-content: center; | ||
| 10 | + z-index: 999; | ||
| 11 | + cursor: pointer; | ||
| 12 | +} | ||
| 13 | + | ||
| 14 | +.tip-icon { | ||
| 15 | + font-size: 32rpx; | ||
| 16 | + margin-bottom: 4rpx; | ||
| 17 | +} | ||
| 18 | + | ||
| 19 | +.tip-text { | ||
| 20 | + font-size: 20rpx; | ||
| 21 | + color: #666; | ||
| 22 | + line-height: 1; | ||
| 23 | +} | ... | ... |
| ... | @@ -150,12 +150,11 @@ | ... | @@ -150,12 +150,11 @@ |
| 150 | @close="handleAdClose" | 150 | @close="handleAdClose" |
| 151 | @click="handleAdClick" | 151 | @click="handleAdClick" |
| 152 | /> | 152 | /> |
| 153 | - | ||
| 154 | - | ||
| 155 | </view> | 153 | </view> |
| 156 | </template> | 154 | </template> |
| 157 | 155 | ||
| 158 | <script setup> | 156 | <script setup> |
| 157 | +import "./index.less"; | ||
| 159 | import { ref, computed, onMounted } from 'vue'; | 158 | import { ref, computed, onMounted } from 'vue'; |
| 160 | import Taro, { useDidShow, useReady } from '@tarojs/taro'; | 159 | import Taro, { useDidShow, useReady } from '@tarojs/taro'; |
| 161 | import { Setting, Photograph, Category } from '@nutui/icons-vue-taro'; | 160 | import { Setting, Photograph, Category } from '@nutui/icons-vue-taro'; |
| ... | @@ -187,8 +186,6 @@ const familySlogn = ref('') | ... | @@ -187,8 +186,6 @@ const familySlogn = ref('') |
| 187 | const familyCover = ref('') | 186 | const familyCover = ref('') |
| 188 | const familyOwner = ref(false); | 187 | const familyOwner = ref(false); |
| 189 | 188 | ||
| 190 | - | ||
| 191 | - | ||
| 192 | // 广告遮罩层数据 | 189 | // 广告遮罩层数据 |
| 193 | const adObj = ref({}) | 190 | const adObj = ref({}) |
| 194 | 191 | ||
| ... | @@ -263,8 +260,6 @@ const goToProfile = () => { | ... | @@ -263,8 +260,6 @@ const goToProfile = () => { |
| 263 | Taro.navigateTo({ url: '/pages/EditFamily/index' }); | 260 | Taro.navigateTo({ url: '/pages/EditFamily/index' }); |
| 264 | }; | 261 | }; |
| 265 | 262 | ||
| 266 | - | ||
| 267 | - | ||
| 268 | /** | 263 | /** |
| 269 | * 打开拍照上传页面 | 264 | * 打开拍照上传页面 |
| 270 | */ | 265 | */ |
| ... | @@ -396,29 +391,3 @@ useReady(async () => { | ... | @@ -396,29 +391,3 @@ useReady(async () => { |
| 396 | }); | 391 | }); |
| 397 | }) | 392 | }) |
| 398 | </script> | 393 | </script> |
| 399 | - | ||
| 400 | -<style lang="less"> | ||
| 401 | -.points-rule-tip { | ||
| 402 | - position: absolute; | ||
| 403 | - // background-color: white; | ||
| 404 | - top: 0rpx; | ||
| 405 | - right: 0rpx; | ||
| 406 | - display: flex; | ||
| 407 | - flex-direction: column; | ||
| 408 | - align-items: center; | ||
| 409 | - justify-content: center; | ||
| 410 | - z-index: 999; | ||
| 411 | - cursor: pointer; | ||
| 412 | -} | ||
| 413 | - | ||
| 414 | -.tip-icon { | ||
| 415 | - font-size: 32rpx; | ||
| 416 | - margin-bottom: 4rpx; | ||
| 417 | -} | ||
| 418 | - | ||
| 419 | -.tip-text { | ||
| 420 | - font-size: 20rpx; | ||
| 421 | - color: #666; | ||
| 422 | - line-height: 1; | ||
| 423 | -} | ||
| 424 | -</style> | ... | ... |
-
Please register or login to post a comment