Skip to content

Commit 2d163f0

Browse files
author
Kenneth Cheng
committed
Fix the key problem in remember feature
1 parent ad60ba3 commit 2d163f0

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,10 +885,12 @@ of each group. If this is the case, you could use grouping attribute. For exampl
885885
])
886886
```
887887
888-
All field set to be grouping will be set as readonly and hide duplication by default.
888+
The above shows the way in specifying 2 groups (region + area). Both group set to collapse by default.
889889
890890
![Grouping](https://i.imgur.com/g5XnsbF.png "Grouping")
891891
892+
All field set to be grouping will be set as readonly and hide duplication by default.
893+
892894
### Localization
893895
894896
The developer may override the default values through localized-label prop.

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vue3-excel-editor",
33
"email": "apple.6502@gmail.com",
44
"description": "Vue3 plugin for displaying and editing the array-of-object in Excel style",
5-
"version": "1.0.44",
5+
"version": "1.0.45",
66
"main": "src/main.js",
77
"dependencies": {
88
"@vuepic/vue-datepicker": "^3.3.0",

src/VueExcelEditor.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ export default defineComponent({
561561
handler () {
562562
this.lazy(() => {
563563
const setting = this.getSetting()
564-
if (this.remember) localStorage[window.location.pathname + '.' + this.token] = JSON.stringify(setting)
564+
if (this.remember) localStorage[window.location.pathname + window.location.hash + '.' + this.token] = JSON.stringify(setting)
565565
this.$emit('setting', setting)
566566
})
567567
},
@@ -625,7 +625,7 @@ export default defineComponent({
625625
window.addEventListener('wheel', this.mousewheel, {passive: false})
626626
627627
if (this.remember) {
628-
const saved = localStorage[window.location.pathname + '.' + this.token]
628+
const saved = localStorage[window.location.pathname + window.location.hash + '.' + this.token]
629629
if (saved) {
630630
const data = JSON.parse(saved)
631631
if (data.colHash === this.colHash)
@@ -1643,7 +1643,7 @@ export default defineComponent({
16431643
window.removeEventListener('mousemove', this.colSepMouseMove)
16441644
window.removeEventListener('mouseup', this.colSepMouseUp)
16451645
const setting = this.getSetting()
1646-
if (this.remember) localStorage[window.location.pathname + '.' + this.token] = JSON.stringify(setting)
1646+
if (this.remember) localStorage[window.location.pathname + window.location.hash + '.' + this.token] = JSON.stringify(setting)
16471647
this.$emit('setting', setting)
16481648
},
16491649

0 commit comments

Comments
 (0)