摘要: 条形码是canvas绘制的,滚动的时候覆盖了文字,弹层也覆盖不住的问题,如图: 被覆盖的view换成了cover-view解决,注意:cover-view包裹的内容需要是cover-view、cover-image,可以包裹button 因为我的只有view 全部改成了cover-view。 后来测 阅读全文
posted @ 2020-07-09 11:11 瑶玲 阅读(1888) 评论(0) 推荐(0) 编辑
摘要: 1 2 3 4 5 阅读全文
posted @ 2021-12-31 17:19 瑶玲 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 没有进行防止xss攻击的例子 <p v-html="test"></p> export default { data () { return { test: `<a οnclick='alert("xss攻击")'>链接</a>` } } 结果,js事件被执行,弹出弹框,我们要杜绝这种情况,保留a标 阅读全文
posted @ 2021-06-28 15:34 瑶玲 阅读(1582) 评论(0) 推荐(0) 编辑
摘要: return必须是使用在函数里面的 return有2个作用,结束函数和返回结果 let aa = function() { for(var i = 0; i < 5; i++) { console.log(i) if (i == 3) { // return // break // 跳出整个循环 / 阅读全文
posted @ 2021-05-25 11:38 瑶玲 阅读(1254) 评论(0) 推荐(0) 编辑
摘要: 1.添加自定义文件 preventReClick.js import Vue from 'vue' const preventReClick = Vue.directive('preventReClick', { inserted: function (el, binding) { el.addEv 阅读全文
posted @ 2021-05-18 16:55 瑶玲 阅读(1273) 评论(0) 推荐(0) 编辑
摘要: npm install vuejs-paginate --save import Paginate from 'vuejs-paginate' Vue.component('paginate', Paginate) <!-- 分页组件 --> <template> <div id="pagation 阅读全文
posted @ 2021-03-29 17:39 瑶玲 阅读(705) 评论(0) 推荐(0) 编辑
摘要: 在 vue 项目中,有个页面切换动画,然后内容里的 position : fixed 只相对 viewBox 来定位,检查后发现动画的css 中的个属性 -webkit-perspective: 1200px; -moz-perspective: 1200px; perspective: 1200p 阅读全文
posted @ 2021-03-15 15:11 瑶玲 阅读(552) 评论(0) 推荐(0) 编辑
摘要: 1、语法为:return 表达式; 2、w3c中的解释: 语句结束函数执行,返回调用函数,而且把表达式的值作为函数的结果 也就是:当代码执行到return语句时,函数返回一个结果就结束运行了,return后面的语句根本不会执行。 举个栗子: 1 2 3 4 5 6 function myFun() 阅读全文
posted @ 2021-03-04 09:49 瑶玲 阅读(474) 评论(0) 推荐(0) 编辑
摘要: 新建home.js <!-- home --> <template> <div id="home"> <div class="tabbar_content"> <router-view></router-view> </div> <!-- vant 标签栏 --> <van-tabbar route 阅读全文
posted @ 2021-02-24 09:16 瑶玲 阅读(3331) 评论(0) 推荐(0) 编辑
摘要: 1.区别:vuex存储在内存,localstorage(本地存储)则以文件的方式存储在本地,永久保存;sessionstorage( 会话存储 ) ,临时保存。localStorage和sessionStorage只能存储字符串类型,对于复杂的对象可以使用ECMAScript提供的JSON对象的st 阅读全文
posted @ 2021-02-22 13:51 瑶玲 阅读(1360) 评论(0) 推荐(0) 编辑
摘要: import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) const store = new Vuex.Store({ state: { isEn: false }, //状态管理 mutations: { //判断是否为英文,首页变化 阅读全文
posted @ 2021-02-22 13:50 瑶玲 阅读(52) 评论(0) 推荐(0) 编辑