hykeda1年前395
在使用uniapp开发微信小程序时,使用了block标签进行了逻辑判断:<block v-show="list.type === 2">...
hykeda1年前368
在使用axios时,在终端用console.log 打印出来返回的是Promise对象,如下图:如果直接用res.code是无法获取的,Promise对象需要使用.then()方法来获取值:res.t...
hykeda1年前1868
最近在开发vite+vue项目时,调用接口获取服务器数据时提示接口有跨域问题,解决办法是配置代理:export default defineConfig({ //配置代理 se...
hykeda1年前450
一、字符串类型let str:string = '123' 二、数值类型let num:number = 123;...
hykeda1年前656
在vuex中获取state中的数据可以解构的方式如下:import { mapState,mapMutations } from "vuex...
hykeda1年前517
自动引入插件:https://github.com/antfu/unplugin-auto-importvue的按需组件自动导入:https://github.com/antfu/unplugin-v...
hykeda1年前1773
一、Pinia持久化存储二、使用步骤1.安装插件代码如下(示例):npm i pinia-plugin-persist --save2.store/index.js代码如...
hykeda1年前1853
1、Element-plus使用了自动按需导入,vite.config.js配置如下:defineConfig({ plugins: [...
hykeda1年前444
import { defineConfig } from 'vite'import vue from '@vitejs/plugin-vue'import path f...
hykeda1年前599
因为安装的 PHP 是 8.0 ,不匹配 composer.json 要求的版本,所以使用 composer 进行安装时会报错。在安装命令后加上 --ignore-pla...