# vue2-base **Repository Path**: zouyu-sz/vue2-base ## Basic Information - **Project Name**: vue2-base - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-30 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # hello-world ## Project setup ``` npm install ``` ### Compiles and hot-reloads for development ``` npm run serve ``` ### Compiles and minifies for production ``` npm run build ``` ### Run your unit tests ``` npm run test:unit ``` ### Run your end-to-end tests ``` npm run test:e2e ``` ### Lints and fixes files ``` npm run lint ``` ## 为了方便看vuex和请求封装,特意安装了elemnt-ui,如是移动端得卸载它 # 一、 sass 全局使用 1. npm install sass-resources-loader 2. vue.config.js下配置 ` css: { loaderOptions: { sass: { prependData: `@import "~@/assets/css/variables.scss";`, }, } } ` # 二、 wow.js动画使用(移动端暂不支持动画效果,待研究) 1. npm install wowjs --save 2. 组件内 import 'animate.css' import {WOW} from 'wowjs' mounted() { // eslint-disable-next-line no-mixed-spaces-and-tabs new WOW().init() } # 三、获取dom宽高 1. this.$el.querySelector('.side').getBoundingClientRect().height 2. var height= this.$refs.text.offsetHeight; let height=this.$refs.text.style.height; # 四、数字滚动动画 npm install --save animate-number import animateNumber from 'animate-number' components: { animateNumber }