mirror of
https://gitee.com/dromara/go-view.git
synced 2025-04-06 03:58:04 +08:00
feat: 修改下载功能
This commit is contained in:
parent
0d482ad9c4
commit
793f4098b7
@ -94,7 +94,7 @@ onMounted(() => {
|
|||||||
@extend .go-point-bg;
|
@extend .go-point-bg;
|
||||||
@include background-image('background-point');
|
@include background-image('background-point');
|
||||||
@include goId('chart-edit-content') {
|
@include goId('chart-edit-content') {
|
||||||
border-radius: 5px;
|
border-radius: 10px;
|
||||||
margin: 15px;
|
margin: 15px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@extend .go-transition;
|
@extend .go-transition;
|
||||||
|
@ -15,7 +15,7 @@ import { renderIcon, fetchPathByName, routerTurnByPath, setSessionStorage, getLo
|
|||||||
import { PreviewEnum } from '@/enums/pageEnum'
|
import { PreviewEnum } from '@/enums/pageEnum'
|
||||||
import { StorageEnum } from '@/enums/storageEnum'
|
import { StorageEnum } from '@/enums/storageEnum'
|
||||||
import { icon } from '@/plugins'
|
import { icon } from '@/plugins'
|
||||||
import { canvasCut } from '@/utils'
|
import { canvasCut, downloadTextFile } from '@/utils'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||||
import { EditCanvasTypeEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
|
import { EditCanvasTypeEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
|
||||||
@ -57,6 +57,10 @@ const previewHandle = () => {
|
|||||||
|
|
||||||
// 导出
|
// 导出
|
||||||
const exportHandle = () => {
|
const exportHandle = () => {
|
||||||
|
// 导出数据
|
||||||
|
downloadTextFile(JSON.stringify(chartEditStore.getStorageInfo || []), undefined, 'json')
|
||||||
|
|
||||||
|
// 导出图片
|
||||||
const ruler = document.getElementById('mb-ruler')
|
const ruler = document.getElementById('mb-ruler')
|
||||||
const range = document.querySelector('.go-edit-range') as HTMLElement
|
const range = document.querySelector('.go-edit-range') as HTMLElement
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user