hookehuyr

fix 弹框现在在有数据之后

<!--
* @Date: 2022-06-20 11:35:50
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-06-20 17:06:10
* @LastEditTime: 2022-06-20 17:45:42
* @FilePath: /tswj/src/components/LocalismBox/index.vue
* @Description: 调整作品方言弹框组件
-->
......@@ -41,7 +41,7 @@
import { ref, watch, nextTick } from 'vue'
import MyButton from '@/components/MyButton/index.vue'
import { localismListModiAPI, addLocalismAPI, modifyProdLocalismAPI } from '@/api/B/localism'
import { Toast, Dialog, _ } from '@/utils/generatePackage.js'
import { Toast, Dialog } from '@/utils/generatePackage.js'
const props = defineProps({
showLocalism: Boolean,
......@@ -74,13 +74,15 @@ const getLocalismList = async () => {
}
});
scrollToDom(props.localism);
show.value = true;
}
let show = ref(false);
watch(() => props.showLocalism, (v) => {
show.value = v;
if (v) {
getLocalismList()
} else {
show.value = false;
}
})
......