Skip to content

Commit

Permalink
fix(components-qa): 快应用组件库样式修复
Browse files Browse the repository at this point in the history
  • Loading branch information
jinjinjin0731 committed Apr 29, 2019
1 parent 2731263 commit cd47958
Show file tree
Hide file tree
Showing 14 changed files with 62 additions and 57 deletions.
2 changes: 1 addition & 1 deletion packages/taro-components-qa/src/components/radio/index.ux
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
required: false,
default: ''
},
className: {
classname: {
type: String,
required: false,
default: 'taro_input'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
required: false,
default: 'html'
},
className: {
classname: {
type: String,
required: false,
default: ''
Expand Down
25 changes: 10 additions & 15 deletions packages/taro-components-qa/src/components/taro-button/index.ux
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
<template>
<div
class="taro-button taro-button_default"
class="{{btnClass}}"
disabled="{{disabled}}"
style="{{btnStyle}}"
>
<slot></slot>
</div>
</template>

<script>
// import LOADING_IMG from './img.js'

export default {
props: {
className: {
classname: {
type: String,
required: false,
default: ''
Expand Down Expand Up @@ -60,21 +62,14 @@
}),

onInit () {
console.log(this)
this.btnClass = `taro-button taro-button_default`
// this.btnClass = this.plain ?
// `taro_button btn_plain btn_plain_${this.type}`
// :
// `taro_button ${this.className} btn_size_${this.size} ${this.disabled ? `disabled_${this.type}` : `btn_color_${this.type}`}`
// this.btnStyle = Object.assign({}, this.style, this.btnStyle)
this.btnClass = this.plain ?
`taro-button taro-button_default btn_plain btn_plain_${this.type} ${this.classname}`
:
`taro-button taro-button_default btn_size_${this.size} ${this.disabled ? `disabled_${this.type}` : `btn_color_${this.type}`} ${this.classname}`
this.btnStyle = Object.assign({}, this.style, this.btnStyle)

},

handleClick (e) {
console.log(1)
console.log(this)
this.$emit('click', e)
}
}
</script>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
required: false,
default: ''
},
className: {
classname: {
type: String,
required: false,
default: ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@

<style>
.taro_image {
width: 300px;
height: 300px;
width: 600px;
height: 600px;
resize-mode: contain;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
required: false,
default: ''
},
className: {
classname: {
type: String,
required: false,
default: 'taro_input'
Expand Down Expand Up @@ -65,12 +65,12 @@
required: false,
default: 10000
},
confirmType: {
confirmtype: {
type: String,
required: false,
default: 'default'
},
placeholderStyle: {
placeholderstyle: {
type: String,
required: false,
default: ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<script>
export default {
props: {
className: {
classname: {
type: String,
required: false,
default: 'taro_label'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<script>
export default {
props: {
className: {
classname: {
type: String,
required: false,
default: ''
Expand Down
22 changes: 11 additions & 11 deletions packages/taro-components-qa/src/components/taro-progress/index.ux
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
percent="{{percent}}"
onclick="handleClick"
disabled="{{disabled}}"
stroke-width="{{strokewidth}}"
>
</progress>
<text class="taro_progress_text" if="showInfo">{{percent}}%</text>
Expand All @@ -22,7 +23,7 @@
required: false,
default: 'horizontal'
},
className: {
classname: {
type: String,
required: false,
default: ''
Expand All @@ -42,7 +43,7 @@
default: {flex: 1}
},
percent: {
type: Number,
type: Number | String,
required: false,
default: 0
},
Expand All @@ -56,18 +57,18 @@
required: false,
default: '#09BB07'
},
backgroundColor: {
backgroundcolor: {
type: String,
required: false,
default: '#fff'
},
activeColor: {
activecolor: {
type: String,
required: false,
default: '#09BB07'
},
strokeWidth: {
type: String,
strokewidth: {
type: Number | String,
required: false,
default: 6
}
Expand All @@ -78,13 +79,12 @@
}),

onInit() {
this.progressStyle = Object.assign(this.style, { 'background': this.backgroundColor,
'color': this.color, 'stroke-width': `${this.strokeWidth}px`})
this.progressStyle = this.style
},

handleClick(e) {
this.$emit('click', e)
}
// handleClick(e) {
// this.$emit('click', e)
// }
}
</script>

Expand Down
12 changes: 6 additions & 6 deletions packages/taro-components-qa/src/components/taro-slider/index.ux
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<script>
export default {
props: {
className: {
classname: {
type: String,
required: false,
default: ''
Expand Down Expand Up @@ -55,22 +55,22 @@
required: false,
default: '#e9e9e9'
},
activeColor: {
activecolor: {
type: String,
required: false,
default: '#1aad19'
},
selectedColor: {
selectedcolor: {
type: String,
required: false,
default: '#1aad19'
},
backgroundColor: {
backgroundcolor: {
type: String,
required: false,
default: '#e9e9e9'
},
showValue: {
showvalue: {
type: Boolean,
required: false,
default: true
Expand All @@ -85,7 +85,7 @@

onInit () {
this.inputValue = this.value
this.sliderStyle = Object.assign(this.style, { 'selected-color:': this.activeColor, 'color: ': this.backgroundColor })
this.sliderStyle = Object.assign(this.style, { 'selected-color:': this.activecolor, 'color: ': this.backgroundcolor })
},

handleChange ( {progress} ) {
Expand Down
32 changes: 21 additions & 11 deletions packages/taro-components-qa/src/components/taro-swiper/index.ux
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<template>
<swiper
class="taro_swiper {{className}}"
style="{{swiperStyle}}"
class="taro_swiper {{classname}}"
style="{{swiperstyle}}"
id="{{id}}"
autoplay="{{autoplay}}"
index="{{current}}"
interval="{{interval}}"
indicator="{{indicatorDots}}"
indicator="{{indicatordots}}"
loop="{{circular}}"
@change="handleChange">
<slot></slot>
Expand All @@ -16,7 +16,7 @@
<script>
export default {
props: {
className: {
classname: {
type: String,
required: false,
default: ''
Expand All @@ -41,17 +41,17 @@
required: false,
default: true
},
indicatorDots: {
indicatordots: {
type: Boolean,
required: false,
default: true
},
indicatorColor: {
indicatocolor: {
type: String,
required: false,
default: 'rgba(0, 0, 0, .3)'
},
indicatorActiveColor: {
},
indicatoractivecolor: {
type: String,
required: false,
default: '000'
Expand All @@ -60,6 +60,16 @@
type: Number,
required: false,
default: 0
},
duration: {
type: Number,
required: false,
default: 0
},
vertical: {
type: Boolean,
required: false,
default: false
}

},
Expand All @@ -73,12 +83,12 @@
//indicator-selected-color indicator选中时的颜色
//indicator-size indicator组件的直径大小
this.swiperStyle = {
'indicator-color': this.indicatorColor,
'indicator-selected-color': '#' + this.indicatorActiveColor
'indicator-color': this.indicatorcolor,
'indicator-selected-color': '#' + this.indicatoractivecolor
}
},
handleChange (e) {
this.$emit('change', e)
// this.$emit('change', e)
}
}
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<script>
export default {
props: {
className: {
classname: {
type: String,
required: false,
default: 'taro_switch'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<script>
export default {
props: {
className: {
classname: {
type: String,
required: false,
default: 'taro_text'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<script>
export default {
props: {
className: {
classname: {
type: String,
required: false,
default: ''
Expand All @@ -41,7 +41,7 @@
required: false,
default: 140
},
placeholderClass: {
placeholderclass: {
type: String,
required: false,
default: 'textarea-placeholder'
Expand Down

0 comments on commit cd47958

Please sign in to comment.