上一页 1 2 3 4 5 6 7 8 9 ··· 29 下一页
摘要: // pages/profile/profile.js Page({ //数据 data: { avatarURL: "", listCount: 30 }, // 监听下拉刷新 onPullDownRefresh() { console.log("用户进行下拉刷新~"); // 模拟网络请求: 定 阅读全文
posted @ 2022-09-07 11:05 杨建鑫 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-09-07 10:57 杨建鑫 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 1 阅读全文
posted @ 2022-08-31 15:19 杨建鑫 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 使用<template> import { defineStore } from 'pinia' // 用到其他store的信息 import useCounter from './counter' const useUser = defineStore('user',{ state:()=>({ 阅读全文
posted @ 2022-08-31 10:28 杨建鑫 阅读(591) 评论(0) 推荐(0) 编辑
摘要: 使用 : <template> <div class="id"> <h3>姓名: {{ userStore.name }}</h3> <h3>年龄: {{ userStore.age }}</h3> <h3>等级: {{ userStore.level }}</h3> <h3>简化版姓名: {{ n 阅读全文
posted @ 2022-08-31 09:51 杨建鑫 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 固定不变的 : stores/index.js import { createPinia } from "pinia" const pinia = createPinia() export default pinia main.js import { createApp } from 'vue' i 阅读全文
posted @ 2022-08-30 16:08 杨建鑫 阅读(61) 评论(0) 推荐(0) 编辑
摘要: store/modules/home.js export default { state: { // 服务器数据 banners: [], recommends: [] }, mutations: { changeBanners(state, banners) { state.banners = b 阅读全文
posted @ 2022-08-30 14:13 杨建鑫 阅读(67) 评论(0) 推荐(0) 编辑
摘要: <template> <div class="app"> <h3>Home Page</h3> <ul> <template v-for="item in $store.state.banners" :key="item.acm"> <li>{{ item.title }}</li> </templ 阅读全文
posted @ 2022-08-30 13:47 杨建鑫 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-08-30 11:20 杨建鑫 阅读(8) 评论(0) 推荐(0) 编辑
摘要: <template> <div class="app"> 姓名:{{$store.state.nameVuex}} <button @click="btn">基本方法 : 修改名字</button> <br/> <button @click="btn1">传递值 : 修改名字</button> <h 阅读全文
posted @ 2022-08-30 10:53 杨建鑫 阅读(345) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 29 下一页