上一页 1 2 3 4 5 6 7 ··· 9 下一页
摘要: <div id="div1">111111111</div> <button onclick="handleClick()">OK</button> <script type="text/javascript" charset="utf-8"> const div1 = document.query 阅读全文
posted @ 2023-03-11 11:23 chicidol 阅读(51) 评论(0) 推荐(0)
摘要: 如果不能自动播放,就模拟元素点击事件 1、隐藏掉播放按钮2、模拟点击播放按钮 //隐藏按钮 document.getElementsByClassName('btn')[0].style.opacity=0; //模拟点击播放 if(document.all) {// 兼容IE document.g 阅读全文
posted @ 2023-03-11 11:22 chicidol 阅读(299) 评论(0) 推荐(0)
摘要: js中与webview通信 function setStyle(){ console.log('1111') return function () { console.log('2222') try{ console.log('3333') //隐藏图片 document.getElementsBy 阅读全文
posted @ 2023-03-11 11:15 chicidol 阅读(538) 评论(0) 推荐(0)
摘要: <p v-html="translateHtml(item.message)"></p> methods: { //给字符串中的链接用span标签包裹起来,实现点击跳转 translateHtml (msg) { var reg = /((http|https):\/\/[-A-Za-z0-9+&@ 阅读全文
posted @ 2023-02-16 10:27 chicidol 阅读(1495) 评论(0) 推荐(0)
摘要: //判断数组中是否有某个值,兼容性写法 function itemIncludes (arr, item) { //如果浏览器支持数组的includes方法 if(arr.includes){ return arr.includes(item) } //如果浏览器不支持数组的includes方法,就 阅读全文
posted @ 2023-02-14 11:32 chicidol 阅读(211) 评论(0) 推荐(0)
摘要: 分两种情况: 一种是直接进入到该页面,通过监听popstate事件来判断返回操作 1、在触发弹窗弹出的方法里加上:window.history.pushState(null, null, "#"); methods:{ addPopState () { if (this.typeVisible) { 阅读全文
posted @ 2022-04-26 14:21 chicidol 阅读(226) 评论(0) 推荐(0)
摘要: //i18n->index.js import Vue from 'vue' import VueI18n from 'vue-i18n' Vue.use(VueI18n) export const i18n = new VueI18n({ locale: 'vus', // 将要切换的语言,根据场 阅读全文
posted @ 2022-03-03 14:21 chicidol 阅读(276) 评论(0) 推荐(0)
摘要: dowFile (item) { const data = { translate: json[item] } let blob = new Blob([JSON.stringify(data)], { type: 'text/plain' }); let file = new File([blob 阅读全文
posted @ 2022-03-03 14:16 chicidol 阅读(93) 评论(0) 推荐(0)
摘要: 日常工作中遇到一些Excel表格的数据,需要转换成json格式的字符串,怎么处理呢?可以使用这个工具:excel2json 下载地址:https://github.com/neil3d/excel2json/releases 用cmd进入文件解压所在的地址,敲入命令 excel2json --exc 阅读全文
posted @ 2022-02-08 15:38 chicidol 阅读(2307) 评论(0) 推荐(0)
摘要: webpack-bundle-analyzer 扫描 bundle 并构建其内部内容的可视化。使用此可视化来查找大的或不必要的依赖项。 步骤一:安装 webpack-bundle-analyzer npm install webpack-bundle-analyzer --save-dev 步骤二: 阅读全文
posted @ 2021-12-10 14:46 chicidol 阅读(70) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 ··· 9 下一页