From aada0d69a3ad8ef120f427494c5de707d2ee9e88 Mon Sep 17 00:00:00 2001 From: luojiantao <244406664@qq.com> Date: Wed, 13 Feb 2019 17:17:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=BA=E4=BA=8Eiview=E7=9A=84tree=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E6=8B=93=E5=B1=95=E4=BA=86=E6=A0=91=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E6=8B=96=E6=8B=BD=E5=8A=9F=E8=83=BD=EF=BC=8C=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E4=BA=86=E8=BF=9C=E7=A8=8B=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=EF=BC=9B=E5=A2=9E=E5=8A=A0=E4=BA=86demo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/tree-drag/index.js | 2 + src/components/tree-drag/index.vue | 242 ++++++++++++++++++++++++ src/locale/lang/en-US.js | 1 + src/locale/lang/zh-CN.js | 1 + src/locale/lang/zh-TW.js | 1 + src/router/routers.js | 9 + src/view/components/tree-drag/index.vue | 77 ++++++++ 7 files changed, 333 insertions(+) create mode 100644 src/components/tree-drag/index.js create mode 100644 src/components/tree-drag/index.vue create mode 100644 src/view/components/tree-drag/index.vue diff --git a/src/components/tree-drag/index.js b/src/components/tree-drag/index.js new file mode 100644 index 000000000..6c38be9c7 --- /dev/null +++ b/src/components/tree-drag/index.js @@ -0,0 +1,2 @@ +import Index from './index.vue' +export default Index diff --git a/src/components/tree-drag/index.vue b/src/components/tree-drag/index.vue new file mode 100644 index 000000000..de40a4f67 --- /dev/null +++ b/src/components/tree-drag/index.vue @@ -0,0 +1,242 @@ + + + + + + + + diff --git a/src/locale/lang/en-US.js b/src/locale/lang/en-US.js index d91537270..d5a8db107 100644 --- a/src/locale/lang/en-US.js +++ b/src/locale/lang/en-US.js @@ -27,6 +27,7 @@ export default { 'export-excel': 'Export Excel', tools_methods_page: 'Tools Methods', drag_list_page: 'Drag-list', + tree_drag: 'Tree Dragger', i18n_page: 'Internationalization', modalTitle: 'Modal Title', content: 'This is the modal box content.', diff --git a/src/locale/lang/zh-CN.js b/src/locale/lang/zh-CN.js index 439373842..000e863f9 100644 --- a/src/locale/lang/zh-CN.js +++ b/src/locale/lang/zh-CN.js @@ -27,6 +27,7 @@ export default { 'export-excel': '导出excel', tools_methods_page: '工具函数', drag_list_page: '拖拽列表', + tree_drag: '树节点拖拽', i18n_page: '多语言', modalTitle: '模态框题目', content: '这是模态框内容', diff --git a/src/locale/lang/zh-TW.js b/src/locale/lang/zh-TW.js index fed4b1dda..febaf12c8 100644 --- a/src/locale/lang/zh-TW.js +++ b/src/locale/lang/zh-TW.js @@ -27,6 +27,7 @@ export default { 'export-excel': '導出excel', tools_methods_page: '工具函數', drag_list_page: '拖拽列表', + tree_drag: '树节点拖拽', i18n_page: '多語言', modalTitle: '模態框題目', content: '這是模態框內容', diff --git a/src/router/routers.js b/src/router/routers.js index a73ae86c4..49b95368b 100644 --- a/src/router/routers.js +++ b/src/router/routers.js @@ -125,6 +125,15 @@ export default [ }, component: () => import('@/view/components/drag-list/drag-list.vue') }, + { + path: 'tree_drag', + name: 'tree_drag', + meta: { + icon: 'ios-expand', + title: '树节点拖拽' + }, + component: () => import('@/view/components/tree-drag/index.vue') + }, { path: 'tree_table_page', name: 'tree_table_page', diff --git a/src/view/components/tree-drag/index.vue b/src/view/components/tree-drag/index.vue new file mode 100644 index 000000000..a4277edaf --- /dev/null +++ b/src/view/components/tree-drag/index.vue @@ -0,0 +1,77 @@ + + + + 选择了:{{selected.title}} + + + + 拖拽历史 + + ID: {{json.from.id}}({{json.from.title}}) --->> ID: {{json.to.id}}({{json.to.title}}) + Position: {{json.position}} + + + + + + +
选择了:{{selected.title}}
拖拽历史
+ ID: {{json.from.id}}({{json.from.title}}) --->> ID: {{json.to.id}}({{json.to.title}}) + Position: {{json.position}} +