contents-popup-redtombo 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -10,7 +10,7 @@ const { popupVisible } = toRefs(state);
|
|
|
10
10
|
const props = defineProps<{
|
|
11
11
|
component: string;
|
|
12
12
|
componentList: Record<string, Component>;
|
|
13
|
-
click
|
|
13
|
+
click?: (variable?: any) => void;
|
|
14
14
|
}>();
|
|
15
15
|
|
|
16
16
|
// 必要な props をリアクティブに扱うため分割代入
|
|
@@ -28,8 +28,11 @@ watch(
|
|
|
28
28
|
);
|
|
29
29
|
|
|
30
30
|
function handleClick() {
|
|
31
|
-
//
|
|
32
|
-
|
|
31
|
+
// 親コンポーネントの関数が存在するなら、
|
|
32
|
+
// 親コンポーネントの関数を呼び出す。
|
|
33
|
+
if(props.click){
|
|
34
|
+
props.click();
|
|
35
|
+
}
|
|
33
36
|
openPopup(props.component)
|
|
34
37
|
}
|
|
35
38
|
</script>
|