Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
account-book
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘文虎
account-book
Commits
5fb6fc1d
Commit
5fb6fc1d
authored
Jul 11, 2022
by
Facius
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.banshouhui.com/liuwenhu/account-book
parents
465f6558
ea263d99
Pipeline
#2755
canceled with stages
Changes
30
Pipelines
1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
3134 additions
and
28 deletions
+3134
-28
ab-button.vue
components/common/ab-button.vue
+6
-1
empty-page.vue
components/common/empty-page.vue
+51
-0
main.js
main.js
+3
-0
plan-step.vue
pages/index/schedule/components/plan-step.vue
+143
-0
plan-view.vue
pages/index/schedule/components/plan-view.vue
+85
-4
schedule.vue
pages/index/schedule/schedule.vue
+10
-8
checkbox-groups.vue
...s/schedule/create-schedule/components/checkbox-groups.vue
+9
-8
create-schedule.vue
pages/schedule/create-schedule/create-schedule.vue
+52
-7
changelog.md
uni_modules/uni-icons/changelog.md
+22
-0
icons.js
uni_modules/uni-icons/components/uni-icons/icons.js
+1169
-0
uni-icons.vue
uni_modules/uni-icons/components/uni-icons/uni-icons.vue
+96
-0
uniicons.css
uni_modules/uni-icons/components/uni-icons/uniicons.css
+663
-0
uniicons.ttf
uni_modules/uni-icons/components/uni-icons/uniicons.ttf
+0
-0
package.json
uni_modules/uni-icons/package.json
+86
-0
readme.md
uni_modules/uni-icons/readme.md
+8
-0
changelog.md
uni_modules/uni-scss/changelog.md
+8
-0
index.scss
uni_modules/uni-scss/index.scss
+1
-0
package.json
uni_modules/uni-scss/package.json
+82
-0
readme.md
uni_modules/uni-scss/readme.md
+4
-0
index.scss
uni_modules/uni-scss/styles/index.scss
+7
-0
_border.scss
uni_modules/uni-scss/styles/setting/_border.scss
+3
-0
_color.scss
uni_modules/uni-scss/styles/setting/_color.scss
+66
-0
_radius.scss
uni_modules/uni-scss/styles/setting/_radius.scss
+55
-0
_space.scss
uni_modules/uni-scss/styles/setting/_space.scss
+56
-0
_styles.scss
uni_modules/uni-scss/styles/setting/_styles.scss
+167
-0
_text.scss
uni_modules/uni-scss/styles/setting/_text.scss
+24
-0
_variables.scss
uni_modules/uni-scss/styles/setting/_variables.scss
+146
-0
functions.scss
uni_modules/uni-scss/styles/tools/functions.scss
+19
-0
theme.scss
uni_modules/uni-scss/theme.scss
+31
-0
variables.scss
uni_modules/uni-scss/variables.scss
+62
-0
No files found.
components/common/ab-button.vue
View file @
5fb6fc1d
<
template
>
<
template
>
<view
class=
"ab-button"
:style=
"
{ fontSize: fontSize + 'rpx', width: width + 'rpx', height: height + 'rpx' ,color:color}" hover-class="u-hover-class">
<view
class=
"ab-button"
:style=
"
{ fontSize: fontSize + 'rpx', width: width + 'rpx', height: height + 'rpx' ,color:color}" hover-class="u-hover-class"
@click="handleClick"
>
<u-icon
:name=
"leftIcon"
v-if=
"leftIcon"
:size=
"fontSize"
class=
"ab-button-left"
></u-icon>
<u-icon
:name=
"leftIcon"
v-if=
"leftIcon"
:size=
"fontSize"
class=
"ab-button-left"
></u-icon>
<text>
{{
content
}}
</text>
<text>
{{
content
}}
</text>
<u-icon
:name=
"rightIcon"
v-if=
"rightIcon"
:size=
"fontSize"
class=
"ab-button-right"
></u-icon>
<u-icon
:name=
"rightIcon"
v-if=
"rightIcon"
:size=
"fontSize"
class=
"ab-button-right"
></u-icon>
...
@@ -41,6 +41,11 @@ export default {
...
@@ -41,6 +41,11 @@ export default {
},
},
data
()
{
data
()
{
return
{};
return
{};
},
methods
:{
handleClick
(){
this
.
$emit
(
"click"
)
}
}
}
};
};
</
script
>
</
script
>
...
...
components/common/empty-page.vue
0 → 100644
View file @
5fb6fc1d
<
template
>
<view
class=
"photo-preview-empty"
>
<view
class=
"photo-preview-empty-image"
v-if=
"img"
>
<image
:src=
"img"
mode=
""
></image>
</view>
<u-icon
name=
"shopping-cart"
size=
"80"
v-else
></u-icon>
<view
class=
"photo-preview-empty-message"
>
{{
title
}}
</view>
</view>
</
template
>
<
script
>
import
{
STATIC_IMG_HOST
}
from
'@/utils/config.js'
;
export
default
{
props
:{
img
:{
type
:
String
,
default
:
""
},
title
:{
type
:
String
,
default
:
"暂无数据"
}
},
data
()
{
return
{
};
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.photo-preview-empty
{
width
:
100%
;
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
// justify-content: center;
overflow
:
hidden
;
color
:
#8D8D8D
;
.photo-preview-empty-image
{
margin-top
:
35%
;
margin-bottom
:
28upx
;
width
:
246upx
;
height
:
126upx
;
}
.photo-preview-empty-message
{
font-size
:
30upx
;
}
}
</
style
>
main.js
View file @
5fb6fc1d
...
@@ -12,6 +12,9 @@ Vue.use(router)
...
@@ -12,6 +12,9 @@ Vue.use(router)
import
uView
from
"uview-ui"
;
import
uView
from
"uview-ui"
;
Vue
.
use
(
uView
);
Vue
.
use
(
uView
);
import
{
parseTime
}
from
"@/utils/common.js"
Vue
.
prototype
.
parseTime
=
parseTime
import
store
from
'./store'
import
store
from
'./store'
App
.
mpType
=
'app'
App
.
mpType
=
'app'
...
...
pages/index/schedule/components/plan-step.vue
0 → 100644
View file @
5fb6fc1d
<
template
>
<view
class=
"ali"
>
<!-- ======="state": 0 ,1 ,2====== -->
<view
class=
"ali_state"
>
<block
v-for=
"(item, i) in datas"
:key=
"i"
>
<view
class=
"State_Four"
>
<view
class=
"FourBox"
>
<text
class=
"line"
:class=
"
{ noline: i == 0, 'closed-border': i >= firstClosed }">
</text>
<text
class=
"ali_top_icon"
style=
"margin: 0 0;"
:class=
"
{ closed: item.status === '0' }">
{{
item
.
time
}}
</text>
<text
class=
"ali_top_dot"
style=
"margin: 0 0;"
:class=
"
{ 'closed-background': i >= firstClosed }" v-if="i !== datas.length - 1">
</text>
<text
class=
"line"
:class=
"
{ noline: i == datas.length - 1, 'closed-border': i >= firstClosed - 1 }">
</text>
</view>
<view
class=
"remark"
>
<view
class=
"remark-content"
:class=
"
{ closed: item.status === '0' }">
{{
item
.
remark
}}
</view>
<view
class=
"status"
:class=
"
{ closed: item.status === '0' }" @click="handleClick(item)">
{{
item
.
status
===
'1'
?
'提醒'
:
'已结束'
}}
</view>
</view>
</view>
</block>
</view>
</view>
</
template
>
<
script
>
export
default
{
props
:
[
'datas'
,
'state'
,
'ways'
],
data
()
{
return
{};
},
computed
:
{
firstClosed
()
{
let
index
=
this
.
datas
.
findIndex
(
item
=>
item
.
status
===
'0'
);
console
.
log
(
index
);
return
index
;
}
},
methods
:
{
handleClick
(
item
){
this
.
$emit
(
"handleClick"
,
item
)
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.isOk
{
background-color
:
#f0ad4e
!
important
;
}
.ali_top_dot
{
width
:
12upx
;
height
:
12upx
;
display
:
block
;
background-color
:
$default-color
;
border-radius
:
50%
;
transform
:
translateX
(
1upx
);
}
.noline
{
/* background-color: #fff !important; */
opacity
:
0
;
}
.State_Four
{
display
:
flex
;
// align-items: flex-start;
// min-height: 100upx;
/* border: 1upx solid red; */
}
.FourBox
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
padding-right
:
40upx
;
// width: 100upx;
// flex: 1;
// height: 100%;
// min-height: 100%;
// background-color: pink;
// flex-shrink:0;
}
.line
{
width
:
0upx
;
border-left
:
2upx
dashed
$default-color
;
display
:
flex
;
flex-direction
:
column
;
flex
:
1
;
}
/* ============= */
.remark
{
display
:
flex
;
width
:
90%
;
padding
:
24upx
24upx
;
background-color
:
#ffffff
;
border-radius
:
16upx
;
margin
:
16upx
0
;
font-size
:
28upx
;
font-weight
:
bold
;
color
:
#333333
;
line-height
:
34upx
;
}
.remark-content
{
flex
:
1
;
}
.status
{
width
:
100upx
;
text-align
:
right
;
margin-left
:
38upx
;
color
:
$default-color
;
}
.ali_top_icon
{
width
:
100upx
;
height
:
32upx
;
display
:
block
;
color
:
#333333
;
font-size
:
28upx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
margin-right
:
20upx
;
}
.ali_top
{
display
:
flex
;
justify-content
:
flex-start
;
align-items
:
center
;
}
/* ========公共========= */
.ali
{
/* width: 100%; */
/* border: 1upx solid #F76260; */
border-radius
:
18upx
;
display
:
flex
;
flex
:
1
;
flex-direction
:
column
;
}
.closed
{
color
:
#cccccc
;
}
.closed-border
{
border-color
:
#cccccc
;
}
.closed-background
{
background-color
:
#cccccc
;
}
</
style
>
pages/index/schedule/components/plan-view.vue
View file @
5fb6fc1d
...
@@ -2,36 +2,117 @@
...
@@ -2,36 +2,117 @@
<view
class=
"plan-view"
>
<view
class=
"plan-view"
>
<view
class=
"plan-view-head"
>
<view
class=
"plan-view-head"
>
<view
class=
"plan-view-head-title"
>
代办计划
</view>
<view
class=
"plan-view-head-title"
>
代办计划
</view>
<ab-button
content=
"添加计划"
left-icon=
"plus"
></ab-button>
<ab-button
content=
"添加计划"
left-icon=
"plus"
@
click=
"toAdd"
></ab-button>
</view>
<view
class=
"time-line"
>
<block
v-if=
"list.length"
>
<plan-step
:datas=
"list"
@
handleClick=
"handleRemind"
></plan-step>
</block>
<block
v-else-if=
"afterGetList"
>
<view
class=
"empty-page"
>
<empty-page></empty-page>
</view>
</block>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
AbButton
from
'@/components/common/ab-button.vue'
;
import
AbButton
from
'@/components/common/ab-button.vue'
;
import
EmptyPage
from
'@/components/common/empty-page.vue'
;
import
PlanStep
from
'./plan-step.vue'
;
export
default
{
export
default
{
name
:
'plan-view'
,
name
:
'plan-view'
,
components
:
{
components
:
{
AbButton
AbButton
,
PlanStep
,
EmptyPage
},
},
data
()
{
data
()
{
return
{};
return
{
list
:
[
// {
// time: '10:30',
// status: '1',
// remark: '[杭州市]快件派送至【丰巢智能快递柜】'
// },
// {
// time: '14:00',
// status: '1',
// remark: '[杭州市]快件交给黄平,正在派送途中(联系电话:15157162459)'
// },
// {
// time: '08:30',
// status: '0',
// remark: '[杭州市]正在派送途中'
// },
// {
// time: '14:00',
// status: '0',
// remark: '[杭州市]快件交给黄平,正在派送途中(联系电话:15157162459)'
// },
// {
// time: '08:30',
// status: '0',
// remark: '[杭州市]正在派送途中'
// }, {
// time: '14:00',
// status: '0',
// remark: '[杭州市]快件交给黄平,正在派送途中(联系电话:15157162459)'
// },
// {
// time: '08:30',
// status: '0',
// remark: '[杭州市]正在派送途中'
// },
],
afterGetList
:
false
};
},
methods
:
{
async
getList
(
date
){
// let res=await getList()
let
time
=
this
.
parseTime
(
date
,
'{y}-{m}-{d}'
)
console
.
log
(
time
)
this
.
afterGetList
=
true
},
toAdd
()
{
uni
.
navigateTo
({
url
:
'pages/schedule/create-schedule/create-schedule'
});
},
handleRemind
(
item
){
if
(
item
.
status
!==
'1'
){
return
false
}
uni
.
showToast
({
icon
:
"none"
,
title
:
"提醒"
})
}
}
}
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.plan-view
{
.plan-view
{
padding
:
0
24upx
;
&
-head
{
&
-head
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
space-between
;
padding
:
0
2
4upx
;
margin-bottom
:
3
4upx
;
&
-title
{
&
-title
{
font-size
:
32upx
;
font-size
:
32upx
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#333333
;
color
:
#333333
;
}
}
}
}
.time-line
{
}
.empty-page
{
height
:
250upx
;
}
}
}
</
style
>
</
style
>
pages/index/schedule/schedule.vue
View file @
5fb6fc1d
...
@@ -16,8 +16,7 @@
...
@@ -16,8 +16,7 @@
></lunc-calendar>
></lunc-calendar>
</view>
</view>
<view
class=
""
>
<view
class=
""
>
<plan-view></plan-view>
<plan-view
ref=
"plan-view"
></plan-view>
<!--
<button
@
click=
"toAdd"
>
添加行程
</button>
-->
</view>
</view>
<mid-popup
ref=
"midPopup"
></mid-popup>
<mid-popup
ref=
"midPopup"
></mid-popup>
<u-tabbar
:list=
"tabbar"
:mid-button=
"true"
:mid-button-size=
"80"
:before-switch=
"beforeSwitch"
></u-tabbar>
<u-tabbar
:list=
"tabbar"
:mid-button=
"true"
:mid-button-size=
"80"
:before-switch=
"beforeSwitch"
></u-tabbar>
...
@@ -55,10 +54,13 @@ export default {
...
@@ -55,10 +54,13 @@ export default {
date
:
'2022-07-12'
,
date
:
'2022-07-12'
,
// title: '朋友聚会'
// title: '朋友聚会'
}
}
]
],
date
:
new
Date
()
};
};
},
},
onReady
()
{},
onReady
()
{
this
.
getList
()
},
methods
:
{
methods
:
{
beforeSwitch
(
index
)
{
beforeSwitch
(
index
)
{
if
(
index
===
2
)
{
if
(
index
===
2
)
{
...
@@ -72,6 +74,8 @@ export default {
...
@@ -72,6 +74,8 @@ export default {
},
},
dayChange
(
e
)
{
dayChange
(
e
)
{
console
.
log
(
'dayChange'
,
e
);
console
.
log
(
'dayChange'
,
e
);
this
.
date
=
e
.
date
this
.
getList
()
},
},
monthChange
(
e
)
{
monthChange
(
e
)
{
console
.
log
(
'monthChange'
,
e
);
console
.
log
(
'monthChange'
,
e
);
...
@@ -79,10 +83,8 @@ export default {
...
@@ -79,10 +83,8 @@ export default {
chooseMonth
(
selDate
){
chooseMonth
(
selDate
){
console
.
log
(
'selDate'
,
selDate
);
console
.
log
(
'selDate'
,
selDate
);
},
},
toAdd
(){
getList
(){
uni
.
navigateTo
({
this
.
$refs
[
"plan-view"
].
getList
(
this
.
date
)
url
:
"pages/schedule/create-schedule/create-schedule"
})
}
}
}
}
};
};
...
...
pages/schedule/create-schedule/components/checkbox-groups.vue
View file @
5fb6fc1d
...
@@ -24,7 +24,7 @@ export default {
...
@@ -24,7 +24,7 @@ export default {
},
},
methods
:
{
methods
:
{
handleCheck
(
item
)
{
handleCheck
(
item
)
{
this
.
$emit
(
'handleClick'
,
item
);
this
.
$emit
(
'handleClick'
,
item
);
}
}
}
}
};
};
...
@@ -35,20 +35,21 @@ export default {
...
@@ -35,20 +35,21 @@ export default {
display
:
flex
;
display
:
flex
;
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
&
-item
{
&
-item
{
padding
:
12upx
24upx
;
width
:
202upx
;
font-size
:
24upx
;
height
:
80upx
;
line-height
:
28upx
;
background
:
#f6f7fa
;
color
:
#333333
;
// background-color: #ffffff;
background-color
:
#f2f2f2
;
border-radius
:
8upx
;
border-radius
:
8upx
;
font-size
:
28upx
;
line-height
:
80upx
;
text-align
:
center
;
color
:
#8d8d8d
;
margin-right
:
24upx
;
margin-right
:
24upx
;
&
:last-child
{
&
:last-child
{
margin-right
:
0
;
margin-right
:
0
;
}
}
}
}
.active
{
.active
{
background-color
:
#87c287
;
background-color
:
$default-color
;
color
:
#ffffff
;
color
:
#ffffff
;
}
}
}
}
...
...
pages/schedule/create-schedule/create-schedule.vue
View file @
5fb6fc1d
...
@@ -7,10 +7,26 @@
...
@@ -7,10 +7,26 @@
<checkbox-groups
:checked=
"form.type"
:options=
"scheduleTypeOptions"
@
handleClick=
"scheduleTypeChange"
></checkbox-groups>
<checkbox-groups
:checked=
"form.type"
:options=
"scheduleTypeOptions"
@
handleClick=
"scheduleTypeChange"
></checkbox-groups>
</view>
</view>
</u-form-item>
</u-form-item>
<u-form-item
label=
"计划时间:"
prop=
"createdTime"
>
<u-form-item
label=
"计划时间:"
prop=
"createdTime"
label-position=
"left"
>
<view
class=
"input-view"
>
<view
class=
"created-time"
>
<view
class=
"input-view-item"
>
<view
class=
"created-time-item"
>
<u-input
v-model=
"form.date"
type=
"select"
border=
"true"
@
click=
"openCalculatorPopup"
/>
<!--
<u-input
v-model=
"form.date"
type=
"select"
:border=
"false"
@
click=
"openCalculatorPopup"
/>
-->
<view
class=
"created-time-item-inner"
@
click=
"openCalculatorPopup"
>
<text
v-if=
"form.createdTime"
></text>
<text
class=
"placeholder"
>
选择计划日期
</text>
</view>
<view
class=
"created-time-item-icon"
>
<u-icon
name=
"calendar"
></u-icon>
</view>
</view>
<view
class=
"created-time-item"
>
<view
class=
"created-time-item-inner"
>
<text
v-if=
"form.time"
></text>
<text
class=
"placeholder"
>
选择时间
</text>
</view>
<view
class=
"created-time-item-icon"
>
<u-icon
name=
"clock"
></u-icon>
</view>
</view>
</view>
</view>
</view>
</u-form-item>
</u-form-item>
...
@@ -101,11 +117,40 @@ export default {
...
@@ -101,11 +117,40 @@ export default {
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.create-schedule
{
.create-schedule
{
padding
:
0
32
upx
;
padding
:
0
24
upx
;
.schedule-card
{
.schedule-card
{
padding
:
0
32
upx
;
padding
:
0
24
upx
;
background-color
:
#ffffff
;
background-color
:
#ffffff
;
border-radius
:
20upx
;
border-radius
:
16upx
;
.created-time
{
display
:
flex
;
width
:
100%
;
height
:
100%
;
align-items
:
center
;
justify-content
:
flex-end
;
&
-item
{
display
:
flex
;
align-items
:
center
;
margin-right
:
50upx
;
&
:last-child
{
margin-right
:
0
;
}
&
-inner
{
font-size
:
28upx
;
color
:
#333333
;
.placeholder
{
color
:
#CCCCCC
;
}
}
&
-icon
{
margin-left
:
16upx
;
font-size
:
32upx
;
color
:
$default-color
;
}
}
}
}
}
}
}
</
style
>
</
style
>
uni_modules/uni-icons/changelog.md
0 → 100644
View file @
5fb6fc1d
## 1.3.5(2022-01-24)
-
优化 size 属性可以传入不带单位的字符串数值
## 1.3.4(2022-01-24)
-
优化 size 支持其他单位
## 1.3.3(2022-01-17)
-
修复 nvue 有些图标不显示的bug,兼容老版本图标
## 1.3.2(2021-12-01)
-
优化 示例可复制图标名称
## 1.3.1(2021-11-23)
-
优化 兼容旧组件 type 值
## 1.3.0(2021-11-19)
-
新增 更多图标
-
优化 自定义图标使用方式
-
优化 组件UI,并提供设计资源,详见:
[
https://uniapp.dcloud.io/component/uniui/resource
](
https://uniapp.dcloud.io/component/uniui/resource
)
-
文档迁移,详见:
[
https://uniapp.dcloud.io/component/uniui/uni-icons
](
https://uniapp.dcloud.io/component/uniui/uni-icons
)
## 1.1.7(2021-11-08)
## 1.2.0(2021-07-30)
-
组件兼容 vue3,如何创建vue3项目,详见
[
uni-app 项目支持 vue3 介绍
](
https://ask.dcloud.net.cn/article/37834
)
## 1.1.5(2021-05-12)
-
新增 组件示例地址
## 1.1.4(2021-02-05)
-
调整为uni_modules目录规范
uni_modules/uni-icons/components/uni-icons/icons.js
0 → 100644
View file @
5fb6fc1d
This diff is collapsed.
Click to expand it.
uni_modules/uni-icons/components/uni-icons/uni-icons.vue
0 → 100644
View file @
5fb6fc1d
<
template
>
<!-- #ifdef APP-NVUE -->
<text
:style=
"
{ color: color, 'font-size': iconSize }" class="uni-icons" @click="_onClick">
{{
unicode
}}
</text>
<!-- #endif -->
<!-- #ifndef APP-NVUE -->
<text
:style=
"
{ color: color, 'font-size': iconSize }" class="uni-icons" :class="['uniui-'+type,customPrefix,customPrefix?type:'']" @click="_onClick">
</text>
<!-- #endif -->
</
template
>
<
script
>
import
icons
from
'./icons.js'
;
const
getVal
=
(
val
)
=>
{
const
reg
=
/^
[
0-9
]
*$/g
return
(
typeof
val
===
'number'
||
reg
.
test
(
val
)
)?
val
+
'px'
:
val
;
}
// #ifdef APP-NVUE
var
domModule
=
weex
.
requireModule
(
'dom'
);
import
iconUrl
from
'./uniicons.ttf'
domModule
.
addRule
(
'fontFace'
,
{
'fontFamily'
:
"uniicons"
,
'src'
:
"url('"
+
iconUrl
+
"')"
});
// #endif
/**
* Icons 图标
* @description 用于展示 icons 图标
* @tutorial https://ext.dcloud.net.cn/plugin?id=28
* @property {Number} size 图标大小
* @property {String} type 图标图案,参考示例
* @property {String} color 图标颜色
* @property {String} customPrefix 自定义图标
* @event {Function} click 点击 Icon 触发事件
*/
export
default
{
name
:
'UniIcons'
,
emits
:[
'click'
],
props
:
{
type
:
{
type
:
String
,
default
:
''
},
color
:
{
type
:
String
,
default
:
'#333333'
},
size
:
{
type
:
[
Number
,
String
],
default
:
16
},
customPrefix
:{
type
:
String
,
default
:
''
}
},
data
()
{
return
{
icons
:
icons
.
glyphs
}
},
computed
:{
unicode
(){
let
code
=
this
.
icons
.
find
(
v
=>
v
.
font_class
===
this
.
type
)
if
(
code
){
return
unescape
(
`%u
${
code
.
unicode
}
`
)
}
return
''
},
iconSize
(){
return
getVal
(
this
.
size
)
}
},
methods
:
{
_onClick
()
{
this
.
$emit
(
'click'
)
}
}
}
</
script
>
<
style
lang=
"scss"
>
/* #ifndef APP-NVUE */
@import
'./uniicons.css'
;
@font-face
{
font-family
:
uniicons
;
src
:
url('./uniicons.ttf')
format
(
'truetype'
);
}
/* #endif */
.uni-icons
{
font-family
:
uniicons
;
text-decoration
:
none
;
text-align
:
center
;
}
</
style
>
uni_modules/uni-icons/components/uni-icons/uniicons.css
0 → 100644
View file @
5fb6fc1d
.uniui-color
:before
{
content
:
"\e6cf"
;
}
.uniui-wallet
:before
{
content
:
"\e6b1"
;
}
.uniui-settings-filled
:before
{
content
:
"\e6ce"
;
}
.uniui-auth-filled
:before
{
content
:
"\e6cc"
;
}
.uniui-shop-filled
:before
{
content
:
"\e6cd"
;
}
.uniui-staff-filled
:before
{
content
:
"\e6cb"
;
}
.uniui-vip-filled
:before
{
content
:
"\e6c6"
;
}
.uniui-plus-filled
:before
{
content
:
"\e6c7"
;
}
.uniui-folder-add-filled
:before
{
content
:
"\e6c8"
;
}
.uniui-color-filled
:before
{
content
:
"\e6c9"
;
}
.uniui-tune-filled
:before
{
content
:
"\e6ca"
;
}
.uniui-calendar-filled
:before
{
content
:
"\e6c0"
;
}
.uniui-notification-filled
:before
{
content
:
"\e6c1"
;
}
.uniui-wallet-filled
:before
{
content
:
"\e6c2"
;
}
.uniui-medal-filled
:before
{
content
:
"\e6c3"
;
}
.uniui-gift-filled
:before
{
content
:
"\e6c4"
;
}
.uniui-fire-filled
:before
{
content
:
"\e6c5"
;
}
.uniui-refreshempty
:before
{
content
:
"\e6bf"
;
}
.uniui-location-filled
:before
{
content
:
"\e6af"
;
}
.uniui-person-filled
:before
{
content
:
"\e69d"
;
}
.uniui-personadd-filled
:before
{
content
:
"\e698"
;
}
.uniui-back
:before
{
content
:
"\e6b9"
;
}
.uniui-forward
:before
{
content
:
"\e6ba"
;
}
.uniui-arrow-right
:before
{
content
:
"\e6bb"
;
}
.uniui-arrowthinright
:before
{
content
:
"\e6bb"
;
}
.uniui-arrow-left
:before
{
content
:
"\e6bc"
;
}
.uniui-arrowthinleft
:before
{
content
:
"\e6bc"
;
}
.uniui-arrow-up
:before
{
content
:
"\e6bd"
;
}
.uniui-arrowthinup
:before
{
content
:
"\e6bd"
;
}
.uniui-arrow-down
:before
{
content
:
"\e6be"
;
}
.uniui-arrowthindown
:before
{
content
:
"\e6be"
;
}
.uniui-bottom
:before
{
content
:
"\e6b8"
;
}
.uniui-arrowdown
:before
{
content
:
"\e6b8"
;
}
.uniui-right
:before
{
content
:
"\e6b5"
;
}
.uniui-arrowright
:before
{
content
:
"\e6b5"
;
}
.uniui-top
:before
{
content
:
"\e6b6"
;
}
.uniui-arrowup
:before
{
content
:
"\e6b6"
;
}
.uniui-left
:before
{
content
:
"\e6b7"
;
}
.uniui-arrowleft
:before
{
content
:
"\e6b7"
;
}
.uniui-eye
:before
{
content
:
"\e651"
;
}
.uniui-eye-filled
:before
{
content
:
"\e66a"
;
}
.uniui-eye-slash
:before
{
content
:
"\e6b3"
;
}
.uniui-eye-slash-filled
:before
{
content
:
"\e6b4"
;
}
.uniui-info-filled
:before
{
content
:
"\e649"
;
}
.uniui-reload
:before
{
content
:
"\e6b2"
;
}
.uniui-micoff-filled
:before
{
content
:
"\e6b0"
;
}
.uniui-map-pin-ellipse
:before
{
content
:
"\e6ac"
;
}
.uniui-map-pin
:before
{
content
:
"\e6ad"
;
}
.uniui-location
:before
{
content
:
"\e6ae"
;
}
.uniui-starhalf
:before
{
content
:
"\e683"
;
}
.uniui-star
:before
{
content
:
"\e688"
;
}
.uniui-star-filled
:before
{
content
:
"\e68f"
;
}
.uniui-calendar
:before
{
content
:
"\e6a0"
;
}
.uniui-fire
:before
{
content
:
"\e6a1"
;
}
.uniui-medal
:before
{
content
:
"\e6a2"
;
}
.uniui-font
:before
{
content
:
"\e6a3"
;
}
.uniui-gift
:before
{
content
:
"\e6a4"
;
}
.uniui-link
:before
{
content
:
"\e6a5"
;
}
.uniui-notification
:before
{
content
:
"\e6a6"
;
}
.uniui-staff
:before
{
content
:
"\e6a7"
;
}
.uniui-vip
:before
{
content
:
"\e6a8"
;
}
.uniui-folder-add
:before
{
content
:
"\e6a9"
;
}
.uniui-tune
:before
{
content
:
"\e6aa"
;
}
.uniui-auth
:before
{
content
:
"\e6ab"
;
}
.uniui-person
:before
{
content
:
"\e699"
;
}
.uniui-email-filled
:before
{
content
:
"\e69a"
;
}
.uniui-phone-filled
:before
{
content
:
"\e69b"
;
}
.uniui-phone
:before
{
content
:
"\e69c"
;
}
.uniui-email
:before
{
content
:
"\e69e"
;
}
.uniui-personadd
:before
{
content
:
"\e69f"
;
}
.uniui-chatboxes-filled
:before
{
content
:
"\e692"
;
}
.uniui-contact
:before
{
content
:
"\e693"
;
}
.uniui-chatbubble-filled
:before
{
content
:
"\e694"
;
}
.uniui-contact-filled
:before
{
content
:
"\e695"
;
}
.uniui-chatboxes
:before
{
content
:
"\e696"
;
}
.uniui-chatbubble
:before
{
content
:
"\e697"
;
}
.uniui-upload-filled
:before
{
content
:
"\e68e"
;
}
.uniui-upload
:before
{
content
:
"\e690"
;
}
.uniui-weixin
:before
{
content
:
"\e691"
;
}
.uniui-compose
:before
{
content
:
"\e67f"
;
}
.uniui-qq
:before
{
content
:
"\e680"
;
}
.uniui-download-filled
:before
{
content
:
"\e681"
;
}
.uniui-pyq
:before
{
content
:
"\e682"
;
}
.uniui-sound
:before
{
content
:
"\e684"
;
}
.uniui-trash-filled
:before
{
content
:
"\e685"
;
}
.uniui-sound-filled
:before
{
content
:
"\e686"
;
}
.uniui-trash
:before
{
content
:
"\e687"
;
}
.uniui-videocam-filled
:before
{
content
:
"\e689"
;
}
.uniui-spinner-cycle
:before
{
content
:
"\e68a"
;
}
.uniui-weibo
:before
{
content
:
"\e68b"
;
}
.uniui-videocam
:before
{
content
:
"\e68c"
;
}
.uniui-download
:before
{
content
:
"\e68d"
;
}
.uniui-help
:before
{
content
:
"\e679"
;
}
.uniui-navigate-filled
:before
{
content
:
"\e67a"
;
}
.uniui-plusempty
:before
{
content
:
"\e67b"
;
}
.uniui-smallcircle
:before
{
content
:
"\e67c"
;
}
.uniui-minus-filled
:before
{
content
:
"\e67d"
;
}
.uniui-micoff
:before
{
content
:
"\e67e"
;
}
.uniui-closeempty
:before
{
content
:
"\e66c"
;
}
.uniui-clear
:before
{
content
:
"\e66d"
;
}
.uniui-navigate
:before
{
content
:
"\e66e"
;
}
.uniui-minus
:before
{
content
:
"\e66f"
;
}
.uniui-image
:before
{
content
:
"\e670"
;
}
.uniui-mic
:before
{
content
:
"\e671"
;
}
.uniui-paperplane
:before
{
content
:
"\e672"
;
}
.uniui-close
:before
{
content
:
"\e673"
;
}
.uniui-help-filled
:before
{
content
:
"\e674"
;
}
.uniui-paperplane-filled
:before
{
content
:
"\e675"
;
}
.uniui-plus
:before
{
content
:
"\e676"
;
}
.uniui-mic-filled
:before
{
content
:
"\e677"
;
}
.uniui-image-filled
:before
{
content
:
"\e678"
;
}
.uniui-locked-filled
:before
{
content
:
"\e668"
;
}
.uniui-info
:before
{
content
:
"\e669"
;
}
.uniui-locked
:before
{
content
:
"\e66b"
;
}
.uniui-camera-filled
:before
{
content
:
"\e658"
;
}
.uniui-chat-filled
:before
{
content
:
"\e659"
;
}
.uniui-camera
:before
{
content
:
"\e65a"
;
}
.uniui-circle
:before
{
content
:
"\e65b"
;
}
.uniui-checkmarkempty
:before
{
content
:
"\e65c"
;
}
.uniui-chat
:before
{
content
:
"\e65d"
;
}
.uniui-circle-filled
:before
{
content
:
"\e65e"
;
}
.uniui-flag
:before
{
content
:
"\e65f"
;
}
.uniui-flag-filled
:before
{
content
:
"\e660"
;
}
.uniui-gear-filled
:before
{
content
:
"\e661"
;
}
.uniui-home
:before
{
content
:
"\e662"
;
}
.uniui-home-filled
:before
{
content
:
"\e663"
;
}
.uniui-gear
:before
{
content
:
"\e664"
;
}
.uniui-smallcircle-filled
:before
{
content
:
"\e665"
;
}
.uniui-map-filled
:before
{
content
:
"\e666"
;
}
.uniui-map
:before
{
content
:
"\e667"
;
}
.uniui-refresh-filled
:before
{
content
:
"\e656"
;
}
.uniui-refresh
:before
{
content
:
"\e657"
;
}
.uniui-cloud-upload
:before
{
content
:
"\e645"
;
}
.uniui-cloud-download-filled
:before
{
content
:
"\e646"
;
}
.uniui-cloud-download
:before
{
content
:
"\e647"
;
}
.uniui-cloud-upload-filled
:before
{
content
:
"\e648"
;
}
.uniui-redo
:before
{
content
:
"\e64a"
;
}
.uniui-images-filled
:before
{
content
:
"\e64b"
;
}
.uniui-undo-filled
:before
{
content
:
"\e64c"
;
}
.uniui-more
:before
{
content
:
"\e64d"
;
}
.uniui-more-filled
:before
{
content
:
"\e64e"
;
}
.uniui-undo
:before
{
content
:
"\e64f"
;
}
.uniui-images
:before
{
content
:
"\e650"
;
}
.uniui-paperclip
:before
{
content
:
"\e652"
;
}
.uniui-settings
:before
{
content
:
"\e653"
;
}
.uniui-search
:before
{
content
:
"\e654"
;
}
.uniui-redo-filled
:before
{
content
:
"\e655"
;
}
.uniui-list
:before
{
content
:
"\e644"
;
}
.uniui-mail-open-filled
:before
{
content
:
"\e63a"
;
}
.uniui-hand-down-filled
:before
{
content
:
"\e63c"
;
}
.uniui-hand-down
:before
{
content
:
"\e63d"
;
}
.uniui-hand-up-filled
:before
{
content
:
"\e63e"
;
}
.uniui-hand-up
:before
{
content
:
"\e63f"
;
}
.uniui-heart-filled
:before
{
content
:
"\e641"
;
}
.uniui-mail-open
:before
{
content
:
"\e643"
;
}
.uniui-heart
:before
{
content
:
"\e639"
;
}
.uniui-loop
:before
{
content
:
"\e633"
;
}
.uniui-pulldown
:before
{
content
:
"\e632"
;
}
.uniui-scan
:before
{
content
:
"\e62a"
;
}
.uniui-bars
:before
{
content
:
"\e627"
;
}
.uniui-cart-filled
:before
{
content
:
"\e629"
;
}
.uniui-checkbox
:before
{
content
:
"\e62b"
;
}
.uniui-checkbox-filled
:before
{
content
:
"\e62c"
;
}
.uniui-shop
:before
{
content
:
"\e62f"
;
}
.uniui-headphones
:before
{
content
:
"\e630"
;
}
.uniui-cart
:before
{
content
:
"\e631"
;
}
uni_modules/uni-icons/components/uni-icons/uniicons.ttf
0 → 100644
View file @
5fb6fc1d
File added
uni_modules/uni-icons/package.json
0 → 100644
View file @
5fb6fc1d
{
"id"
:
"uni-icons"
,
"displayName"
:
"uni-icons 图标"
,
"version"
:
"1.3.5"
,
"description"
:
"图标组件,用于展示移动端常见的图标,可自定义颜色、大小。"
,
"keywords"
:
[
"uni-ui"
,
"uniui"
,
"icon"
,
"图标"
],
"repository"
:
"https://github.com/dcloudio/uni-ui"
,
"engines"
:
{
"HBuilderX"
:
"^3.2.14"
},
"directories"
:
{
"example"
:
"../../temps/example_temps"
},
"dcloudext"
:
{
"category"
:
[
"前端组件"
,
"通用组件"
],
"sale"
:
{
"regular"
:
{
"price"
:
"0.00"
},
"sourcecode"
:
{
"price"
:
"0.00"
}
},
"contact"
:
{
"qq"
:
""
},
"declaration"
:
{
"ads"
:
"无"
,
"data"
:
"无"
,
"permissions"
:
"无"
},
"npmurl"
:
"https://www.npmjs.com/package/@dcloudio/uni-ui"
},
"uni_modules"
:
{
"dependencies"
:
[
"uni-scss"
],
"encrypt"
:
[],
"platforms"
:
{
"cloud"
:
{
"tcb"
:
"y"
,
"aliyun"
:
"y"
},
"client"
:
{
"App"
:
{
"app-vue"
:
"y"
,
"app-nvue"
:
"y"
},
"H5-mobile"
:
{
"Safari"
:
"y"
,
"Android Browser"
:
"y"
,
"微信浏览器(Android)"
:
"y"
,
"QQ浏览器(Android)"
:
"y"
},
"H5-pc"
:
{
"Chrome"
:
"y"
,
"IE"
:
"y"
,
"Edge"
:
"y"
,
"Firefox"
:
"y"
,
"Safari"
:
"y"
},
"小程序"
:
{
"微信"
:
"y"
,
"阿里"
:
"y"
,
"百度"
:
"y"
,
"字节跳动"
:
"y"
,
"QQ"
:
"y"
},
"快应用"
:
{
"华为"
:
"u"
,
"联盟"
:
"u"
},
"Vue"
:
{
"vue2"
:
"y"
,
"vue3"
:
"y"
}
}
}
}
}
\ No newline at end of file
uni_modules/uni-icons/readme.md
0 → 100644
View file @
5fb6fc1d
## Icons 图标
> **组件名:uni-icons**
> 代码块: `uIcons`
用于展示 icons 图标 。
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-icons)
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
uni_modules/uni-scss/changelog.md
0 → 100644
View file @
5fb6fc1d
## 1.0.3(2022-01-21)
-
优化 组件示例
## 1.0.2(2021-11-22)
-
修复 / 符号在 vue 不同版本兼容问题引起的报错问题
## 1.0.1(2021-11-22)
-
修复 vue3中scss语法兼容问题
## 1.0.0(2021-11-18)
-
init
uni_modules/uni-scss/index.scss
0 → 100644
View file @
5fb6fc1d
@import
'./styles/index.scss'
;
uni_modules/uni-scss/package.json
0 → 100644
View file @
5fb6fc1d
{
"id"
:
"uni-scss"
,
"displayName"
:
"uni-scss 辅助样式"
,
"version"
:
"1.0.3"
,
"description"
:
"uni-sass是uni-ui提供的一套全局样式 ,通过一些简单的类名和sass变量,实现简单的页面布局操作,比如颜色、边距、圆角等。"
,
"keywords"
:
[
"uni-scss"
,
"uni-ui"
,
"辅助样式"
],
"repository"
:
"https://github.com/dcloudio/uni-ui"
,
"engines"
:
{
"HBuilderX"
:
"^3.1.0"
},
"dcloudext"
:
{
"category"
:
[
"JS SDK"
,
"通用 SDK"
],
"sale"
:
{
"regular"
:
{
"price"
:
"0.00"
},
"sourcecode"
:
{
"price"
:
"0.00"
}
},
"contact"
:
{
"qq"
:
""
},
"declaration"
:
{
"ads"
:
"无"
,
"data"
:
"无"
,
"permissions"
:
"无"
},
"npmurl"
:
"https://www.npmjs.com/package/@dcloudio/uni-ui"
},
"uni_modules"
:
{
"dependencies"
:
[],
"encrypt"
:
[],
"platforms"
:
{
"cloud"
:
{
"tcb"
:
"y"
,
"aliyun"
:
"y"
},
"client"
:
{
"App"
:
{
"app-vue"
:
"y"
,
"app-nvue"
:
"u"
},
"H5-mobile"
:
{
"Safari"
:
"y"
,
"Android Browser"
:
"y"
,
"微信浏览器(Android)"
:
"y"
,
"QQ浏览器(Android)"
:
"y"
},
"H5-pc"
:
{
"Chrome"
:
"y"
,
"IE"
:
"y"
,
"Edge"
:
"y"
,
"Firefox"
:
"y"
,
"Safari"
:
"y"
},
"小程序"
:
{
"微信"
:
"y"
,
"阿里"
:
"y"
,
"百度"
:
"y"
,
"字节跳动"
:
"y"
,
"QQ"
:
"y"
},
"快应用"
:
{
"华为"
:
"n"
,
"联盟"
:
"n"
},
"Vue"
:
{
"vue2"
:
"y"
,
"vue3"
:
"y"
}
}
}
}
}
uni_modules/uni-scss/readme.md
0 → 100644
View file @
5fb6fc1d
`uni-sass`
是
`uni-ui`
提供的一套全局样式 ,通过一些简单的类名和
`sass`
变量,实现简单的页面布局操作,比如颜色、边距、圆角等。
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-sass)
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
\ No newline at end of file
uni_modules/uni-scss/styles/index.scss
0 → 100644
View file @
5fb6fc1d
@import
'./setting/_variables.scss'
;
@import
'./setting/_border.scss'
;
@import
'./setting/_color.scss'
;
@import
'./setting/_space.scss'
;
@import
'./setting/_radius.scss'
;
@import
'./setting/_text.scss'
;
@import
'./setting/_styles.scss'
;
uni_modules/uni-scss/styles/setting/_border.scss
0 → 100644
View file @
5fb6fc1d
.uni-border
{
border
:
1px
$uni-border-1
solid
;
}
\ No newline at end of file
uni_modules/uni-scss/styles/setting/_color.scss
0 → 100644
View file @
5fb6fc1d
// TODO 暂时不需要 class ,需要用户使用变量实现 ,如果使用类名其实并不推荐
// @mixin get-styles($k,$c) {
// @if $k == size or $k == weight{
// font-#{$k}:#{$c}
// }@else{
// #{$k}:#{$c}
// }
// }
$uni-ui-color
:(
//
主色
primary
:
$uni-primary
,
primary-disable
:
$uni-primary-disable
,
primary-light
:
$uni-primary-light
,
//
辅助色
success
:
$uni-success
,
success-disable
:
$uni-success-disable
,
success-light
:
$uni-success-light
,
warning
:
$uni-warning
,
warning-disable
:
$uni-warning-disable
,
warning-light
:
$uni-warning-light
,
error
:
$uni-error
,
error-disable
:
$uni-error-disable
,
error-light
:
$uni-error-light
,
info
:
$uni-info
,
info-disable
:
$uni-info-disable
,
info-light
:
$uni-info-light
,
//
中性色
main-color
:
$uni-main-color
,
base-color
:
$uni-base-color
,
secondary-color
:
$uni-secondary-color
,
extra-color
:
$uni-extra-color
,
//
背景色
bg-color
:
$uni-bg-color
,
//
边框颜色
border-1
:
$uni-border-1
,
border-2
:
$uni-border-2
,
border-3
:
$uni-border-3
,
border-4
:
$uni-border-4
,
//
黑色
black
:
$uni-black
,
//
白色
white
:
$uni-white
,
//
透明
transparent
:
$uni-transparent
)
!
default
;
@each
$key
,
$child
in
$uni-ui-color
{
.uni-
#{
""
+
$key
}
{
color
:
$child
;
}
.uni-
#{
""
+
$key
}
-bg
{
background-color
:
$child
;
}
}
.uni-shadow-sm
{
box-shadow
:
$uni-shadow-sm
;
}
.uni-shadow-base
{
box-shadow
:
$uni-shadow-base
;
}
.uni-shadow-lg
{
box-shadow
:
$uni-shadow-lg
;
}
.uni-mask
{
background-color
:
$uni-mask
;
}
uni_modules/uni-scss/styles/setting/_radius.scss
0 → 100644
View file @
5fb6fc1d
@mixin
radius
(
$r
,
$d
:
null
,
$important
:
false
){
$radius-value
:
map-get
(
$uni-radius
,
$r
)
if
(
$important
,
!
important
,
null
);
// Key exists within the $uni-radius variable
@if
(
map-has-key
(
$uni-radius
,
$r
)
and
$d
){
@if
$d
==
t
{
border-top-left-radius
:
$radius-value
;
border-top-right-radius
:
$radius-value
;
}
@else
if
$d
==
r
{
border-top-right-radius
:
$radius-value
;
border-bottom-right-radius
:
$radius-value
;
}
@else
if
$d
==
b
{
border-bottom-left-radius
:
$radius-value
;
border-bottom-right-radius
:
$radius-value
;
}
@else
if
$d
==
l
{
border-top-left-radius
:
$radius-value
;
border-bottom-left-radius
:
$radius-value
;
}
@else
if
$d
==
tl
{
border-top-left-radius
:
$radius-value
;
}
@else
if
$d
==
tr
{
border-top-right-radius
:
$radius-value
;
}
@else
if
$d
==
br
{
border-bottom-right-radius
:
$radius-value
;
}
@else
if
$d
==
bl
{
border-bottom-left-radius
:
$radius-value
;
}
}
@else
{
border-radius
:
$radius-value
;
}
}
@each
$key
,
$child
in
$uni-radius
{
@if
(
$key
){
.uni-radius-
#{
""
+
$key
}
{
@include
radius
(
$key
)
}
}
@else
{
.uni-radius
{
@include
radius
(
$key
)
}
}
}
@each
$direction
in
t
,
r
,
b
,
l
,
tl
,
tr
,
br
,
bl
{
@each
$key
,
$child
in
$uni-radius
{
@if
(
$key
){
.uni-radius-
#{
""
+
$direction
}
-
#{
""
+
$key
}
{
@include
radius
(
$key
,
$direction
,
false
)
}
}
@else
{
.uni-radius-
#{
$direction
}
{
@include
radius
(
$key
,
$direction
,
false
)
}
}
}
}
uni_modules/uni-scss/styles/setting/_space.scss
0 → 100644
View file @
5fb6fc1d
@mixin
fn
(
$space
,
$direction
,
$size
,
$n
)
{
@if
$n
{
#{
$space
}
-
#{
$direction
}
:
#{
$size
*
$uni-space-root
}
px
}
@else
{
#{
$space
}
-
#{
$direction
}
:
#{
-
$size
*
$uni-space-root
}
px
}
}
@mixin
get-styles
(
$direction
,
$i
,
$space
,
$n
){
@if
$direction
==
t
{
@include
fn
(
$space
,
top
,
$i
,
$n
);
}
@if
$direction
==
r
{
@include
fn
(
$space
,
right
,
$i
,
$n
);
}
@if
$direction
==
b
{
@include
fn
(
$space
,
bottom
,
$i
,
$n
);
}
@if
$direction
==
l
{
@include
fn
(
$space
,
left
,
$i
,
$n
);
}
@if
$direction
==
x
{
@include
fn
(
$space
,
left
,
$i
,
$n
);
@include
fn
(
$space
,
right
,
$i
,
$n
);
}
@if
$direction
==
y
{
@include
fn
(
$space
,
top
,
$i
,
$n
);
@include
fn
(
$space
,
bottom
,
$i
,
$n
);
}
@if
$direction
==
a
{
@if
$n
{
#{
$space
}
:
#{
$i
*
$uni-space-root
}
px
;
}
@else
{
#{
$space
}
:
#{
-
$i
*
$uni-space-root
}
px
;
}
}
}
@each
$orientation
in
m
,
p
{
$space
:
margin
;
@if
$orientation
==
m
{
$space
:
margin
;
}
@else
{
$space
:
padding
;
}
@for
$i
from
0
through
16
{
@each
$direction
in
t
,
r
,
b
,
l
,
x
,
y
,
a
{
.uni-
#{
$orientation
}#{
$direction
}
-
#{
$i
}
{
@include
get-styles
(
$direction
,
$i
,
$space
,
true
);
}
.uni-
#{
$orientation
}#{
$direction
}
-n
#{
$i
}
{
@include
get-styles
(
$direction
,
$i
,
$space
,
false
);
}
}
}
}
\ No newline at end of file
uni_modules/uni-scss/styles/setting/_styles.scss
0 → 100644
View file @
5fb6fc1d
/* #ifndef APP-NVUE */
$-color-white
:
#fff
;
$-color-black
:
#000
;
@mixin
base-style
(
$color
)
{
color
:
#fff
;
background-color
:
$color
;
border-color
:
mix
(
$-color-black
,
$color
,
8%
);
&
:not
([
hover-class
])
:active
{
background
:
mix
(
$-color-black
,
$color
,
10%
);
border-color
:
mix
(
$-color-black
,
$color
,
20%
);
color
:
$-color-white
;
outline
:
none
;
}
}
@mixin
is-color
(
$color
)
{
@include
base-style
(
$color
);
&
[
loading
]
{
@include
base-style
(
$color
);
&
:
:
before
{
margin-right
:
5px
;
}
}
&
[
disabled
]
{
&
,
&
[
loading
],
&
:not
([
hover-class
])
:active
{
color
:
$-color-white
;
border-color
:
mix
(
darken
(
$color
,
10%
)
,
$-color-white
);
background-color
:
mix
(
$color
,
$-color-white
);
}
}
}
@mixin
base-plain-style
(
$color
)
{
color
:
$color
;
background-color
:
mix
(
$-color-white
,
$color
,
90%
);
border-color
:
mix
(
$-color-white
,
$color
,
70%
);
&
:not
([
hover-class
])
:active
{
background
:
mix
(
$-color-white
,
$color
,
80%
);
color
:
$color
;
outline
:
none
;
border-color
:
mix
(
$-color-white
,
$color
,
50%
);
}
}
@mixin
is-plain
(
$color
){
&
[
plain
]
{
@include
base-plain-style
(
$color
);
&
[
loading
]
{
@include
base-plain-style
(
$color
);
&
:
:
before
{
margin-right
:
5px
;
}
}
&
[
disabled
]
{
&
,
&
:active
{
color
:
mix
(
$-color-white
,
$color
,
40%
);
background-color
:
mix
(
$-color-white
,
$color
,
90%
);
border-color
:
mix
(
$-color-white
,
$color
,
80%
);
}
}
}
}
.uni-btn
{
margin
:
5px
;
color
:
#393939
;
border
:
1px
solid
#ccc
;
font-size
:
16px
;
font-weight
:
200
;
background-color
:
#F9F9F9
;
// TODO 暂时处理边框隐藏一边的问题
overflow
:
visible
;
&
:
:
after
{
border
:
none
;
}
&
:not
([
type
]),
&
[
type
=
default
]
{
color
:
#999
;
&
[
loading
]
{
background
:
none
;
&
:
:
before
{
margin-right
:
5px
;
}
}
&
[
disabled
]
{
color
:
mix
(
$-color-white
,
#999
,
60%
);
&
,
&
[
loading
],
&
:active
{
color
:
mix
(
$-color-white
,
#999
,
60%
);
background-color
:
mix
(
$-color-white
,
$-color-black
,
98%
);
border-color
:
mix
(
$-color-white
,
#999
,
85%
);
}
}
&
[
plain
]
{
color
:
#999
;
background
:
none
;
border-color
:
$uni-border-1
;
&
:not
([
hover-class
])
:active
{
background
:
none
;
color
:
mix
(
$-color-white
,
$-color-black
,
80%
);
border-color
:
mix
(
$-color-white
,
$-color-black
,
90%
);
outline
:
none
;
}
&
[
disabled
]
{
&
,
&
[
loading
],
&
:active
{
background
:
none
;
color
:
mix
(
$-color-white
,
#999
,
60%
);
border-color
:
mix
(
$-color-white
,
#999
,
85%
);
}
}
}
}
&
:not
([
hover-class
])
:active
{
color
:
mix
(
$-color-white
,
$-color-black
,
50%
);
}
&
[
size
=
mini
]
{
font-size
:
16px
;
font-weight
:
200
;
border-radius
:
8px
;
}
&
.uni-btn-small
{
font-size
:
14px
;
}
&
.uni-btn-mini
{
font-size
:
12px
;
}
&
.uni-btn-radius
{
border-radius
:
999px
;
}
&
[
type
=
primary
]
{
@include
is-color
(
$uni-primary
);
@include
is-plain
(
$uni-primary
)
}
&
[
type
=
success
]
{
@include
is-color
(
$uni-success
);
@include
is-plain
(
$uni-success
)
}
&
[
type
=
error
]
{
@include
is-color
(
$uni-error
);
@include
is-plain
(
$uni-error
)
}
&
[
type
=
warning
]
{
@include
is-color
(
$uni-warning
);
@include
is-plain
(
$uni-warning
)
}
&
[
type
=
info
]
{
@include
is-color
(
$uni-info
);
@include
is-plain
(
$uni-info
)
}
}
/* #endif */
uni_modules/uni-scss/styles/setting/_text.scss
0 → 100644
View file @
5fb6fc1d
@mixin
get-styles
(
$k
,
$c
)
{
@if
$k
==
size
or
$k
==
weight
{
font-
#{
$k
}
:
#{
$c
}
}
@else
{
#{
$k
}
:
#{
$c
}
}
}
@each
$key
,
$child
in
$uni-headings
{
/* #ifndef APP-NVUE */
.uni-
#{
$key
}
{
@each
$k
,
$c
in
$child
{
@include
get-styles
(
$k
,
$c
)
}
}
/* #endif */
/* #ifdef APP-NVUE */
.container
.uni-
#{
$key
}
{
@each
$k
,
$c
in
$child
{
@include
get-styles
(
$k
,
$c
)
}
}
/* #endif */
}
uni_modules/uni-scss/styles/setting/_variables.scss
0 → 100644
View file @
5fb6fc1d
// @use "sass:math";
@import
'../tools/functions.scss'
;
// 间距基础倍数
$uni-space-root
:
2
!
default
;
// 边框半径默认值
$uni-radius-root
:
5px
!
default
;
$uni-radius
:
()
!
default
;
// 边框半径断点
$uni-radius
:
map-deep-merge
(
(
0
:
0
,
//
TODO
当前版本暂时不支持
sm
属性
//
'sm'
:
math
.
div
(
$uni-radius-root
,
2
)
,
null
:
$uni-radius-root
,
'lg'
:
$uni-radius-root
*
2
,
'xl'
:
$uni-radius-root
*
6
,
'pill'
:
9999px
,
'circle'
:
50%
)
,
$uni-radius
);
// 字体家族
$body-font-family
:
'Roboto'
,
sans-serif
!
default
;
// 文本
$heading-font-family
:
$body-font-family
!
default
;
$uni-headings
:
()
!
default
;
$letterSpacing
:
-0
.01562em
;
$uni-headings
:
map-deep-merge
(
(
'h1'
:
(
size
:
32px
,
weight
:
300
,
line-height
:
50px
,
//
letter-spacing
:-
0
.01562em
)
,
'h2'
:
(
size
:
28px
,
weight
:
300
,
line-height
:
40px
,
//
letter-spacing
:
-0
.00833em
)
,
'h3'
:
(
size
:
24px
,
weight
:
400
,
line-height
:
32px
,
//
letter-spacing
:
normal
)
,
'h4'
:
(
size
:
20px
,
weight
:
400
,
line-height
:
30px
,
//
letter-spacing
:
0
.00735em
)
,
'h5'
:
(
size
:
16px
,
weight
:
400
,
line-height
:
24px
,
//
letter-spacing
:
normal
)
,
'h6'
:
(
size
:
14px
,
weight
:
500
,
line-height
:
18px
,
//
letter-spacing
:
0
.0125em
)
,
'subtitle'
:
(
size
:
12px
,
weight
:
400
,
line-height
:
20px
,
//
letter-spacing
:
0
.00937em
)
,
'body'
:
(
font-size
:
14px
,
font-weight
:
400
,
line-height
:
22px
,
//
letter-spacing
:
0
.03125em
)
,
'caption'
:
(
'size'
:
12px
,
'weight'
:
400
,
'line-height'
:
20px
,
//
'letter-spacing'
:
0
.03333em
,
//
'text-transform'
:
false
)
)
,
$uni-headings
);
// 主色
$uni-primary
:
#2979ff
!
default
;
$uni-primary-disable
:
lighten
(
$uni-primary
,
20%
)
!
default
;
$uni-primary-light
:
lighten
(
$uni-primary
,
25%
)
!
default
;
// 辅助色
// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
$uni-success
:
#18bc37
!
default
;
$uni-success-disable
:
lighten
(
$uni-success
,
20%
)
!
default
;
$uni-success-light
:
lighten
(
$uni-success
,
25%
)
!
default
;
$uni-warning
:
#f3a73f
!
default
;
$uni-warning-disable
:
lighten
(
$uni-warning
,
20%
)
!
default
;
$uni-warning-light
:
lighten
(
$uni-warning
,
25%
)
!
default
;
$uni-error
:
#e43d33
!
default
;
$uni-error-disable
:
lighten
(
$uni-error
,
20%
)
!
default
;
$uni-error-light
:
lighten
(
$uni-error
,
25%
)
!
default
;
$uni-info
:
#8f939c
!
default
;
$uni-info-disable
:
lighten
(
$uni-info
,
20%
)
!
default
;
$uni-info-light
:
lighten
(
$uni-info
,
25%
)
!
default
;
// 中性色
// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
$uni-main-color
:
#3a3a3a
!
default
;
// 主要文字
$uni-base-color
:
#6a6a6a
!
default
;
// 常规文字
$uni-secondary-color
:
#909399
!
default
;
// 次要文字
$uni-extra-color
:
#c7c7c7
!
default
;
// 辅助说明
// 边框颜色
$uni-border-1
:
#F0F0F0
!
default
;
$uni-border-2
:
#EDEDED
!
default
;
$uni-border-3
:
#DCDCDC
!
default
;
$uni-border-4
:
#B9B9B9
!
default
;
// 常规色
$uni-black
:
#000000
!
default
;
$uni-white
:
#ffffff
!
default
;
$uni-transparent
:
rgba
(
$color
:
#000000
,
$alpha
:
0
)
!
default
;
// 背景色
$uni-bg-color
:
#f7f7f7
!
default
;
/* 水平间距 */
$uni-spacing-sm
:
8px
!
default
;
$uni-spacing-base
:
15px
!
default
;
$uni-spacing-lg
:
30px
!
default
;
// 阴影
$uni-shadow-sm
:
0
0
5px
rgba
(
$color
:
#d8d8d8
,
$alpha
:
0
.5
)
!
default
;
$uni-shadow-base
:
0
1px
8px
1px
rgba
(
$color
:
#a5a5a5
,
$alpha
:
0
.2
)
!
default
;
$uni-shadow-lg
:
0px
1px
10px
2px
rgba
(
$color
:
#a5a4a4
,
$alpha
:
0
.5
)
!
default
;
// 蒙版
$uni-mask
:
rgba
(
$color
:
#000000
,
$alpha
:
0
.4
)
!
default
;
uni_modules/uni-scss/styles/tools/functions.scss
0 → 100644
View file @
5fb6fc1d
// 合并 map
@function
map-deep-merge
(
$parent-map
,
$child-map
){
$result
:
$parent-map
;
@each
$key
,
$child
in
$child-map
{
$parent-has-key
:
map-has-key
(
$result
,
$key
);
$parent-value
:
map-get
(
$result
,
$key
);
$parent-type
:
type-of
(
$parent-value
);
$child-type
:
type-of
(
$child
);
$parent-is-map
:
$parent-type
==
map
;
$child-is-map
:
$child-type
==
map
;
@if
(
not
$parent-has-key
)
or
(
$parent-type
!=
$child-type
)
or
(
not
(
$parent-is-map
and
$child-is-map
)){
$result
:
map-merge
(
$result
,
(
$key
:
$child
));
}
@else
{
$result
:
map-merge
(
$result
,
(
$key
:
map-deep-merge
(
$parent-value
,
$child
)
));
}
}
@return
$result
;
};
uni_modules/uni-scss/theme.scss
0 → 100644
View file @
5fb6fc1d
// 间距基础倍数
$uni-space-root
:
2
;
// 边框半径默认值
$uni-radius-root
:
5px
;
// 主色
$uni-primary
:
#2979ff
;
// 辅助色
$uni-success
:
#4cd964
;
// 警告色
$uni-warning
:
#f0ad4e
;
// 错误色
$uni-error
:
#dd524d
;
// 描述色
$uni-info
:
#909399
;
// 中性色
$uni-main-color
:
#303133
;
$uni-base-color
:
#606266
;
$uni-secondary-color
:
#909399
;
$uni-extra-color
:
#C0C4CC
;
// 背景色
$uni-bg-color
:
#f5f5f5
;
// 边框颜色
$uni-border-1
:
#DCDFE6
;
$uni-border-2
:
#E4E7ED
;
$uni-border-3
:
#EBEEF5
;
$uni-border-4
:
#F2F6FC
;
// 常规色
$uni-black
:
#000000
;
$uni-white
:
#ffffff
;
$uni-transparent
:
rgba
(
$color
:
#000000
,
$alpha
:
0
);
uni_modules/uni-scss/variables.scss
0 → 100644
View file @
5fb6fc1d
@import
'./styles/setting/_variables.scss'
;
// 间距基础倍数
$uni-space-root
:
2
;
// 边框半径默认值
$uni-radius-root
:
5px
;
// 主色
$uni-primary
:
#2979ff
;
$uni-primary-disable
:
mix
(
#fff
,
$uni-primary
,
50%
);
$uni-primary-light
:
mix
(
#fff
,
$uni-primary
,
80%
);
// 辅助色
// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
$uni-success
:
#18bc37
;
$uni-success-disable
:
mix
(
#fff
,
$uni-success
,
50%
);
$uni-success-light
:
mix
(
#fff
,
$uni-success
,
80%
);
$uni-warning
:
#f3a73f
;
$uni-warning-disable
:
mix
(
#fff
,
$uni-warning
,
50%
);
$uni-warning-light
:
mix
(
#fff
,
$uni-warning
,
80%
);
$uni-error
:
#e43d33
;
$uni-error-disable
:
mix
(
#fff
,
$uni-error
,
50%
);
$uni-error-light
:
mix
(
#fff
,
$uni-error
,
80%
);
$uni-info
:
#8f939c
;
$uni-info-disable
:
mix
(
#fff
,
$uni-info
,
50%
);
$uni-info-light
:
mix
(
#fff
,
$uni-info
,
80%
);
// 中性色
// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
$uni-main-color
:
#3a3a3a
;
// 主要文字
$uni-base-color
:
#6a6a6a
;
// 常规文字
$uni-secondary-color
:
#909399
;
// 次要文字
$uni-extra-color
:
#c7c7c7
;
// 辅助说明
// 边框颜色
$uni-border-1
:
#F0F0F0
;
$uni-border-2
:
#EDEDED
;
$uni-border-3
:
#DCDCDC
;
$uni-border-4
:
#B9B9B9
;
// 常规色
$uni-black
:
#000000
;
$uni-white
:
#ffffff
;
$uni-transparent
:
rgba
(
$color
:
#000000
,
$alpha
:
0
);
// 背景色
$uni-bg-color
:
#f7f7f7
;
/* 水平间距 */
$uni-spacing-sm
:
8px
;
$uni-spacing-base
:
15px
;
$uni-spacing-lg
:
30px
;
// 阴影
$uni-shadow-sm
:
0
0
5px
rgba
(
$color
:
#d8d8d8
,
$alpha
:
0
.5
);
$uni-shadow-base
:
0
1px
8px
1px
rgba
(
$color
:
#a5a5a5
,
$alpha
:
0
.2
);
$uni-shadow-lg
:
0px
1px
10px
2px
rgba
(
$color
:
#a5a4a4
,
$alpha
:
0
.5
);
// 蒙版
$uni-mask
:
rgba
(
$color
:
#000000
,
$alpha
:
0
.4
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment