09 2019 档案

vue 动画滑动
摘要:我是在vue中引入jquery使用的 第一步:安装jquery插件 npm install jquery --save 第二步:配置文件 webpack.base.conf.js: const webpack = require('webpack')plugins:[ new webpack.Pro 阅读全文

posted @ 2019-09-19 18:46 旺仔小裤头 阅读(325) 评论(0) 推荐(0)

H5 textarea高度自适应
摘要:<!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv= 阅读全文

posted @ 2019-09-19 14:53 旺仔小裤头 阅读(798) 评论(0) 推荐(0)

vue swiper4使用
摘要:swiper中文官网:https://www.swiper.com.cn/api/index.html 第一步:下载swiper 插件 npm install swiper --save-dev 第二步:在main.js中引入 import Swiper from 'swiper' import ' 阅读全文

posted @ 2019-09-19 14:44 旺仔小裤头 阅读(1582) 评论(0) 推荐(0)

vue 元素定义class
摘要:<template> <div :style="aaa"></div> </template> <script> aaa:{ width:document.body.clientWidth, height:'100px', border:'1px solid red' }, aaa:{ width: 阅读全文

posted @ 2019-09-17 17:40 旺仔小裤头 阅读(474) 评论(0) 推荐(0)

小程序 用户授权登录
摘要:1.index.wxml中 <button open-type="getUserInfo" bindgetuserinfo="getUserInfo"> 获取头像昵称 </button> 2.index.js中 getUserInfo: function(e) { console.log(e) ap 阅读全文

posted @ 2019-09-06 15:22 旺仔小裤头 阅读(172) 评论(0) 推荐(0)

原生小程序 iconfont引用及使用
摘要:1.将iconfont图标代码下载下来 2.解压后找到iconfont.ttf文件,打开https://transfonter.org/转化下 3.在utils下新建个iconfont.wxss(位置,命名自己根据喜好来) 转化后找到stylesheet.css,将里面的代码全部复制到iconfon 阅读全文

posted @ 2019-09-05 15:46 旺仔小裤头 阅读(1053) 评论(0) 推荐(0)

vue vuex全局变量
摘要:1.使用命令 :npm install vuex --save 2.src下新建个文件store,在store下再建个index.js: import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) const store = new Vue 阅读全文

posted @ 2019-09-05 11:34 旺仔小裤头 阅读(3080) 评论(0) 推荐(0)

原生小程序 变量全局调用
摘要:第一种方法: 在app.js中声明 globalData: { userInfo: null, nnnnn:1111 } 调用,在指定的js中 const app = getApp() console.log(app.globalData.nnnnn) 第二种方法: 可以像调用方法那样调用变量 gl 阅读全文

posted @ 2019-09-04 15:17 旺仔小裤头 阅读(276) 评论(0) 推荐(0)

原生小程序 请求方法的封装及调用
摘要:1.在util.js中写下请求方法 function request(obj.method, obj.url, obj.data) { return new Promise((resolve) => { wx.request({ method: obj.method, url: 'http://17 阅读全文

posted @ 2019-09-04 14:47 旺仔小裤头 阅读(741) 评论(0) 推荐(0)

vue px直接转化为rem
摘要:1.命令 npm install postcss-px2rem --save-dev npm install px2rem-loader--save-dev 2.build/utils.js文件 第一步:找到exports.cssLoaders = function (options) {}方法插入 阅读全文

posted @ 2019-09-04 12:08 旺仔小裤头 阅读(269) 评论(0) 推荐(0)

elementUI 模板搭建及使用
摘要:1.https://github.com/ElementUI/element-starter下载elementUI模板 2.运行完代码,在浏览器打开,即可看到欢迎页 3.安装element-ui npm i element-ui@next -D 阅读全文

posted @ 2019-09-02 18:41 旺仔小裤头 阅读(5336) 评论(0) 推荐(0)