Skip to content

Commit 277d724

Browse files
committed
style: demo
1 parent 08dea08 commit 277d724

File tree

3 files changed

+29
-17
lines changed

3 files changed

+29
-17
lines changed

pages/API/canvas/canvas.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
<canvas class="canvas-element" canvas-id="canvas" id="canvas"></canvas>
66
<scroll-view class="canvas-buttons" scroll-y="true">
77
<block v-for="(name, index) in names" :key="index">
8-
<button class="canvas-button" @tap="handleCanvasButton(name)">{{name}}</button>
8+
<button class="canvas-button" @click="handleCanvasButton(name)">{{name}}</button>
99
</block>
10-
<button class="canvas-button" @tap="toTempFilePath" type="primary">toTempFilePath</button>
10+
<button class="canvas-button" @click="toTempFilePath" type="primary">toTempFilePath</button>
1111
</scroll-view>
1212
</view>
1313
</view>

pages/component/form/form.vue

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,30 @@
55
<form @submit="formSubmit" @reset="formReset">
66
<view class="uni-form-item uni-column">
77
<view class="title">switch</view>
8-
<switch name="switch" />
8+
<view>
9+
<switch name="switch" />
10+
</view>
911
</view>
1012
<view class="uni-form-item uni-column">
1113
<view class="title">radio</view>
1214
<radio-group name="radio">
13-
<label><radio value="radio1" />选项一</label>
14-
<label><radio value="radio2" />选项二</label>
15+
<label>
16+
<radio value="radio1" />选项一
17+
</label>
18+
<label>
19+
<radio value="radio2" />选项二
20+
</label>
1521
</radio-group>
1622
</view>
1723
<view class="uni-form-item uni-column">
1824
<view class="title">checkbox</view>
1925
<checkbox-group name="checkbox">
20-
<label><checkbox value="checkbox1" />选项一</label>
21-
<label><checkbox value="checkbox2" />选项二</label>
26+
<label>
27+
<checkbox value="checkbox1" />选项一
28+
</label>
29+
<label>
30+
<checkbox value="checkbox2" />选项二
31+
</label>
2232
</checkbox-group>
2333
</view>
2434
<view class="uni-form-item uni-column">
@@ -47,27 +57,29 @@
4757
}
4858
},
4959
methods: {
50-
pickerConfirm: function (e) {
60+
pickerConfirm: function(e) {
5161
this.pickerHidden = true
5262
this.chosen = e.target.value
5363
},
54-
pickerCancel: function (e) {
64+
pickerCancel: function(e) {
5565
this.pickerHidden = true
5666
},
57-
pickerShow: function (e) {
67+
pickerShow: function(e) {
5868
this.pickerHidden = false
5969
},
60-
formSubmit: function (e) {
70+
formSubmit: function(e) {
6171
console.log('form发生了submit事件,携带数据为:' + JSON.stringify(e.detail.value))
6272
},
63-
formReset: function (e) {
64-
console.log("清空数据")
73+
formReset: function(e) {
74+
console.log('清空数据')
6575
this.chosen = ''
6676
}
6777
}
6878
}
6979
</script>
7080

7181
<style>
72-
.title{padding:10px 0 !important;}
73-
</style>
82+
.uni-form-item .title {
83+
padding: 20upx 0;
84+
}
85+
</style>

pages/tabBar/component/component.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<view class="uni-list">
1111
<view class="uni-list-cell uni-collapse">
1212
<view class="uni-list-cell-navigate uni-navigate-bottom" hover-class="uni-list-cell-hover" :class="list.open ? 'uni-active' : ''"
13-
@click="trigerCollapse(index)">
13+
@click="triggerCollapse(index)">
1414
{{list.name}}
1515
</view>
1616
<view class="uni-list uni-collapse" :class="list.open ? 'uni-active' : ''">
@@ -111,7 +111,7 @@
111111
})
112112
},
113113
methods: {
114-
trigerCollapse(e) {
114+
triggerCollapse(e) {
115115
if(!this.lists[e].pages){
116116
this.goDetailPage(this.lists[e].url);
117117
return ;

0 commit comments

Comments
 (0)