05 2021 档案
摘要:亲测可用! <template> <div class="adbox" ref="adbox" v-show="showAdbox" @mouseenter="enterbox" @mouseleave="leavebox"> <b style="float:right;cursor:pointer
阅读全文
摘要:在vue中,使用watch来响应数据的变化。watch的用法大致有三种。下面代码是watch的一种简单的用法: <input type="text" v-model="cityName"/> new Vue({ el: '#root', data: { cityName: 'shanghai' },
阅读全文
摘要:被后端坑了,他告诉我接口返回的是二进制流,结果怎么都解析不出来,最后才不断测试,发现他返回给我的是base64码。。。 一、下载流文件 首先,reponseType要设置成 blob request({ url:url, method:'post', data, responseType:'blob
阅读全文
摘要:首先在公用方法中写入下面的方法,我这里是src/utils/index.js export function parse_xml(content) { let xml_doc = null try { xml_doc = (new DOMParser()).parseFromString(conte
阅读全文
摘要:el-upload加header <template> <el-upload action="test" :headers="myHeaders"></el-upload> </template> <script> var token = localStorage.getItem('token')
阅读全文