Skip to content

Commit a006701

Browse files
committed
fix: 修复 vue3中某些scss变量无法找到的问题
fix: 兼容 vue3
1 parent 1b90fc0 commit a006701

File tree

36 files changed

+74
-55
lines changed

36 files changed

+74
-55
lines changed

App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</script>
1515

1616
<style lang="scss">
17-
@import '@/uni_modules/uni-scss';
17+
@import '@/uni_modules/uni-scss/index.scss';
1818
1919
/* #ifndef APP-NVUE */
2020
@import '@/static/customicons.css';

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# uni-ui 介绍
2-
1+
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-transition)
2+
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
33
## uni-ui产品特点
44

55
### 1. 高性能

common/airport.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = {
1+
export default {
22
'list': [{
33
'letter': 'A',
44
'data': [

manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@
4545
},
4646
"h5" : {
4747
"router" : {
48-
"mode" : "hash",
48+
"mode" : "history",
4949
"base" : ""
5050
},
5151
"title" : "uni-ui",
5252
"template" : "template.h5.html"
5353
},
54-
"vueVersion" : "2"
54+
"vueVersion" : "3"
5555
}

pages/vue/card/card.nvue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
<uni-card title="基础卡片" sub-title="副标题" extra="额外信息" padding="10px 0" :thumbnail="avatar" >
5252
<template v-slot:title>
5353
<uni-list>
54-
<uni-list-item :show-switch="true" title="自定义标题" @switchChange="switchChange" />
54+
<uni-list-item :show-switch="true" title="自定义标题"/>
5555
</uni-list>
5656
</template>
5757
<image style="width: 100%;" :src="cover"></image>

pages/vue/forms/forms.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<uni-easyinput type="textarea" v-model="baseFormData.introduction" placeholder="请输入自我介绍" />
2424
</uni-forms-item>
2525
<uni-forms-item label="日期时间">
26-
<uni-datetime-picker type="datetime" return-type="timestamp" v-model="baseFormData.datetimesingle" @change="changeLog" />
26+
<uni-datetime-picker type="datetime" return-type="timestamp" v-model="baseFormData.datetimesingle"/>
2727
</uni-forms-item>
2828
</uni-forms>
2929
</view>

pages/vue/grid/grid.nvue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</uni-grid-item>
2424
</uni-grid>
2525
</uni-section>
26-
26+
2727
<uni-section title="滑动视图" type="line" padding>
2828
<!-- 因为swiper特性的关系,请指定swiper的高度 ,swiper的高度并不会被内容撑开-->
2929
<swiper class="swiper" :indicator-dots="true">
@@ -212,13 +212,13 @@
212212

213213
<style lang="scss">
214214
.image {
215-
width: 50rpx;
216-
height: 50rpx;
215+
width: 25px;
216+
height: 25px;
217217
}
218218

219219
.text {
220-
font-size: 26rpx;
221-
margin-top: 10rpx;
220+
font-size: 14px;
221+
margin-top: 5px;
222222
}
223223

224224
.example-body {

pages/vue/row/row.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@
206206
207207
.demo-uni-col {
208208
height: 36px;
209-
border-radius: $uni-border-radius-base;
209+
border-radius: 5px;
210210
}
211211
212212
.dark_deep {

pages/vue/segmented-control/segmented-control.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
124124
.content-text {
125125
font-size: 14px;
126-
color: $uni-text-color;
126+
color: #666;
127127
}
128128
129129
.color-tag {

uni_modules/uni-collapse/changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
## 1.4.1(2021-11-22)
2+
- 修复 vue3中个别scss变量无法找到的问题
13
## 1.4.0(2021-11-19)
24
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
35
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-collapse](https://uniapp.dcloud.io/component/uniui/uni-collapse)

uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@
296296
/* #endif */
297297
&.is-disabled {
298298
.uni-collapse-item__title-text {
299-
color: $uni-text-color-disable;
299+
color: #999;
300300
}
301301
}
302302
@@ -311,14 +311,14 @@
311311
}
312312
313313
&-img {
314-
height: $uni-img-size-base;
315-
width: $uni-img-size-base;
314+
height: 22px;
315+
width: 22px;
316316
margin-right: 10px;
317317
}
318318
319319
&-text {
320320
flex: 1;
321-
font-size: $uni-font-size-base;
321+
font-size: 14px;
322322
/* #ifndef APP-NVUE */
323323
white-space: nowrap;
324324
color: inherit;

uni_modules/uni-collapse/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "uni-collapse",
33
"displayName": "uni-collapse 折叠面板",
4-
"version": "1.4.0",
4+
"version": "1.4.1",
55
"description": "Collapse 组件,可以折叠 / 展开的内容区域。",
66
"keywords": [
77
"uni-ui",

uni_modules/uni-drawer/changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
## 1.2.1(2021-11-22)
2+
- 修复 vue3中个别scss变量无法找到的问题
13
## 1.2.0(2021-11-19)
24
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
35
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-drawer](https://uniapp.dcloud.io/component/uniui/uni-drawer)

uni_modules/uni-drawer/components/uni-drawer/uni-drawer.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@
105105
}
106106
</script>
107107

108-
<style lang="scss" scoped>
108+
<style lang="scss" scoped>
109+
$uni-mask: rgba($color: #000000, $alpha: 0.4) ;
109110
// 抽屉宽度
110111
$drawer-width: 220px;
111112
@@ -169,7 +170,7 @@
169170
left: 0;
170171
bottom: 0;
171172
right: 0;
172-
background-color: $uni-bg-color-mask;
173+
background-color: $uni-mask;
173174
transition: opacity 0.3s;
174175
}
175176

uni_modules/uni-drawer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "uni-drawer",
33
"displayName": "uni-drawer 抽屉",
4-
"version": "1.2.0",
4+
"version": "1.2.1",
55
"description": "抽屉式导航,用于展示侧滑菜单,侧滑导航。",
66
"keywords": [
77
"uni-ui",

uni_modules/uni-group/changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
## 1.2.1(2021-11-22)
2+
- 修复 vue3中某些scss变量无法找到的问题
13
## 1.2.0(2021-11-19)
24
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
35
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-group](https://uniapp.dcloud.io/component/uniui/uni-group)

uni_modules/uni-group/components/uni-group/uni-group.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@
9696
align-items: center;
9797
padding-left: 15px;
9898
height: 40px;
99-
background-color: $uni-bg-color-grey;
99+
background-color: #eee;
100100
font-weight: normal;
101-
color: $uni-text-color;
101+
color: #666;
102102
}
103103
104104
.uni-group__content {
@@ -112,8 +112,8 @@
112112
}
113113
114114
.uni-group__title-text {
115-
font-size: $uni-font-size-base;
116-
color: $uni-text-color;
115+
font-size: 14px;
116+
color: #666;
117117
}
118118
119119
.distraction {

uni_modules/uni-group/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "uni-group",
33
"displayName": "uni-group 分组",
4-
"version": "1.2.0",
4+
"version": "1.2.1",
55
"description": "分组组件可用于将组件用于分组,添加间隔,以产生明显的区块",
66
"keywords": [
77
"uni-ui",

uni_modules/uni-indexed-list/changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
## 1.2.1(2021-11-22)
2+
- 修复 vue3中某些scss变量无法找到的问题
13
## 1.2.0(2021-11-19)
24
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
35
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-indexed-list](https://uniapp.dcloud.io/component/uniui/uni-indexed-list)

uni_modules/uni-indexed-list/components/uni-indexed-list/uni-indexed-list-item.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
}
6767
6868
.uni-indexed-list__item {
69-
font-size: $uni-font-size-lg;
69+
font-size: 14px;
7070
/* #ifndef APP-NVUE */
7171
display: flex;
7272
/* #endif */
@@ -77,7 +77,7 @@
7777
}
7878
7979
.uni-indexed-list__item-container {
80-
padding-left: $uni-spacing-row-lg;
80+
padding-left: 15px;
8181
flex: 1;
8282
position: relative;
8383
/* #ifndef APP-NVUE */

uni_modules/uni-indexed-list/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "uni-indexed-list",
33
"displayName": "uni-indexed-list 索引列表",
4-
"version": "1.2.0",
4+
"version": "1.2.1",
55
"description": "索引列表组件,右侧带索引的列表,方便快速定位到具体内容,通常用于城市/机场选择等场景",
66
"keywords": [
77
"uni-ui",

uni_modules/uni-number-box/changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
## 1.2.1(2021-11-22)
2+
- 修复 vue3中某些scss变量无法找到的问题
13
## 1.2.0(2021-11-19)
24
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
35
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-number-box](https://uniapp.dcloud.io/component/uniui/uni-number-box)

uni_modules/uni-number-box/components/uni-number-box/uni-number-box.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
width: 40px;
187187
height: $box-height;
188188
text-align: center;
189-
font-size: $uni-font-size-lg;
189+
font-size: 14px;
190190
border-left-width: 0;
191191
border-right-width: 0;
192192
color: $color;

uni_modules/uni-number-box/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "uni-number-box",
33
"displayName": "uni-number-box 数字输入框",
4-
"version": "1.2.0",
4+
"version": "1.2.1",
55
"description": "NumberBox 带加减按钮的数字输入框组件,用户可以控制每次点击增加的数值,支持小数。",
66
"keywords": [
77
"uni-ui",

uni_modules/uni-pagination/changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
## 1.2.1(2021-11-22)
2+
- 修复 vue3中某些scss变量无法找到的问题
13
## 1.2.0(2021-11-19)
24
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
35
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-pagination](https://uniapp.dcloud.io/component/uniui/uni-pagination)

uni_modules/uni-pagination/components/uni-pagination/uni-pagination.vue

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,8 @@
256256
}
257257
</script>
258258

259-
<style lang="scss" scoped>
259+
<style lang="scss" scoped>
260+
$uni-primary: #2979ff;
260261
.uni-pagination {
261262
/* #ifndef APP-NVUE */
262263
display: flex;
@@ -281,7 +282,7 @@
281282
/* #endif */
282283
padding: 0 8px;
283284
line-height: 30px;
284-
font-size: $uni-font-size-base;
285+
font-size: 12px;
285286
position: relative;
286287
background-color: #F0F0F0;
287288
flex-direction: row;
@@ -298,13 +299,13 @@
298299
/* #ifndef APP-NVUE */
299300
display: flex;
300301
/* #endif */
301-
font-size: $uni-font-size-base;
302+
font-size: 12px;
302303
position: relative;
303304
flex-direction: row;
304305
justify-content: center;
305306
align-items: center;
306307
text-align: center;
307-
color: #0F1214;
308+
color: #666;
308309
font-size: 12px;
309310
}
310311
@@ -318,8 +319,8 @@
318319
align-items: center;
319320
height: 30px;
320321
line-height: 30px;
321-
font-size: $uni-font-size-base;
322-
color: $uni-text-color;
322+
font-size: 12px;
323+
color: #666;
323324
margin: 0 5px;
324325
}
325326
@@ -333,7 +334,7 @@
333334
text-align: center;
334335
line-height: 30px;
335336
// border: 1px red solid;
336-
color: #666;
337+
color: #999;
337338
border-radius: 4px;
338339
// border-width: 1px;
339340
// border-style: solid;
@@ -365,16 +366,16 @@
365366
366367
.uni-pagination--hover {
367368
color: rgba(0, 0, 0, 0.6);
368-
background-color: $uni-bg-color-hover;
369+
background-color: #eee;
369370
}
370371
371372
.tag--active:hover {
372-
color: $uni-color-primary;
373+
color: $uni-primary;
373374
}
374375
375376
.page--active {
376377
color: #fff;
377-
background-color: $uni-color-primary;
378+
background-color: $uni-primary;
378379
}
379380
380381
.page--active:hover {

uni_modules/uni-pagination/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "uni-pagination",
33
"displayName": "uni-pagination 分页器",
4-
"version": "1.2.0",
4+
"version": "1.2.1",
55
"description": "Pagination 分页器组件,用于展示页码、请求数据等。",
66
"keywords": [
77
"uni-ui",

uni_modules/uni-scss/changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
## 1.0.1(2021-11-22)
2+
- 修复 vue3中scss语法兼容问题
13
## 1.0.0(2021-11-18)
24
- init

uni_modules/uni-scss/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "uni-scss",
33
"displayName": "uni-scss 辅助样式",
4-
"version": "1.0.0",
4+
"version": "1.0.1",
55
"description": "uni-sass是uni-ui提供的一套全局样式 ,通过一些简单的类名和sass变量,实现简单的页面布局操作,比如颜色、边距、圆角等。",
66
"keywords": [
77
"uni-scss",

uni_modules/uni-scss/styles/setting/_color.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ $uni-ui-color:(
4545
transparent:$uni-transparent
4646
) !default;
4747
@each $key, $child in $uni-ui-color {
48-
.uni-#{$key} {
48+
.uni-#{"" + $key} {
4949
color: $child;
5050
}
51-
.uni-#{$key}-bg {
51+
.uni-#{"" + $key}-bg {
5252
background-color: $child;
5353
}
5454
}

0 commit comments

Comments
 (0)