摘要:我是在vue中引入jquery使用的 第一步:安装jquery插件 npm install jquery --save 第二步:配置文件 webpack.base.conf.js: const webpack = require('webpack')plugins:[ new webpack.Pro
阅读全文
摘要:<!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv=
阅读全文
摘要:swiper中文官网:https://www.swiper.com.cn/api/index.html 第一步:下载swiper 插件 npm install swiper --save-dev 第二步:在main.js中引入 import Swiper from 'swiper' import '
阅读全文
摘要:<template> <div :style="aaa"></div> </template> <script> aaa:{ width:document.body.clientWidth, height:'100px', border:'1px solid red' }, aaa:{ width:
阅读全文
摘要:1.index.wxml中 <button open-type="getUserInfo" bindgetuserinfo="getUserInfo"> 获取头像昵称 </button> 2.index.js中 getUserInfo: function(e) { console.log(e) ap
阅读全文
摘要:1.将iconfont图标代码下载下来 2.解压后找到iconfont.ttf文件,打开https://transfonter.org/转化下 3.在utils下新建个iconfont.wxss(位置,命名自己根据喜好来) 转化后找到stylesheet.css,将里面的代码全部复制到iconfon
阅读全文
摘要: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
阅读全文
摘要:第一种方法: 在app.js中声明 globalData: { userInfo: null, nnnnn:1111 } 调用,在指定的js中 const app = getApp() console.log(app.globalData.nnnnn) 第二种方法: 可以像调用方法那样调用变量 gl
阅读全文
摘要:1.在util.js中写下请求方法 function request(obj.method, obj.url, obj.data) { return new Promise((resolve) => { wx.request({ method: obj.method, url: 'http://17
阅读全文
摘要:1.命令 npm install postcss-px2rem --save-dev npm install px2rem-loader--save-dev 2.build/utils.js文件 第一步:找到exports.cssLoaders = function (options) {}方法插入
阅读全文
摘要:1.https://github.com/ElementUI/element-starter下载elementUI模板 2.运行完代码,在浏览器打开,即可看到欢迎页 3.安装element-ui npm i element-ui@next -D
阅读全文