Commit 613d2a9ce11cb35c28c6d174020e235e5433745e

Authored by Andy
1 parent a7fa495f

add icon

add 我的钱包前端页面
src/icons/svg/give.svg 0 → 100644
  1 +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1561604131415" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8713" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48"><defs><style type="text/css"></style></defs><path d="M512 800c-6.4 0-19.2-6.4-25.6-12.8L249.6 499.2C236.8 492.8 236.8 473.6 243.2 467.2l70.4-134.4C320 320 326.4 313.6 339.2 313.6l345.6 0c12.8 0 25.6 6.4 25.6 19.2l70.4 134.4c6.4 12.8 6.4 25.6-6.4 32l-243.2 288C531.2 793.6 518.4 800 512 800zM307.2 473.6 512 716.8l204.8-243.2-51.2-96L358.4 377.6 307.2 473.6z" p-id="8714" fill="#409eff"></path><path d="M512 1024c-281.6 0-512-230.4-512-512s230.4-512 512-512 512 230.4 512 512c0 19.2-12.8 32-32 32S960 531.2 960 512c0-249.6-198.4-448-448-448S64 262.4 64 512s198.4 448 448 448c19.2 0 32 12.8 32 32S531.2 1024 512 1024z" p-id="8715" fill="#409eff"></path><path d="M992 864l-320 0c-19.2 0-32-12.8-32-32s12.8-32 32-32l320 0c19.2 0 32 12.8 32 32S1011.2 864 992 864z" p-id="8716" fill="#409eff"></path><path d="M832 1024c-19.2 0-32-12.8-32-32l0-320c0-19.2 12.8-32 32-32s32 12.8 32 32l0 320C864 1011.2 851.2 1024 832 1024z" p-id="8717" fill="#409eff"></path></svg>
0 2 \ No newline at end of file
... ...
src/icons/svg/money.svg 0 → 100644
  1 +<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M54.122 127.892v-28.68H7.513V87.274h46.609v-12.4H7.513v-12.86h38.003L.099 0h22.6l32.556 45.07c3.617 5.144 6.44 9.611 8.487 13.385 1.788-3.05 4.89-7.779 9.301-14.186L103.93 0h24.01L82.385 62.013h38.34v12.862h-46.41v12.4h46.41v11.937h-46.41v28.68H54.123z"/></svg>
0 2 \ No newline at end of file
... ...
src/icons/svg/people.svg 0 → 100644
  1 +<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M104.185 95.254c8.161 7.574 13.145 17.441 13.145 28.28 0 1.508-.098 2.998-.285 4.466h-10.784c.238-1.465.403-2.948.403-4.465 0-8.983-4.36-17.115-11.419-23.216C86 104.66 75.355 107.162 64 107.162c-11.344 0-21.98-2.495-31.22-6.83-7.064 6.099-11.444 14.218-11.444 23.203 0 1.517.165 3 .403 4.465H10.955a35.444 35.444 0 0 1-.285-4.465c0-10.838 4.974-20.713 13.127-28.291C9.294 85.42.003 70.417.003 53.58.003 23.99 28.656.001 64 .001s63.997 23.988 63.997 53.58c0 16.842-9.299 31.85-23.812 41.673zM64 36.867c-29.454 0-53.33-10.077-53.33 15.342 0 25.418 23.876 46.023 53.33 46.023 29.454 0 53.33-20.605 53.33-46.023 0-25.419-23.876-15.342-53.33-15.342zm24.888 25.644c-3.927 0-7.111-2.665-7.111-5.953 0-3.288 3.184-5.954 7.11-5.954 3.928 0 7.111 2.666 7.111 5.954s-3.183 5.953-7.11 5.953zm-3.556 16.372c0 4.11-9.55 7.442-21.332 7.442-11.781 0-21.332-3.332-21.332-7.442 0-1.06.656-2.064 1.8-2.976 3.295 2.626 10.79 4.465 19.532 4.465 8.743 0 16.237-1.84 19.531-4.465 1.145.912 1.801 1.916 1.801 2.976zm-46.22-16.372c-3.927 0-7.11-2.665-7.11-5.953 0-3.288 3.183-5.954 7.11-5.954 3.927 0 7.111 2.666 7.111 5.954s-3.184 5.953-7.11 5.953z"/></svg>
