refactor: 轮播图模态框
This commit is contained in:
1 parent
0558261ba7
commit
73fb136b91
5 files changed
+45
-38
No files matched your search
@@ -39,13 +39,13 @@ const props = defineProps({
|
||||
|
||||
const emits = defineEmits(['on-success'])
|
||||
watch(() => props.imageUrl,(newVal) => {
|
||||
if(newVal){
|
||||
if(newVal.url !== ''){
|
||||
file1.value = [{ ...newVal }]
|
||||
}else{
|
||||
file1.value = []
|
||||
}
|
||||
if (!newVal) return
|
||||
if (newVal.url !== '') {
|
||||
file1.value = [{...newVal}]
|
||||
} else {
|
||||
file1.value = []
|
||||
}
|
||||
|
||||
},{
|
||||
deep:true,
|
||||
immediate:true
|
||||
@@ -86,4 +86,4 @@ watch(() => props.imageUrl,(newVal) => {
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
</style>
|
||||
Reference in new issue
Block a user