Skip to content

Commit

Permalink
Provide v-model:update-count
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenneth Cheng committed May 30, 2024
1 parent b177088 commit a0a955c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vue3-excel-editor",
"email": "[email protected]",
"description": "Vue3 plugin for displaying and editing the array-of-object in Excel style",
"version": "1.0.35",
"version": "1.0.36",
"main": "src/main.js",
"dependencies": {
"@vuepic/vue-datepicker": "^3.3.0",
Expand Down
11 changes: 10 additions & 1 deletion src/VueExcelEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ export default defineComponent({
pageTop: 0, // Current page top pos of [table] array
selected: {}, // selected storage in hash, key is the pos of [table] array
selectedCount: 0, // selected row count
_selectedCount: 0, // selected row count
prevSelect: -1, // previous select pos of [table] array
processing: false, // current general-purpose processing status
Expand Down Expand Up @@ -482,6 +482,15 @@ export default defineComponent({
return dataset
},
computed: {
selectedCount: {
get () {
return this._selectedCount
},
set (value) {
this._selectedCount = value
this.$emit('update:selectedCount', value)
}
},
token () {
const id = Array.from(document.querySelectorAll('.vue-excel-editor')).indexOf(this.$el)
return `vue-excel-editor-${id}`
Expand Down

0 comments on commit a0a955c

Please sign in to comment.