Skip to content

Commit 740e15a

Browse files
author
weilei
committed
feat(examples): 添加 SendMixins 路由和示例
1 parent 6925f56 commit 740e15a

File tree

3 files changed

+598
-49
lines changed

3 files changed

+598
-49
lines changed

examples/src/App.vue

Lines changed: 50 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@
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
10+
router
11+
:default-active="$route.path"
12+
background-color="#545c64"
13+
text-color="#fff"
14+
active-text-color="#ffd04b"
15+
>
1116
<el-menu-item index="/typewriter">
1217
<i class="el-icon-edit"></i>
1318
<span>Typewriter</span>
@@ -60,6 +65,10 @@
6065
<i class="el-icon-edit"></i>
6166
<span>Record</span>
6267
</el-menu-item>
68+
<el-menu-item index="/sendmixins">
69+
<i class="el-icon-s-promotion"></i>
70+
<span>SendMixins</span>
71+
</el-menu-item>
6372
</el-menu>
6473
</el-aside>
6574
<el-main>
@@ -71,51 +80,51 @@
7180
</template>
7281

7382
<script>
74-
export default {
75-
name: 'App',
76-
};
83+
export default {
84+
name: 'App',
85+
};
7786
</script>
7887

7988
<style lang="scss">
80-
#app {
81-
font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
82-
SimSun, sans-serif;
83-
height: 100vh;
84-
display: flex;
85-
flex-direction: column;
86-
}
89+
#app {
90+
font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
91+
SimSun, sans-serif;
92+
height: 100vh;
93+
display: flex;
94+
flex-direction: column;
95+
}
8796
88-
body {
89-
margin: 0;
90-
padding: 0;
91-
background-color: #f5f7fa;
92-
color: #333;
93-
overflow: hidden;
94-
}
97+
body {
98+
margin: 0;
99+
padding: 0;
100+
background-color: #f5f7fa;
101+
color: #333;
102+
overflow: hidden;
103+
}
95104
96-
.el-header {
97-
color: #fff;
98-
line-height: 60px;
99-
text-align: center;
100-
flex: 0 0 auto;
101-
}
105+
.el-header {
106+
color: #fff;
107+
line-height: 60px;
108+
text-align: center;
109+
flex: 0 0 auto;
110+
}
102111
103-
.el-container {
104-
flex: 1;
105-
overflow: hidden;
106-
display: flex;
107-
}
112+
.el-container {
113+
flex: 1;
114+
overflow: hidden;
115+
display: flex;
116+
}
108117
109-
.el-aside {
110-
background-color: #545c64;
111-
color: #fff;
112-
width: 200px;
113-
flex-shrink: 0;
114-
}
118+
.el-aside {
119+
background-color: #545c64;
120+
color: #fff;
121+
width: 200px;
122+
flex-shrink: 0;
123+
}
115124
116-
.el-main {
117-
padding: 20px;
118-
overflow-y: auto;
119-
flex: 1;
120-
}
125+
.el-main {
126+
padding: 20px;
127+
overflow-y: auto;
128+
flex: 1;
129+
}
121130
</style>

examples/src/router/index.js

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
import Vue from 'vue';
22
import Router from 'vue-router';
3-
import Typewriter from '../views/Typewriter.vue';
3+
import Attachments from '../views/Attachments.vue';
44
import Bubble from '../views/Bubble.vue';
55
import BubbleList from '../views/BubbleList.vue';
6-
import Welcome from '../views/Welcome.vue';
7-
import Prompts from '../views/Prompts.vue';
86
import Conversations from '../views/Conversations.vue';
9-
import Thinking from '../views/Thinking.vue';
10-
import Think from '../views/Think.vue';
11-
import ThoughtChain from '../views/ThoughtChain.vue';
12-
import Sender from '../views/Sender.vue';
137
import FilesCard from '../views/FilesCard.vue';
14-
import Attachments from '../views/Attachments.vue';
8+
import Prompts from '../views/Prompts.vue';
159
import Record from '../views/record.vue';
10+
import Sender from '../views/Sender.vue';
11+
import SendMixins from '../views/SendMixins.vue';
12+
import Think from '../views/Think.vue';
13+
import Thinking from '../views/Thinking.vue';
14+
import ThoughtChain from '../views/ThoughtChain.vue';
15+
import Typewriter from '../views/Typewriter.vue';
16+
import Welcome from '../views/Welcome.vue';
1617
Vue.use(Router);
1718

1819
export default new Router({
@@ -82,6 +83,11 @@ export default new Router({
8283
name: 'Record',
8384
component: Record,
8485
},
86+
{
87+
path: '/sendmixins',
88+
name: 'SendMixins',
89+
component: SendMixins,
90+
},
8591
{
8692
path: '*',
8793
redirect: '/typewriter',

0 commit comments

Comments
 (0)