【fix ESLint】src/components/jero/JSwitch

This commit is contained in:
zhaoxiao
2023-03-06 09:18:40 +08:00
parent 1b5c779948
commit 1ad6075283
+2 -7
View File
@@ -24,7 +24,7 @@ export default {
name: 'JSwitch', name: 'JSwitch',
props: { props: {
value: { value: {
type: String | Number, type: [String, Number],
required: false required: false
}, },
disabled: { disabled: {
@@ -57,7 +57,6 @@ export default {
}, },
// 透传给下级组件的事件,需要排除本组件使用的change事件 // 透传给下级组件的事件,需要排除本组件使用的change事件
childListeners () { childListeners () {
const vm = this
const result = Object.assign({}, const result = Object.assign({},
this.$listeners this.$listeners
) )
@@ -74,11 +73,7 @@ export default {
this.checkStatus = false this.checkStatus = false
this.$emit('change', this.options[1]) this.$emit('change', this.options[1])
} else { } else {
if (this.options[0] == val) { this.checkStatus = this.options[0] + '' === val + ''
this.checkStatus = true
} else {
this.checkStatus = false
}
} }
} }
} }