Compare commits

..

No commits in common. "8dc6937c30c4833cebe2160bee7b57a9169d61ac" and "413c0eac110aee132ae2a124edbe30262874a9f5" have entirely different histories.

2 changed files with 5 additions and 3 deletions

View File

@ -4,9 +4,11 @@
<script>
import { defineComponent, ref, unref, computed } from 'vue'
import { NSwitch } from 'naive-ui'
export default defineComponent({
name: 'TableSwitch',
props: {
...NSwitch.props,
data: {
type: [Object, String, Number, Boolean],
required: true
@ -16,7 +18,7 @@ export default defineComponent({
default: ''
}
},
emits: ['change'],
emits: ['getRow'],
setup(props, { emit }) {
const switchVlue = ref()
const { data, rowKey } = unref(props)
@ -32,7 +34,7 @@ export default defineComponent({
data,
value
}
emit('change', params)
emit('getRow', params)
}
return {
switchVlue,

View File

@ -90,7 +90,7 @@ export default {
rowKey: 'status',
checkedValue: 1,
uncheckedValue: 2,
onChange: getSwitch.bind(row)
onGetRow: getSwitch.bind(row)
})
}
},