mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2026-01-07 23:47:00 +08:00
refactor: Refatoração de comentários excessivos do código - resolver erro de Introduce Explaining Variable
This commit is contained in:
parent
5a139ffae9
commit
80cc1383e5
@ -70,6 +70,7 @@
|
||||
"serve-static": "1.13.2",
|
||||
"svg-sprite-loader": "4.1.3",
|
||||
"svgo": "1.2.0",
|
||||
"vue-mess-detector": "^0.67.0",
|
||||
"vue-template-compiler": "2.6.10"
|
||||
},
|
||||
"browserslist": [
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
/**
|
||||
* database64文件格式转换为2进制
|
||||
*
|
||||
* @param {[String]} data dataURL 的格式为 “data:image/png;base64,****”,逗号之前都是一些说明性的文字,我们只需要逗号之后的就行了
|
||||
* @param {[String]} mime [description]
|
||||
* @return {[blob]} [description]
|
||||
* dataURL
|
||||
* @param {[String]} data
|
||||
* @param {[String]} mime
|
||||
* @return {[blob]}
|
||||
*/
|
||||
export default function(data, mime) {
|
||||
data = data.split(',')[1]
|
||||
@ -12,7 +11,7 @@ export default function(data, mime) {
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
ia[i] = data.charCodeAt(i)
|
||||
}
|
||||
// canvas.toDataURL 返回的默认格式就是 image/png
|
||||
|
||||
return new Blob([ia], {
|
||||
type: mime
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user