mod vue2 to vue3
This commit is contained in:
@@ -25,12 +25,12 @@
|
||||
|
||||
<script>
|
||||
|
||||
import { fetchList } from '@/api/sys/role/role'
|
||||
import { fetchList } from '@/api/sys/role/role.js'
|
||||
|
||||
export default {
|
||||
name: 'MeetRole',
|
||||
props: {
|
||||
value: Array,
|
||||
modelValue: Array,
|
||||
default: Array
|
||||
},
|
||||
data() {
|
||||
@@ -43,15 +43,15 @@ export default {
|
||||
|
||||
watch: {
|
||||
// 检测查询变化
|
||||
value: {
|
||||
modelValue: {
|
||||
handler() {
|
||||
this.values = this.value
|
||||
this.values = this.modelValue
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.values = this.value
|
||||
this.values = this.modelValue
|
||||
this.fetchList()
|
||||
},
|
||||
methods: {
|
||||
@@ -63,7 +63,7 @@ export default {
|
||||
},
|
||||
handlerChange(e) {
|
||||
this.$emit('change', e)
|
||||
this.$emit('input', e)
|
||||
this.$emit('update:modelValue', e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user