Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
ec36eba9
U
uni-app
项目概览
DCloud
/
uni-app
14 天 前同步成功
通知
817
Star
38709
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
8
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
8
Issue
8
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
ec36eba9
编写于
1月 15, 2024
作者:
H
hdx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore(x:switch): 拆分 switch 样式为单独文件,不在使用条件编译
上级
beba5043
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
119 addition
and
32 deletion
+119
-32
packages/uni-components/style-x/switch.css
packages/uni-components/style-x/switch.css
+118
-0
packages/uni-components/style/switch.css
packages/uni-components/style/switch.css
+0
-31
packages/uni-h5-vite/src/plugins/easycom.ts
packages/uni-h5-vite/src/plugins/easycom.ts
+1
-1
未找到文件。
packages/uni-components/style-x/switch.css
0 → 100644
浏览文件 @
ec36eba9
uni-switch
{
-webkit-tap-highlight-color
:
transparent
;
display
:
inline-block
;
cursor
:
pointer
;
}
uni-switch
[
hidden
]
{
display
:
none
;
}
uni-switch
[
disabled
]
{
cursor
:
not-allowed
;
}
uni-switch
[
disabled
]
.uni-switch-input
{
opacity
:
0.7
;
}
.uni-switch-wrapper
{
display
:
inline-flex
;
align-items
:
center
;
vertical-align
:
middle
;
}
.uni-switch-input
{
appearance
:
none
;
position
:
relative
;
width
:
52px
;
height
:
32px
;
margin-right
:
5px
;
border
:
2px
solid
transparent
;
outline
:
0
;
border-radius
:
16px
;
box-sizing
:
border-box
;
background-color
:
rgba
(
0
,
0
,
0
,
.1
);
transition
:
background-color
0.1s
,
border
0.1s
;
}
.uni-switch-input
:after
{
content
:
' '
;
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
28px
;
height
:
28px
;
border-radius
:
15px
;
background-color
:
#ffffff
;
box-shadow
:
0
2px
3px
rgba
(
0
,
0
,
0
,
0.06
);
transition
:
transform
0.3s
;
}
.uni-switch-input.uni-switch-input-checked
{
border-color
:
#007aff
;
background-color
:
#007aff
;
}
.uni-switch-input.uni-switch-input-checked
:before
{
transform
:
scale
(
0
);
}
.uni-switch-input.uni-switch-input-checked
:after
{
transform
:
translateX
(
20px
);
}
uni-switch
.uni-checkbox-input
{
margin-right
:
5px
;
appearance
:
none
;
outline
:
0
;
border
:
1px
solid
#d1d1d1
;
background-color
:
#ffffff
;
border-radius
:
3px
;
width
:
22px
;
height
:
22px
;
position
:
relative
;
color
:
#007aff
;
}
uni-switch
:not
([
disabled
])
.uni-checkbox-input
:hover
{
border-color
:
#007aff
;
}
uni-switch
.uni-checkbox-input
svg
{
fill
:
#007aff
;
font-size
:
22px
;
position
:
absolute
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-48%
)
scale
(
0.73
);
}
.uni-checkbox-input.uni-checkbox-input-disabled
{
background-color
:
#e1e1e1
;
}
.uni-checkbox-input.uni-checkbox-input-disabled
:before
{
color
:
#adadad
;
}
@media
(
prefers-color-scheme
:
dark
)
{
uni-switch
.uni-switch-input
{
border-color
:
#3b3b3f
;
}
uni-switch
.uni-switch-input
,
uni-switch
.uni-switch-input
:before
{
background-color
:
#3b3b3f
;
}
uni-switch
.uni-switch-input
:after
{
background-color
:
#fff
;
box-shadow
:
0
1px
3px
rgba
(
0
,
0
,
0
,
0.4
);
}
uni-switch
.uni-checkbox-input
{
background-color
:
#2c2c2c
;
border
:
1px
solid
#656565
;
}
}
packages/uni-components/style/switch.css
浏览文件 @
ec36eba9
...
...
@@ -22,7 +22,6 @@ uni-switch[disabled] .uni-switch-input {
vertical-align
:
middle
;
}
/* #ifndef UNI-APP-X */
.uni-switch-input
{
appearance
:
none
;
position
:
relative
;
...
...
@@ -63,36 +62,6 @@ uni-switch[disabled] .uni-switch-input {
transition
:
transform
0.3s
;
transition
:
transform
0.3s
,
-webkit-transform
0.3s
;
}
/* #endif */
/* #ifdef UNI-APP-X */
.uni-switch-input
{
appearance
:
none
;
position
:
relative
;
width
:
52px
;
height
:
32px
;
margin-right
:
5px
;
border
:
2px
solid
transparent
;
outline
:
0
;
border-radius
:
16px
;
box-sizing
:
border-box
;
background-color
:
rgba
(
0
,
0
,
0
,
.1
);
transition
:
background-color
0.1s
,
border
0.1s
;
}
.uni-switch-input
:after
{
content
:
' '
;
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
28px
;
height
:
28px
;
border-radius
:
15px
;
background-color
:
#ffffff
;
box-shadow
:
0
2px
3px
rgba
(
0
,
0
,
0
,
0.06
);
transition
:
transform
0.3s
;
}
/* #endif */
.uni-switch-input.uni-switch-input-checked
{
border-color
:
#007aff
;
...
...
packages/uni-h5-vite/src/plugins/easycom.ts
浏览文件 @
ec36eba9
...
...
@@ -20,7 +20,7 @@ import {
const
H5_COMPONENTS_PATH
=
'
@dcloudio/uni-h5
'
const
xBaseComponents
=
[
'
slider
'
]
const
xBaseComponents
=
[
'
slider
'
,
'
switch
'
]
const
baseComponents
=
[
'
audio
'
,
'
button
'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录