@ -0,0 +1,39 @@ |
|||
<template> |
|||
<view class="arrow-bar"> |
|||
<text class="title">{{title}}</text> |
|||
<uni-icons class="arrow" type="right" size="16"></uni-icons> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: "arrow-bar", |
|||
props: { |
|||
title: { |
|||
type: String, |
|||
required: true |
|||
} |
|||
}, |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.arrow-bar { |
|||
width: 100%; |
|||
height: 90rpx; |
|||
font-size: 30rpx; |
|||
color: black; |
|||
margin-top: 5rpx; |
|||
background-color: white; |
|||
line-height: 90rpx; |
|||
display: flex; |
|||
.title { |
|||
flex: 1; |
|||
margin-left: 40rpx; |
|||
} |
|||
|
|||
.arrow { |
|||
margin-right: 40rpx; |
|||
} |
|||
} |
|||
</style> |
|||
@ -0,0 +1,17 @@ |
|||
<template> |
|||
<view class="bar-group"> |
|||
<slot></slot> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default{ |
|||
name: "bar-group" |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.bar-group{ |
|||
margin: 20rpx 0; |
|||
} |
|||
</style> |
|||
@ -0,0 +1,66 @@ |
|||
<template> |
|||
<view class="btn-bar" :style="style"> |
|||
<text v-if="icon" class="icon iconfont" :class="icon"></text> |
|||
<text class="title">{{title}}</text> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: "btn-bar", |
|||
props: { |
|||
title: { |
|||
type: String, |
|||
required: true |
|||
}, |
|||
icon: { |
|||
type: String, |
|||
required: false |
|||
}, |
|||
type: { |
|||
type: String, |
|||
default: "normal" |
|||
}, |
|||
color: { |
|||
type: String, |
|||
default: "#000" |
|||
} |
|||
}, |
|||
computed: { |
|||
style() { |
|||
let color = "#000"; |
|||
switch (this.type) { |
|||
case 'danger': |
|||
color = "#f14747"; |
|||
break; |
|||
case 'primary': |
|||
color = "#35567f"; |
|||
break; |
|||
} |
|||
return `color: ${color};` |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.btn-bar { |
|||
width: 100%; |
|||
height: 100rpx; |
|||
margin-top: 5rpx; |
|||
background-color: white; |
|||
line-height: 100rpx; |
|||
text-align: center; |
|||
display: flex; |
|||
justify-content: center; |
|||
.icon { |
|||
font-size: 40rpx; |
|||
font-weight: 600; |
|||
margin-right: 10rpx; |
|||
} |
|||
.title { |
|||
font-size: 32rpx; |
|||
font-weight: 600; |
|||
} |
|||
} |
|||
</style> |
|||
@ -0,0 +1,61 @@ |
|||
<template> |
|||
<view class="switch-bar"> |
|||
<text class="title">{{title}}</text> |
|||
<switch class="switch" :checked="checked" color="#18bc37" @change="onChange"></switch> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: "switch-bar", |
|||
props: { |
|||
title: { |
|||
type: String, |
|||
required: true |
|||
}, |
|||
checked: { |
|||
type: Boolean, |
|||
default: false |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
value: this.checked |
|||
} |
|||
}, |
|||
methods: { |
|||
onChange(e) { |
|||
this.value = true; |
|||
setTimeout(()=>{ |
|||
this.value = false; |
|||
},100) |
|||
//this.value = false; |
|||
|
|||
this.$emit('change', e); |
|||
} |
|||
} |
|||
|
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.switch-bar { |
|||
width: 100%; |
|||
height: 100rpx; |
|||
font-size: 34rpx; |
|||
color: black; |
|||
margin-top: 5rpx; |
|||
background-color: white; |
|||
line-height: 100rpx; |
|||
display: flex; |
|||
|
|||
.title { |
|||
flex: 1; |
|||
margin-left: 40rpx; |
|||
} |
|||
|
|||
.switch { |
|||
margin-right: 40rpx; |
|||
} |
|||
} |
|||
</style> |
|||
|
Before Width: | Height: | Size: 162 KiB After Width: | Height: | Size: 238 KiB |
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 205 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 9.8 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 839 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 141 KiB |