- 博客(10)
- 收藏
- 关注
原创 vue 自定义样式radio单选框 样式美化
先上图template<div> <div class="radio-box" v-for="(item,index) in radios" :key="item.id"> <span class="radio" :class="{'on':item.isChecked}"></spa
2018-06-28 15:59:55 16678 1
原创 vue cli webpack创建的项目,ip地址不能访问,修改方法
vue cli创建的项目,ip地址不能访问,有时候给测试看一下,弄到测试服务器太麻烦。所以找到了下面的解决方法以下两种方法可访问,但是ip不能访问http://localhost:1221/loginhttp://127.0.0.1:1221/login需要修改的文件地址 config/index.js host: 'localhost', // can be ov...
2018-06-28 12:11:10 3160
原创 mpvue微信小程序之间的跳转navigator标签的坑 ,接收不到extra-data传递的对象
老方法即将废弃,在这里就不多说了,在mpvue里这个方法其实是有坑的 navigator标签[官方文档],详细介绍去这里看(https://developers.weixin.qq.com/miniprogram/dev/component/navigator.html?t=20161122https://developers.weixin.qq.com/miniprogram/dev/comp...
2018-06-23 11:10:11 8740 1
原创 mpvue 微信小程序获取 国家、省份、城市、区域 getLocations
methodsgetLocations(){ let _this = this wx.getSetting({ success(res) { debugger // 判断用户是否授权过, // 未授权过、 if (!res.authSetting['scope.userLoc...
2018-06-20 12:30:51 4682
转载 vue+axios 实现post文件下载
功能:点击导出按钮,提交请求,下载excel文件;第一步:跟后端童鞋确认交付的接口的response header设置了 以及返回了文件流。第二步:修改axios请求的responseType为blob,以post请求为例:复制代码axios({ method: 'post', url: 'api/user/', data: { f...
2018-06-15 17:23:52 7802 5
原创 vue + axios get下载文件
vue + axios 下载文件这里是axios的get方法。post方法请点击这里=》here 注意点:Herder 请求头需注意content-disposition:”attachment;filename=total.xls”content-type:”application/x-download;charset=utf-8”axios请求的responseTy...
2018-06-15 16:58:39 20894 5
原创 mpvue 微信小程序 获取用户权限open-type="getUserInfo"
注意:此接口有调整,使用该接口将不再出现授权弹窗,请使用 引导用户主动进行授权操作 做了一个小demo记录一下 小程序官网介绍template &lt;button open-type="getUserInfo" @getuserinfo="bindGetUserInfo" @click="getUserInfo1"&gt;获取权限&l
2018-06-15 16:15:43 18374 8
原创 vue 图片加载失败,加载默认图片方法
template <img :onerror="errorUserPhoto" :src="'Ecp.Picture.view.img?pictureId=' + head_pic" />scriptimport userPhoto from '@/assets/images/userPhoto.jpg'data() { return { error...
2018-06-05 09:33:40 7911
原创 vue input type=file 获取文件本地路径
templat&lt;input type="file" :id="id" name="image" class="getImgUrl_file" @change="preview($event)"&gt;srcipt preview(event){ let f
2018-06-02 22:55:29 49372 13
原创 vue 路由参数变化,页面不刷新,provide /inject 完美解决方案
此方法使用的是v-if来控制router-view的显示或隐藏,v-if从false变为true时,vue会重新渲染router-view区域,所以当参数变化时,只需让v-if 从true =&amp;gt; false =&amp;gt; false,就能实现页面刷新; 问题描述路由http://localhost:1221/newproduct?entityId=7B311104点击div时,变为...
2018-06-02 22:48:51 12833 9
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人