From 6f8f60a9f924e45521912591adec44a754de41d3 Mon Sep 17 00:00:00 2001 From: Huang <596417202@qq.com> Date: Mon, 28 Nov 2022 18:10:14 +0800 Subject: [PATCH] =?UTF-8?q?feat-iconify=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 4 +- src/assets/main.scss | 69 ++++++++++++++++++++++++++++++++ src/components/Iconify/index.vue | 30 ++++++++++++-- src/pages/index/index.vue | 8 ++-- src/pagesA/list/test1/index.vue | 2 +- src/uni.scss | 66 ------------------------------ 6 files changed, 100 insertions(+), 79 deletions(-) create mode 100644 src/assets/main.scss diff --git a/src/App.vue b/src/App.vue index 1784572..945a14f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -21,7 +21,5 @@ }); diff --git a/src/assets/main.scss b/src/assets/main.scss new file mode 100644 index 0000000..5dd63f4 --- /dev/null +++ b/src/assets/main.scss @@ -0,0 +1,69 @@ +view, +scroll-view, +swiper, +match-media, +movable-area, +movable-view, +cover-view, +cover-image, +icon, +text, +rich-text, +progress, +button, +checkboxe, +ditor, +form, +input, +label, +picker, +picker-view, +radio, +slider, +switch, +textarea, +navigator, +audio, +camera, +image, +video, +live-player, +live-pusher, +map, +canvas, +web-view, +:before, +:after { + box-sizing: border-box; +} + +/* 隐藏scroll-view的滚动条 */ +::-webkit-scrollbar { + display: none; + width: 0 !important; + height: 0 !important; + -webkit-appearance: none; + background: transparent; +} + +// 超出省略,最多5行 +@for $i from 1 through 5 { + .text-ellipsis-#{$i} { + // vue下,单行和多行显示省略号需要单独处理 + @if $i == '1' { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } @else { + display: -webkit-box !important; + overflow: hidden; + text-overflow: ellipsis; + word-break: break-all; + -webkit-line-clamp: $i; + -webkit-box-orient: vertical !important; + } + } +} +page { + background-color: #f2f2f2; +} diff --git a/src/components/Iconify/index.vue b/src/components/Iconify/index.vue index 2c524ab..7439c8a 100644 --- a/src/components/Iconify/index.vue +++ b/src/components/Iconify/index.vue @@ -1,20 +1,42 @@ diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 439c42d..f68c685 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -33,11 +33,9 @@ Get Started → uno css - - + + + diff --git a/src/pagesA/list/test1/index.vue b/src/pagesA/list/test1/index.vue index 0de2e64..f42e494 100644 --- a/src/pagesA/list/test1/index.vue +++ b/src/pagesA/list/test1/index.vue @@ -8,7 +8,7 @@ }; diff --git a/src/uni.scss b/src/uni.scss index 66f7af6..e69de29 100644 --- a/src/uni.scss +++ b/src/uni.scss @@ -1,66 +0,0 @@ -view, -scroll-view, -swiper, -match-media, -movable-area, -movable-view, -cover-view, -cover-image, -icon, -text, -rich-text, -progress, -button, -checkboxe, -ditor, -form, -input, -label, -picker, -picker-view, -radio, -slider, -switch, -textarea, -navigator, -audio, -camera, -image, -video, -live-player, -live-pusher, -map, -canvas, -web-view, -:before, -:after { - box-sizing: border-box; -} - -/* 隐藏scroll-view的滚动条 */ -::-webkit-scrollbar { - display: none; - width: 0 !important; - height: 0 !important; - -webkit-appearance: none; - background: transparent; -} - -// 超出省略,最多5行 -@for $i from 1 through 5 { - .text-ellipsis-#{$i} { - // vue下,单行和多行显示省略号需要单独处理 - @if $i == '1' { - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } @else { - display: -webkit-box !important; - overflow: hidden; - text-overflow: ellipsis; - word-break: break-all; - -webkit-line-clamp: $i; - -webkit-box-orient: vertical !important; - } - } -}