随笔分类 -  Vue

摘要:# https://www.npmjs.com/package/nprogress pnpm i nprogress // main.js import 'nprogress/nprogress.css' // App.vue 自定义一下loading的滚动条样式 <style> #nprogres 阅读全文
posted @ 2023-04-18 11:39 LeoShi2020 阅读(39) 评论(0) 推荐(0) 编辑
摘要:pnpm i vuex@next # 创建 @/store/index.js import { createStore } from 'vuex' // 创建一个新的 store 实例 const store = createStore({ state() { return { // 初始化用户信息 阅读全文
posted @ 2023-04-11 21:29 LeoShi2020 阅读(10) 评论(0) 推荐(0) 编辑
摘要:1. 步骤 form表单提交账号密码 提交成功 validate 对整个表单的内容进行验证。 接收一个回调函数,或返回 Promise。 (callback?: (isValid: boolean, invalidFields?: ValidateFieldsError) => void) => P 阅读全文
posted @ 2023-04-10 16:11 LeoShi2020 阅读(109) 评论(0) 推荐(0) 编辑
摘要:<template> <h1>后台首页</h1> <el-button @click="set">设置</el-button> <el-button @click="get">读取</el-button> <el-button @click="remove">删除</el-button> </tem 阅读全文
posted @ 2023-04-10 10:47 LeoShi2020 阅读(219) 评论(0) 推荐(0) 编辑
摘要:useRouter(跳转), useRoute(获取路由参数) // login.vue // 路由跳转-引入-01 import { useRouter } from "vue-router"; // 路由跳转-实例化后-02 // useRouter 使用push方法进行跳转 const rou 阅读全文
posted @ 2023-04-10 09:41 LeoShi2020 阅读(23) 评论(0) 推荐(0) 编辑
摘要:├── dist/ └── src/ ├── api/ // 接口请求目录 ├── assets/ // 静态资源目录 ├── common/ // 通用类库目录 ├── components/ // 公共组件目录 ├── router/ // 路由配置目录 ├── store/ // 状态管理目录 阅读全文
posted @ 2023-04-07 08:57 LeoShi2020 阅读(182) 评论(0) 推荐(0) 编辑
摘要:![](https://img2023.cnblogs.com/blog/1940615/202304/1940615-20230403101354582-1387034555.png) 阅读全文
posted @ 2023-04-03 10:14 LeoShi2020 阅读(79) 评论(0) 推荐(0) 编辑
摘要:从一个大的数组或对象中提取个别值使用 数组赋值逆向 let obj = reactive({ name: "张三", age: 20 }) let { name, age } = toRefs(obj); const btn = () => { name.value = '李四'; console. 阅读全文
posted @ 2023-04-03 01:28 LeoShi2020 阅读(12) 评论(0) 推荐(0) 编辑
摘要:# 安装组件 pnpm install -D unplugin-vue-components unplugin-auto-import # 修改配置文件 // vite.config.ts import { defineConfig } from 'vite' import AutoImport f 阅读全文
posted @ 2023-04-03 01:11 LeoShi2020 阅读(57) 评论(0) 推荐(0) 编辑
摘要:1. npm安装 vue cli [root@Python 20230401VUE3]# npm install -g @vue/cli 2. 查看 vue版本 [root@Python 20230401VUE3]# vue --version @vue/cli 5.0.8 3. 创建项目 [roo 阅读全文
posted @ 2023-04-01 11:50 LeoShi2020 阅读(153) 评论(0) 推荐(0) 编辑
摘要:![](https://img2023.cnblogs.com/blog/1940615/202212/1940615-20221222184728043-614190516.png) 阅读全文
posted @ 2022-12-22 18:47 LeoShi2020 阅读(39) 评论(0) 推荐(0) 编辑
摘要:![](https://img2023.cnblogs.com/blog/1940615/202212/1940615-20221210182057455-1465685491.png) 阅读全文
posted @ 2022-12-10 18:21 LeoShi2020 阅读(23) 评论(0) 推荐(0) 编辑
摘要:1. 父组件传递子组件 2. 子组件传递父组件 阅读全文
posted @ 2022-12-10 17:40 LeoShi2020 阅读(23) 评论(0) 推荐(0) 编辑
摘要:![](https://img2023.cnblogs.com/blog/1940615/202212/1940615-20221204222927334-1552452621.png) 阅读全文
posted @ 2022-12-04 22:29 LeoShi2020 阅读(15) 评论(0) 推荐(0) 编辑
摘要:![](https://img2023.cnblogs.com/blog/1940615/202212/1940615-20221201172454422-2084630933.png) 阅读全文
posted @ 2022-12-01 17:25 LeoShi2020 阅读(13) 评论(0) 推荐(0) 编辑
摘要:![](https://img2023.cnblogs.com/blog/1940615/202212/1940615-20221201161454395-2046154749.png) 阅读全文
posted @ 2022-12-01 16:15 LeoShi2020 阅读(19) 评论(0) 推荐(0) 编辑
摘要:1. 输入框 2. 单选多选 3. 下拉选择 阅读全文
posted @ 2022-12-01 13:49 LeoShi2020 阅读(11) 评论(0) 推荐(0) 编辑
摘要:1. 传参 2. 多事件绑定 阅读全文
posted @ 2022-12-01 12:00 LeoShi2020 阅读(12) 评论(0) 推荐(0) 编辑
摘要:![](https://img2023.cnblogs.com/blog/1940615/202211/1940615-20221130222237078-1829343007.png) 阅读全文
posted @ 2022-11-30 22:22 LeoShi2020 阅读(16) 评论(0) 推荐(0) 编辑
摘要:![](https://img2023.cnblogs.com/blog/1940615/202211/1940615-20221130211615371-629328352.png) 阅读全文
posted @ 2022-11-30 21:16 LeoShi2020 阅读(16) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示