【fix ESLint】src/components/jero/JSwitch
This commit is contained in:
@@ -24,7 +24,7 @@ export default {
|
||||
name: 'JSwitch',
|
||||
props: {
|
||||
value: {
|
||||
type: String | Number,
|
||||
type: [String, Number],
|
||||
required: false
|
||||
},
|
||||
disabled: {
|
||||
@@ -57,7 +57,6 @@ export default {
|
||||
},
|
||||
// 透传给下级组件的事件,需要排除本组件使用的change事件
|
||||
childListeners () {
|
||||
const vm = this
|
||||
const result = Object.assign({},
|
||||
this.$listeners
|
||||
)
|
||||
@@ -74,11 +73,7 @@ export default {
|
||||
this.checkStatus = false
|
||||
this.$emit('change', this.options[1])
|
||||
} else {
|
||||
if (this.options[0] == val) {
|
||||
this.checkStatus = true
|
||||
} else {
|
||||
this.checkStatus = false
|
||||
}
|
||||
this.checkStatus = this.options[0] + '' === val + ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user