Merge pull request #216 from dataease/pr@dev@panel

Pr@dev@panel
This commit is contained in:
王嘉豪 2021-07-12 17:59:30 +08:00 committed by GitHub
commit b75d9b1eda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -53,7 +53,7 @@
</el-tooltip>
<span style="float: right;margin-left: 10px">
<el-button size="mini" :disabled="changeTimes===0||snapshotIndex===lastSaveSnapshotIndex" @click="save">
<el-button size="mini" :disabled="changeTimes===0||snapshotIndex===lastSaveSnapshotIndex" @click="save(false)">
{{ $t('commons.save') }}
</el-button>
<el-button size="mini" @click="closePanelEdit">
@ -260,6 +260,7 @@ export default {
},
save(withClose) {
debugger
//
const requestInfo = {
id: this.$store.state.panel.panelInfo.id,

View File

@ -131,7 +131,7 @@ export default {
saveToTemplate() {
this.templateSaveShow = true
html2canvas(this.$refs.imageWrapper).then(canvas => {
const snapshot = canvas.toDataURL('image/jpeg', 0.2) // 0.2
const snapshot = canvas.toDataURL('image/jpeg', 0.1) // 0.2
if (snapshot !== '') {
this.templateInfo = {
name: this.$store.state.panel.panelInfo.name,
@ -149,7 +149,7 @@ export default {
},
downloadToTemplate() {
html2canvas(this.$refs.imageWrapper).then(canvas => {
const snapshot = canvas.toDataURL('image/jpeg', 0.2) // 0.2
const snapshot = canvas.toDataURL('image/jpeg', 0.1) // 0.2
if (snapshot !== '') {
this.templateInfo = {
name: this.$store.state.panel.panelInfo.name,
@ -167,7 +167,7 @@ export default {
refreshTemplateInfo() {
this.templateInfo = {}
html2canvas(this.$refs.imageWrapper).then(canvas => {
const snapshot = canvas.toDataURL('image/jpeg', 0.2) // 0.2
const snapshot = canvas.toDataURL('image/jpeg', 0.1) // 0.2
if (snapshot !== '') {
this.templateInfo = {
snapshot: snapshot,