上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 25 下一页

2025年2月23日

环境变量env

摘要: 1.查看环境变量 <template> <div></div> </template> <script setup lang='ts'> // 获取环境变量 console.log(import.meta.env); // 不可直接修改值,因为线上环境是硬编码,是写死的,动态修改无效 const B 阅读全文

posted @ 2025-02-23 01:10 ChoZ 阅读(52) 评论(0) 推荐(0)

2025年2月22日

编译宏 definedProps、definedEmits、definedOptions、definedSlot

摘要: <template> <div>{{prop.dataProp}}</div> {{ a }}{{ b }} <div v-for="item in prop.dataProp" :key="String(item)"> {{ item }} <slot :item="item"></slot> < 阅读全文

posted @ 2025-02-22 22:23 ChoZ 阅读(115) 评论(0) 推荐(0)

pinia 持久化插件

摘要: import { createApp } from 'vue' import './style.css' import App from './App.vue' // import SelfComponent from './study/selfComponent/component.vue' // 阅读全文

posted @ 2025-02-22 19:05 ChoZ 阅读(69) 评论(0) 推荐(0)

pinia $reset、$subscribe、$onAction

摘要: <template> <div @click="[store.count++,store.increment()]"> 直接通过实例.就可以获取 {{ store.count }} {{ store.sex }} </div> <div @click="reset">恢复</div> </templ 阅读全文

posted @ 2025-02-22 16:46 ChoZ 阅读(233) 评论(0) 推荐(0)

pinia action和getter

摘要: import {defineStore} from 'pinia' import {StoreName} from './store-name' // StoreName是id,用于区分不同的store,自定义即可 export const useStore = defineStore(StoreN 阅读全文

posted @ 2025-02-22 15:31 ChoZ 阅读(43) 评论(0) 推荐(0)

pinia 解构state

摘要: <template> <div @click="change"> 直接通过实例.就可以获取 {{ store.count }} {{ store.sex }} </div> {{ count }} </template> <script setup lang='ts'> import { useSt 阅读全文

posted @ 2025-02-22 14:55 ChoZ 阅读(34) 评论(0) 推荐(0)

pinia 修改state

摘要: <template> <div @click="change"> 直接通过实例.就可以获取 {{ store.count }} {{ store.sex }} </div> </template> <script setup lang='ts'> import { useStore } from ' 阅读全文

posted @ 2025-02-22 12:29 ChoZ 阅读(88) 评论(0) 推荐(0)

pinia基础使用

摘要: import {defineStore} from 'pinia' import {StoreName} from './store-name' // StoreName是id,用于区分不同的store,自定义即可 export const useStore = defineStore(StoreN 阅读全文

posted @ 2025-02-22 11:40 ChoZ 阅读(21) 评论(0) 推荐(0)

pinia安装介绍

摘要: 1.介绍 2.安装 npm i pinia -S import {createPinia} from 'pinia' const store = createPinia() app.use(store) 阅读全文

posted @ 2025-02-22 11:18 ChoZ 阅读(38) 评论(0) 推荐(0)

unocss原子化

摘要: https://xiaoman.blog.csdn.net/article/details/125650172 阅读全文

posted @ 2025-02-22 00:02 ChoZ 阅读(28) 评论(0) 推荐(0)

上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 25 下一页

导航