先にGirack-m-Backendの環境構築からすると楽
npm i
npm run dev
Girack, with better built inside.
先にGirack-m-Backendの環境構築からすると楽
npm i
npm run dev
AuthブランチにてpiniaでServerinfo用のstoreを定義したが一番最初にバックエンドからServerinfoを受け取り、socketHandlerのinfoserver.tsでインポートするとこのエラーがでる。
//サーバー情報保存
import { defineStore } from "pinia";
import type { ServerInfo } from "~/types/serverInfo";
export const storeServerinfo = defineStore("serverinfo", {
state: () => {
return {
serverinfo: {} as ServerInfo,
count: 0 as number
}
},
// could also be defined as
// state: () => ({ count: 0 })
actions: {
increment() {
this.count++
},
updateInfo(data:ServerInfo) {
this.serverinfo = data;
}
},
})
//サーバー情報受け取り
import { Socket } from "socket.io-client"; //クラス識別用
import { storeServerinfo } from "../stores/serverinfo";
const Serverinfo = storeServerinfo(); //piniaからインポート
export default function infoServer(socket: Socket): void {
//サーバー(インスタンス)情報
socket.on("infoServer", (dat) => {
console.log("infoServer :: dat->", dat);
Serverinfo.updateInfo(dat); //サーバー情報へ適用
});
}
[🍍]: "getActivePinia()" was called but there was no active Pinia. Did you forget to install pinia? const pinia = createPinia() app.use(pinia) This will fail in production
ガチで忘れてた
main画面レイアウト決め
チャンネル名変更とか
ブランチ : https://github.com/NfoAlex/Girack-m-/tree/FileUploads
解決案1
composablesまたはvueファイルに直接書く
解決案2
べつのプラグイン使う
やってみたけどダメだった
チャンネル開いたときにユーザー情報が初期情報のまま、取得ができていない
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.