Skip to content

Commit 22dcfad

Browse files
author
huangshuwei
committed
1、Add Vue.observable() for explicitly creating observable objects
2、Specifies the Vue version dependency
1 parent 8fbab54 commit 22dcfad

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
},
4646
"peerDependencies": {
4747
"lodash": "^4.17.20",
48-
"vue": "^2.6.11"
48+
"vue": ">= 2.6.0"
4949
},
5050
"devDependencies": {
5151
"@babel/cli": "^7.12.8",
Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
1-
/*
2-
暂未使用
3-
*/
4-
5-
61
import Vue from "vue";
72

83
// store
94
export const store = Vue.observable({
10-
cloneTableData: [],
11-
cloneColumns: []
5+
/*
6+
table view port width except scroll bar width
7+
*/
8+
tableViewportWidth: 0
129
});
1310

1411
// mutation
1512
export const mutations = {
16-
initStoreData({ cloneTableData, cloneColumns }) {
17-
store.cloneTableData = cloneTableData;
18-
store.cloneColumns = cloneColumns;
13+
// set store
14+
setStore(payload) {
15+
Object.assign(store, payload);
1916
}
2017
};

0 commit comments

Comments
 (0)