WEB/VUE.js 20

[Vue.js] vue-awesome-swiper vue2.7 setup script에서 내장 함수 쓰는 법

https://github.com/surmon-china/vue-awesome-swiper GitHub - surmon-china/vue-awesome-swiper: 🏆 Swiper component for @vuejs 🏆 Swiper component for @vuejs. Contribute to surmon-china/vue-awesome-swiper development by creating an account on GitHub. github.com 내가 원하는 기능은 autoplay되다가 마우스 오버를 하면 멈췄다가 mouseleave를 하면 다시 autoplay가 되는 기능을 원했다. 예시로 나오는 코드들은 다 vue2버전인데 나는 2.7의 setup script로 바꾸고 싶었음! ... swi..

WEB/VUE.js 2023.05.26

[VUE.js] vue3 vuex module 분리/ 파일에서 접근하는 법

Vue3에서 vuex module분리하는 법 어려운 작업이 아닌데 처음에 할 때 vue3 관련 코드가 없어서 많이 헤맸던 기억이 있다. 1. store폴더 안에 modules폴더를 만든다. 2. 그 안에 모듈 하나씩 파일을 만든다. 예시 : user.ts import { SavedMovie, User, Collection, SavedCollection } from '@/type'; import { SET_USER, SET_PASTMOVIE, SET_FUTUREMOVIE, ... } from '../mutation'; export interface State { user: User, pastMovie : SavedMovie[], futureMovie : SavedMovie[], collections : C..

WEB/VUE.js 2021.11.30

[VUE.js] vue3 selectbox mutiple dropdown구현하기

[결과] [구현] select box에 속성을 mutiple로 지정해놓으니까 클릭했을때 저절로 dropdown이 안됐다. 그런데 드롭다운이 안되면 너무 ui가 불편하기 때문에 클릭했을때 목록이 쭈르륵 나와야 했다. {{genre}} 그래서 size를 selectSize로 바인딩하고 focus이벤트에서 size를 키우고 blur이벤트에서 size를 1로 돌렸다. const selectFocus = ref(false); const selectSize = computed(() => (selectFocus.value ? 10 : 1)); const focusSelect = () => { selectFocus.value = true; }; const blurSelect = () => { selectFocus.va..

WEB/VUE.js 2021.11.27