0 2 \ No newline at end of file
... ...
src/icons/svg/recharge.svg 0 → 100644
  1 +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1561603267733" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5863" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48"><defs><style type="text/css"></style></defs><path d="M512 750.509317c-19.080745 0-31.801242-12.720497-31.801242-31.801242L480.198758 432.496894c0-19.080745 12.720497-31.801242 31.801242-31.801242s31.801242 12.720497 31.801242 31.801242l0 286.21118C537.440994 737.78882 524.720497 750.509317 512 750.509317z" p-id="5864" fill="#409eff"></path><path d="M651.925466 534.26087 365.714286 534.26087c-19.080745 0-31.801242-12.720497-31.801242-31.801242 0-19.080745 12.720497-31.801242 31.801242-31.801242l286.21118 0c19.080745 0 31.801242 12.720497 31.801242 31.801242C683.726708 521.540373 671.006211 534.26087 651.925466 534.26087z" p-id="5865" fill="#409eff"></path><path d="M651.925466 648.745342 365.714286 648.745342c-19.080745 0-31.801242-12.720497-31.801242-31.801242 0-19.080745 12.720497-31.801242 31.801242-31.801242l286.21118 0c19.080745 0 31.801242 12.720497 31.801242 31.801242C683.726708 636.024845 671.006211 648.745342 651.925466 648.745342z" p-id="5866" fill="#409eff"></path><path d="M512 464.298137c-6.360248 0-19.080745 0-25.440994-6.360248L352.993789 324.372671c-12.720497-12.720497-12.720497-31.801242 0-44.521739 12.720497-12.720497 31.801242-12.720497 44.521739 0l133.565217 133.565217c12.720497 12.720497 12.720497 31.801242 0 44.521739C524.720497 464.298137 518.360248 464.298137 512 464.298137z" p-id="5867" fill="#409eff"></path><path d="M512 464.298137c-6.360248 0-19.080745 0-25.440994-6.360248-12.720497-12.720497-12.720497-31.801242 0-44.521739l133.565217-133.565217c12.720497-12.720497 31.801242-12.720497 44.521739 0 12.720497 12.720497 12.720497 31.801242 0 44.521739L531.080745 457.937888C524.720497 464.298137 518.360248 464.298137 512 464.298137z" p-id="5868" fill="#409eff"></path><path d="M512 1017.639752c-279.850932 0-508.819876-228.968944-508.819876-508.819876s228.968944-508.819876 508.819876-508.819876 508.819876 228.968944 508.819876 508.819876c0 25.440994 0 50.881988-6.360248 82.68323 0 19.080745-19.080745 31.801242-38.161491 25.440994-19.080745 0-31.801242-19.080745-25.440994-38.161491 6.360248-25.440994 6.360248-44.521739 6.360248-69.962733 0-248.049689-197.167702-445.217391-445.217391-445.217391S66.782609 267.130435 66.782609 515.180124s197.167702 445.217391 445.217391 445.217391c25.440994 0 57.242236 0 82.68323-6.360248 19.080745-6.360248 31.801242 6.360248 38.161491 25.440994 6.360248 19.080745-6.360248 31.801242-25.440994 38.161491C575.602484 1017.639752 543.801242 1017.639752 512 1017.639752z" p-id="5869" fill="#409eff"></path><path d="M989.018634 864.993789l-318.012422 0c-19.080745 0-31.801242-12.720497-31.801242-31.801242s12.720497-31.801242 31.801242-31.801242l318.012422 0c19.080745 0 31.801242 12.720497 31.801242 31.801242S1001.73913 864.993789 989.018634 864.993789z" p-id="5870" fill="#409eff"></path><path d="M830.012422 1024c-19.080745 0-31.801242-12.720497-31.801242-31.801242l0-318.012422c0-19.080745 12.720497-31.801242 31.801242-31.801242s31.801242 12.720497 31.801242 31.801242l0 318.012422C861.813665 1004.919255 842.732919 1024 830.012422 1024z" p-id="5871" fill="#409eff"></path></svg>
