본문 바로가기

Frontend/Vue 231

vue3 computed 캐싱 //중괄호 내부에서 문자 합치기, 변형하기 {{ msg+'!?' }} {{ msg.split('').reverse().join('') }} //h1 태그 내부 {{ reverseMessage() }} //methods {{ reversedMessage }} //computed. computed 캐싱 - 한번 계산을 하면 저장된 값을 - computed에서 만들어둔 데이터는 캐싱이라는 기능이 있어서 한번 연산을 해두면 반복적으로 데이터처럼 화면에 출력할때 또 계산을 하지않음. 가지고 있는 데이터를 출력해줌 - 여러차례 출력되는 데이터 일땐 계산된 가지고 있는 데이터(캐싱)를 통해서 출력을 해준다. 기본적으로 application을 만들때 데이터를 최적화 할때 캐싱 기능을 이용할수있다. computed 에는.. 2021. 10. 18.
vue3 computed @@@Computed //계산된 데이터 computed 에 function haSFruits 생성후 v-if문에 hasFruits 입력 function reverseFruits 생성후 v-for문 fruit in reverseFruits Fruits {{ fruit }} Reverse Fruit {{ fruit }} 2021. 10. 18.
vue3 syntax //onClick @click="펑션명" //조건문 v-if //마운트된 이후로 데이터가 변하지 않음 v-once //원시 html v-html="msg" //v-bind msg : 'active' v-bind:id="" ->> :id v-bind:class="" ->> :class {{ msg }} 2021. 10. 18.
[유튜브] 한시간만에 끝내는 Vue.js 입문 배운것 vue 설치 (nodejs 설치 필수) - npm install -g @vue/cli 폴더 생성 방법 - vue create test ('test'라는 프로젝트 생성) bootstrap vue 설치 방법 data를 {{ }} 로 표시하는 방법 watch 의 기능 method (function) create, mount, update, destroy 타이밍 App.vue / main.js / router.js / Header.vue / Home.vue / About.vue 각 무슨 기능을 하는지 잘 모르겠음 데이터 바인딩 {{ }} 이벤트 @click @change 다중데이터 v-for 조건에 따라 보여주기 v-if : 렌더링 X v-show : 렌더링O 보여주진않음. Welcome to home~.. 2021. 10. 13.
[error] VSCode : 이 시스템에서 스크립트를 실행할 수 없으므로 VSCode 터미널에서 vue 설치 (vue -g install vue/cli) 후 테스트 폴더를 작성하려고 했는데 에러가 발생 vue create test //테스트 폴더 생성 명령어 console 내용 : vue : 이 시스템에서 스크립트를 실행할 수 없으므로 ~~ vue.ps1 파일을 로드할 수 없습니다. 자세한 내용은 about_Exe cution_Policies(https://go.microsoft.com/fwlink/?LinkID=135170)를 참조하십시오. PowerShell 을 관리자 모드로 실행 get-help Set-ExecutionPolisy > [Y](조금 시간이 걸린다) Set-ExecutionPolicy RemoteSigned > [Y] 2021. 10. 13.
반응형