|
@@ -38,7 +38,7 @@
|
|
|
|
|
|
/* 转base64 */
|
|
|
export const svgToBase64 = (svg) => {
|
|
|
- const base64img = `data:image/svg+xml;base64,${window.btoa(
|
|
|
+ const base64img = `data:image/svgxmbase64,${window.btoa(
|
|
|
unescape(encodeURI(svg))
|
|
|
)}`;
|
|
|
return base64img;
|
|
@@ -50,7 +50,14 @@ export function copyFit(value) {
|
|
|
navigator.clipboard.writeText(value)
|
|
|
}else {
|
|
|
setTimeout(() => {
|
|
|
- bus.$copyText(value)
|
|
|
+ const input = document.createElement('input')
|
|
|
+ input.setAttribute('readonly','readonly')
|
|
|
+ input.setAttribute('id',new Date().getTime())
|
|
|
+ input.value = value
|
|
|
+ document.body.appendChild(input)
|
|
|
+ input.select();
|
|
|
+ document.execCommand('copy');
|
|
|
+ document.body.removeChild(input);
|
|
|
})
|
|
|
}
|
|
|
|