|
@@ -186,7 +186,15 @@ const data = reactive({
|
|
|
});
|
|
|
|
|
|
const { queryParams, form } = toRefs(data);
|
|
|
-
|
|
|
+// 监听 modelValue 的变化
|
|
|
+/*watch(
|
|
|
+ () => props.modelValue,
|
|
|
+ (newVal) => {
|
|
|
+ if (newVal) {
|
|
|
+ getList();
|
|
|
+ }
|
|
|
+ }
|
|
|
+);*/
|
|
|
const getList = () => {
|
|
|
loading.value = true;
|
|
|
getEvent(queryParams.value)
|
|
@@ -292,21 +300,31 @@ const handleClose = (row) => {
|
|
|
const handleCloseEventDialog = (b) => {
|
|
|
console.log('handleCloseEventDialog', b);
|
|
|
};
|
|
|
-
|
|
|
-onMounted(() => {
|
|
|
- getList();
|
|
|
-});
|
|
|
-
|
|
|
-interface Props {
|
|
|
+/*interface Props {
|
|
|
modelValue: boolean;
|
|
|
title?: string;
|
|
|
height?: string;
|
|
|
-}
|
|
|
-const props = withDefaults(defineProps<Props>(), {
|
|
|
+}*/
|
|
|
+/*const props = withDefaults(defineProps<Props>(), {
|
|
|
modelValue: false
|
|
|
-});
|
|
|
+});*/
|
|
|
+const props = defineProps<{
|
|
|
+ modelValue?: boolean;
|
|
|
+ title?: string;
|
|
|
+ height?: string;
|
|
|
+}>();
|
|
|
const emit = defineEmits(['update:modelValue']);
|
|
|
|
|
|
+// 将props转换
|
|
|
+const { modelValue } = toRefs(props);
|
|
|
+
|
|
|
+// 监听props的modelValue变化
|
|
|
+watch(modelValue,(newValue) => {
|
|
|
+ if (newValue) {
|
|
|
+ getList();
|
|
|
+ }
|
|
|
+});
|
|
|
+
|
|
|
// 关闭弹窗
|
|
|
const closeDialog = () => {
|
|
|
emit('update:modelValue', false);
|