Commit 1d16a73d by tangqy

增加动画库

parent 3c7b19ad
......@@ -11,12 +11,14 @@
"build": "node build/build.js"
},
"dependencies": {
"animate.css": "^3.7.0",
"axios": "^0.18.0",
"echarts": "^4.2.0-rc.2",
"element-ui": "^2.4.9",
"moment": "^2.22.2",
"underscore": "^1.9.1",
"v-charts": "^1.19.0",
"velocity-animate": "^1.5.0",
"vue": "^2.5.2",
"vue-router": "^3.0.1",
"vuex": "^3.0.1"
......
......@@ -21,10 +21,10 @@
</template>
<script>
// 引入mescroll的vue组件
import MescrollVue from '@/lib/mescroll/mescroll.vue'
// 引入mescroll的vue组件
import MescrollVue from '@/lib/mescroll/mescroll.vue'
export default {
export default {
name: 'message',
components: {
MescrollVue
......@@ -100,11 +100,11 @@
* */
async getListDataFromNet (pageNum, pageSize) {
// 延时一秒,模拟联网
const res = await this.axios.get('http://rap2api.taobao.org/app/mock/115626/store/notice!getStoreNoticeListByPageAction.do',{
params:{
pageNo:pageNum,
const res = await this.axios.get('http://rap2api.taobao.org/app/mock/115626/store/notice!getStoreNoticeListByPageAction.do', {
params: {
pageNo: pageNum,
pageSize,
push_state:2
push_state: 2
}
})
if (res.data.code === 0) {
......@@ -116,7 +116,7 @@
}
}
}
}
}
</script>
<style scope>
......
......@@ -4,8 +4,10 @@ import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui'
import './assets/styles/reset.css'
import './assets/styles/common.css'
import 'animate.css'
// import 'element-ui/lib/theme-chalk/index.css'
import qs from 'qs'
import store from './store'
......@@ -15,7 +17,7 @@ import * as filters from './filters'
import echarts from 'echarts'
import VCharts from 'v-charts'
import * as plugins from './plugin'
import plugins from './plugin'
Vue.use(VCharts)
Axios.defaults.withCredentials = true // 让ajax携带cookie
......@@ -40,7 +42,11 @@ Axios.interceptors.request.use(
)
Vue.use(ElementUI)
Vue.use(plugins)
Object.keys(plugins).forEach(key => {
const plugin = plugins[key]
Vue.use(plugin)
})
Object.keys(filters).forEach(key => {
Vue.filter(key, filters[key])
......
import moment from './moment'
import underscore from './underscore'
export const momentPlugin = moment
export const underscorePlugin = underscore
import velocity from './velocity'
export default {
moment,
underscore,
velocity
}
import velocity from 'velocity-animate'
import 'velocity-animate/velocity.ui'
class Animate {
install (Vue, options) {
// 4. 添加实例方法
Vue.prototype.$velocity = velocity
}
}
export default new Animate()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment