摘要: getTimes(file) { var content = file; var url = URL.createObjectURL(content); //经测试,发现audio也可获取视频的时长 var audioElement = new Audio(url); audioElement.ad 阅读全文
posted @ 2023-08-15 10:51 ·休伯利安 阅读(1180) 评论(0) 推荐(0)
摘要: import Vue from 'vue' Vue.directive('Int', { bind: function (el) { const input = el.getElementsByTagName('input')[0] input.onkeyup = function (e) { if 阅读全文
posted @ 2023-03-22 18:24 ·休伯利安 阅读(1002) 评论(0) 推荐(0)
摘要: 字符串转base64 function encode(str){ // 对字符串进行编码 var encode = encodeURI(str); // 对编码的字符串转化base64 var base64 = btoa(encode); return base64; } base64转字符串 fu 阅读全文
posted @ 2023-02-25 10:44 ·休伯利安 阅读(265) 评论(0) 推荐(0)
摘要: get: getInfo(){ this.$http.get('接口地址',{params:{参数}},{emulateJSON:true}).then(result =>{ console.log(result) }) }post: getInfo(){ this.$http.post('接口地址 阅读全文
posted @ 2023-02-01 16:34 ·休伯利安 阅读(755) 评论(0) 推荐(0)
摘要: 效果如下 安装工具库 npm install pinyin-pro 或者 yarn add pinyin-pro 封装组件 change-pinyin <template> <div class="pinyin"> <div class="wordBox" v-for="(item,index) i 阅读全文
posted @ 2022-12-28 17:25 ·休伯利安 阅读(423) 评论(0) 推荐(0)
摘要: 查看当前镜像源 npm config get registry 切换为国内镜像源 npm config set registry=https://registry.npm.taobao.org/ 阅读全文
posted @ 2022-12-27 14:43 ·休伯利安 阅读(86) 评论(0) 推荐(0)