본문 바로가기

Vue

(6)
[vue] ngrok 을 이용해서 외부에서 로컬로 접속하기 ngrok 에 관한건 아래 글 참고https://ksy93.tistory.com/entry/ngrok-%EC%99%B8%EB%B6%80%EC%97%90%EC%84%9C-%EB%A1%9C%EC%BB%AC%EB%A1%9C-%EC%A0%91%EC%86%8D%ED%95%B4%EC%84%9C-%EA%B0%9C%EB%B0%9C%ED%95%98%EA%B8%B0 [ngrok] 외부에서 로컬로 접속해서 개발하기ngrok이란? 외부(Public)에서 로컬에 접속할 수 있게 도와주는 터널링 프로그램 1. ngrok 설치 brew install --cask ngrok cask 가 없으면 설치(*cask: 간단한 명령어 한줄로 맥용 어플을 설치해주는 유틸리티 프.ksy93.tistory.com 아래 설정 추가module.exp..
eslint, prettier eslint : 코드 포맷터 + 코드 에러잡아내고 코드 문법 강제 (품질개선) prettier: 코드를 예쁘게 (에러를 잡아내지 못함) * eslint-config-prettier 패키지는 ESLint 규칙에서 Pretter 규칙과 충돌하는 규칙들을 OFF 시키는 역할 * eslint-plugin-prettier는 Prettier 규칙들을 ESLint 규칙에 추가하는 패키지입니다. 즉, eslint --fix 만 실행해줘도 prettier --write를 사용할 필요 없이 prettier까지 적용 module.exports = { ... plugins: ['prettier'], extends: ['eslint:recommended', 'plugin:vue/vue3-recommended', 'prettie..
같은 라이브러리 다른버전 npm install https://www.nieknijland.nl/blog/use-multiple-versions-of-an-npm-package-at-the-same-time Use multiple versions of an npm package at the same time | Blog Sometimes the API of an npm package changes. And sometimes the package is not backward compatible. In big projects, it is sometimes hard to refactor all the code concerned with a new API of an npm package you just updated. You probably want to b..
[Vue3] Watch, WatchEffect watch : 특정 데이터가 변경되었을 때 실행, 새로운 데이터와 이전의 데이터를 가져옴 (lazy) / watching a getter const state = reactive({ count: 0 }) watch( () => state.count, (count, prevCount) => { /* ... */ } ) watchEffect : 의존성이 있는 데이터에 대해서 즉각적으로 실행 (immediately), 함수 내부에 있는 여러 반응값을 관찰해야 할 때마다 사용하고 그 중 하나가 업데이트 될 때 마다 반응 const count = ref(0) watchEffect(() => console.log(count.value)) // -> logs 0
Vue Cli 3 IE polyfill 설정하기 1. babel 관련 npm을 install 한다. https://www.npmjs.com/package/@babel/polyfill @babel/polyfill Provides polyfills necessary for a full ES2015+ environment www.npmjs.com 2. main.js 에 import 한다. import '@babel/polyfill' 3. vue.config.js 에 관련하여 추가옵션을 더한다. const ansiRegex = require('ansi-regex') const path = require('path') module.exports = { ... transpileDependencies: [ansiRegex] // 추가 } ※ 참고사이트 https:..
브라우저 blob 데이터 받기 blob type vnd.ms-excel 데이터 받기 ie는 ‘msSaveOrOpenBlob’라는 파일을 만들고 다운로드하기위한 자체 API가 있어서 그걸써야한다. this.$http.instance().post(url, domain, {responseType:'blob',headers: {"Content-Type": "application/json"}}).then((response)=>{ console.log("성공"); const filename = util.replaceAll(decodeURI(response.headers['content-disposition'].split("filename=")[1]), '"', ''); // ie 10+ if(window.navigator.msSaveBlob) ..