
vue
大白菜1号
个人学习笔记,私信免费帮解决问题
展开
-
vue3+ts+element-plus管理系统实际开发业务之增删改查
vue3+ts+elementPlus实现一个页面,包括列表搜索,增删改查功能原创 2023-07-14 14:40:03 · 3337 阅读 · 4 评论 -
组件采过的坑--大乌龙事件
报错Invalid prop: type check failed for prop “tableData”. Expected Object, got Array found in分析:子组件使用父组件传输数据,子组件接收数据类型正常,但是一直报错经过分析发现是父组件data中初始化数据类型不对,但是一般不使用组件时候再次赋值会被覆盖,就不存在数据类型不对的报错,但是使用组件时候在父组件数据没有赋值之前是会被子组件加载,此时数据类型不对应就会报错....原创 2021-12-08 15:05:10 · 594 阅读 · 0 评论 -
table使用if和el-table-column使用if恶心到吐了
1. 如果直接在table上家if会不起作用,建议添加div标签包裹之后使用 <div v-if="Sample === 'all'"> <el-table :data="tableData" stripe border height="450" style="width: 100%; margin-top: 15px" @select="原创 2021-11-26 10:30:31 · 3353 阅读 · 0 评论 -
打包后页面不显示
如果打包后静态图片css样式等加载失败,就在vue.config.js文件中加下图设置后,重新打包,如果没有vue.config.js文件可以自己手动添加原创 2021-08-18 15:10:44 · 303 阅读 · 0 评论 -
web网页实现扫描条形码(安卓+ios适配)
web网页唤起相机拍照或者相册选择–照片识别条形码原创 2021-07-13 16:49:43 · 1993 阅读 · 7 评论 -
vue项目报错总结
1.vue项目报错1 http://eslint.org/docs/rules/eol-last ✘ http://eslint.org/docs/rules/eol-last Newline required at end of file but not found src\views\setting\index.vue:13:9 </style> ^注意src\views\setting\index.vue:13行此处enter一个14行原创 2021-06-09 14:15:20 · 185 阅读 · 0 评论 -
input使用maxlength报错
报错Invalid prop: type check failed for prop “maxlength”. Expected Number, got String. found in原因:是maxlength属性使用错误解决方法::maxlength="300"加冒号就可以了原创 2021-06-02 10:20:05 · 563 阅读 · 0 评论 -
vue 使用播放器插件 vue-video-player
报错:This dependency was not found:vue-video-player/node_modules/video.js/dist/video-js.css in ./src/main.jsTo install it, you can run: npm install --save vue-video-player/node_modules/video.js/dist/video-js.css改import VideoPlayer from ‘vue-video-playe原创 2021-06-02 10:18:16 · 3963 阅读 · 0 评论 -
element中表格中使用表单数据同步问题
问题:表格中使用编辑按钮打开表单填写,有时候会出现不管是点击确定还是取消,表格中该条数据都会被更改.原因: editClick(row){ let formData=row}因为row是一个对象,直接复制是浅拷贝,formData指向地址还是row地址,所以row数据会更改,导致表格数据更改解决方法:使用深拷贝:方法有多种个人习惯用let formData=JSON.parse(JSON.stringify(row))...原创 2021-06-02 10:13:49 · 528 阅读 · 0 评论 -
AES登录加密前后端加密踩的坑
前端加密代码下载依赖"crypto-js": "^4.0.0",引用import CryptoJS from "crypto-js"; // 加密 encrypt(word, keyStr) { keyStr = keyStr ? keyStr : "VoyfNIaTstuujFki"; let key = CryptoJS.enc.Utf8.parse(keyStr); let srcs = CryptoJS.enc.Utf8.parse(wor原创 2020-11-22 13:56:32 · 407 阅读 · 0 评论 -
better-scroll使用实例
安装:npm install @better-scroll/core --save可以在使用页面引入 import BScroll from "@better-scroll/core"; <div class="wrapper" ref="wrapper"> //父级设置固定高度 <div class="content"> //子 ......滑动内容 </div> </div>watc原创 2020-11-19 17:11:12 · 415 阅读 · 0 评论 -
api整理
对于axios 请求 ,统一整理api因为axios本身是promise所以直接export function A() { return axios({ url: ``, method: '' })}使用import {A} from "…’;A().then(res=>{ console.log(res)}.catch(err=>{conosle.log(err)}对于request请求 需要使用Promiseexport function原创 2020-11-18 17:18:27 · 94 阅读 · 0 评论 -
点击事件传参 方式
路由跳转 传参方法一// 字符串this.$router.push('/xx/xxx')// 对象this.$router.push({ path: '/xx/xxx' })// 命名的路由this.$router.push({ name: 'xxx', params: { userId: wise }})// 点击事件里面写this.$router.push({ name: 'xxx', query: { key: aaa}})...原创 2020-06-29 17:57:03 · 736 阅读 · 0 评论 -
vue-element-admin学习过程
1.声明:项目是网上搜到的下载到本地2.文件目录下执行 npm install 下载依赖3. 运行 npm run dev4.之后开始扣代码,由于基础有点忘记了,重新记录下vue知识一 .vue/name:详细例子 借用下一位网友的笔记:https://www.jianshu.com/p/28b997accbee二 .路由元信息例如:meta 一般用于登录校验meta:{title:'组件名字'}待更新…...原创 2020-06-24 16:49:47 · 409 阅读 · 0 评论 -
element全局安装引入报错
element引入时候报错:Error from chokidar (C:): Error: EBUSY: resource busy or locked, lstat ‘C:\hiberfil.sys’主要是下载失败:在项目目录下打开cmd之后执行命令:npm i element-ui -S再次运行: npm run dev原创 2020-06-02 17:07:26 · 2515 阅读 · 0 评论 -
element 安装使用
1.安装:npm i element-ui -S2.引入;在 main.js 中写入以下内容:全局引入:import Vue from ‘vue’; import ElementUI from ‘element-ui’; import‘element-ui/lib/theme-chalk/index.css’; import App from ‘./App.vue’;Vue.use(...原创 2019-12-16 21:23:48 · 404 阅读 · 0 评论 -
VUE安装 Vue项目创建
1.Vue依赖于node.js 与npm 所以项检查是否安装node.jscmd: node -v显示node.js版本如下:之后检查npm 输入npm -V2.安装Vuenpm国内安装比较慢npm install -g vue-cli可以快速安装使用淘宝镜像npm install -g vue-cli --registry=https://registry.npm....原创 2020-02-08 13:49:00 · 112 阅读 · 0 评论 -
localStorage.setItem与localStorage.getItem存储数据
4存储数据存:var obj = {"name":"xiaoming","age":"16"}localStorage.setItem("userInfo",JSON.stringify(obj));取:var user = JSON.parse(localStorage.getItem("userInfo"))删除:localStorage.remove("userI...原创 2019-12-07 14:41:13 · 1482 阅读 · 3 评论 -
json文件初始数据导入数据库
右击鼠标 点击import选择文件类型为json+号添加 找到本地json文件导入就完成了原创 2019-12-02 15:01:48 · 1271 阅读 · 0 评论