vue
RubyLinT
这个作者很懒,什么都没留下…
展开
-
Cannot read property ‘upgrade‘ of undefined
env.development变量原创 2022-12-07 16:58:39 · 316 阅读 · 1 评论 -
element ui 表单校验validate await失效问题
element ui validate 异步问题原创 2022-11-23 15:38:58 · 937 阅读 · 0 评论 -
vue项目报错TypeError: Object(...) is not a function
TypeError: Object(...) is not a function原创 2022-10-24 11:32:33 · 836 阅读 · 0 评论 -
vue项目报错
vue项目报错TypeError: Object(...) is not a function原创 2022-10-12 09:24:45 · 295 阅读 · 0 评论 -
vue 使用jszip将多个文件压缩下载压缩包
vue 使用jszip将多个文件压缩下载压缩包原创 2022-05-24 09:23:36 · 1421 阅读 · 0 评论 -
高德地图使用AMap.DrivingPolicy.LEAST_DISTANCE报错
报错:Cannot read properties of undefined (reading 'LEAST_DISTANCE')原因:在引入js的时候加上&plugin=AMap.Driving,即:https://webapi.amap.com/maps?v=${this.v}&key=${this.key}&plugin=AMap.Driving原创 2021-12-24 10:15:32 · 1934 阅读 · 0 评论 -
vue移动端图片压缩上传,使用lrz
<template> <div class="uploadOutter"> <slot> <div class="uploadInner" @click="$refs.file.click();"> <div class="imgBox" v-if="value&&multiple==false"> <img :src="value" alt class="img".原创 2021-11-10 10:02:15 · 904 阅读 · 0 评论 -
node.js express +vue实现打包桌面应用
1.vue打包:将vue.config.js里的publicPath赋值'./',打包。2.将打包的vue包放入node项目的public文件夹下3.node创建路由指向前端index.htmlrouter.get('/', function(req, res, next) { res.render('index', { title: 'Express' });});4.node的app.js文件里加上app.use(express.static(path.join(__dir原创 2021-08-24 14:19:02 · 473 阅读 · 0 评论 -
Export2Excel.js实现导出excel压缩包
首先在Export2Excel.js文件中引入:importJSZipfrom'jszip'将Export2Excel.js文件最下方的代码saveAs(new Blob([s2ab(wbout)], { type: "application/octet-stream" }), `改成如下代码即可const zip = new JSZip() const zip_name = filename || 'file' const data = new Blob([s...原创 2021-06-22 08:53:54 · 575 阅读 · 1 评论 -
vue 返回上一页不刷新页面且滚动条位置不变
1.不刷新页面:设置路由:{ path: '/room/polling',name: 'roomList',component:()=>import("@/views/room/list.vue"),meta:{ title:'title', keepAlive: true // 需要缓存 }},设置原创 2021-06-10 14:24:13 · 1209 阅读 · 0 评论 -
vue 子组件嵌套父组件使用时报错 Unknown custom element: <addPol> - did you register the component correctly
只需将importaddPolfrom"./addPol";改成:异步加载constaddPol=()=>import('./addPol.vue')原创 2021-05-25 16:51:10 · 297 阅读 · 2 评论 -
Export2Excel实现多级表头以及多个sheet页
安装xlsx-style:npm install --save xlsx-style,在\node_modules\xlsx-style\dist\cpexcel.js找到var cpt = require(’./cpt’ + ‘able’);并改成var cpt = cptable;将Export2Excel.js文件修改:import { saveAs } from "file-saver";// import XLSX from "xlsx";import XLSX from "...原创 2021-01-22 15:26:01 · 1744 阅读 · 1 评论 -
echarts使用3D时报错Error: Component series.surface not exists. Load it first.
这是因为还需要依赖echarts-gl解决方法:npm install echarts-gl -S安装后在使用的页面引入import'echarts-gl'原创 2020-10-15 16:54:15 · 7416 阅读 · 0 评论 -
vue项目里引用three里的OrbitControls
vue文件<template> <div> <div id="container"></div> </div></template><script>import * as Three from 'three'import "three/examples/js/controls/OrbitControls"export default { name: 'CustomerThree', l原创 2020-08-27 11:54:32 · 2580 阅读 · 0 评论 -
请求返回文件流格式,实现下载文件功能,前端代码
let _this = this var xhr = new XMLHttpRequest(); let link = process.env.VUE_APP_BASE_API+'/gbgl/downloadDoclist' xhr.open('POST', link, true); // 也可用POST方式 xhr.responseType = "blob"; xhr.onload = function () { ...原创 2020-07-16 11:31:26 · 1273 阅读 · 0 评论 -
vue router控制页面权限,切换账号出现router权限还是上一个登录人的
解决办法再退出方法里加上:this.$router.replace(`/login?redirect=${this.$route.fullPath}`)location.reload();//重新加载原创 2020-05-14 09:11:24 · 1209 阅读 · 2 评论 -
高德地图 transform: rotate(90deg)横屏显示后样式及事件问题
做大屏数据报表,底图用的动态的高德地图,后客户又要求做移动端的大屏,要求用户一进入页面,就是横屏显示。即rotate(90deg)显示页面内容。但是发现旋转后高德地图的样式会有问题。就是创建的marker会被挡住。解决方法:检查元素发现是被amap-layer层挡住,无论怎么设置他的z-index:-1都没有用,后来加了个绝对定位就好了。.amap-layer{z-index:-1!important;position:absolute;}还有就是旋转了之后,高德地图...原创 2020-05-12 08:33:51 · 3053 阅读 · 1 评论 -
vue-cli创建的项目npm run dev运行很慢
vue-cli创建的项目npm run dev刚开始运行正常,之后突然运行要花很长时间。后来发现是cpmn的原因。有次npm i装包的时候失败了,于是就用了cnpm i来装包,装包后再跑项目就很慢了。解决方法:删除node_modules文件,npm i重新安装包。...原创 2020-03-03 15:23:20 · 8168 阅读 · 1 评论 -
Invalid Host header
vue-cli搭建的环境,用nginx做代理服务器,访问时显示:Invalid Host header在网上找到了解决办法:原文https://blog.csdn.net/Cookysurongbin/article/details/86077241,记录一下devServer下添加disableHostCheck: true...转载 2020-02-05 14:44:39 · 175 阅读 · 0 评论 -
Error in render: "TypeError: Cannot read property 'value' of undefined
element-ui.common.js报错,<ElSelect> at packages/select/src/select.vuevue.runtime.esm.js:619 [Vue warn]: Error in render: "TypeError: Cannot read property 'value' of undefined"这个错误提示是由于el-selec...原创 2020-01-02 16:46:32 · 1937 阅读 · 0 评论 -
vue实现 bpmn 自定义属性模板(activiti版)
例子地址:https://github.com/RubyLinT/bpmnActiviti.git安装包:npm i运行:npm run dev访问http://localhost:8081/#/为官网提供的模板访问http://localhost:8081/#/pro为自定义的模板1.页面内容:<template> <div class="cont...原创 2019-12-24 15:11:14 · 12159 阅读 · 10 评论 -
vue使用bpmn结合activiti版
1.首先安装包:npm i bpmn-js安装bpmn-js-properties-panel、activiti-bpmn-moddle:修改package.json:"bpmn-js-properties-panel":"https://github.com/RubyLinT/bpmn-js-properties-panel.git","activiti-bpmn-mod...原创 2019-12-11 17:09:17 · 6509 阅读 · 3 评论 -
vue-codemirror 基于 Codemirror,适用于 Vue 的 Web 代码编辑器。
Codemirror官网:https://codemirror.net/vue-codemirror官网:https://www.npmjs.com/package/vue-codemirror第一步安装:npminstallvue-codemirror--save第二步引入:分为全局引入和组件引入 全局引入:// require libimport Vue fro...原创 2019-11-27 09:06:45 · 2437 阅读 · 0 评论 -
vue的public 引入ueditor文件过大导致首次加载慢的问题
新建load.js文件:export function loadScript(src, callback) { var script = document.createElement('script'), head = document.getElementsByTagName('head')[0]; script.type = 'text/javascript'; sc...原创 2019-11-18 15:04:17 · 1020 阅读 · 0 评论 -
element cascader 选择任意一级操作面积问题
//给.el-cascader-node__label也加上点击事件mounted(){setInterval(function(){document.querySelectorAll('.el-cascader-node__label').forEach(el=>{el.onclick=function(){...原创 2019-11-13 15:23:40 · 257 阅读 · 0 评论 -
vue使用百度地图 vue-baidu-map
官方文档地址:https://dafrok.github.io/vue-baidu-map1.安装:npm i --save vue-baidu-map2.全局初始化:main.js文件import BaiduMap from 'vue-baidu-map'Vue.use(BaiduMap, { ak: 'YOUR_APP_KEY' // 详见 http://l...原创 2019-08-02 16:58:20 · 2127 阅读 · 0 评论 -
vue设置百度地图自定义主题
<template> <baidu-map class="map" :center="{lng: 116.404, lat: 39.915}" :zoom="15" :mapStyle="mapStyle"> </baidu-map></template><script>export default { data ()...原创 2019-08-02 17:29:49 · 4298 阅读 · 0 评论 -
使用vue-baidu-map百度地图实现双向绑定
<template> <div style="height:100%"> <input v-model.number="center.lng"> <input v-model.number="center.lat"> <input v-model.number="zoom"> <baidu-ma...原创 2019-08-03 08:36:59 · 843 阅读 · 0 评论 -
vue动态渲染路由
router.jsimport Vue from 'vue'import Router from 'vue-router'import Home from './views/Home.vue'Vue.use(Router)let list = [ {Name:'Home',View:'views/Home.vue'}, {Name:'Char...原创 2019-08-02 10:12:02 · 478 阅读 · 0 评论 -
vue-cli3直接访问dist页面
vue.config.js文件里直接修改:module.exports = {publicPath: './',}原创 2019-08-07 09:14:08 · 925 阅读 · 0 评论 -
vue使用vue-cropper裁剪图片报错: Failed to mount component: template or render function not defined
原因是vue-cropper新版本报错,最方便的解决办法是将vue-cropper降到旧版本,我使用的是0.3.6。1.npm uninstall vue-cropper2. npm install [email protected]原创 2019-08-15 17:19:10 · 2391 阅读 · 8 评论 -
vue-cli3结合ueditor里使用秀米总结
第一步:安装vue-ueditor-wrap:npm ivue-ueditor-wrap第二步:从ueditor官网下载资源放在public/static下,如图:第三步:从秀米官网下载资源放在public/static/UE/dialogs下,如图:第四步:修改文件1.ueditor.config.js :修改section:['class', 'style']...原创 2019-10-08 11:03:08 · 1381 阅读 · 0 评论 -
element+Sortable实现表格拖拽
1.先安装sortablejs<template> <el-table :data="Data" align="left"> <el-table-column v-for="(item, index) in Table" :key="index" :prop="dropCol[index].prop" :label="item.label"> ...原创 2019-07-04 10:06:21 · 558 阅读 · 0 评论