Vue.js
[vue]vue3 : 데이터 바인딩
whitedeveloper
2023. 1. 20. 15:41
#.파일명 명명규칙(vuecli)
views -> ...View로 만들기
#.data만들기
#.특정한 곳에 css적용 - scope
#.문자열 데이터 바인딩
-{{ data.name }}
#.Html 데이터 바인딩
-<div v-html=''></div>
#.vue 구조 설정하기
file(혹은 좌하단 설정마크) - > user Snippets -> vue.json(없으면 만들기)
{
// Place your vue workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
// "Print to console": {
// "scope": "javascript,typescript",
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
"Generate Basic Vue Code": {
"prefix": "vue-state",
"body": [
"<template>\n\t<div></div>\n</template>\n<script>\nexport default {\n\tcomponents: {},\n\tdata() {\n\t\treturn {\n\t\t\tsampleDate:''\n\t\t}\n\t},\n\tsetup() {},\n\tcreated() {},\n\tmounted() {},\n\tunmounted() {},\n\tmethods: {}\n}\n</script>" ], "description":"Generate Basic Vue Code"
}
}