zetan-cli-dev-template-vue-element-admin 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +8 -0
- package/template/.editorconfig +14 -0
- package/template/.env.development +5 -0
- package/template/.env.production +6 -0
- package/template/.env.staging +8 -0
- package/template/.eslintignore +4 -0
- package/template/.eslintrc.js +198 -0
- package/template/.travis.yml +5 -0
- package/template/LICENSE +21 -0
- package/template/README.es.md +228 -0
- package/template/README.ja.md +224 -0
- package/template/README.md +250 -0
- package/template/README.zh-CN.md +273 -0
- package/template/babel.config.js +14 -0
- package/template/build/index.js +35 -0
- package/template/jest.config.js +24 -0
- package/template/jsconfig.json +9 -0
- package/template/mock/article.js +116 -0
- package/template/mock/index.js +60 -0
- package/template/mock/mock-server.js +81 -0
- package/template/mock/remote-search.js +51 -0
- package/template/mock/role/index.js +98 -0
- package/template/mock/role/routes.js +530 -0
- package/template/mock/user.js +84 -0
- package/template/mock/utils.js +48 -0
- package/template/package.json +111 -0
- package/template/plop-templates/component/index.hbs +26 -0
- package/template/plop-templates/component/prompt.js +55 -0
- package/template/plop-templates/store/index.hbs +16 -0
- package/template/plop-templates/store/prompt.js +62 -0
- package/template/plop-templates/utils.js +2 -0
- package/template/plop-templates/view/index.hbs +26 -0
- package/template/plop-templates/view/prompt.js +55 -0
- package/template/plopfile.js +9 -0
- package/template/postcss.config.js +5 -0
- package/template/public/favicon.ico +0 -0
- package/template/public/index.html +15 -0
- package/template/src/App.vue +11 -0
- package/template/src/api/article.js +41 -0
- package/template/src/api/qiniu.js +8 -0
- package/template/src/api/remote-search.js +17 -0
- package/template/src/api/role.js +38 -0
- package/template/src/api/user.js +24 -0
- package/template/src/assets/401_images/401.gif +0 -0
- package/template/src/assets/404_images/404.png +0 -0
- package/template/src/assets/404_images/404_cloud.png +0 -0
- package/template/src/assets/custom-theme/fonts/element-icons.ttf +0 -0
- package/template/src/assets/custom-theme/fonts/element-icons.woff +0 -0
- package/template/src/assets/custom-theme/index.css +1 -0
- package/template/src/components/BackToTop/index.vue +111 -0
- package/template/src/components/Breadcrumb/index.vue +82 -0
- package/template/src/components/Charts/Keyboard.vue +155 -0
- package/template/src/components/Charts/LineMarker.vue +227 -0
- package/template/src/components/Charts/MixChart.vue +271 -0
- package/template/src/components/Charts/mixins/resize.js +56 -0
- package/template/src/components/DndList/index.vue +166 -0
- package/template/src/components/DragSelect/index.vue +65 -0
- package/template/src/components/Dropzone/index.vue +297 -0
- package/template/src/components/ErrorLog/index.vue +78 -0
- package/template/src/components/GithubCorner/index.vue +54 -0
- package/template/src/components/Hamburger/index.vue +44 -0
- package/template/src/components/HeaderSearch/index.vue +180 -0
- package/template/src/components/ImageCropper/index.vue +1779 -0
- package/template/src/components/ImageCropper/utils/data2blob.js +19 -0
- package/template/src/components/ImageCropper/utils/effectRipple.js +39 -0
- package/template/src/components/ImageCropper/utils/language.js +232 -0
- package/template/src/components/ImageCropper/utils/mimes.js +7 -0
- package/template/src/components/JsonEditor/index.vue +77 -0
- package/template/src/components/Kanban/index.vue +99 -0
- package/template/src/components/MDinput/index.vue +360 -0
- package/template/src/components/MarkdownEditor/default-options.js +31 -0
- package/template/src/components/MarkdownEditor/index.vue +118 -0
- package/template/src/components/Pagination/index.vue +101 -0
- package/template/src/components/PanThumb/index.vue +142 -0
- package/template/src/components/RightPanel/index.vue +145 -0
- package/template/src/components/Screenfull/index.vue +60 -0
- package/template/src/components/Share/DropdownMenu.vue +103 -0
- package/template/src/components/SizeSelect/index.vue +57 -0
- package/template/src/components/Sticky/index.vue +91 -0
- package/template/src/components/SvgIcon/index.vue +62 -0
- package/template/src/components/TextHoverEffect/Mallki.vue +113 -0
- package/template/src/components/ThemePicker/index.vue +175 -0
- package/template/src/components/Tinymce/components/EditorImage.vue +111 -0
- package/template/src/components/Tinymce/dynamicLoadScript.js +59 -0
- package/template/src/components/Tinymce/index.vue +247 -0
- package/template/src/components/Tinymce/plugins.js +7 -0
- package/template/src/components/Tinymce/toolbar.js +6 -0
- package/template/src/components/Upload/SingleImage.vue +134 -0
- package/template/src/components/Upload/SingleImage2.vue +130 -0
- package/template/src/components/Upload/SingleImage3.vue +157 -0
- package/template/src/components/UploadExcel/index.vue +138 -0
- package/template/src/directive/clipboard/clipboard.js +49 -0
- package/template/src/directive/clipboard/index.js +13 -0
- package/template/src/directive/el-drag-dialog/drag.js +77 -0
- package/template/src/directive/el-drag-dialog/index.js +13 -0
- package/template/src/directive/el-table/adaptive.js +41 -0
- package/template/src/directive/el-table/index.js +13 -0
- package/template/src/directive/permission/index.js +13 -0
- package/template/src/directive/permission/permission.js +31 -0
- package/template/src/directive/sticky.js +91 -0
- package/template/src/directive/waves/index.js +13 -0
- package/template/src/directive/waves/waves.css +26 -0
- package/template/src/directive/waves/waves.js +72 -0
- package/template/src/filters/index.js +68 -0
- package/template/src/icons/index.js +9 -0
- package/template/src/icons/svg/404.svg +1 -0
- package/template/src/icons/svg/bug.svg +1 -0
- package/template/src/icons/svg/chart.svg +1 -0
- package/template/src/icons/svg/clipboard.svg +1 -0
- package/template/src/icons/svg/component.svg +1 -0
- package/template/src/icons/svg/dashboard.svg +1 -0
- package/template/src/icons/svg/documentation.svg +1 -0
- package/template/src/icons/svg/drag.svg +1 -0
- package/template/src/icons/svg/edit.svg +1 -0
- package/template/src/icons/svg/education.svg +1 -0
- package/template/src/icons/svg/email.svg +1 -0
- package/template/src/icons/svg/example.svg +1 -0
- package/template/src/icons/svg/excel.svg +1 -0
- package/template/src/icons/svg/exit-fullscreen.svg +1 -0
- package/template/src/icons/svg/eye-open.svg +1 -0
- package/template/src/icons/svg/eye.svg +1 -0
- package/template/src/icons/svg/form.svg +1 -0
- package/template/src/icons/svg/fullscreen.svg +1 -0
- package/template/src/icons/svg/guide.svg +1 -0
- package/template/src/icons/svg/icon.svg +1 -0
- package/template/src/icons/svg/international.svg +1 -0
- package/template/src/icons/svg/language.svg +1 -0
- package/template/src/icons/svg/link.svg +1 -0
- package/template/src/icons/svg/list.svg +1 -0
- package/template/src/icons/svg/lock.svg +1 -0
- package/template/src/icons/svg/message.svg +1 -0
- package/template/src/icons/svg/money.svg +1 -0
- package/template/src/icons/svg/nested.svg +1 -0
- package/template/src/icons/svg/password.svg +1 -0
- package/template/src/icons/svg/pdf.svg +1 -0
- package/template/src/icons/svg/people.svg +1 -0
- package/template/src/icons/svg/peoples.svg +1 -0
- package/template/src/icons/svg/qq.svg +1 -0
- package/template/src/icons/svg/search.svg +1 -0
- package/template/src/icons/svg/shopping.svg +1 -0
- package/template/src/icons/svg/size.svg +1 -0
- package/template/src/icons/svg/skill.svg +1 -0
- package/template/src/icons/svg/star.svg +1 -0
- package/template/src/icons/svg/tab.svg +1 -0
- package/template/src/icons/svg/table.svg +1 -0
- package/template/src/icons/svg/theme.svg +1 -0
- package/template/src/icons/svg/tree-table.svg +1 -0
- package/template/src/icons/svg/tree.svg +1 -0
- package/template/src/icons/svg/user.svg +1 -0
- package/template/src/icons/svg/wechat.svg +1 -0
- package/template/src/icons/svg/zip.svg +1 -0
- package/template/src/icons/svgo.yml +22 -0
- package/template/src/layout/components/AppMain.vue +57 -0
- package/template/src/layout/components/Navbar.vue +167 -0
- package/template/src/layout/components/Settings/index.vue +108 -0
- package/template/src/layout/components/Sidebar/FixiOSBug.js +26 -0
- package/template/src/layout/components/Sidebar/Item.vue +41 -0
- package/template/src/layout/components/Sidebar/Link.vue +43 -0
- package/template/src/layout/components/Sidebar/Logo.vue +82 -0
- package/template/src/layout/components/Sidebar/SidebarItem.vue +95 -0
- package/template/src/layout/components/Sidebar/index.vue +54 -0
- package/template/src/layout/components/TagsView/ScrollPane.vue +94 -0
- package/template/src/layout/components/TagsView/index.vue +292 -0
- package/template/src/layout/components/index.js +5 -0
- package/template/src/layout/index.vue +102 -0
- package/template/src/layout/mixin/ResizeHandler.js +45 -0
- package/template/src/main.js +53 -0
- package/template/src/permission.js +74 -0
- package/template/src/router/index.js +404 -0
- package/template/src/router/modules/charts.js +36 -0
- package/template/src/router/modules/components.js +102 -0
- package/template/src/router/modules/nested.js +66 -0
- package/template/src/router/modules/table.js +41 -0
- package/template/src/settings.js +35 -0
- package/template/src/store/getters.js +15 -0
- package/template/src/store/index.js +25 -0
- package/template/src/store/modules/app.js +56 -0
- package/template/src/store/modules/errorLog.js +28 -0
- package/template/src/store/modules/permission.js +69 -0
- package/template/src/store/modules/settings.js +35 -0
- package/template/src/store/modules/tagsView.js +160 -0
- package/template/src/store/modules/user.js +131 -0
- package/template/src/styles/btn.scss +99 -0
- package/template/src/styles/element-ui.scss +84 -0
- package/template/src/styles/element-variables.scss +31 -0
- package/template/src/styles/index.scss +191 -0
- package/template/src/styles/mixin.scss +66 -0
- package/template/src/styles/sidebar.scss +226 -0
- package/template/src/styles/transition.scss +48 -0
- package/template/src/styles/variables.scss +35 -0
- package/template/src/utils/auth.js +15 -0
- package/template/src/utils/clipboard.js +32 -0
- package/template/src/utils/error-log.js +35 -0
- package/template/src/utils/get-page-title.js +10 -0
- package/template/src/utils/index.js +357 -0
- package/template/src/utils/open-window.js +25 -0
- package/template/src/utils/permission.js +21 -0
- package/template/src/utils/request.js +85 -0
- package/template/src/utils/scroll-to.js +58 -0
- package/template/src/utils/validate.js +87 -0
- package/template/src/vendor/Export2Excel.js +220 -0
- package/template/src/vendor/Export2Zip.js +24 -0
- package/template/src/views/charts/keyboard.vue +23 -0
- package/template/src/views/charts/line.vue +23 -0
- package/template/src/views/charts/mix-chart.vue +23 -0
- package/template/src/views/clipboard/index.vue +49 -0
- package/template/src/views/components-demo/avatar-upload.vue +61 -0
- package/template/src/views/components-demo/back-to-top.vue +154 -0
- package/template/src/views/components-demo/count-to.vue +218 -0
- package/template/src/views/components-demo/dnd-list.vue +39 -0
- package/template/src/views/components-demo/drag-dialog.vue +61 -0
- package/template/src/views/components-demo/drag-kanban.vue +66 -0
- package/template/src/views/components-demo/drag-select.vue +43 -0
- package/template/src/views/components-demo/dropzone.vue +31 -0
- package/template/src/views/components-demo/json-editor.vue +36 -0
- package/template/src/views/components-demo/markdown.vue +101 -0
- package/template/src/views/components-demo/mixin.vue +169 -0
- package/template/src/views/components-demo/split-pane.vue +67 -0
- package/template/src/views/components-demo/sticky.vue +135 -0
- package/template/src/views/components-demo/tinymce.vue +36 -0
- package/template/src/views/dashboard/admin/components/BarChart.vue +102 -0
- package/template/src/views/dashboard/admin/components/BoxCard.vue +118 -0
- package/template/src/views/dashboard/admin/components/LineChart.vue +135 -0
- package/template/src/views/dashboard/admin/components/PanelGroup.vue +181 -0
- package/template/src/views/dashboard/admin/components/PieChart.vue +79 -0
- package/template/src/views/dashboard/admin/components/RaddarChart.vue +116 -0
- package/template/src/views/dashboard/admin/components/TodoList/Todo.vue +81 -0
- package/template/src/views/dashboard/admin/components/TodoList/index.scss +320 -0
- package/template/src/views/dashboard/admin/components/TodoList/index.vue +127 -0
- package/template/src/views/dashboard/admin/components/TransactionTable.vue +55 -0
- package/template/src/views/dashboard/admin/components/mixins/resize.js +55 -0
- package/template/src/views/dashboard/admin/index.vue +124 -0
- package/template/src/views/dashboard/editor/index.vue +74 -0
- package/template/src/views/dashboard/index.vue +31 -0
- package/template/src/views/documentation/index.vue +57 -0
- package/template/src/views/error-log/components/ErrorTestA.vue +13 -0
- package/template/src/views/error-log/components/ErrorTestB.vue +11 -0
- package/template/src/views/error-log/index.vue +32 -0
- package/template/src/views/error-page/401.vue +99 -0
- package/template/src/views/error-page/404.vue +228 -0
- package/template/src/views/example/components/ArticleDetail.vue +289 -0
- package/template/src/views/example/components/Dropdown/Comment.vue +41 -0
- package/template/src/views/example/components/Dropdown/Platform.vue +46 -0
- package/template/src/views/example/components/Dropdown/SourceUrl.vue +38 -0
- package/template/src/views/example/components/Dropdown/index.js +3 -0
- package/template/src/views/example/components/Warning.vue +13 -0
- package/template/src/views/example/create.vue +13 -0
- package/template/src/views/example/edit.vue +13 -0
- package/template/src/views/example/list.vue +112 -0
- package/template/src/views/excel/components/AutoWidthOption.vue +34 -0
- package/template/src/views/excel/components/BookTypeOption.vue +39 -0
- package/template/src/views/excel/components/FilenameOption.vue +27 -0
- package/template/src/views/excel/export-excel.vue +116 -0
- package/template/src/views/excel/merge-header.vue +101 -0
- package/template/src/views/excel/select-excel.vue +107 -0
- package/template/src/views/excel/upload-excel.vue +42 -0
- package/template/src/views/guide/index.vue +36 -0
- package/template/src/views/guide/steps.js +53 -0
- package/template/src/views/icons/element-icons.js +3 -0
- package/template/src/views/icons/index.vue +101 -0
- package/template/src/views/icons/svg-icons.js +10 -0
- package/template/src/views/login/auth-redirect.vue +15 -0
- package/template/src/views/login/components/SocialSignin.vue +72 -0
- package/template/src/views/login/index.vue +324 -0
- package/template/src/views/nested/menu1/index.vue +7 -0
- package/template/src/views/nested/menu1/menu1-1/index.vue +7 -0
- package/template/src/views/nested/menu1/menu1-2/index.vue +7 -0
- package/template/src/views/nested/menu1/menu1-2/menu1-2-1/index.vue +5 -0
- package/template/src/views/nested/menu1/menu1-2/menu1-2-2/index.vue +5 -0
- package/template/src/views/nested/menu1/menu1-3/index.vue +5 -0
- package/template/src/views/nested/menu2/index.vue +5 -0
- package/template/src/views/pdf/content.js +58 -0
- package/template/src/views/pdf/download.vue +201 -0
- package/template/src/views/pdf/index.vue +13 -0
- package/template/src/views/permission/components/SwitchRoles.vue +32 -0
- package/template/src/views/permission/directive.vue +111 -0
- package/template/src/views/permission/page.vue +19 -0
- package/template/src/views/permission/role.vue +270 -0
- package/template/src/views/profile/components/Account.vue +38 -0
- package/template/src/views/profile/components/Activity.vue +185 -0
- package/template/src/views/profile/components/Timeline.vue +43 -0
- package/template/src/views/profile/components/UserCard.vue +134 -0
- package/template/src/views/profile/index.vue +68 -0
- package/template/src/views/qiniu/upload.vue +41 -0
- package/template/src/views/redirect/index.vue +12 -0
- package/template/src/views/tab/components/TabPane.vue +103 -0
- package/template/src/views/tab/index.vue +57 -0
- package/template/src/views/table/complex-table.vue +379 -0
- package/template/src/views/table/drag-table.vue +153 -0
- package/template/src/views/table/dynamic-table/components/FixedThead.vue +62 -0
- package/template/src/views/table/dynamic-table/components/UnfixedThead.vue +50 -0
- package/template/src/views/table/dynamic-table/index.vue +24 -0
- package/template/src/views/table/inline-edit-table.vue +149 -0
- package/template/src/views/theme/index.vue +120 -0
- package/template/src/views/zip/index.vue +77 -0
- package/template/tests/unit/.eslintrc.js +5 -0
- package/template/tests/unit/components/Hamburger.spec.js +18 -0
- package/template/tests/unit/components/SvgIcon.spec.js +22 -0
- package/template/tests/unit/utils/formatTime.spec.js +29 -0
- package/template/tests/unit/utils/param2Obj.spec.js +14 -0
- package/template/tests/unit/utils/parseTime.spec.js +37 -0
- package/template/tests/unit/utils/validate.spec.js +28 -0
- package/template/vue.config.js +124 -0
@@ -0,0 +1,169 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="mixin-components-container">
|
3
|
+
<el-row>
|
4
|
+
<el-card class="box-card">
|
5
|
+
<div slot="header" class="clearfix">
|
6
|
+
<span>Buttons</span>
|
7
|
+
</div>
|
8
|
+
<div style="margin-bottom:50px;">
|
9
|
+
<el-col :span="4" class="text-center">
|
10
|
+
<router-link class="pan-btn blue-btn" to="/documentation/index">
|
11
|
+
Documentation
|
12
|
+
</router-link>
|
13
|
+
</el-col>
|
14
|
+
<el-col :span="4" class="text-center">
|
15
|
+
<router-link class="pan-btn light-blue-btn" to="/icon/index">
|
16
|
+
Icons
|
17
|
+
</router-link>
|
18
|
+
</el-col>
|
19
|
+
<el-col :span="4" class="text-center">
|
20
|
+
<router-link class="pan-btn pink-btn" to="/excel/export-excel">
|
21
|
+
Excel
|
22
|
+
</router-link>
|
23
|
+
</el-col>
|
24
|
+
<el-col :span="4" class="text-center">
|
25
|
+
<router-link class="pan-btn green-btn" to="/table/complex-table">
|
26
|
+
Table
|
27
|
+
</router-link>
|
28
|
+
</el-col>
|
29
|
+
<el-col :span="4" class="text-center">
|
30
|
+
<router-link class="pan-btn tiffany-btn" to="/example/create">
|
31
|
+
Form
|
32
|
+
</router-link>
|
33
|
+
</el-col>
|
34
|
+
<el-col :span="4" class="text-center">
|
35
|
+
<router-link class="pan-btn yellow-btn" to="/theme/index">
|
36
|
+
Theme
|
37
|
+
</router-link>
|
38
|
+
</el-col>
|
39
|
+
</div>
|
40
|
+
</el-card>
|
41
|
+
</el-row>
|
42
|
+
|
43
|
+
<el-row :gutter="20" style="margin-top:50px;">
|
44
|
+
<el-col :span="6">
|
45
|
+
<el-card class="box-card">
|
46
|
+
<div slot="header" class="clearfix">
|
47
|
+
<span>Material Design 的input</span>
|
48
|
+
</div>
|
49
|
+
<div style="height:100px;">
|
50
|
+
<el-form :model="demo" :rules="demoRules">
|
51
|
+
<el-form-item prop="title">
|
52
|
+
<md-input v-model="demo.title" icon="el-icon-search" name="title" placeholder="输入标题">
|
53
|
+
标题
|
54
|
+
</md-input>
|
55
|
+
</el-form-item>
|
56
|
+
</el-form>
|
57
|
+
</div>
|
58
|
+
</el-card>
|
59
|
+
</el-col>
|
60
|
+
|
61
|
+
<el-col :span="6">
|
62
|
+
<el-card class="box-card">
|
63
|
+
<div slot="header" class="clearfix">
|
64
|
+
<span>图片hover效果</span>
|
65
|
+
</div>
|
66
|
+
<div class="component-item">
|
67
|
+
<pan-thumb width="100px" height="100px" image="https://wpimg.wallstcn.com/577965b9-bb9e-4e02-9f0c-095b41417191">
|
68
|
+
vue-element-admin
|
69
|
+
</pan-thumb>
|
70
|
+
</div>
|
71
|
+
</el-card>
|
72
|
+
</el-col>
|
73
|
+
|
74
|
+
<el-col :span="6">
|
75
|
+
<el-card class="box-card">
|
76
|
+
<div slot="header" class="clearfix">
|
77
|
+
<span>水波纹 waves v-directive</span>
|
78
|
+
</div>
|
79
|
+
<div class="component-item">
|
80
|
+
<el-button v-waves type="primary">
|
81
|
+
水波纹效果
|
82
|
+
</el-button>
|
83
|
+
</div>
|
84
|
+
</el-card>
|
85
|
+
</el-col>
|
86
|
+
|
87
|
+
<el-col :span="6">
|
88
|
+
<el-card class="box-card">
|
89
|
+
<div slot="header" class="clearfix">
|
90
|
+
<span>hover text</span>
|
91
|
+
</div>
|
92
|
+
<div class="component-item">
|
93
|
+
<mallki class-name="mallki-text" text="vue-element-admin" />
|
94
|
+
</div>
|
95
|
+
</el-card>
|
96
|
+
</el-col>
|
97
|
+
</el-row>
|
98
|
+
|
99
|
+
<el-row :gutter="20" style="margin-top:50px;">
|
100
|
+
<el-col :span="8">
|
101
|
+
<el-card class="box-card">
|
102
|
+
<div slot="header" class="clearfix">
|
103
|
+
<span>Share</span>
|
104
|
+
</div>
|
105
|
+
<div class="component-item" style="height:420px;">
|
106
|
+
<dropdown-menu :items="articleList" style="margin:0 auto;" title="系列文章" />
|
107
|
+
</div>
|
108
|
+
</el-card>
|
109
|
+
</el-col>
|
110
|
+
</el-row>
|
111
|
+
</div>
|
112
|
+
</template>
|
113
|
+
|
114
|
+
<script>
|
115
|
+
import PanThumb from '@/components/PanThumb'
|
116
|
+
import MdInput from '@/components/MDinput'
|
117
|
+
import Mallki from '@/components/TextHoverEffect/Mallki'
|
118
|
+
import DropdownMenu from '@/components/Share/DropdownMenu'
|
119
|
+
import waves from '@/directive/waves/index.js' // 水波纹指令
|
120
|
+
|
121
|
+
export default {
|
122
|
+
name: 'ComponentMixinDemo',
|
123
|
+
components: {
|
124
|
+
PanThumb,
|
125
|
+
MdInput,
|
126
|
+
Mallki,
|
127
|
+
DropdownMenu
|
128
|
+
},
|
129
|
+
directives: {
|
130
|
+
waves
|
131
|
+
},
|
132
|
+
data() {
|
133
|
+
const validate = (rule, value, callback) => {
|
134
|
+
if (value.length !== 6) {
|
135
|
+
callback(new Error('请输入六个字符'))
|
136
|
+
} else {
|
137
|
+
callback()
|
138
|
+
}
|
139
|
+
}
|
140
|
+
return {
|
141
|
+
demo: {
|
142
|
+
title: ''
|
143
|
+
},
|
144
|
+
demoRules: {
|
145
|
+
title: [{ required: true, trigger: 'change', validator: validate }]
|
146
|
+
},
|
147
|
+
articleList: [
|
148
|
+
{ title: '基础篇', href: 'https://juejin.im/post/59097cd7a22b9d0065fb61d2' },
|
149
|
+
{ title: '登录权限篇', href: 'https://juejin.im/post/591aa14f570c35006961acac' },
|
150
|
+
{ title: '实战篇', href: 'https://juejin.im/post/593121aa0ce4630057f70d35' },
|
151
|
+
{ title: 'vue-admin-template 篇', href: 'https://juejin.im/post/595b4d776fb9a06bbe7dba56' },
|
152
|
+
{ title: 'v4.0 篇', href: 'https://juejin.im/post/5c92ff94f265da6128275a85' },
|
153
|
+
{ title: '优雅的使用 icon', href: 'https://juejin.im/post/59bb864b5188257e7a427c09' }
|
154
|
+
]
|
155
|
+
}
|
156
|
+
}
|
157
|
+
}
|
158
|
+
</script>
|
159
|
+
|
160
|
+
<style scoped>
|
161
|
+
.mixin-components-container {
|
162
|
+
background-color: #f0f2f5;
|
163
|
+
padding: 30px;
|
164
|
+
min-height: calc(100vh - 84px);
|
165
|
+
}
|
166
|
+
.component-item{
|
167
|
+
min-height: 100px;
|
168
|
+
}
|
169
|
+
</style>
|
@@ -0,0 +1,67 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="components-container">
|
3
|
+
<aside><strong>SplitPane</strong> If you've used
|
4
|
+
<a href="https://codepen.io/" target="_blank"> codepen</a>,
|
5
|
+
<a href="https://jsfiddle.net/" target="_blank"> jsfiddle </a>will not be unfamiliar.
|
6
|
+
<a href="https://github.com/PanJiaChen/vue-split-pane" target="_blank"> Github repository</a>
|
7
|
+
</aside>
|
8
|
+
<split-pane split="vertical" @resize="resize">
|
9
|
+
<template slot="paneL">
|
10
|
+
<div class="left-container" />
|
11
|
+
</template>
|
12
|
+
<template slot="paneR">
|
13
|
+
<split-pane split="horizontal">
|
14
|
+
<template slot="paneL">
|
15
|
+
<div class="top-container" />
|
16
|
+
</template>
|
17
|
+
<template slot="paneR">
|
18
|
+
<div class="bottom-container" />
|
19
|
+
</template>
|
20
|
+
</split-pane>
|
21
|
+
</template>
|
22
|
+
</split-pane>
|
23
|
+
</div>
|
24
|
+
</template>
|
25
|
+
|
26
|
+
<script>
|
27
|
+
import splitPane from 'vue-splitpane'
|
28
|
+
|
29
|
+
export default {
|
30
|
+
name: 'SplitpaneDemo',
|
31
|
+
components: { splitPane },
|
32
|
+
methods: {
|
33
|
+
resize() {
|
34
|
+
console.log('resize')
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}
|
38
|
+
</script>
|
39
|
+
|
40
|
+
<style scoped>
|
41
|
+
.components-container {
|
42
|
+
position: relative;
|
43
|
+
height: 100vh;
|
44
|
+
}
|
45
|
+
|
46
|
+
.left-container {
|
47
|
+
background-color: #F38181;
|
48
|
+
height: 100%;
|
49
|
+
}
|
50
|
+
|
51
|
+
.right-container {
|
52
|
+
background-color: #FCE38A;
|
53
|
+
height: 200px;
|
54
|
+
}
|
55
|
+
|
56
|
+
.top-container {
|
57
|
+
background-color: #FCE38A;
|
58
|
+
width: 100%;
|
59
|
+
height: 100%;
|
60
|
+
}
|
61
|
+
|
62
|
+
.bottom-container {
|
63
|
+
width: 100%;
|
64
|
+
background-color: #95E1D3;
|
65
|
+
height: 100%;
|
66
|
+
}
|
67
|
+
</style>
|
@@ -0,0 +1,135 @@
|
|
1
|
+
<template>
|
2
|
+
<div>
|
3
|
+
<sticky :z-index="10" class-name="sub-navbar">
|
4
|
+
<el-dropdown trigger="click">
|
5
|
+
<el-button plain>
|
6
|
+
Platform<i class="el-icon-caret-bottom el-icon--right" />
|
7
|
+
</el-button>
|
8
|
+
<el-dropdown-menu slot="dropdown" class="no-border">
|
9
|
+
<el-checkbox-group v-model="platforms" style="padding: 5px 15px;">
|
10
|
+
<el-checkbox v-for="item in platformsOptions" :key="item.key" :label="item.key">
|
11
|
+
{{ item.name }}
|
12
|
+
</el-checkbox>
|
13
|
+
</el-checkbox-group>
|
14
|
+
</el-dropdown-menu>
|
15
|
+
</el-dropdown>
|
16
|
+
|
17
|
+
<el-dropdown trigger="click">
|
18
|
+
<el-button plain>
|
19
|
+
Link<i class="el-icon-caret-bottom el-icon--right" />
|
20
|
+
</el-button>
|
21
|
+
<el-dropdown-menu slot="dropdown" class="no-padding no-border" style="width:300px">
|
22
|
+
<el-input v-model="url" placeholder="Please enter the content">
|
23
|
+
<template slot="prepend">
|
24
|
+
Url
|
25
|
+
</template>
|
26
|
+
</el-input>
|
27
|
+
</el-dropdown-menu>
|
28
|
+
</el-dropdown>
|
29
|
+
|
30
|
+
<div class="time-container">
|
31
|
+
<el-date-picker v-model="time" type="datetime" format="yyyy-MM-dd HH:mm:ss" placeholder="Release time" />
|
32
|
+
</div>
|
33
|
+
|
34
|
+
<el-button style="margin-left: 10px;" type="success">
|
35
|
+
publish
|
36
|
+
</el-button>
|
37
|
+
</sticky>
|
38
|
+
|
39
|
+
<div class="components-container">
|
40
|
+
<aside>
|
41
|
+
Sticky header, When the page is scrolled to the preset position will be sticky on the top.
|
42
|
+
</aside>
|
43
|
+
<div>placeholder</div>
|
44
|
+
<div>placeholder</div>
|
45
|
+
<div>placeholder</div>
|
46
|
+
<div>placeholder</div>
|
47
|
+
<div>placeholder</div>
|
48
|
+
<div>placeholder</div>
|
49
|
+
<div>placeholder</div>
|
50
|
+
<div>placeholder</div>
|
51
|
+
<div>placeholder</div>
|
52
|
+
<div>placeholder</div>
|
53
|
+
<div>placeholder</div>
|
54
|
+
<div>placeholder</div>
|
55
|
+
<div>placeholder</div>
|
56
|
+
<sticky :sticky-top="200">
|
57
|
+
<el-button type="primary"> placeholder</el-button>
|
58
|
+
</sticky>
|
59
|
+
<div>placeholder</div>
|
60
|
+
<div>placeholder</div>
|
61
|
+
<div>placeholder</div>
|
62
|
+
<div>placeholder</div>
|
63
|
+
<div>placeholder</div>
|
64
|
+
<div>placeholder</div>
|
65
|
+
<div>placeholder</div>
|
66
|
+
<div>placeholder</div>
|
67
|
+
<div>placeholder</div>
|
68
|
+
<div>placeholder</div>
|
69
|
+
<div>placeholder</div>
|
70
|
+
<div>placeholder</div>
|
71
|
+
<div>placeholder</div>
|
72
|
+
<div>placeholder</div>
|
73
|
+
<div>placeholder</div>
|
74
|
+
<div>placeholder</div>
|
75
|
+
<div>placeholder</div>
|
76
|
+
<div>placeholder</div>
|
77
|
+
<div>placeholder</div>
|
78
|
+
<div>placeholder</div>
|
79
|
+
<div>placeholder</div>
|
80
|
+
<div>placeholder</div>
|
81
|
+
<div>placeholder</div>
|
82
|
+
<div>placeholder</div>
|
83
|
+
<div>placeholder</div>
|
84
|
+
<div>placeholder</div>
|
85
|
+
<div>placeholder</div>
|
86
|
+
<div>placeholder</div>
|
87
|
+
<div>placeholder</div>
|
88
|
+
<div>placeholder</div>
|
89
|
+
<div>placeholder</div>
|
90
|
+
<div>placeholder</div>
|
91
|
+
<div>placeholder</div>
|
92
|
+
<div>placeholder</div>
|
93
|
+
<div>placeholder</div>
|
94
|
+
<div>placeholder</div>
|
95
|
+
<div>placeholder</div>
|
96
|
+
<div>placeholder</div>
|
97
|
+
</div>
|
98
|
+
</div>
|
99
|
+
</template>
|
100
|
+
|
101
|
+
<script>
|
102
|
+
import Sticky from '@/components/Sticky'
|
103
|
+
|
104
|
+
export default {
|
105
|
+
name: 'StickyDemo',
|
106
|
+
components: { Sticky },
|
107
|
+
data() {
|
108
|
+
return {
|
109
|
+
time: '',
|
110
|
+
url: '',
|
111
|
+
platforms: ['a-platform'],
|
112
|
+
platformsOptions: [
|
113
|
+
{ key: 'a-platform', name: 'platformA' },
|
114
|
+
{ key: 'b-platform', name: 'platformB' },
|
115
|
+
{ key: 'c-platform', name: 'platformC' }
|
116
|
+
],
|
117
|
+
pickerOptions: {
|
118
|
+
disabledDate(time) {
|
119
|
+
return time.getTime() > Date.now()
|
120
|
+
}
|
121
|
+
}
|
122
|
+
}
|
123
|
+
}
|
124
|
+
}
|
125
|
+
</script>
|
126
|
+
|
127
|
+
<style scoped>
|
128
|
+
.components-container div {
|
129
|
+
margin: 10px;
|
130
|
+
}
|
131
|
+
|
132
|
+
.time-container {
|
133
|
+
display: inline-block;
|
134
|
+
}
|
135
|
+
</style>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="components-container">
|
3
|
+
<aside>
|
4
|
+
Rich text is a core feature of the management backend, but at the same time it is a place with lots of pits. In the process of selecting rich texts, I also took a lot of detours. The common rich texts on the market have been basically used, and I finally chose Tinymce. See the more detailed rich text comparison and introduction.
|
5
|
+
<a target="_blank" class="link-type" href="https://panjiachen.github.io/vue-element-admin-site/feature/component/rich-editor.html">Documentation</a>
|
6
|
+
</aside>
|
7
|
+
<div>
|
8
|
+
<tinymce v-model="content" :height="300" />
|
9
|
+
</div>
|
10
|
+
<div class="editor-content" v-html="content" />
|
11
|
+
</div>
|
12
|
+
</template>
|
13
|
+
|
14
|
+
<script>
|
15
|
+
import Tinymce from '@/components/Tinymce'
|
16
|
+
|
17
|
+
export default {
|
18
|
+
name: 'TinymceDemo',
|
19
|
+
components: { Tinymce },
|
20
|
+
data() {
|
21
|
+
return {
|
22
|
+
content:
|
23
|
+
`<h1 style="text-align: center;">Welcome to the TinyMCE demo!</h1><p style="text-align: center; font-size: 15px;"><img title="TinyMCE Logo" src="//www.tinymce.com/images/glyph-tinymce@2x.png" alt="TinyMCE Logo" width="110" height="97" /><ul>
|
24
|
+
<li>Our <a href="//www.tinymce.com/docs/">documentation</a> is a great resource for learning how to configure TinyMCE.</li><li>Have a specific question? Visit the <a href="https://community.tinymce.com/forum/">Community Forum</a>.</li><li>We also offer enterprise grade support as part of <a href="https://tinymce.com/pricing">TinyMCE premium subscriptions</a>.</li>
|
25
|
+
</ul>`
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
29
|
+
</script>
|
30
|
+
|
31
|
+
<style scoped>
|
32
|
+
.editor-content{
|
33
|
+
margin-top: 20px;
|
34
|
+
}
|
35
|
+
</style>
|
36
|
+
|
@@ -0,0 +1,102 @@
|
|
1
|
+
<template>
|
2
|
+
<div :class="className" :style="{height:height,width:width}" />
|
3
|
+
</template>
|
4
|
+
|
5
|
+
<script>
|
6
|
+
import echarts from 'echarts'
|
7
|
+
require('echarts/theme/macarons') // echarts theme
|
8
|
+
import resize from './mixins/resize'
|
9
|
+
|
10
|
+
const animationDuration = 6000
|
11
|
+
|
12
|
+
export default {
|
13
|
+
mixins: [resize],
|
14
|
+
props: {
|
15
|
+
className: {
|
16
|
+
type: String,
|
17
|
+
default: 'chart'
|
18
|
+
},
|
19
|
+
width: {
|
20
|
+
type: String,
|
21
|
+
default: '100%'
|
22
|
+
},
|
23
|
+
height: {
|
24
|
+
type: String,
|
25
|
+
default: '300px'
|
26
|
+
}
|
27
|
+
},
|
28
|
+
data() {
|
29
|
+
return {
|
30
|
+
chart: null
|
31
|
+
}
|
32
|
+
},
|
33
|
+
mounted() {
|
34
|
+
this.$nextTick(() => {
|
35
|
+
this.initChart()
|
36
|
+
})
|
37
|
+
},
|
38
|
+
beforeDestroy() {
|
39
|
+
if (!this.chart) {
|
40
|
+
return
|
41
|
+
}
|
42
|
+
this.chart.dispose()
|
43
|
+
this.chart = null
|
44
|
+
},
|
45
|
+
methods: {
|
46
|
+
initChart() {
|
47
|
+
this.chart = echarts.init(this.$el, 'macarons')
|
48
|
+
|
49
|
+
this.chart.setOption({
|
50
|
+
tooltip: {
|
51
|
+
trigger: 'axis',
|
52
|
+
axisPointer: { // 坐标轴指示器,坐标轴触发有效
|
53
|
+
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
54
|
+
}
|
55
|
+
},
|
56
|
+
grid: {
|
57
|
+
top: 10,
|
58
|
+
left: '2%',
|
59
|
+
right: '2%',
|
60
|
+
bottom: '3%',
|
61
|
+
containLabel: true
|
62
|
+
},
|
63
|
+
xAxis: [{
|
64
|
+
type: 'category',
|
65
|
+
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
66
|
+
axisTick: {
|
67
|
+
alignWithLabel: true
|
68
|
+
}
|
69
|
+
}],
|
70
|
+
yAxis: [{
|
71
|
+
type: 'value',
|
72
|
+
axisTick: {
|
73
|
+
show: false
|
74
|
+
}
|
75
|
+
}],
|
76
|
+
series: [{
|
77
|
+
name: 'pageA',
|
78
|
+
type: 'bar',
|
79
|
+
stack: 'vistors',
|
80
|
+
barWidth: '60%',
|
81
|
+
data: [79, 52, 200, 334, 390, 330, 220],
|
82
|
+
animationDuration
|
83
|
+
}, {
|
84
|
+
name: 'pageB',
|
85
|
+
type: 'bar',
|
86
|
+
stack: 'vistors',
|
87
|
+
barWidth: '60%',
|
88
|
+
data: [80, 52, 200, 334, 390, 330, 220],
|
89
|
+
animationDuration
|
90
|
+
}, {
|
91
|
+
name: 'pageC',
|
92
|
+
type: 'bar',
|
93
|
+
stack: 'vistors',
|
94
|
+
barWidth: '60%',
|
95
|
+
data: [30, 52, 200, 334, 390, 330, 220],
|
96
|
+
animationDuration
|
97
|
+
}]
|
98
|
+
})
|
99
|
+
}
|
100
|
+
}
|
101
|
+
}
|
102
|
+
</script>
|
@@ -0,0 +1,118 @@
|
|
1
|
+
<template>
|
2
|
+
<el-card class="box-card-component" style="margin-left:8px;">
|
3
|
+
<div slot="header" class="box-card-header">
|
4
|
+
<img src="https://wpimg.wallstcn.com/e7d23d71-cf19-4b90-a1cc-f56af8c0903d.png">
|
5
|
+
</div>
|
6
|
+
<div style="position:relative;">
|
7
|
+
<pan-thumb :image="avatar" class="panThumb" />
|
8
|
+
<mallki class-name="mallki-text" text="vue-element-admin" />
|
9
|
+
<div style="padding-top:35px;" class="progress-item">
|
10
|
+
<span>Vue</span>
|
11
|
+
<el-progress :percentage="70" />
|
12
|
+
</div>
|
13
|
+
<div class="progress-item">
|
14
|
+
<span>JavaScript</span>
|
15
|
+
<el-progress :percentage="18" />
|
16
|
+
</div>
|
17
|
+
<div class="progress-item">
|
18
|
+
<span>CSS</span>
|
19
|
+
<el-progress :percentage="12" />
|
20
|
+
</div>
|
21
|
+
<div class="progress-item">
|
22
|
+
<span>ESLint</span>
|
23
|
+
<el-progress :percentage="100" status="success" />
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
</el-card>
|
27
|
+
</template>
|
28
|
+
|
29
|
+
<script>
|
30
|
+
import { mapGetters } from 'vuex'
|
31
|
+
import PanThumb from '@/components/PanThumb'
|
32
|
+
import Mallki from '@/components/TextHoverEffect/Mallki'
|
33
|
+
|
34
|
+
export default {
|
35
|
+
components: { PanThumb, Mallki },
|
36
|
+
|
37
|
+
filters: {
|
38
|
+
statusFilter(status) {
|
39
|
+
const statusMap = {
|
40
|
+
success: 'success',
|
41
|
+
pending: 'danger'
|
42
|
+
}
|
43
|
+
return statusMap[status]
|
44
|
+
}
|
45
|
+
},
|
46
|
+
data() {
|
47
|
+
return {
|
48
|
+
statisticsData: {
|
49
|
+
article_count: 1024,
|
50
|
+
pageviews_count: 1024
|
51
|
+
}
|
52
|
+
}
|
53
|
+
},
|
54
|
+
computed: {
|
55
|
+
...mapGetters([
|
56
|
+
'name',
|
57
|
+
'avatar',
|
58
|
+
'roles'
|
59
|
+
])
|
60
|
+
}
|
61
|
+
}
|
62
|
+
</script>
|
63
|
+
|
64
|
+
<style lang="scss" >
|
65
|
+
.box-card-component{
|
66
|
+
.el-card__header {
|
67
|
+
padding: 0px!important;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
</style>
|
71
|
+
<style lang="scss" scoped>
|
72
|
+
.box-card-component {
|
73
|
+
.box-card-header {
|
74
|
+
position: relative;
|
75
|
+
height: 220px;
|
76
|
+
img {
|
77
|
+
width: 100%;
|
78
|
+
height: 100%;
|
79
|
+
transition: all 0.2s linear;
|
80
|
+
&:hover {
|
81
|
+
transform: scale(1.1, 1.1);
|
82
|
+
filter: contrast(130%);
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|
86
|
+
.mallki-text {
|
87
|
+
position: absolute;
|
88
|
+
top: 0px;
|
89
|
+
right: 0px;
|
90
|
+
font-size: 20px;
|
91
|
+
font-weight: bold;
|
92
|
+
}
|
93
|
+
.panThumb {
|
94
|
+
z-index: 100;
|
95
|
+
height: 70px!important;
|
96
|
+
width: 70px!important;
|
97
|
+
position: absolute!important;
|
98
|
+
top: -45px;
|
99
|
+
left: 0px;
|
100
|
+
border: 5px solid #ffffff;
|
101
|
+
background-color: #fff;
|
102
|
+
margin: auto;
|
103
|
+
box-shadow: none!important;
|
104
|
+
::v-deep .pan-info {
|
105
|
+
box-shadow: none!important;
|
106
|
+
}
|
107
|
+
}
|
108
|
+
.progress-item {
|
109
|
+
margin-bottom: 10px;
|
110
|
+
font-size: 14px;
|
111
|
+
}
|
112
|
+
@media only screen and (max-width: 1510px){
|
113
|
+
.mallki-text{
|
114
|
+
display: none;
|
115
|
+
}
|
116
|
+
}
|
117
|
+
}
|
118
|
+
</style>
|