摘要:
固定不变的 : 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
杨建鑫
阅读(76)
评论(0)
推荐(0)
摘要:
store/modules/home.js export default { state: { // 服务器数据 banners: [], recommends: [] }, mutations: { changeBanners(state, banners) { state.banners = b 阅读全文
posted @ 2022-08-30 14:13
杨建鑫
阅读(85)
评论(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
杨建鑫
阅读(186)
评论(0)
推荐(0)
摘要:
阅读全文
posted @ 2022-08-30 11:20
杨建鑫
阅读(20)
评论(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
杨建鑫
阅读(577)
评论(0)
推荐(0)
摘要:
<template> <div class="app"> 姓名:{{$store.state.nameVuex}} <button @click="btn">基本方法 : 修改名字</button> <br/> <button @click="btn1">传递值 : 修改名字</button> <h 阅读全文
posted @ 2022-08-30 10:43
杨建鑫
阅读(589)
评论(0)
推荐(0)

浙公网安备 33010602011771号