04 2020 档案

摘要:然后新建个项目hello uniapp把里面的common下的uni.css和static下的uni.tff放在这个项目文件夹里面 阅读全文
posted @ 2020-04-18 12:39 金翅扑街鸟 阅读(665) 评论(0) 推荐(0)
摘要:点击主页的某个图片 <swiper :options="swiperOption" class="banner-swiper"> <swiper-slide class="swiper-slide" v-for="(item, index) in spikeList" :key="index" > 阅读全文
posted @ 2020-04-17 21:37 金翅扑街鸟 阅读(172) 评论(0) 推荐(0)
摘要:const routes = [ { path: "/", component: Home }, { path: "/city", component: () => import("../components/city/City.vue") }, { path: "/details", compon 阅读全文
posted @ 2020-04-17 20:43 金翅扑街鸟 阅读(116) 评论(0) 推荐(0)
摘要:首先在app.vue里面 <template> <div > <keep-alive> <router-view></router-view> </keep-alive> </div> </template> <style lang="stylus"> </style> 然后在home.vue里面s 阅读全文
posted @ 2020-04-17 20:32 金翅扑街鸟 阅读(197) 评论(0) 推荐(0)
摘要:import { mapState } from "vuex"; 导入mapState computed: { ...mapState(["cityName"]), }, 循环请求到的数据,判断是否点击的文字和请求到的数据是否一样 methods: { http() { let that = thi 阅读全文
posted @ 2020-04-17 18:50 金翅扑街鸟 阅读(125) 评论(0) 推荐(0)
摘要:import Vue from "vue"; import Vuex from "vuex"; Vue.use(Vuex); let defaultCity = "北京"; 2.本地存储赋值给变量 defaultCity = localStorage.city; export default new 阅读全文
posted @ 2020-04-17 16:07 金翅扑街鸟 阅读(213) 评论(0) 推荐(0)
摘要:import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) export default new Vuex.Store({ state: { cityName:'北京' }, mutations: { changeCity(state,ci 阅读全文
posted @ 2020-04-17 16:04 金翅扑街鸟 阅读(203) 评论(0) 推荐(0)
摘要:父组件script区域 props: {}, data() { return { spikeList:[], likeList:[] }; }, watch: {}, computed: {}, methods: { http(){ let that = this; this.axios.get(" 阅读全文
posted @ 2020-04-17 14:52 金翅扑街鸟 阅读(164) 评论(0) 推荐(0)
摘要:1 <template> 2 <div class="spike"> 3 <swiper :options="swiperOption" class="banner-swiper"> 4 <swiper-slide 5 class="swiper-slide" 6 v-for="(item, ind 阅读全文
posted @ 2020-04-17 12:11 金翅扑街鸟 阅读(166) 评论(0) 推荐(0)