摘要: 最近在做移动端的需求时,有一个长按的需求,总是会触发移动端浏览器自带的长按效果,而且文字也会被选中,所以需要修改为文字不能被选中,浏览器默认长按效果禁止掉。 *{ -webkit-touch-callout:none;/*系统默认菜单被禁用*/ -webkit-user-select:none;/* 阅读全文
posted @ 2021-02-09 09:05 小亮- 阅读(1427) 评论(0) 推荐(0) 编辑
摘要: 最近的Vue项目中使用到了百度地图,因只有一个页面使用到了该组件,所以选择局部引入组件(这时坑就来了)。 在开发过程中向来是使用Google来进行调试的,这里都是一帆风顺,但是开发完在IE中打开时, bug出现了,点击导航按钮,页面竟然不显示!!!又试了下Firefox和Edge均正常!! 无奈的按 阅读全文
posted @ 2020-11-11 11:46 小亮- 阅读(358) 评论(0) 推荐(0) 编辑
摘要: 通过 v-html 创建的 DOM 内容不受 scoped 样式影响,但是你仍然可以通过深度作用选择器来为他们设置样式。 <style scoped> .a >>> .b { /* ... */ } </style> 有些像 Sass 之类的预处理器无法正确解析 >>>。这种情况下你可以使用 /de 阅读全文
posted @ 2020-08-04 15:56 小亮- 阅读(1805) 评论(0) 推荐(0) 编辑
摘要: //获取图片地址 getImgUrl (img) { return require("@/assets/images/inventory/" + img+ ".png"); }, 阅读全文
posted @ 2020-08-04 15:55 小亮- 阅读(5373) 评论(0) 推荐(0) 编辑
摘要: 先有如下场景 点击当前页的某个按钮跳转到另外一个页面去,并将某个值带过去 <div class="examine" @click="insurance(2)">查看详情</div> 第一种方法 页面刷新数据不会丢失 methods:{ insurance(id) { //直接调用$router.pu 阅读全文
posted @ 2020-08-04 11:22 小亮- 阅读(427) 评论(0) 推荐(0) 编辑
摘要: //修改input placeholder颜色 @mixin placeholderColor($color: #fff) { &::-webkit-input-placeholder { color: $color; } &::-moz-placeholder { /* Mozilla Firef 阅读全文
posted @ 2020-06-01 16:38 小亮- 阅读(2268) 评论(0) 推荐(0) 编辑
摘要: //main.js import components from './components' Vue.use(components) //src/components/index.js import loading from './loading' import model from './mod 阅读全文
posted @ 2020-05-22 11:51 小亮- 阅读(3685) 评论(0) 推荐(0) 编辑
摘要: 最近新建一个项目,配置完路由之后,发现<router-view></router-view>内容无法渲染出来,找了许久之后,才发现是一个神坑!!! 配置路由时注意,名字定义为routes 而不是routers 否则你的也内容渲染不出来。 阅读全文
posted @ 2020-05-22 10:36 小亮- 阅读(2956) 评论(0) 推荐(0) 编辑
摘要: 用 test、preview、production分别表示测试,预览,生产三种环境 修改 package.json 文件如下 “scripts”: {“serve”: “vue-cli-service serve”,“test”: “vue-cli-service build --mode test 阅读全文
posted @ 2020-05-21 10:21 小亮- 阅读(1911) 评论(0) 推荐(0) 编辑
摘要: 下载sass-resources-loader工具 npm install sass-resources-loader vue.config.js中加入配置 module.exports = { chainWebpack: config => { const oneOfsMap = config.m 阅读全文
posted @ 2020-05-18 15:14 小亮- 阅读(2924) 评论(0) 推荐(0) 编辑