일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- 로컬스토리지 쓰기 읽기 삭제
- vue sass 사용하기
- for in 문 예시
- array method 요약
- vue scss
- for of 문 예시
- input range
- vscode 초기화
- forEach map 차이
- javascript cookie 삭제
- 로지텍 MX Vertical 마우스
- react 검색 기능 구현
- 접근자 함수
- react input autofocus
- pip 명령 에러
- Object for in
- 로지텍 버티컬 마우스 사용 후기
- 로컬스토리지 객체 저장
- next.config.mjs
- vscode 재설치
- input range 컬러변경
- 검색창 autofocus
- javascript cookie 얻기
- input type="range"
- javascript cookie 설정
- for in for of 차이점
- setter 함수 동기적 실행
- 접근자 프로퍼티
- 객체 반복문
- vue scss 전역 설정
- Today
- Total
목록Web Development (48)
짬짬이기록하기
for in => 객체 순환 시에 사용한다. 객체에 for of를 사용하면 "Uncaught TypeError: obj is not iterable" 타입에러가 발생한다. 즉 for of는 순번이 있는 index값을 가지는 객체에 사용할 수 있다. (*iterable : 반복가능한) let obj = { a: 1, b: 2, c: 3 }; for (let item in obj) { console.log(item) // a, b, c ==> item은 프로퍼티명, 즉 key를 의미함 console.log(obj[item]) // 1, 2, 3 } for of => 배열 값 순환 시에 사용한다. let array = [1, 2, 3]; for (let item of array) { console.log(it..
function GetCookie() { let hasCookie = document.cookie console.log(hasCookie) } function SetCookie(){ let myDue = new Date(); // 현재시간(객체) myDue.setDate(myDue.getDate() + 10) //일자를 구해서(숫자타입) 10을 더해준 것을 다시 일자로 지정함(객체) myDue.toUTCString() //UTC 표기방식(string타입) let myCookie = "name=hong; expires=" + myDue; //키와 밸류의 조합으로 생성함 document.cookie = myCookie } function DelCookie() { document.cookie = "name=;..
const obj = { name: 'jang', weight: 99, address: 'seoul' } document.getElementById("btnInput").addEventListener("click", () => { for (let key in obj) { const value = obj[key] console.log(key) console.log(value) localStorage.setItem(key, value) } }) 로컬스토리지에 객체의 내용을 key,value 값으로 저장하는 코드 예시

LocalStorage 브라우저의 로컬 스토리지(저장) 공간. key와 value가 한 쌍으로 저장된다. - 쓰기 window.localStroage.setItem('key', value) - 읽어오기 window.localStorage.getItem('key') - 삭제 window.localStorage.removeItem('key') TodoList 만들 때 활용했었고, 웹사이트 사용자 테마 지정 시에도 유용하게 쓸 수 있다.
flex container의 속성들 - flex-direction: row;(기본값) / column, row-reverse, column-reverse - flex-wrap: nowrap;(기본값) / wrap, wrap-reverse - flex-flow : row nowrap; (direction과 wrap을 한줄로 표기) - align-items : baseline (텍스트를 기준으로 균등하게 정렬) - align-content: (row라면 수직축, 즉 반대축을 기준으로 정렬) flex-wrap:wrap 일 경우 사용이 가능함 flex item의 속성들 - order : 순서를 지정할 수 있음 (잘쓰진않음, 아이템의 모든 순서를 정해야 원하는대로 출력가능, order:0부터 시작) - flex-..
1. github에서 레포지토리를 만든다. 2. vscode에서 작업할 폴더를 선택하여 폴더를 연다. 3. 만든 레포지토리로 가면 git init부터 연결주소까지 내용이 적혀있다. 4. vscode에서 터미널을 열고, 3번의 내용을 차례대로 입력해 연결해주면 끝! 5. github의 레포지토리에서 settings - pages - branch에서 브랜치 선택 후 save를 누르면 나의 깃주소/생성한레포지토리/ 명으로 uri가 생성된다. (체감 상 1분 정도 소요되는 듯하다. 쬐꼼 기다렸다 확인하면 됨)
vue : 이 시스템에서 스크립트를 실행할 수 없으므로 C:\Users\username\AppData\Roaming\npm\vue.ps1 파일을 로드할 수 없습니다. 자세한 내용은 about_Execu tion_Policies(https://go.microsoft.com/fwlink/?LinkID=135170)를 참조하십시오. 위치 줄:1 문자:1 + vue add vuetify + ~~~ + CategoryInfo : 보안 오류: (:) [], PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess 설치 에러의 연속이구만. "터미널에서 "vue create" 명령어 입력시 아래와 같은 오류가 발생할 수 있습니다. 이는 윈도우 파워쉘에서 실행했..
아이고 두야~ 설치가 왜이리 어려운 것이냐. 잘 따라하다가 꼭 설치에서 개고생을 한다. 2년 전 강의를 보고 따라하니 그런거겠지. ㅠㅠ Vuetify 연습해보려고 따라하다가 vue-router를 설치했는데 vue2버전에서는 router3버전을 써야한단다.. 3버전에서는 4를 써야하고.. 왜그런건데... 여튼 그냥 설치했더니 자동으로 4버전이 설치되어서 아래와 같은 에러를 뱉었다. Cannot read properties of undefined (reading 'install') TypeError: Cannot read properties of undefined (reading 'install') at Vue.use (webpack-internal:///./node_modules/vue/dist/vue.r..