- 博客(22)
- 收藏
- 关注
转载 vue换算单位px自动转换rem
cnpm i postcss-px2rem --savecnpm install px2rem-loader --save2、配置px2rembuild目录下vue-loader.conf.js中,做如下修改:module.exports = {loaders: utils.cssLoaders({sourceMap: isProduction? ...
2019-09-28 14:14:00 426
转载 css使Img图片居中显示
<div class="flex-center listing-img"> <img v-if="item.imgUrl" v-bind:src="item.imgUrl" alt="not find picture"> <img v-if="!item.imgUrl" src="../../assets/img/detail-not...
2019-09-26 10:48:00 1626
转载 formData请求接口传递参数格式
element ui组件方法的传递//引入 组件。<el-upload class="avatar-uploader" :action="action" :http-request="uploadFile" :show-file-list="false"> <img v-if="imageUrl" :sr...
2019-09-23 11:11:00 8105
转载 vue过滤金额自动补全小数点
watch:{ //监听input双向绑定 balance(value) { //保留2位小数点过滤器 不四舍五入 var toFixedNum = Number(value).toFixed(3); var realVal = toFixedNum.substring(0, toFixedNum.toString().length - 1);...
2019-09-21 15:40:00 792
转载 vue Element验证input提示
<el-form-item prop="userName" class="userName_color"> <b>详细地址<i class="red">*</i></b> <el-input placehol...
2019-09-20 20:44:00 696
转载 vue点击按钮复制文本框内容
1.npm进行安装npm install clipboard --save 2.在需要使用的组件中import引用方法:import Clipboard from 'clipboard';3.添加需要复制的内容<button class="tag-read" data-clipboard-text="我是可以复制的内容,请点击复制" @c...
2019-09-19 18:53:00 1421
转载 js验证邮箱格式
function test() { var temp = document.getElementById("text1"); //对电子邮件的验证 var myreg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+...
2019-09-18 19:50:00 388
转载 Vue Element ui密码框校验
<el-form-item prop="repeat_Password" class="userName_color"> <el-input type="password" placeholder="请再次输入新密码" v-model="loginRuleForm.repeat_Password" ma...
2019-09-18 15:05:00 1114
转载 js手机号隐藏中间四位
var tel = "13122223333";var reg = /^(\d{3})\d{4}(\d{4})$/;tel = tel.replace(reg, "$1****$2");console.log(tel); 转载于:https://www.cnblogs.com/wuliujun521/p/11540928.html...
2019-09-18 11:44:00 111
转载 vue实现省市区三级联动
npm 安装npm install v-distpicker --saveVue全局引入组件import Distpicker from 'v-distpicker'Vue.component('v-distpicker', Distpicker)也可以那里需要,哪里引入import VDistpick...
2019-09-16 21:08:00 168
转载 Taro开发微信小程序遇到的问题和解决方法
1.scroll-view 置顶, 给设置scroll-top为0无效问题?解决方案: 不触发置顶问题,需要给scroll-top一个设置接近0的随机数,Math.random()2.scroll-view绑定bindscrolltolower没有触发问题?解决方案: 通过获取系统信息wx.getSystemInfoSync()拿到屏幕的高度,然后减去其他组件占位...
2019-09-06 16:00:00 1344
转载 Taro时间选择器+地址选择器
时间地址选择器https://www.manzj.net/topic/5c3c2123cd01b8af5bce4373转载于:https://www.cnblogs.com/wuliujun521/p/11466381.html
2019-09-05 15:32:00 2159
转载 Taro下拉刷新,上拉加载更多
1、引入插件import Taro, { Component } from '@tarojs/taro'import { View, Text, ScrollView } from '@tarojs/components'import { AtActivityIndicator } from 'taro-ui'import './index.scss'...
2019-09-05 10:30:00 2446
转载 taro开发微信小程序-页面开发规范
https://blog.csdn.net/museions/article/details/84133824https://blog.csdn.net/museions/article/details/84133773转载于:https://www.cnblogs.com/wuliujun521/p/11460706.html
2019-09-04 18:04:00 103
转载 视频Video放器的部分实例方法
***创建一个视频播放器实例let myPlayer = this.$video(myVideo, { controls: true, autoplay: 'muted', preload: "auto", });创建实例后,可以通过两种方式全局访问它:this.$video.players.myVideo;this....
2019-09-04 16:41:00 439
转载 Input框搜索关键字高亮显示
ruleTitle(text, val) { if (!val) return text; const result = text.replace( new RegExp(val, "g"), ` <span class="primary_title">${val}</span>` ); ...
2019-09-04 16:26:00 723
转载 vue上拉加载下拉加载
npm i vue-scroller<scroller :on-refresh="refresh" :on-infinite="infinite" :noDataText="msg"></scroller >refresh(done){ //刷新 this.page=1 this.init(done)},infini...
2019-09-04 16:24:00 188
转载 Input的校验表达式
1、只是不能输入空格<input type="text" onkeyup="this.value=this.value.replace(/^ +| +$/g,'')">2、不能输入空格及英文状态下的逗号<input type="text" onkeyup="this.value=this.value.replace(/[, ]/g,'')"&...
2019-09-04 16:14:00 163
转载 微信小程序下拉加载和上拉刷新两种实现方法
方法一:onPullDownRefresh和onReachBottom方法实现小程序下拉加载和上拉刷新首先要在json文件里设置window属性设置js里onPullDownRefresh和onReachBottom方法下拉加载说明:当处理完数据刷新后,wx.stopPullDownRefresh可以停止当前页面的下拉刷新。onPullDownRefresh...
2019-09-04 15:52:00 172
转载 微信小程序插件组件-Taro UI
微信小程序组件使用以下官网查看 ↓ ↓ ↓https://taro-ui.jd.com/#/docs/fab转载于:https://www.cnblogs.com/wuliujun521/p/11458383.html
2019-09-04 12:26:00 1249
转载 微信小程序HTTP接口请求封装
1.方法封装(新建文件夹util,工具文件,在文件夹下创建request.js文件,用于对方法封装)request.js:var app = getApp();//项目URL相同部分,减轻代码量,同时方便项目迁移//这里因为我是本地调试,所以host不规范,实际上应该是你备案的域名信息var host = 'http://localhost:8081/demo...
2019-09-04 12:25:00 177
转载 微信小程序命名规则
目录分析src是主要的开发目录,各个文件实现功能如下所示:├─.idea│ └─libraries├─.temp├─config└─src ├─assets │ └─images ├─components (公用组件) │ ├─Brandbar │ ├─Selectbar │ ├─S...
2019-09-04 12:08:00 1574
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人