본문 바로가기

카테고리 없음

2020-10-01 16시 개발자 글 모음 | "Vite부터 시작하는 Vue 3 생활"

Vite부터 시작하는 Vue 3 생활 by 백진후 about Vue

  • < template > < p > count: {{ count }} < button @click = " count++ " > count update < p > list: {{ list }} < button @click = " updateList(list) " > list push < p > readOnlyCount: {{ readOnlyCount }} < button @click = " readOnlyCount++ " > readOnlyCount update < hr /> < p > failedCount: {{ failedCount }} < button @click = " failedCount++ " > count update < p > failedList: {{ failedList }} < button @click = " updateList(failedList) " > list push < script > import { ref
  • readonly } from 'vue' export default { setup ( ) { const count = ref ( 0 ) const list = reactive ( [ ] ) const readOnlyCount = readonly ( count ) const failedCount = reactive ( 0 ) const failedList = ref ( [ ] ) const updateList = ( base ) => { base
  • < template > < h1 > 출입문 < p > {{ welcomeMessage }} < button @click = " leave " > 떠나기 < script > import { reactive


태그