작업 일지 39

커스텀 Input 컴포넌트의 라벨 연결 오류 와 해

같은 커스텀 컴포넌트에서는 Vue의 구조 특성상 구조가 잘못되기 쉽습니다. 스크린리더는 이 input이 어떤 필드인지 알 수 없습니다. {{ label }} input과 label 연결을 위한 id 생성 {{ label }} :id="inputId" :value="modelValue" @input="$emit('update:modelValue', $event.target.value)" /> aria-labelledby 대체 방식 시각적으로 라벨을 숨겨야 할 경우:{{ label }} v-model 호환 개선 defineProps(['modelValue', 'label']); defineEmit..

Vue2 - You may use special comments to disable some warnings(ESLint 설정)

vue2 라우터 설치만 3번째...라우터만 설치하면 나타나는 에러늪!!!! 꼭? 필요한 설정이 있어서 기록합니다. 에러 You may use special comments to disable some warnings. Use // eslint-disable-next-line to ignore the next line. Use /* eslint-disable */ to ignore all warnings in a file. ERROR in [eslint] D:\stduy\vue2-project\todo2\src\views\HomeView.vue 13:11 error Component name "home" should always be multi-word vue/multi-word-component-name..

Vue2 - Component name "***" should always be multi-word

에러 error Component name "Header" should always be multi-word ( 구성 요소 이름 "***"는 항상 여러 단어로 이루어져야 합니다.) * 해결 * export default { name: "Header", >> 변경 " HeaderItem " }; 네이밍을 할때는 카멜 케이스, 파스칼 케이스, 케밥 케이스 으로 네이밍 단어를 구분해줘야만 여러 단어로 인식한다! 참고 eslint-plugin-vue 공식문서