Skip to content

Commit

Permalink
feat(switch): switch组件的Skyline适配 (#2967)
Browse files Browse the repository at this point in the history
* feat(switch): switch组件的Skyline适配

* fix(switch): 新增skyline版本入口
  • Loading branch information
byq1213 authored Jul 11, 2024
1 parent e0ba1a4 commit 6ae36aa
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 0 deletions.
1 change: 1 addition & 0 deletions example/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"pages/radio/radio",
"pages/radio/skyline/radio",
"pages/switch/switch",
"pages/switch/skyline/switch",
"pages/sticky/sticky",
"pages/tag/tag",
"pages/tag/skyline/tag",
Expand Down
4 changes: 4 additions & 0 deletions example/pages/home/data/form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ const skylineForm = {
name: 'Stepper',
label: '步进器',
},
{
name: 'Switch',
label: '开关',
},
{
name: 'Textarea',
label: '多行文本框',
Expand Down
14 changes: 14 additions & 0 deletions src/switch/_example/skyline/switch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"navigationBarTitleText": "Switch",
"usingComponents": {
"t-demo": "../../../components/demo-block",
"base": "../base",
"label": "../label",
"color": "../color",
"status": "../status",
"size": "../size"
},
"renderer": "skyline",
"componentFramework": "glass-easel",
"disableScroll": true
}
3 changes: 3 additions & 0 deletions src/switch/_example/skyline/switch.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
page {
--td-cell-height: 112rpx;
}
1 change: 1 addition & 0 deletions src/switch/_example/skyline/switch.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Page({});
27 changes: 27 additions & 0 deletions src/switch/_example/skyline/switch.wxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<view class="skyline">
<t-navbar title="Switch" leftArrow />
<scroll-view scroll-y type="list" class="scroll-view">
<view class="demo-title">Switch 开关</view>
<view class="demo-desc">用于控制某个功能的开启和关闭。</view>

<t-demo title="01 组件类型" desc="基础开关">
<base />
</t-demo>

<t-demo desc="带描述开关">
<label />
</t-demo>

<t-demo desc="自定义颜色开关">
<color />
</t-demo>

<t-demo title="02 组件状态">
<status />
</t-demo>

<t-demo title="03 组件样式" desc="开关尺寸">
<size />
</t-demo>
</scroll-view>
</view>

0 comments on commit 6ae36aa

Please sign in to comment.