vue
欧阳木马
我不懒,我很勤快
展开
-
微信小程序设置左上角返回键跳转到特定界面
onUnload: function () { wx.reLaunch({ url: '../admin/admin' }) }转载 2020-07-31 16:48:00 · 2788 阅读 · 0 评论 -
token传参问题 (Bearer后面需要加一个空格)
token传参问题,反复检查很多地方都没有问题,最终问题是Bearer后面没有加空格header: { authorization: 'Bearer ' + that.token }, uni.request({ url: that.$serverUrl + '/treatment/addTreat', data: JSON.stringify(formData), contentType: 'application/json;charset..原创 2020-07-20 16:26:55 · 5888 阅读 · 3 评论 -
js数组合并
// ES6 的写法 const filterA = [], filterB = [], filterC = [], filterdata = []; for (var Info in queryInfo) { if (queryInfo[Info].strength == strength) { filterA.push(queryInfo[Info].medicineName) } if (queryInfo[Info].full == .原创 2020-06-20 16:10:57 · 234 阅读 · 0 评论 -
uni-app页面多个picker ,如何解决不冲突
json数据:treatFeature: [ { newindex: 0, key: 'strength', name: '力度', types: ['力度偏弱', '力度适中', '力度偏强'] }, { newindex: 0, key: 'full', name: '饱满度', types: ['脉体不充盈', '充盈适中', '脉体充盈'] }, { newindex: 0, key: 'thickness', name: '粗细度', types: ['偏细', '.转载 2020-06-05 21:12:27 · 3696 阅读 · 1 评论 -
小程序textarea组件字数限制问题
maxlength="-1",则无限制<view class="fore-text">主诉:</view><textarea maxlength="-1" v-model="symptom" placeholder="请输入具体情况" />原创 2020-02-28 21:01:49 · 1346 阅读 · 1 评论 -
h5+(mui) 截图分享微信
1.引入必要文件<script type="text/javascript" src="../js/html2canvas.js"></script><script src="../js/vue.min.js" type="text/javascript" charset="utf-8"></script>2.html <...原创 2019-06-05 14:10:39 · 2079 阅读 · 8 评论 -
vue axios传中文参数导致乱码的解决方案之encodeURI
axios.get(filterdata, { params: { strCustomer: encodeURI(filterUser), strDt: _this.date }, headers: { "Content-Type": "application/x-w...原创 2019-05-22 16:25:36 · 22111 阅读 · 0 评论 -
vue 项目使用echarts异步加载,xAxis坐标轴不显示
1.安装echartscnpm install echarts -S2.main.js// 引入echartsimport echarts from 'echarts'Vue.prototype.$echarts = echarts 3.tool.vue<template> <div id="Toolrecord" class="box">...原创 2018-11-05 20:15:18 · 6211 阅读 · 1 评论 -
报错:“Duplicate keys detected: '2'. This may cause an update error.”
这个是由于v-for循环里,key值可能重复了,所以会报这个错 <div @click="selectDay"> <span v-for="(day,i) in previousMonth" :key="i" class="previousMonth"> {{ day }} </span&g原创 2018-08-28 14:22:16 · 33490 阅读 · 1 评论 -
vue sort()方法报错:“You may have an infinite update loop in a component”
html <div class="box" v-for="(item,itemindex) in itemrank" :key="itemindex"> <div class="box-title" > <div class="title-item"><span class=&quo转载 2018-08-28 13:21:38 · 1836 阅读 · 0 评论 -
vue placeholder绑定动态变量
<input type="text" :placeholder=dateinit @focus="trueDateBox" readonly v-model="date" />原创 2018-08-23 15:34:17 · 37667 阅读 · 7 评论 -
vue-cli项目打包出现空白页和路径错误问题
1.第一个问题,运行index,会看到网页一片空白f12调试,全是css,js路径引用错误的问题。解决:到config文件夹中打开index.js文件。assetsPublicPath属性:‘/’ 改为 ’./’assetsPublicPath属性作用是指定编译发布的根目录,‘/’指的是项目的根目录 ,’./’指的是当前目录。2.第二个问题,router-view中的内容显示不...转载 2018-08-27 14:27:19 · 428 阅读 · 0 评论 -
微信开发者工具报错:Cannot read property 'Promise' of undefined
一般提到: thirdScriptError sdk uncaught third Error微信开发者工具右边‘详情’,把ES6转ES5的打勾去掉...转载 2018-08-08 22:49:23 · 3485 阅读 · 0 评论 -
vue资源,文件引用的注意事项
1.assets目录中的文件会被文本pack处理解析为模块依赖,只支持相对路径的引用方式./ -------当前路径../ -------上级目录/ -------根目录原创 2018-06-15 15:15:33 · 707 阅读 · 0 评论 -
vue :class,style绑定的几种写法
class属性绑定:1.绑定变量<div :class="{classA:a , classB: b,......}"/></div> new Vue({ el:'#app', data:{ a:true,//根据true/false判断是否执行class b:true } ...原创 2018-06-13 17:58:57 · 9167 阅读 · 0 评论 -
vue 升降排序
本实例是根据工作进度的百分比来进行排序。html <div class="ibox-content"> <li v-for="(rangeItem,index) in range" :key="index" class="rankLi"> <span class="rankSpan">原创 2018-06-01 11:36:14 · 11204 阅读 · 1 评论 -
Cannot read property 'get' of undefined" in vuejs
1.组件的js写法export default { name: "TP300", //组件的名称 data() { return { keys: "", light: "", deep: "", flagRange: "", flag: "", showopa: "",原创 2018-06-13 17:30:37 · 27977 阅读 · 1 评论