development 21

파이참 - npm run serve 환경 구성

무슨 이유인지는 모르겠지만 D:\workspace\data_share_front_web_user\aos.data.share.user\src\components\main\Main.vue 102:7 error 'staticHeader' is not defined no-undef 103:7 error 'initRoomLayoutResize' is not defined no-undef 106:9 error 'initSelectBox' is not defined no-undef 함수를 호출할 수 없다는 에러가 나온다 커맨드에서 npm run serve 하는 것보다는 아래와 같은 방법으로 하는것이 좋은것 같다

DataRangePicker 라벨 설정

picker의 범위 검색뒤 화면이 새로고침 된후 picker의 선택된 값이 초기화 되는 현상이 발생하였다. 특정일을 선택 하여 범위 검색을 하였는데도 오늘이 선택되는 현상이다. 하루를 삽질하여서 해결방안을 알아냈다...... 허무하다......하지만 난 이런걸 즐긴다 // 대시보드 상단 날짜 표시 let start_date = moment(response.data.start_date).format('YYYY.MM.DD'); let end_date = moment(response.data.end_date).format('YYYY.MM.DD'); let date_picker_display = response.data.range_label + ' : ' + start_date + ' ~ ' + end_date..

development 2020.05.13

install pycropto error

Python 3 - Install pycrypto on Windows I'm using Python 3.7 and Windows 10. 'pip install pycrypto' doesn't work with the following error: (pyramid) C:\Projects\Pyramid>pip install pycrypto Collecting pycrypto Downloading https://files.pythonhosted.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz (446kB) 100% |████████████████████████████████| ..

EventBUS 사용법

vue.js를 사용하면 컴포넌트간의 데이터 이동이 필요할때가 있다. 그럴때에는 Eventbus를 사용하면 된다. event-bus.js import Vue from "vue"; export const EventBus = new Vue(); TemplateLoad.vue => 보내는 쪽 import {EventBus} from "../../plugins/event-bus"; axios.get(baseURL + '/template/template_detail/' + this.selected).then(data => { this.tp_contents = data.data.data[0].tp_contents; EventBus.$emit('template-load', this.tp_contents); }) Sma..

development/vue.js 2019.08.19

dJango Rest API 파일 다운로드 구현하기

백엔드 단은 장고 restapi로 구현하였고 프론트단은 vue.js를 사용하였다 vue에서 파일 다운로드를 구현하기 위해선 아래와 같은 작업이 추가적으로 필요하다 let blob = new Blob([response.data], {type: response.headers['content-type']}); let link = document.createElement('a'); link.href = window.URL.createObjectURL(blob); link.download = fileName; link.click() // this.$store.commit('SET_FILE_COUNT', response.data.data); // this.$store.commit('SET_FILE_LIST', re..