contents-popup-redtombo 1.0.2 → 1.0.4
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/module.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { defineNuxtModule } from '@nuxt/kit'
|
|
2
|
+
import { resolve } from 'path'
|
|
3
|
+
|
|
4
|
+
export default defineNuxtModule({
|
|
5
|
+
setup(_, nuxt) {
|
|
6
|
+
// コンポーネントディレクトリを追加
|
|
7
|
+
nuxt.hook('components:dirs', (dirs) => {
|
|
8
|
+
dirs.push({
|
|
9
|
+
path: resolve(__dirname, 'components'), // モジュール内のコンポーネントを登録
|
|
10
|
+
pathPrefix: false,
|
|
11
|
+
})
|
|
12
|
+
})
|
|
13
|
+
},
|
|
14
|
+
})
|
package/package.json
CHANGED
package/components/EditSong.vue
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
interface State {
|
|
2
|
-
component: string; //コンポーネント
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
// グローバルな状態管理
|
|
6
|
-
const state = reactive<State>({
|
|
7
|
-
component: "EditSong",
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
export function useComponent() {
|
|
11
|
-
function changeComponent(): void {
|
|
12
|
-
if (state.component === "EditSong") {
|
|
13
|
-
state.component = "DeleteSong";
|
|
14
|
-
} else {
|
|
15
|
-
state.component = "EditSong";
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
return {
|
|
20
|
-
changeComponent,
|
|
21
|
-
state,
|
|
22
|
-
};
|
|
23
|
-
}
|