Skip to content

Commit 79c4abb

Browse files
author
weilei
committed
feat(examples): 新增 Attachments 组件,支持文件上传和拖放功能,并更新路由配置
1 parent dd083a1 commit 79c4abb

File tree

3 files changed

+401
-2
lines changed

3 files changed

+401
-2
lines changed

examples/src/App.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
</el-header>
77
<el-container>
88
<el-aside width="200px">
9-
<el-menu router :default-active="$route.path" background-color="#545c64" text-color="#fff"
10-
active-text-color="#ffd04b">
9+
<el-menu router :default-active="$route.path" background-color="#545c64" text-color="#fff" active-text-color="#ffd04b">
1110
<el-menu-item index="/typewriter">
1211
<i class="el-icon-edit"></i>
1312
<span>Typewriter</span>
@@ -52,6 +51,10 @@
5251
<i class="el-icon-edit"></i>
5352
<span>FilesCard</span>
5453
</el-menu-item>
54+
<el-menu-item index="/attachments">
55+
<i class="el-icon-edit"></i>
56+
<span>Attachments</span>
57+
</el-menu-item>
5558
</el-menu>
5659
</el-aside>
5760
<el-main>

examples/src/router/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import Think from '../views/Think.vue'
1111
import ThoughtChain from '../views/ThoughtChain.vue'
1212
import Sender from '../views/Sender.vue'
1313
import FilesCard from '../views/FilesCard.vue'
14+
import Attachments from '../views/Attachments.vue'
1415
Vue.use(Router)
1516

1617
export default new Router({
@@ -70,6 +71,11 @@ export default new Router({
7071
name: 'FilesCard',
7172
component: FilesCard
7273
},
74+
{
75+
path: '/attachments',
76+
name: 'Attachments',
77+
component: Attachments
78+
},
7379
{
7480
path: '*',
7581
redirect: '/typewriter'

0 commit comments

Comments
 (0)