Browse Source

二维码下载包名图片名优化

lwx_16
liwenxuan 10 months ago
parent
commit
a8406bbb0b
  1. 4
      src/components/DesignForm/tableListPage/index.vue

4
src/components/DesignForm/tableListPage/index.vue

@ -263,7 +263,7 @@ async function downloadTables() {
}
const blob = new Blob([ab], { type: mimeString });
zip.file(`${tableKey}.png`, blob);
zip.file(`${props.formBasicConfig.formName}-${tableKey}.png`, blob);
} catch (error) {
console.error(`Error converting ${tableKey} to image:`, error);
}
@ -272,7 +272,7 @@ async function downloadTables() {
zip.generateAsync({ type: 'blob' }).then(function(content) {
const now = new Date();
const formattedDate = `${now.getFullYear()}${String(now.getMonth() + 1).padStart(2, '0')}${String(now.getDate()).padStart(2, '0')}_${String(now.getHours()).padStart(2, '0')}${String(now.getMinutes()).padStart(2, '0')}${String(now.getSeconds()).padStart(2, '0')}`;
const fileName = `tables_${formattedDate}.zip`;
const fileName = `${props.formBasicConfig.formName}-${formattedDate}.zip`;
const link = document.createElement('a');
link.href = URL.createObjectURL(content);

Loading…
Cancel
Save