04 2020 档案
摘要:然后新建个项目hello uniapp把里面的common下的uni.css和static下的uni.tff放在这个项目文件夹里面
阅读全文
摘要:点击主页的某个图片 <swiper :options="swiperOption" class="banner-swiper"> <swiper-slide class="swiper-slide" v-for="(item, index) in spikeList" :key="index" >
阅读全文
摘要:const routes = [ { path: "/", component: Home }, { path: "/city", component: () => import("../components/city/City.vue") }, { path: "/details", compon
阅读全文
摘要:首先在app.vue里面 <template> <div > <keep-alive> <router-view></router-view> </keep-alive> </div> </template> <style lang="stylus"> </style> 然后在home.vue里面s
阅读全文
摘要:import { mapState } from "vuex"; 导入mapState computed: { ...mapState(["cityName"]), }, 循环请求到的数据,判断是否点击的文字和请求到的数据是否一样 methods: { http() { let that = thi
阅读全文
摘要:import Vue from "vue"; import Vuex from "vuex"; Vue.use(Vuex); let defaultCity = "北京"; 2.本地存储赋值给变量 defaultCity = localStorage.city; export default new
阅读全文
摘要:import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) export default new Vuex.Store({ state: { cityName:'北京' }, mutations: { changeCity(state,ci
阅读全文
摘要:父组件script区域 props: {}, data() { return { spikeList:[], likeList:[] }; }, watch: {}, computed: {}, methods: { http(){ let that = this; this.axios.get("
阅读全文
摘要: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
阅读全文

浙公网安备 33010602011771号