commit
b75d9b1eda
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user