【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',
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 + ''
}
}
}