diff --git a/package-lock.json b/package-lock.json index 64f7f93ff..f2101e4ab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3403,6 +3403,11 @@ "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", "dev": true }, + "clonedeep": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/clonedeep/-/clonedeep-2.0.0.tgz", + "integrity": "sha1-jOygd39He78x/oyHGq9jo5C7wnI=" + }, "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -13664,13 +13669,40 @@ } }, "tree-table-vue": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/tree-table-vue/-/tree-table-vue-1.0.5.tgz", - "integrity": "sha512-dauAPky+jlUjW0G4TyYOFsBw9PgVTpcMS3GyPm9lvzTiWcF+wjoznLpfZLKNzheyv8oLE85Tc2qRzpwYQNTByg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/tree-table-vue/-/tree-table-vue-1.1.0.tgz", + "integrity": "sha512-r5WUa5+s36Ud3Ycpp6+wqse6FkG3yDUsOUagjhoUbBld7H7JETntQRJ1oeL8jMj/oOH4gflkarG5h4QUX0zTtA==", "requires": { + "clonedeep": "2.0.0", + "iview": "3.1.5", "vue": "2.5.17" }, "dependencies": { + "deepmerge": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-2.2.1.tgz", + "integrity": "sha512-R9hc1Xa/NOBi9WRVUWg19rl1UB7Tt4kuPd+thNJgFZoxXsTz7ncaPaeIm+40oSGuP33DfMb4sZt1QIGiJzC4EA==" + }, + "iview": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/iview/-/iview-3.1.5.tgz", + "integrity": "sha512-lFom+Do/mJ4ejdu/+o/kCMWVGBpe85pIho7AsrOge/7IPuP5UbdSPu720qaEe4lC2T1AFczD74LlzqZ/mik0FA==", + "requires": { + "async-validator": "1.8.2", + "deepmerge": "2.2.1", + "element-resize-detector": "1.1.14", + "js-calendar": "1.2.3", + "lodash.throttle": "4.1.1", + "popper.js": "1.14.3", + "tinycolor2": "1.4.1", + "v-click-outside-x": "3.5.3" + } + }, + "v-click-outside-x": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/v-click-outside-x/-/v-click-outside-x-3.5.3.tgz", + "integrity": "sha512-b7n42NTZ1lv4Q8MmRSyv4aatxnuH+jRbj+uL+EEihBJ2t93Vxt1/LQvca/qDRvvyVcrSGprS4HOYffX7Dk4uTg==" + }, "vue": { "version": "2.5.17", "resolved": "https://registry.npmjs.org/vue/-/vue-2.5.17.tgz", diff --git a/package.json b/package.json index 55478e277..72a78bf8e 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "js-cookie": "^2.2.0", "simplemde": "^1.11.2", "sortablejs": "^1.7.0", - "tree-table-vue": "^1.0.5", + "tree-table-vue": "^1.1.0", "vue": "^2.5.10", "vue-i18n": "^7.8.0", "vue-router": "^3.0.1", diff --git a/src/components/parent-view/parent-view.vue b/src/components/parent-view/parent-view.vue index c4ef36935..84259f36c 100644 --- a/src/components/parent-view/parent-view.vue +++ b/src/components/parent-view/parent-view.vue @@ -1,8 +1,20 @@ diff --git a/src/locale/lang/en-US.js b/src/locale/lang/en-US.js index 18f102ea9..d91537270 100644 --- a/src/locale/lang/en-US.js +++ b/src/locale/lang/en-US.js @@ -21,6 +21,7 @@ export default { level_2_3: 'Level-2-3', level_2_2: 'Level-2-2', level_2_2_1: 'Level-2-2-1', + level_2_2_2: 'Level-2-2-2', excel: 'Excel', 'upload-excel': 'Upload Excel', 'export-excel': 'Export Excel', diff --git a/src/locale/lang/zh-CN.js b/src/locale/lang/zh-CN.js index 10aca9391..439373842 100644 --- a/src/locale/lang/zh-CN.js +++ b/src/locale/lang/zh-CN.js @@ -21,6 +21,7 @@ export default { level_2_3: 'Level-2-3', level_2_2: 'Level-2-2', level_2_2_1: 'Level-2-2-1', + level_2_2_2: 'Level-2-2-2', excel: 'Excel', 'upload-excel': '上传excel', 'export-excel': '导出excel', diff --git a/src/locale/lang/zh-TW.js b/src/locale/lang/zh-TW.js index c4c56adca..fed4b1dda 100644 --- a/src/locale/lang/zh-TW.js +++ b/src/locale/lang/zh-TW.js @@ -21,6 +21,7 @@ export default { level_2_3: 'Level-2-3', level_2_2: 'Level-2-2', level_2_2_1: 'Level-2-2-1', + level_2_2_2: 'Level-2-2-2', excel: 'Excel', 'upload-excel': '上傳excel', 'export-excel': '導出excel', diff --git a/src/router/routers.js b/src/router/routers.js index 3c4cd2e83..a73ae86c4 100644 --- a/src/router/routers.js +++ b/src/router/routers.js @@ -381,7 +381,16 @@ export default [ icon: 'md-funnel', title: '三级' }, - component: () => import('@/view/multilevel/level-2-2/level-3-1.vue') + component: () => import('@/view/multilevel/level-2-2/level-2-2-1.vue') + }, + { + path: 'level_2_2_2', + name: 'level_2_2_2', + meta: { + icon: 'md-funnel', + title: '三级' + }, + component: () => import('@/view/multilevel/level-2-2/level-2-2-2.vue') } ] }, diff --git a/src/view/components/tree-table/index.vue b/src/view/components/tree-table/index.vue index c8910765f..6af71d14c 100644 --- a/src/view/components/tree-table/index.vue +++ b/src/view/components/tree-table/index.vue @@ -4,7 +4,7 @@ 树状表格组件tree-table-vue,基于vue-table-with-tree-grid进行开发,修复了一些bug,添加了一些新属性

支持使用slot-scope进行自定义列渲染内容

文档请看https://github.com/lison16/tree-table-vue

- + @@ -20,22 +20,22 @@ export default { return { columns: [ { - label: 'name', - prop: 'name', + title: 'name', + key: 'name', width: '400px' }, { - label: 'sex', - prop: 'sex', + title: 'sex', + key: 'sex', minWidth: '50px' }, { - label: 'score', - prop: 'score' + title: 'score', + key: 'score' }, { - label: 'likes', - prop: 'likes', + title: 'likes', + key: 'likes', minWidth: '200px', type: 'template', template: 'likes' diff --git a/src/view/multilevel/level-2-2/level-2-2-1.vue b/src/view/multilevel/level-2-2/level-2-2-1.vue new file mode 100644 index 000000000..d110adf4c --- /dev/null +++ b/src/view/multilevel/level-2-2/level-2-2-1.vue @@ -0,0 +1,16 @@ + + diff --git a/src/view/multilevel/level-2-2/level-2-2-2.vue b/src/view/multilevel/level-2-2/level-2-2-2.vue new file mode 100644 index 000000000..9c2a88c59 --- /dev/null +++ b/src/view/multilevel/level-2-2/level-2-2-2.vue @@ -0,0 +1,16 @@ + + diff --git a/src/view/multilevel/level-2-2/level-3-1.vue b/src/view/multilevel/level-2-2/level-3-1.vue deleted file mode 100644 index 5985a5be2..000000000 --- a/src/view/multilevel/level-2-2/level-3-1.vue +++ /dev/null @@ -1,8 +0,0 @@ - -