Skip to content

Commit a0a955c

Browse files
author
Kenneth Cheng
committed
Provide v-model:update-count
1 parent b177088 commit a0a955c

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

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.35",
5+
"version": "1.0.36",
66
"main": "src/main.js",
77
"dependencies": {
88
"@vuepic/vue-datepicker": "^3.3.0",

src/VueExcelEditor.vue

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ export default defineComponent({
421421
pageTop: 0, // Current page top pos of [table] array
422422
423423
selected: {}, // selected storage in hash, key is the pos of [table] array
424-
selectedCount: 0, // selected row count
424+
_selectedCount: 0, // selected row count
425425
prevSelect: -1, // previous select pos of [table] array
426426
processing: false, // current general-purpose processing status
427427
@@ -482,6 +482,15 @@ export default defineComponent({
482482
return dataset
483483
},
484484
computed: {
485+
selectedCount: {
486+
get () {
487+
return this._selectedCount
488+
},
489+
set (value) {
490+
this._selectedCount = value
491+
this.$emit('update:selectedCount', value)
492+
}
493+
},
485494
token () {
486495
const id = Array.from(document.querySelectorAll('.vue-excel-editor')).indexOf(this.$el)
487496
return `vue-excel-editor-${id}`

0 commit comments

Comments
 (0)