├── .babelrc ├── .gitignore ├── .npmignore ├── README.md ├── dist ├── tree-table.common.js ├── tree-table.es.js └── tree-table.js ├── example ├── data.js ├── dev.html ├── index.js └── test.html ├── jsx.d.ts ├── package.json ├── rollup.config.js ├── src ├── dependence.ts ├── expand.ts ├── index.tsx ├── inject.ts ├── props.ts └── utils.tsx ├── tsconfig.json ├── types ├── dependence.d.ts ├── expand.d.ts ├── index.d.ts ├── inject.d.ts ├── props.d.ts └── utils.d.ts └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["es2015", { "modules": false }] 4 | ], 5 | "plugins": [ 6 | "transform-vue-jsx" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | types/*.jsx 4 | types/*.js 5 | src1 -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .node_modules 2 | bin 3 | yarn.lock 4 | gulpfile.js 5 | .babelrc 6 | example 7 | .git 8 | .gitignore -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # element-tree-grid 2 |
10 | 11 | tree grid extends `element` ui with `vue` 12 | 13 | #### releases v1.0.4 14 | - try to expand row expanded after data reload 15 | 16 | 17 | **having problems** with `load data by props remote
41 |currently can't use width selection column
62 |basic usage
63 |click to see code
77 | 78 |
79 | new Vue({
80 | el: "#app1",
81 | data: {
82 | model: {
83 | menus: trees
84 | }
85 | },
86 | methods: {
87 | remote(row, callback) {
88 | setTimeout(function () {
89 | callback(row.children)
90 | }, 500)
91 | },
92 | testClick(scope) {
93 | console.info(scope)
94 | }
95 | }
96 | })
97 |
98 | load data by props remote
145 |click to see code
154 | 155 |
156 | window.app = new Vue({
157 | el: "#app",
158 | data: {
159 | model: {
160 | menus: flatTree.filter(f => f['parent_id'] == null)
161 | }
162 | },
163 | methods: {
164 | remote(row, callback) {
165 | callback(flatTree.filter(f => f['parent_id'] == row['id']))
166 | }
167 | }
168 | })
169 |
170 |