contents-popup-redtombo 1.0.5 → 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.
package/README.md CHANGED
@@ -1,75 +1,4 @@
1
- # Nuxt Minimal Starter
1
+ # suggets-redtombo
2
2
 
3
- Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
4
-
5
- ## Setup
6
-
7
- Make sure to install dependencies:
8
-
9
- ```bash
10
- # npm
11
- npm install
12
-
13
- # pnpm
14
- pnpm install
15
-
16
- # yarn
17
- yarn install
18
-
19
- # bun
20
- bun install
21
- ```
22
-
23
- ## Development Server
24
-
25
- Start the development server on `http://localhost:3000`:
26
-
27
- ```bash
28
- # npm
29
- npm run dev
30
-
31
- # pnpm
32
- pnpm dev
33
-
34
- # yarn
35
- yarn dev
36
-
37
- # bun
38
- bun run dev
39
- ```
40
-
41
- ## Production
42
-
43
- Build the application for production:
44
-
45
- ```bash
46
- # npm
47
- npm run build
48
-
49
- # pnpm
50
- pnpm build
51
-
52
- # yarn
53
- yarn build
54
-
55
- # bun
56
- bun run build
57
- ```
58
-
59
- Locally preview production build:
60
-
61
- ```bash
62
- # npm
63
- npm run preview
64
-
65
- # pnpm
66
- pnpm preview
67
-
68
- # yarn
69
- yarn preview
70
-
71
- # bun
72
- bun run preview
73
- ```
74
-
75
- Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
3
+ このパッケージの詳細な説明や使用方法については、以下のブログ記事をご参照ください:
4
+ [自作パッケージの公開③](https://human-osaka.net/blog/%e8%87%aa%e4%bd%9c%e3%83%91%e3%83%83%e3%82%b1%e3%83%bc%e3%82%b8%e3%81%ae%e5%85%ac%e9%96%8b%e2%91%a2/)
@@ -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: (variable?: any) => void;
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
- props.click();
31
+ // 親コンポーネントの関数が存在するなら、
32
+ // 親コンポーネントの関数を呼び出す。
33
+ if(props.click){
34
+ props.click();
35
+ }
33
36
  openPopup(props.component)
34
37
  }
35
38
  </script>
package/package.json CHANGED
@@ -1,18 +1,11 @@
1
1
  {
2
2
  "name": "contents-popup-redtombo",
3
- "version": "1.0.5",
4
- "description": "中のComponentsを動的に切り替えれるポップアップ",
3
+ "version": "1.1.1",
4
+ "description": "ポップアップの中のComponentsを動的に切り替えることができるポップアップ",
5
5
  "main": "./module.ts",
6
6
  "exports": {
7
7
  ".": "./module.ts"
8
8
  },
9
- "scripts": {
10
- "build": "nuxt build",
11
- "dev": "nuxt dev",
12
- "generate": "nuxt generate",
13
- "preview": "nuxt preview",
14
- "postinstall": "nuxt prepare"
15
- },
16
9
  "peerDependencies": {
17
10
  "bootstrap": "^5.0.0",
18
11
  "nuxt": "^3.0.0"