mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 11:56:46 +08:00
-- bug
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
<div style="color:red;font-size: 10px" v-if="value && !validate">名称重复,请重新输入</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import {defineProps, defineEmits, watch, ref} from "vue";
|
||||
import {defineProps, defineEmits, watch, ref, onMounted} from "vue";
|
||||
import {validateName} from "@/api/index1";
|
||||
|
||||
const props = defineProps({
|
||||
@@ -47,6 +47,10 @@ const emit = defineEmits({})
|
||||
|
||||
const modelV = ref()
|
||||
|
||||
onMounted(()=>{
|
||||
modelV.value = props.value
|
||||
})
|
||||
|
||||
watch(() => props.value, () => {
|
||||
if (props.value !== modelV.value) {
|
||||
modelV.value = props.value
|
||||
|
||||
Reference in New Issue
Block a user