9
9
</h1 >
10
10
</section >
11
11
<section class =" section" >
12
- <v-input v-model =" userInput" placeholder =" search your page title ..." center />
12
+ <v-input v-model =" userInput" placeholder =" Search for the page you want to open ..." center />
13
13
</section >
14
14
<section class =" section" >
15
15
<v-table :data =" filterPages" @row-click =" rowClickHandler" >
16
- <v-table-col label =" title" prop =" title" />
17
- <v-table-col label =" type" prop =" type" default =" none" />
18
- <v-table-col label =" description" prop =" description" default =" none" />
16
+ <v-table-col label =" Title" prop =" title" />
17
+ <v-table-col label =" Tags" prop =" type" default =" none" />
18
+ <v-table-col label =" More information" default =" none" >
19
+ <template slot-scope="props">
20
+ <a class =" link" href =" javascript:;" @click.stop =" open(props.row.description)" >more...</a >
21
+ </template >
22
+ </v-table-col >
19
23
</v-table >
20
24
</section >
21
25
<section class =" section" >
22
- Note: click any table row will open the page
26
+ Tip: Clicking on any row in the table will open the page.
23
27
</section >
24
28
<footer class =" footer" >
25
29
@ create by vue-cli-plugin-navigator
26
30
</footer >
31
+ <v-dialog title =" Information" :visible.sync =" showDetail" >
32
+ <template slot="body">
33
+ {{detailContent}}
34
+ </template >
35
+ <v-button type =" dark" value =" close" slot =" footer" @click =" showDetail = false" />
36
+ </v-dialog >
27
37
</div >
28
38
</template >
29
39
30
40
<script lang="ts">
31
41
/* eslint-disable prefer-destructuring */
32
42
import Vue from ' vue' ;
33
- import VInput from ' ./components/v-input' ;
34
- import { VTable , VTableCol } from ' ./components/v-table' ;
43
+ import VInput from ' ../ui/input' ;
44
+ import { VTable , VTableCol } from ' ../ui/table' ;
45
+ import VDialog from ' ../ui/dialog' ;
46
+ import VButton from ' ../ui/button' ;
35
47
import getConfig from ' ../utils/getConfig' ;
36
48
37
49
export default Vue .extend ({
38
50
name: ' app' ,
39
51
components: {
40
52
VInput ,
41
53
VTable ,
42
- VTableCol
54
+ VTableCol ,
55
+ VDialog ,
56
+ VButton
43
57
},
44
58
data() {
45
59
return {
46
60
userInput: ' ' ,
47
61
pages: getConfig (),
62
+ showDetail: false ,
63
+ detailContent: ' '
48
64
};
49
65
},
50
66
computed: {
@@ -57,25 +73,37 @@ export default Vue.extend({
57
73
methods: {
58
74
rowClickHandler(row : PageConfig ) {
59
75
location .href = row .path ;
76
+ },
77
+ open(content : string ) {
78
+ this .detailContent = content ;
79
+ this .showDetail = true ;
60
80
}
61
81
},
62
82
});
63
83
</script >
64
84
65
85
<style lang="scss">
86
+ @import " ~@/assets/color" ;
87
+ html {
88
+ height : 100% ;
89
+ }
66
90
body {
67
91
margin : 0 ;
68
92
padding : 0 ;
93
+ height : 100% ;
69
94
}
70
95
#app {
96
+ position : relative ;
71
97
font-family : sans-serif ;
72
98
box-sizing : border-box ;
73
99
color : #2c3e50 ;
74
100
margin-left : auto ;
75
101
margin-right : auto ;
76
- padding : 0 10px ;
77
- min-width : 700px ;
78
- max-width : 1024px ;
102
+ padding : 1px 10px 42px ;
103
+ min-width : 320px ; // 移动端最小屏幕
104
+ max-width : 1200px ; // 最大尺寸
105
+ min-height : 100% ;
106
+ -webkit-overflow-scrolling : touch ;
79
107
}
80
108
81
109
.section {
@@ -90,47 +118,7 @@ body {
90
118
margin : 0 auto ;
91
119
width : 150px ;
92
120
height : 150px ;
93
- background : url (" data:img/jpg;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAABU1BMVEUAAABBuIM1SV5BuINBuINA
94
- sIFBuINBuINBuINAsoE2TmBBuINBuINBuINBuINBuINBuINBuINBuINBuINBuINBuoRBuINBuINB
95
- uINBuINApn5AroBBuINBuINBuINBuINBuINBuIM8d3BBuINBuIM4XGVBuIM5ZmpBuINBuINBuIM8
96
- enI2UWE3VGM3VWNBuINBuIM3V2RBuIM4WmQ5YmhBuIM5Y2k6amtBuINBuIM6bm07cG47b207dG9B
97
- uINBuIMzO1k6Z2o6aGpBuINBuIM1SV5Bt4NDyok0Qlw0QFtCxogzOFk1R10zNldDzIk1Rl00RFwy
98
- NVczPVozO1lCw4dBvIRBvoVBv4VCyIhCwYZBu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7ijsvpPcteSkH1U9nP8zt631lGZYQRmkOK9LsmTXI7qhelbc/XC9K21enH61jYq
126
- 225/dyB9a3qv2x+P+/RPcvbq9dvtHEzfmqr3cADqW9N7XfInuXjvdXb2J7n01QvWt7qli2QpeU1d
127
- JFPJbOOi2EhuMxfFTLIbuwjGkp9vVFZzBAZg4swmAqGqekH79vzqRe1b3ciZjASFZ1TmH4HBWDuD
128
- tQBZuGALQaJXL3bf6oYu0FCwaIcGvCNCHc98fXuqevn6Vjd3AeYCaOXOthJEU8K+DRiVaT4E04yw
129
- b3Vjvr71j8r8WhB9q5sQ9m3FoQH9iGAYlWm+BNqIr29Pv9chPcklH5V9Crw21pNcuAHYk1zSUdmF
130
- MGgS9q2ui/UkZxmVeUdgJPpgT3KJRmUvwuO9egRGpIP1JGd5r8N6kgvXA3uSC9fCepKLPip7EzpX
131
- fH2rewJ7kos6KrsXRpc3fH2rewB7kgvX5utb3YCwb2uMyl6FV5Owb3Vdvr71jcpuafpW1yfsW90d
132
- 1pNcuEewJ7lwHb6+PVW9fH2r6xH2ra7RkP9hDvk6UxRFURRFURS0/gD8CBvXYvEa7AAAAABJRU5E
133
- rkJggg==" );
121
+ background : url (' ../assets/logo.png' );
134
122
background-size : cover ;
135
123
}
136
124
@@ -144,7 +132,17 @@ rkJggg==");
144
132
}
145
133
146
134
.link {
147
- color : #e83030 ;
135
+ color : $bright ;
148
136
text-decoration : none ;
149
137
}
138
+
139
+ .v-table__row :hover {
140
+ .link {
141
+ color : #ffffff ;
142
+ }
143
+ }
144
+
145
+ .tag {
146
+ padding : 2px 5px ;
147
+ }
150
148
</style >
0 commit comments