Commit c2233d2239973c0cf5ee49f3446380a8377f84b8
1 parent
b6e67986
fix: #251
Showing
1 changed file
with
4 additions
and
5 deletions
front-end/h5/src/components/core/support/excel.js
| @@ -34,11 +34,6 @@ export default { | @@ -34,11 +34,6 @@ export default { | ||
| 34 | } | 34 | } |
| 35 | } | 35 | } |
| 36 | }, | 36 | }, |
| 37 | - watch: { | ||
| 38 | - value () { | ||
| 39 | - this.refreshSheet({ rows: this.innerItems }) | ||
| 40 | - } | ||
| 41 | - }, | ||
| 42 | methods: { | 37 | methods: { |
| 43 | parseCSV (csv) { | 38 | parseCSV (csv) { |
| 44 | const sheetData = Parser.binaryMatrix2excel(csv.data) | 39 | const sheetData = Parser.binaryMatrix2excel(csv.data) |
| @@ -84,6 +79,10 @@ export default { | @@ -84,6 +79,10 @@ export default { | ||
| 84 | </div> | 79 | </div> |
| 85 | }, | 80 | }, |
| 86 | mounted () { | 81 | mounted () { |
| 82 | + // fix #251 | ||
| 83 | + window.EditorApp.$on('setEditingElement', (ele) => { | ||
| 84 | + this.refreshSheet({ rows: this.innerItems }) | ||
| 85 | + }) | ||
| 87 | this.sheet = this.initSheet() | 86 | this.sheet = this.initSheet() |
| 88 | this.refreshSheet({ rows: this.innerItems }) | 87 | this.refreshSheet({ rows: this.innerItems }) |
| 89 | } | 88 | } |