摘要: vue按钮级权限 使用方式: <!-- 根据角色权限 --><el-button v-hasRole="['admin','operater']"></el-button> <!-- 根据按钮权限 --><el-button v-hasRole="['system:add','system:delete']"></e 阅读全文
posted @ 2022-10-26 17:17 辉仔的前端之路 阅读(206) 评论(0) 推荐(0)
摘要: 在小程序根标签上使用 v-show 进行判断网络请求的数据是否已经请求完成了, 完成了才显示页面给用户看。 尽量不要使用 v-if 判断, tabbar 页面使用 v-if 判断网络请求数据加载会导致页面显示文档流错误,页面无法显示。 有用到组件的页面 也不能使用 v-if 进行判断负责会导致数据无 阅读全文
posted @ 2022-01-04 10:47 辉仔的前端之路 阅读(4054) 评论(0) 推荐(0)
摘要: // 同步储存和读取 // 存 uni.setStorageSync('name','LZJAPYX,ZDL'); // name为键名 LZJAPYX,ZDL为健值 // 取 uni.getStorageSync('name') // 以健名取健值 // 删除 uni.removeStorageS 阅读全文
posted @ 2021-12-09 14:36 辉仔的前端之路 阅读(2927) 评论(0) 推荐(0)
摘要: uni.getSystemInfo({ success: function(res) { // res - 各种参数 console.log(res.windowWidth); // 屏幕的宽度 let info = uni.createSelectorQuery().select(".search 阅读全文
posted @ 2021-12-09 09:32 辉仔的前端之路 阅读(1308) 评论(0) 推荐(0)
摘要: let height = wx.getSystemInfoSync().windowHeight; let width = wx.getSystemInfoSync().windowWidth; 阅读全文
posted @ 2021-12-09 09:28 辉仔的前端之路 阅读(351) 评论(0) 推荐(0)
摘要: 先安装两个插件,live server和 live sass compiler两个插件 然后将下面的代码复制到设置(文件 首选项 设置 打开设置json)中 "liveSassCompile.settings.formats":[ { "format": "expanded", "extension 阅读全文
posted @ 2021-11-26 16:37 辉仔的前端之路 阅读(964) 评论(0) 推荐(0)
摘要: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.o 阅读全文
posted @ 2021-11-26 14:29 辉仔的前端之路 阅读(107) 评论(0) 推荐(0)
摘要: const info = wx.getSystemInfoSync() if (info.platform 'android') { // android 需要执行的代码 } else { // ios 需要执行的代码 } 阅读全文
posted @ 2021-11-20 11:41 辉仔的前端之路 阅读(814) 评论(0) 推荐(0)
摘要: 问题描述: 获取用户选择的开始时间与结束时间,两个时间都为yyyyMMdd格式; 取出后转为"yyyy-MM-dd 00:00:00:000"格式; 之后date = new Date(yyyy-MM-dd 00:00:00:000); 之后转时间戳 date.getTime()。用结束时间戳减去开 阅读全文
posted @ 2021-11-20 11:31 辉仔的前端之路 阅读(873) 评论(0) 推荐(0)