摘要: methods: { clickOther: function () {}; } mounted() { window.addEventListener("click", this.clickOther); } beforeDestroy() { // 实例销毁之前对点击事件进行解绑 window. 阅读全文
posted @ 2020-10-21 18:38 法国梧桐和小伙子 阅读(11430) 评论(0) 推荐(1)
摘要: *有些浏览器cookie如果页面路径是本地路径,是无法设置cookie的,项目放线上去就不影响。 1.下面是封装的cookie文件,在需要使用的页面直接引入使用 //设置 function setCookie(name, value) { var Days = 1; var exp = new Da 阅读全文
posted @ 2020-10-09 15:09 法国梧桐和小伙子 阅读(264) 评论(0) 推荐(0)
摘要: 由于需要兼容到ie8并且是ajax请求,所以你得保证你得jquery是1.3.2及以下版本,不然就不能兼容ie8 单独新建js文件,然后再需要使用的地方引入 var baseurl = 'http://1.0.0.0'; function getCookie(name) { var arr, reg 阅读全文
posted @ 2020-10-09 15:01 法国梧桐和小伙子 阅读(242) 评论(0) 推荐(0)
摘要: 1、条件渲染表格内容 这是创建一个实例 在temple中return数据条件处理后的结果 结果如图 2、条件处理表格操作按钮的显示影藏 添加标致id 添加模板script <script type="text/html" id="barDemo"> {{# if(d.nickName !="admi 阅读全文
posted @ 2020-09-18 11:41 法国梧桐和小伙子 阅读(583) 评论(0) 推荐(0)
摘要: 以下6个属性设置在容器上。 flex-direction flex-wrap flex-flow justify-content align-items align-content flex-direction属性决定主轴的方向(即项目的排列方向)。 .box { flex-direction: r 阅读全文
posted @ 2020-07-21 16:38 法国梧桐和小伙子 阅读(166) 评论(0) 推荐(0)
摘要: 1. yum -y install pcre* 2. . 3. 4. 5. 6. 7. 8. 9. 10. 11. 新建Nginx.conf下的内容 阅读全文
posted @ 2020-07-19 10:10 法国梧桐和小伙子 阅读(941) 评论(0) 推荐(0)
摘要: 1、卸载之前的vue-cli版本:npm uninstall vue-cli -g 2、安装新版本包:npm install -g @vue/cli 或者 yarn global add @vue/cli 3、检测版本是否正确:vue --version。 4、创建新项目:vue create vu 阅读全文
posted @ 2020-03-12 14:00 法国梧桐和小伙子 阅读(996) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-03-11 11:16 法国梧桐和小伙子 阅读(2512) 评论(0) 推荐(0)
摘要: wx.createSelectorQuery().selectAll('.npl-intro').boundingClientRect(function (rect) { console.log(rect[0].height) console.log(rect[0].width) }).exec() 阅读全文
posted @ 2020-01-09 14:38 法国梧桐和小伙子 阅读(1898) 评论(0) 推荐(0)
摘要: 1,封装方法 hilight_word(str, keyword) { var that = this; const idx = str.indexOf(keyword); var t = []; if (idx !== -1) { if (idx == 0) { t = that.hilight_ 阅读全文
posted @ 2019-12-16 13:52 法国梧桐和小伙子 阅读(584) 评论(0) 推荐(0)