Unverified 提交 b75d9b1e authored 作者: 王嘉豪's avatar 王嘉豪 提交者: GitHub

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

Pr@dev@panel
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
</el-tooltip> </el-tooltip>
<span style="float: right;margin-left: 10px"> <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') }} {{ $t('commons.save') }}
</el-button> </el-button>
<el-button size="mini" @click="closePanelEdit"> <el-button size="mini" @click="closePanelEdit">
...@@ -260,6 +260,7 @@ export default { ...@@ -260,6 +260,7 @@ export default {
}, },
save(withClose) { save(withClose) {
debugger
// 保存到数据库 // 保存到数据库
const requestInfo = { const requestInfo = {
id: this.$store.state.panel.panelInfo.id, id: this.$store.state.panel.panelInfo.id,
......
...@@ -131,7 +131,7 @@ export default { ...@@ -131,7 +131,7 @@ export default {
saveToTemplate() { saveToTemplate() {
this.templateSaveShow = true this.templateSaveShow = true
html2canvas(this.$refs.imageWrapper).then(canvas => { 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 !== '') { if (snapshot !== '') {
this.templateInfo = { this.templateInfo = {
name: this.$store.state.panel.panelInfo.name, name: this.$store.state.panel.panelInfo.name,
...@@ -149,7 +149,7 @@ export default { ...@@ -149,7 +149,7 @@ export default {
}, },
downloadToTemplate() { downloadToTemplate() {
html2canvas(this.$refs.imageWrapper).then(canvas => { 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 !== '') { if (snapshot !== '') {
this.templateInfo = { this.templateInfo = {
name: this.$store.state.panel.panelInfo.name, name: this.$store.state.panel.panelInfo.name,
...@@ -167,7 +167,7 @@ export default { ...@@ -167,7 +167,7 @@ export default {
refreshTemplateInfo() { refreshTemplateInfo() {
this.templateInfo = {} this.templateInfo = {}
html2canvas(this.$refs.imageWrapper).then(canvas => { 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 !== '') { if (snapshot !== '') {
this.templateInfo = { this.templateInfo = {
snapshot: snapshot, snapshot: snapshot,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论