0 2 \ No newline at end of file
... ...
src/icons/svg/table.svg deleted
1   -<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M.006.064h127.988v31.104H.006V.064zm0 38.016h38.396v41.472H.006V38.08zm0 48.384h38.396v41.472H.006V86.464zM44.802 38.08h38.396v41.472H44.802V38.08zm0 48.384h38.396v41.472H44.802V86.464zM89.598 38.08h38.396v41.472H89.598zm0 48.384h38.396v41.472H89.598z"/><path d="M.006.064h127.988v31.104H.006V.064zm0 38.016h38.396v41.472H.006V38.08zm0 48.384h38.396v41.472H.006V86.464zM44.802 38.08h38.396v41.472H44.802V38.08zm0 48.384h38.396v41.472H44.802V86.464zM89.598 38.08h38.396v41.472H89.598zm0 48.384h38.396v41.472H89.598z"/></svg>
2 0 \ No newline at end of file
src/icons/svg/tree.svg deleted
1   -<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M126.713 90.023c.858.985 1.287 2.134 1.287 3.447v29.553c0 1.423-.429 2.6-1.287 3.53-.858.93-1.907 1.395-3.146 1.395H97.824c-1.145 0-2.146-.465-3.004-1.395-.858-.93-1.287-2.107-1.287-3.53V93.47c0-.875.19-1.696.572-2.462.382-.766.906-1.368 1.573-1.806a3.84 3.84 0 0 1 2.146-.657h9.725V69.007a3.84 3.84 0 0 0-.43-1.806 3.569 3.569 0 0 0-1.143-1.313 2.714 2.714 0 0 0-1.573-.492h-36.47v23.149h9.725c1.144 0 2.145.492 3.004 1.478.858.985 1.287 2.134 1.287 3.447v29.553c0 .876-.191 1.696-.573 2.463-.38.766-.905 1.368-1.573 1.806a3.84 3.84 0 0 1-2.145.656H51.915a3.84 3.84 0 0 1-2.145-.656c-.668-.438-1.216-1.04-1.645-1.806a4.96 4.96 0 0 1-.644-2.463V93.47c0-1.313.43-2.462 1.288-3.447.858-.986 1.907-1.478 3.146-1.478h9.582v-23.15h-37.9c-.953 0-1.74.356-2.359 1.068-.62.711-.93 1.56-.93 2.544v19.538h9.726c1.239 0 2.264.492 3.074 1.478.81.985 1.216 2.134 1.216 3.447v29.553c0 1.423-.405 2.6-1.216 3.53-.81.93-1.835 1.395-3.074 1.395H4.29c-.476 0-.93-.082-1.358-.246a4.1 4.1 0 0 1-1.144-.657 4.658 4.658 0 0 1-.93-1.067 5.186 5.186 0 0 1-.643-1.395 5.566 5.566 0 0 1-.215-1.56V93.47c0-.437.048-.875.143-1.313a3.95 3.95 0 0 1 .429-1.15c.19-.328.429-.656.715-.984.286-.329.572-.602.858-.821.286-.22.62-.383 1.001-.493.382-.11.763-.164 1.144-.164h9.726V61.619c0-.985.31-1.833.93-2.544.619-.712 1.358-1.068 2.216-1.068h44.335V39.62h-9.582c-1.24 0-2.288-.492-3.146-1.477a5.09 5.09 0 0 1-1.287-3.448V5.14c0-1.423.429-2.627 1.287-3.612.858-.985 1.907-1.477 3.146-1.477h25.743c.763 0 1.478.246 2.145.739a5.17 5.17 0 0 1 1.573 1.888c.382.766.573 1.587.573 2.462v29.553c0 1.313-.43 2.463-1.287 3.448-.859.985-1.86 1.477-3.004 1.477h-9.725v18.389h42.762c.954 0 1.74.355 2.36 1.067.62.711.93 1.56.93 2.545v26.925h9.582c1.239 0 2.288.492 3.146 1.478z"/></svg>
2 0 \ No newline at end of file
src/router/index.js
... ... @@ -49,30 +49,27 @@ export const constantRoutes = [
49 49 redirect: '/dashboard',
50 50 children: [{
51 51 path: 'dashboard',
52   - name: 'Dashboard',
  52 + name: '首页',
53 53 component: () => import('@/views/dashboard/index'),
54   - meta: { title: '我的首页', icon: 'dashboard' }
  54 + meta: { title: '首页', icon: 'dashboard' }
55 55 }]
56 56 },
57 57  
58 58 {
59 59 path: '/example',
60 60 component: Layout,
61   - redirect: '/example/table',
62   - name: 'Example',
63   - meta: { title: '我的钱包', icon: 'example' },
  61 + name: '我的钱包',
  62 + meta: { title: '我的钱包', icon: 'money' },
64 63 children: [
65 64 {
66   - path: 'table',
67   - name: 'Table',
68   - component: () => import('@/views/table/index'),
69   - meta: { title: '我的账户', icon: 'table' }
  65 + path: 'account',
  66 + component: () => import('@/views/account/index'),
  67 + meta: { title: '我的账户', }
70 68 },
71 69 {
72   - path: 'tree',
73   - name: 'Tree',
74   - component: () => import('@/views/tree/index'),
75   - meta: { title: '我的卡券', icon: 'tree' }
  70 + path: 'cardticket',
  71 + component: () => import('@/views/cardticket/index'),
  72 + meta: { title: '我的卡券', }
76 73 }
77 74 ]
78 75 },
... ... @@ -83,7 +80,6 @@ export const constantRoutes = [
83 80 children: [
84 81 {
85 82 path: 'index',
86   - name: 'Form',
87 83 component: () => import('@/views/order/index'),
88 84 meta: { title: '我的订单', icon: 'form' }
89 85 }
... ... @@ -91,42 +87,38 @@ export const constantRoutes = [
91 87 },
92 88  
93 89 {
94   - path: 'external-link',
  90 + path: '/mycar',
95 91 component: Layout,
96 92 children: [
97 93 {
98   - path: 'https://panjiachen.github.io/vue-element-admin-site/#/',
99   - meta: { title: '我的车辆', icon: 'link' }
  94 + path: 'index',
  95 + component: () => import('@/views/mycar/index'),
  96 + meta: { title: '我的车辆', icon: 'people' }
100 97 }
101 98 ]
102 99 },
103 100  
104 101 {
105   - path: '/nested',
  102 + path: '/owncenter',
106 103 component: Layout,
107   - redirect: '/nested/menu1',
108   - name: 'Nested',
109 104 meta: {
110 105 title: '个人中心',
111   - icon: 'nested'
  106 + icon: 'user'
112 107 },
113 108 children: [
114 109 {
115   - path: 'menu1-1',
116   - component: () => import('@/views/nested/menu1/menu1-1'),
117   - name: 'Menu1-1',
  110 + path: 'information',
  111 + component: () => import('@/views/information/index'),
118 112 meta: { title: '个人资料' }
119 113 },
120 114 {
121   - path: 'menu1-2',
122   - component: () => import('@/views/nested/menu1/menu1-2'),
123   - name: 'Menu1-2',
  115 + path: 'settings',
  116 + component: () => import('@/views/settings/index'),
124 117 meta: { title: '账户设置' },
125 118 },
126 119 {
127   - path: 'menu1-3',
128   - component: () => import('@/views/nested/menu1/menu1-3'),
129   - name: 'Menu1-3',
  120 + path: 'myevaluate',
  121 + component: () => import('@/views/myevaluate/index'),
130 122 meta: { title: '我的评价' }
131 123 }
132 124 ]
... ...
src/styles/index.scss
... ... @@ -97,3 +97,10 @@ p{
97 97 padding-top: 10px;
98 98 padding-left: 15px;
99 99 }
  100 +// 自定义 css
  101 +.common-color{
  102 + color: rgb(64, 158, 255);
  103 +}
  104 +.font-size24{
  105 + font-size: 24px;
  106 +}
... ...
src/views/account/index.vue 0 → 100644
  1 +<template>
  2 + <!--汇总卡片-->
  3 + <el-row :gutter="16" class="card-second-top">
  4 + <el-col :span="12">
  5 + <el-card class="box-card">
  6 + <el-row :gutter="24">
  7 + <el-col :span="8" style="text-align: center">
  8 + <svg-icon icon-class="recharge" class="svg-icon" style="width: 48px;height: 48px" />
  9 + </el-col>
  10 + <el-col :span="12" :offset="4">
  11 + <el-row :gutter="16"><el-col :span="24">充值账户(元)</el-col></el-row>
  12 + <el-row :gutter="16" class="common-color font-size24" style="margin-top: 4px"><el-col :span="24">240.0</el-col></el-row>
  13 + </el-col>
  14 + </el-row>
  15 + </el-card>
  16 + </el-col>
  17 + <el-col :span="12">
  18 + <el-card class="box-card">
  19 + <el-row :gutter="24">
  20 + <el-col :span="8" style="text-align: center">
  21 + <svg-icon icon-class="give" style="width: 48px;height: 48px" />
  22 + </el-col>
  23 + <el-col :span="12" :offset="4">
  24 + <el-row :gutter="16"><el-col :span="24">赠送账户(元)</el-col></el-row>
  25 + <el-row :gutter="16" class="common-color font-size24" style="margin-top: 4px"><el-col :span="24">140.0</el-col></el-row>
  26 + </el-col>
  27 + </el-row>
  28 + </el-card>
  29 + </el-col>
  30 + </el-row>
  31 +</template>
  32 +
  33 +<script>
  34 +// import { getList } from '@/api/table'
  35 +
  36 +export default {
  37 + filters: {
  38 +
  39 + },
  40 + data() {
  41 + return {
  42 + list: null,
  43 + listLoading: true
  44 + }
  45 + },
  46 + created() {
  47 +
  48 + },
  49 + methods: {
  50 +
  51 + }
  52 +}
  53 +</script>
... ...
src/views/tree/index.vue renamed to src/views/cardticket/index.vue
src/views/information/index.vue 0 → 100644
  1 +<template>
  2 + <div class="app-container">
  3 + <el-input v-model="filterText" placeholder="Filter keyword" style="margin-bottom:30px;" />
  4 +
  5 + <el-tree
  6 + ref="tree2"
  7 + :data="data2"
  8 + :props="defaultProps"
  9 + :filter-node-method="filterNode"
  10 + class="filter-tree"
  11 + default-expand-all
  12 + />
  13 +
  14 + </div>
  15 +</template>
  16 +
  17 +<script>
  18 + export default {
  19 +
  20 + data() {
  21 + return {
  22 + filterText: '',
  23 + data2: [{
  24 + id: 1,
  25 + label: 'Level one 1',
  26 + children: [{
  27 + id: 4,
  28 + label: 'Level two 1-1',
  29 + children: [{
  30 + id: 9,
  31 + label: 'Level three 1-1-1'
  32 + }, {
  33 + id: 10,
  34 + label: 'Level three 1-1-2'
  35 + }]
  36 + }]
  37 + }, {
  38 + id: 2,
  39 + label: 'Level one 2',
  40 + children: [{
  41 + id: 5,
  42 + label: 'Level two 2-1'
  43 + }, {
  44 + id: 6,
  45 + label: 'Level two 2-2'
  46 + }]
  47 + }, {
  48 + id: 3,
  49 + label: 'Level one 3',
  50 + children: [{
  51 + id: 7,
  52 + label: 'Level two 3-1'
  53 + }, {
  54 + id: 8,
  55 + label: 'Level two 3-2'
  56 + }]
  57 + }],
  58 + defaultProps: {
  59 + children: 'children',
  60 + label: 'label'
  61 + }
  62 + }
  63 + },
  64 + watch: {
  65 + filterText(val) {
  66 + this.$refs.tree2.filter(val)
  67 + }
  68 + },
  69 +
  70 + methods: {
  71 + filterNode(value, data) {
  72 + if (!value) return true
  73 + return data.label.indexOf(value) !== -1
  74 + }
  75 + }
  76 + }
  77 +</script>
  78 +
... ...
src/views/mycar/index.vue 0 → 100644
  1 +<template>
  2 + <div class="app-container">
  3 + <el-input v-model="filterText" placeholder="Filter keyword" style="margin-bottom:30px;" />
  4 +
  5 + <el-tree
  6 + ref="tree2"
  7 + :data="data2"
  8 + :props="defaultProps"
  9 + :filter-node-method="filterNode"
  10 + class="filter-tree"
  11 + default-expand-all
  12 + />
  13 +
  14 + </div>
  15 +</template>
  16 +
  17 +<script>
  18 + export default {
  19 +
  20 + data() {
  21 + return {
  22 + filterText: '',
  23 + data2: [{
  24 + id: 1,
  25 + label: 'Level one 1',
  26 + children: [{
  27 + id: 4,
  28 + label: 'Level two 1-1',
  29 + children: [{
  30 + id: 9,
  31 + label: 'Level three 1-1-1'
  32 + }, {
  33 + id: 10,
  34 + label: 'Level three 1-1-2'
  35 + }]
  36 + }]
  37 + }, {
  38 + id: 2,
  39 + label: 'Level one 2',
  40 + children: [{
  41 + id: 5,
  42 + label: 'Level two 2-1'
  43 + }, {
  44 + id: 6,
  45 + label: 'Level two 2-2'
  46 + }]
  47 + }, {
  48 + id: 3,
  49 + label: 'Level one 3',
  50 + children: [{
  51 + id: 7,
  52 + label: 'Level two 3-1'
  53 + }, {
  54 + id: 8,
  55 + label: 'Level two 3-2'
  56 + }]
  57 + }],
  58 + defaultProps: {
  59 + children: 'children',
  60 + label: 'label'
  61 + }
  62 + }
  63 + },
  64 + watch: {
  65 + filterText(val) {
  66 + this.$refs.tree2.filter(val)
  67 + }
  68 + },
  69 +
  70 + methods: {
  71 + filterNode(value, data) {
  72 + if (!value) return true
  73 + return data.label.indexOf(value) !== -1
  74 + }
  75 + }
  76 + }
  77 +</script>
  78 +
... ...
src/views/myevaluate/index.vue 0 → 100644
  1 +<template>
  2 + <div class="app-container">
  3 + <el-input v-model="filterText" placeholder="Filter keyword" style="margin-bottom:30px;" />
  4 +
  5 + <el-tree
  6 + ref="tree2"
  7 + :data="data2"
  8 + :props="defaultProps"
  9 + :filter-node-method="filterNode"
  10 + class="filter-tree"
  11 + default-expand-all
  12 + />
  13 +
  14 + </div>
  15 +</template>
  16 +
  17 +<script>
  18 + export default {
  19 +
  20 + data() {
  21 + return {
  22 + filterText: '',
  23 + data2: [{
  24 + id: 1,
  25 + label: 'Level one 1',
  26 + children: [{
  27 + id: 4,
  28 + label: 'Level two 1-1',
  29 + children: [{
  30 + id: 9,
  31 + label: 'Level three 1-1-1'
  32 + }, {
  33 + id: 10,
  34 + label: 'Level three 1-1-2'
  35 + }]
  36 + }]
  37 + }, {
  38 + id: 2,
  39 + label: 'Level one 2',
  40 + children: [{
  41 + id: 5,
  42 + label: 'Level two 2-1'
  43 + }, {
  44 + id: 6,
  45 + label: 'Level two 2-2'
  46 + }]
  47 + }, {
  48 + id: 3,
  49 + label: 'Level one 3',
  50 + children: [{
  51 + id: 7,
  52 + label: 'Level two 3-1'
  53 + }, {
  54 + id: 8,
  55 + label: 'Level two 3-2'
  56 + }]
  57 + }],
  58 + defaultProps: {
  59 + children: 'children',
  60 + label: 'label'
  61 + }
  62 + }
  63 + },
  64 + watch: {
  65 + filterText(val) {
  66 + this.$refs.tree2.filter(val)
  67 + }
  68 + },
  69 +
  70 + methods: {
  71 + filterNode(value, data) {
  72 + if (!value) return true
  73 + return data.label.indexOf(value) !== -1
  74 + }
  75 + }
  76 + }
  77 +</script>
  78 +
... ...
src/views/nested/menu1/index.vue deleted
1   -<template>
2   - <div style="padding:30px;">
3   - <el-alert :closable="false" title="menu 1">
4   - <router-view />
5   - </el-alert>
6   - </div>
7   -</template>
src/views/nested/menu1/menu1-1/index.vue deleted
1   -<template>
2   - <div style="padding:30px;">
3   - <el-alert :closable="false" title="menu 1-1" type="success">
4   - <router-view />
5   - </el-alert>
6   - </div>
7   -</template>
src/views/nested/menu1/menu1-2/index.vue deleted
1   -<template>
2   - <div style="padding:30px;">
3   - <el-alert :closable="false" title="menu 1-2" type="success">
4   - <router-view />
5   - </el-alert>
6   - </div>
7   -</template>
src/views/nested/menu1/menu1-2/menu1-2-1/index.vue deleted
1   -<template functional>
2   - <div style="padding:30px;">
3   - <el-alert :closable="false" title="menu 1-2-1" type="warning" />
4   - </div>
5   -</template>
src/views/nested/menu1/menu1-2/menu1-2-2/index.vue deleted
1   -<template functional>
2   - <div style="padding:30px;">
3   - <el-alert :closable="false" title="menu 1-2-2" type="warning" />
4   - </div>
5   -</template>
src/views/nested/menu1/menu1-3/index.vue deleted
1   -<template functional>
2   - <div style="padding:30px;">
3   - <el-alert :closable="false" title="menu 1-3" type="success" />
4   - </div>
5   -</template>
src/views/nested/menu2/index.vue deleted
1   -<template>
2   - <div style="padding:30px;">
3   - <el-alert :closable="false" title="menu 2" />
4   - </div>
5   -</template>
src/views/settings/index.vue 0 → 100644
  1 +<template>
  2 + <div class="app-container">
  3 + <el-input v-model="filterText" placeholder="Filter keyword" style="margin-bottom:30px;" />
  4 +
  5 + <el-tree
  6 + ref="tree2"
  7 + :data="data2"
  8 + :props="defaultProps"
  9 + :filter-node-method="filterNode"
  10 + class="filter-tree"
  11 + default-expand-all
  12 + />
  13 +
  14 + </div>
  15 +</template>
  16 +
  17 +<script>
  18 + export default {
  19 +
  20 + data() {
  21 + return {
  22 + filterText: '',
  23 + data2: [{
  24 + id: 1,
  25 + label: 'Level one 1',
  26 + children: [{
  27 + id: 4,
  28 + label: 'Level two 1-1',
  29 + children: [{
  30 + id: 9,
  31 + label: 'Level three 1-1-1'
  32 + }, {
  33 + id: 10,
  34 + label: 'Level three 1-1-2'
  35 + }]
  36 + }]
  37 + }, {
  38 + id: 2,
  39 + label: 'Level one 2',
  40 + children: [{
  41 + id: 5,
  42 + label: 'Level two 2-1'
  43 + }, {
  44 + id: 6,
  45 + label: 'Level two 2-2'
  46 + }]
  47 + }, {
  48 + id: 3,
  49 + label: 'Level one 3',
  50 + children: [{
  51 + id: 7,
  52 + label: 'Level two 3-1'
  53 + }, {
  54 + id: 8,
  55 + label: 'Level two 3-2'
  56 + }]
  57 + }],
  58 + defaultProps: {
  59 + children: 'children',
  60 + label: 'label'
  61 + }
  62 + }
  63 + },
  64 + watch: {
  65 + filterText(val) {
  66 + this.$refs.tree2.filter(val)
  67 + }
  68 + },
  69 +
  70 + methods: {
  71 + filterNode(value, data) {
  72 + if (!value) return true
  73 + return data.label.indexOf(value) !== -1
  74 + }
  75 + }
  76 + }
  77 +</script>
  78 +
... ...
src/views/table/index.vue deleted
1   -<template>
2   - <div class="app-container">
3   - <el-table
4   - v-loading="listLoading"
5   - :data="list"
6   - element-loading-text="Loading"
7   - border
8   - fit
9   - highlight-current-row
10   - >
11   - <el-table-column align="center" label="ID" width="95">
12   - <template slot-scope="scope">
13   - {{ scope.$index }}
14   - </template>
15   - </el-table-column>
16   - <el-table-column label="Title">
17   - <template slot-scope="scope">
18   - {{ scope.row.title }}
19   - </template>
20   - </el-table-column>
21   - <el-table-column label="Author" width="110" align="center">
22   - <template slot-scope="scope">
23   - <span>{{ scope.row.author }}</span>
24   - </template>
25   - </el-table-column>
26   - <el-table-column label="Pageviews" width="110" align="center">
27   - <template slot-scope="scope">
28   - {{ scope.row.pageviews }}
29   - </template>
30   - </el-table-column>
31   - <el-table-column class-name="status-col" label="Status" width="110" align="center">
32   - <template slot-scope="scope">
33   - <el-tag :type="scope.row.status | statusFilter">{{ scope.row.status }}</el-tag>
34   - </template>
35   - </el-table-column>
36   - <el-table-column align="center" prop="created_at" label="Display_time" width="200">
37   - <template slot-scope="scope">
38   - <i class="el-icon-time" />
39   - <span>{{ scope.row.display_time }}</span>
40   - </template>
41   - </el-table-column>
42   - </el-table>
43   - </div>
44   -</template>
45   -
46   -<script>
47   -import { getList } from '@/api/table'
48   -
49   -export default {
50   - filters: {
51   - statusFilter(status) {
52   - const statusMap = {
53   - published: 'success',
54   - draft: 'gray',
55   - deleted: 'danger'
56   - }
57   - return statusMap[status]
58   - }
59   - },
60   - data() {
61   - return {
62   - list: null,
63   - listLoading: true
64   - }
65   - },
66   - created() {
67   - this.fetchData()
68   - },
69   - methods: {
70   - fetchData() {
71   - this.listLoading = true
72   - getList().then(response => {
73   - this.list = response.data.items
74   - this.listLoading = false
75   - })
76   - }
77   - }
78   -}
79   -</script>