diff --git a/content/CloneCoding/chatting/ChattingStory_3.md b/content/CloneCoding/chatting/ChattingStory_3.md new file mode 100644 index 0000000..3caf539 --- /dev/null +++ b/content/CloneCoding/chatting/ChattingStory_3.md @@ -0,0 +1,232 @@ +--- +tags: + - vue + - stomp + - websocket + - project + - chatting +draft: false +description: +title: "[Vue.js] 채팅 테스트용 화면 구성" +--- +> Spring Documentation에 있는 Html 예제를 Vue로 변환해봤다. + +# 1. Vue 프로젝트 생성 +```cmd +npm create vue@latest +``` +> vue-router, pinia 설치도 같이 하면 좋음 + +# 2. 필요 라이브러리 설치 +> 예제에서 @stomp/stompjs 모듈이 import 되어 있어서 설치함 + +```cmd +npm i @stomp/stompjs +``` + + +# 3. 화면 구성 +> 설명을 위해 template과 script 태그 영역을 분리했음 +#### 1. template +```vue title="App.vue" + + + + 연결 + 연결 해제 + 연결됨 + 연결 안됨 + + + + + {{ message.senderId }}: + {{ message.content }} + + + + + + + 전송 + + + + + +``` + +#### 2. script +> roomId, userId는 테스트를 위해 미리 백엔드에 만들어둔 값을 사용했다. + +```vue title='App.vue' + + +``` + +이제 고도화 해야겠지... \ No newline at end of file diff --git a/content/vuejs/Vue_000_Project_Setup.md b/content/vuejs/Vue_000_Project_Setup.md new file mode 100644 index 0000000..eeab67f --- /dev/null +++ b/content/vuejs/Vue_000_Project_Setup.md @@ -0,0 +1,21 @@ +--- +tags: + - vue + - frontend +draft: true +description: +title: "[Vue.js] 프로젝트 생성" +--- +# 1. 프로젝트 생성 + +```cmd +npm create vue@latest +``` +> vue-router, pinia 설치 예정이라면 중간에 yes 선택 + + +# Terms + +# Syntax + +# References \ No newline at end of file diff --git a/templates/Note.md b/templates/Note.md index 21910ac..c9df12b 100644 --- a/templates/Note.md +++ b/templates/Note.md @@ -1,7 +1,8 @@ --- tags: draft: true -description: +description: +title: --- # Title