前端
文章平均质量分 74
小超超~
这个作者很懒,什么都没留下…
展开
-
微信小程序封装wx.request
在utils下面新建request.js文件放下如下代码:const $settings = require(’./settings.js’); //配置文件,配置域名和需要loading层的接口const request = (method, url, data) => {// 开启loading层const loading = KaTeX parse error: Expected 'EOF', got '&' at position 67: …ue); loading &a原创 2021-04-21 15:51:03 · 168 阅读 · 0 评论 -
VUE后台管理系统权限管理思路
一.有两种做法:(权限就是路由,按钮权限就是控制显示和隐藏)1.权限组放在前端(包括按钮权限)。2.权限组全部由后端返回(包括按钮权限)。二.1.权限组放在前端:根据登录人不同选择不同的权限组。2.权限全部由后端返回:你不管权限,你只要把后端返回的权限组按路由的规则遍历出来添加到Router里面就行了。基本上就是这样。3.按钮权限:把按钮的名称放在一个数组里面,然后在按钮上使用v-if来判断有或者没有显示隐藏就行了。...原创 2020-11-25 11:16:28 · 1305 阅读 · 0 评论 -
vue动态绑定背景图片
:style="{backgroundImage:‘url(’ + val.banner + ‘)’, backgroundRepeat:‘no-repeat’, backgroundPosition:‘center center’, backgroundSize: ‘cover’}"原创 2020-08-24 16:23:59 · 474 阅读 · 0 评论 -
vue引入vue-awesome-swiper报错
有些这样import VueAwesomeSwiper from ‘vue-awesome-swiper’import 'swiper/dist/css/swiper.css’不报错,有些会报错就这样引入import VueAwesomeSwiper from “vue-awesome-swiper”;import ‘vue-awesome-swiper/node_modules/swiper/dist/css/swiper.css’...原创 2020-08-10 17:47:59 · 698 阅读 · 0 评论 -
微信小程序简单的分包
1.在app.json里面加"subpackages": [{“root”: “shoping”,//分包的路径“name”: “shoping”,//分包的名字“pages”: [“pages/home/index”],“independent”: false//是否独立分包},{“root”: “conter”,“name”: “conter”,“pages”: [“pages/new_s/index”],“independent”: false}],...原创 2020-06-19 11:03:49 · 533 阅读 · 0 评论 -
微信小程序顶部自定义基本上适配所以手机
1.先去设置顶部导航可以自定义2.在app.js里面:wx.getSystemInfo({success: (e) => {this.globalData.statusBar = e.statusBarHeight; //状态栏高度let custom = wx.getMenuButtonBoundingClientRect(); //菜单按钮this.globalData.custom = custom;this.globalData.customBar = custom.bottom原创 2020-05-10 18:39:29 · 828 阅读 · 0 评论 -
html中使用load,怎么使用被加载页面的id的方法
$(function(){$("#header").load(“new_file.html”,function(){$("#a").on(‘click’,function(){alert(“1111”)});}); })原创 2020-02-10 16:34:43 · 645 阅读 · 0 评论 -
vue-cil2.0前端解决跨越问题
在config下面的index.js中的module.exports下面的dev加入proxyTable: {‘/api’: {target: ‘http://www.baidu.com’, //源地址changeOrigin: true, //改变源pathRewrite: {‘^/api’: ‘http://www.baidu.com’ //路径重写}}},在使用axiso...原创 2020-01-08 15:35:42 · 176 阅读 · 0 评论 -
vue中判断上传图片大小是否符合
const isImage = file.type.includes("image"); if (!isImage) { this.$message.error("上传文件类型必须是图片!"); return false } var testmsg = /^image\/(jpeg|png|jpg)$/.test(file.type); if (tes...原创 2019-12-03 16:31:16 · 1653 阅读 · 0 评论 -
vue 中为不同页面设置背景图片
beforeRouteEnter(to, from, next) {document.getElementsByTagName(“body”)[0].className = “bac”;next()},beforeRouteLeave(to, from, next) {document.body.removeAttribute(“class”,“bac”);next();},ba...原创 2019-11-04 16:13:08 · 1394 阅读 · 0 评论 -
css3动画
1.创建一个动画: @keyframes myfirst{0% {background: #00000}50% {background: red}100% {background: yellow} }2.去相印的要使用动画的元素下面使用animation: myfirst 5s;原创 2019-11-04 14:53:26 · 77 阅读 · 0 评论