pgyunjae1100
@pgyunjae1100
Reviews Written
5
Average Rating
5.0
Posts
Q&A
'myChart' is assigned a value but never used
์๋ ํ์ธ์! ์ ๋ ๋์ผํ ํ์์ด์ด์ ์์ด ๋ง์ํ์ ๊ฒ์ฒ๋ผ ์๋์ ๊ฐ์ด `vue.config.js` ๋ฅผ ์์ฑ ํ serve๋ฅผ ๋ด๋ ธ๋ค ์ฌ๋ ธ๋๋ฐ๋ ๋์ผ ํ ํ์์ด ๋ฐ์ํฉ๋๋ค. (์ฌ์ง) (์ฌ์ง) vue ๋ฒ์ ผ์ PS C:\Dev_Env\workspace\vue-advanced\vue-charts\chart-lib> vue -V @vue/cli 4.0.5 ์ ๋๋ค. ๊ทธ๋ฆฌ๊ณ package.jon์ ์ค์น๋ chart.js๋ "dependencies": { "chart.js": "^2.9.2", "core-js": "^3.3.2", "vue": "^2.6.10" }, ์ ๋๋ค. ๊ฐ์ฌํฉ๋๋ค.
- Likes
- 1
- Comments
- 4
- Viewcount
- 2.5K
Q&A
console.log ์ค๋ฅ ์ง๋ฌธ๋๋ฆฝ๋๋ค...!
๋ฐ๋ก ๋ต๋ณ ์ฃผ์ ์ ๊ฐ์ฌํฉ๋๋ค. ๊ทธ๋ฐ๋ฐ ๋ง์ ํ์ ๋ฐ๋ก `vue.config.js` ํ์ผ์ ์์ฑํ๊ณ ์์ ๋ด์ฉ์ ๋ณต์ฌํด์ ๋ฃ์ด๋ ๊ฒฐ๊ณผ๋ ๋์ผํฉ๋๋ค. ๊ทธ๋์ App.vue ์์ค ํ์ผ์ /* eslint-disable no-console */ ๋ด์ฉ์ 1 line ์ถ๊ฐํ๋๋ ์ค๋ฅ๊ฐ ์์ด์ง๋๋ค. methods: { loginUser() { axios.get('https://jsonplaceholder.typicode.com/users/1') .then(response => { /* eslint-disable no-console */ if (response.data.id === 1) { axios.get('https://jsonplaceholder.typicode.com/todos') .then(response => { console.log('test', response); }) .catch(error => console.log(error)); } }) .catch(error => console.log(error)); } } ๊ฐ์ ๋ด์ฉ์ "vue-advanced"์์๋ ์ด๋ฐ ์ค๋ฅ๊ฐ ์์๋๋ฐ, ์ ๊ท๋ก ๋ทฐ๋ฅผ ์์ฑํด์ async-await ๊ฐ์ ๋จ๊ณ์์๋ ์์ด๋ฐ ํ์์ด ๋ฐ์ํ๋์ง ๊ถ๊ธํฉ๋๋ค. package๋ฅผ ์ถ๊ฐ๋ก ๋ ์ค์น๋ฅผ ํด์ผ๋๋๊ฑด์ง์? vue๋ฅผ ์ฒ์ ๋ฐฐ์ฐ๊ณ ์๋ ๋จ๊ณ๋ผ ๊ถ๊ธํด์ ์ฌ์ญ์ด ๋ด ๋๋ค.
- Likes
- 3
- Comments
- 3
- Viewcount
- 1.2K




