contents-popup-redtombo 1.1.0 → 1.1.2

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.
@@ -8,9 +8,10 @@ const { popupVisible } = toRefs(state);
8
8
 
9
9
  // プロパティ定義と取得
10
10
  const props = defineProps<{
11
+ buttonName: string;
11
12
  component: string;
12
13
  componentList: Record<string, Component>;
13
- click: (variable?: any) => void;
14
+ click?: (variable?: any) => void;
14
15
  }>();
15
16
 
16
17
  // 必要な props をリアクティブに扱うため分割代入
@@ -28,8 +29,11 @@ watch(
28
29
  );
29
30
 
30
31
  function handleClick() {
31
- // ボタンがクリックされたら親の関数を呼び出す
32
- props.click();
32
+ // 親コンポーネントの関数が存在するなら、
33
+ // 親コンポーネントの関数を呼び出す。
34
+ if(props.click){
35
+ props.click();
36
+ }
33
37
  openPopup(props.component)
34
38
  }
35
39
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contents-popup-redtombo",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "ポップアップの中のComponentsを動的に切り替えることができるポップアップ",
5
5
  "main": "./module.ts",
6
6
  "exports": {