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.
Files changed (303) hide show
  1. package/package.json +8 -0
  2. package/template/.editorconfig +14 -0
  3. package/template/.env.development +5 -0
  4. package/template/.env.production +6 -0
  5. package/template/.env.staging +8 -0
  6. package/template/.eslintignore +4 -0
  7. package/template/.eslintrc.js +198 -0
  8. package/template/.travis.yml +5 -0
  9. package/template/LICENSE +21 -0
  10. package/template/README.es.md +228 -0
  11. package/template/README.ja.md +224 -0
  12. package/template/README.md +250 -0
  13. package/template/README.zh-CN.md +273 -0
  14. package/template/babel.config.js +14 -0
  15. package/template/build/index.js +35 -0
  16. package/template/jest.config.js +24 -0
  17. package/template/jsconfig.json +9 -0
  18. package/template/mock/article.js +116 -0
  19. package/template/mock/index.js +60 -0
  20. package/template/mock/mock-server.js +81 -0
  21. package/template/mock/remote-search.js +51 -0
  22. package/template/mock/role/index.js +98 -0
  23. package/template/mock/role/routes.js +530 -0
  24. package/template/mock/user.js +84 -0
  25. package/template/mock/utils.js +48 -0
  26. package/template/package.json +111 -0
  27. package/template/plop-templates/component/index.hbs +26 -0
  28. package/template/plop-templates/component/prompt.js +55 -0
  29. package/template/plop-templates/store/index.hbs +16 -0
  30. package/template/plop-templates/store/prompt.js +62 -0
  31. package/template/plop-templates/utils.js +2 -0
  32. package/template/plop-templates/view/index.hbs +26 -0
  33. package/template/plop-templates/view/prompt.js +55 -0
  34. package/template/plopfile.js +9 -0
  35. package/template/postcss.config.js +5 -0
  36. package/template/public/favicon.ico +0 -0
  37. package/template/public/index.html +15 -0
  38. package/template/src/App.vue +11 -0
  39. package/template/src/api/article.js +41 -0
  40. package/template/src/api/qiniu.js +8 -0
  41. package/template/src/api/remote-search.js +17 -0
  42. package/template/src/api/role.js +38 -0
  43. package/template/src/api/user.js +24 -0
  44. package/template/src/assets/401_images/401.gif +0 -0
  45. package/template/src/assets/404_images/404.png +0 -0
  46. package/template/src/assets/404_images/404_cloud.png +0 -0
  47. package/template/src/assets/custom-theme/fonts/element-icons.ttf +0 -0
  48. package/template/src/assets/custom-theme/fonts/element-icons.woff +0 -0
  49. package/template/src/assets/custom-theme/index.css +1 -0
  50. package/template/src/components/BackToTop/index.vue +111 -0
  51. package/template/src/components/Breadcrumb/index.vue +82 -0
  52. package/template/src/components/Charts/Keyboard.vue +155 -0
  53. package/template/src/components/Charts/LineMarker.vue +227 -0
  54. package/template/src/components/Charts/MixChart.vue +271 -0
  55. package/template/src/components/Charts/mixins/resize.js +56 -0
  56. package/template/src/components/DndList/index.vue +166 -0
  57. package/template/src/components/DragSelect/index.vue +65 -0
  58. package/template/src/components/Dropzone/index.vue +297 -0
  59. package/template/src/components/ErrorLog/index.vue +78 -0
  60. package/template/src/components/GithubCorner/index.vue +54 -0
  61. package/template/src/components/Hamburger/index.vue +44 -0
  62. package/template/src/components/HeaderSearch/index.vue +180 -0
  63. package/template/src/components/ImageCropper/index.vue +1779 -0
  64. package/template/src/components/ImageCropper/utils/data2blob.js +19 -0
  65. package/template/src/components/ImageCropper/utils/effectRipple.js +39 -0
  66. package/template/src/components/ImageCropper/utils/language.js +232 -0
  67. package/template/src/components/ImageCropper/utils/mimes.js +7 -0
  68. package/template/src/components/JsonEditor/index.vue +77 -0
  69. package/template/src/components/Kanban/index.vue +99 -0
  70. package/template/src/components/MDinput/index.vue +360 -0
  71. package/template/src/components/MarkdownEditor/default-options.js +31 -0
  72. package/template/src/components/MarkdownEditor/index.vue +118 -0
  73. package/template/src/components/Pagination/index.vue +101 -0
  74. package/template/src/components/PanThumb/index.vue +142 -0
  75. package/template/src/components/RightPanel/index.vue +145 -0
  76. package/template/src/components/Screenfull/index.vue +60 -0
  77. package/template/src/components/Share/DropdownMenu.vue +103 -0
  78. package/template/src/components/SizeSelect/index.vue +57 -0
  79. package/template/src/components/Sticky/index.vue +91 -0
  80. package/template/src/components/SvgIcon/index.vue +62 -0
  81. package/template/src/components/TextHoverEffect/Mallki.vue +113 -0
  82. package/template/src/components/ThemePicker/index.vue +175 -0
  83. package/template/src/components/Tinymce/components/EditorImage.vue +111 -0
  84. package/template/src/components/Tinymce/dynamicLoadScript.js +59 -0
  85. package/template/src/components/Tinymce/index.vue +247 -0
  86. package/template/src/components/Tinymce/plugins.js +7 -0
  87. package/template/src/components/Tinymce/toolbar.js +6 -0
  88. package/template/src/components/Upload/SingleImage.vue +134 -0
  89. package/template/src/components/Upload/SingleImage2.vue +130 -0
  90. package/template/src/components/Upload/SingleImage3.vue +157 -0
  91. package/template/src/components/UploadExcel/index.vue +138 -0
  92. package/template/src/directive/clipboard/clipboard.js +49 -0
  93. package/template/src/directive/clipboard/index.js +13 -0
  94. package/template/src/directive/el-drag-dialog/drag.js +77 -0
  95. package/template/src/directive/el-drag-dialog/index.js +13 -0
  96. package/template/src/directive/el-table/adaptive.js +41 -0
  97. package/template/src/directive/el-table/index.js +13 -0
  98. package/template/src/directive/permission/index.js +13 -0
  99. package/template/src/directive/permission/permission.js +31 -0
  100. package/template/src/directive/sticky.js +91 -0
  101. package/template/src/directive/waves/index.js +13 -0
  102. package/template/src/directive/waves/waves.css +26 -0
  103. package/template/src/directive/waves/waves.js +72 -0
  104. package/template/src/filters/index.js +68 -0
  105. package/template/src/icons/index.js +9 -0
  106. package/template/src/icons/svg/404.svg +1 -0
  107. package/template/src/icons/svg/bug.svg +1 -0
  108. package/template/src/icons/svg/chart.svg +1 -0
  109. package/template/src/icons/svg/clipboard.svg +1 -0
  110. package/template/src/icons/svg/component.svg +1 -0
  111. package/template/src/icons/svg/dashboard.svg +1 -0
  112. package/template/src/icons/svg/documentation.svg +1 -0
  113. package/template/src/icons/svg/drag.svg +1 -0
  114. package/template/src/icons/svg/edit.svg +1 -0
  115. package/template/src/icons/svg/education.svg +1 -0
  116. package/template/src/icons/svg/email.svg +1 -0
  117. package/template/src/icons/svg/example.svg +1 -0
  118. package/template/src/icons/svg/excel.svg +1 -0
  119. package/template/src/icons/svg/exit-fullscreen.svg +1 -0
  120. package/template/src/icons/svg/eye-open.svg +1 -0
  121. package/template/src/icons/svg/eye.svg +1 -0
  122. package/template/src/icons/svg/form.svg +1 -0
  123. package/template/src/icons/svg/fullscreen.svg +1 -0
  124. package/template/src/icons/svg/guide.svg +1 -0
  125. package/template/src/icons/svg/icon.svg +1 -0
  126. package/template/src/icons/svg/international.svg +1 -0
  127. package/template/src/icons/svg/language.svg +1 -0
  128. package/template/src/icons/svg/link.svg +1 -0
  129. package/template/src/icons/svg/list.svg +1 -0
  130. package/template/src/icons/svg/lock.svg +1 -0
  131. package/template/src/icons/svg/message.svg +1 -0
  132. package/template/src/icons/svg/money.svg +1 -0
  133. package/template/src/icons/svg/nested.svg +1 -0
  134. package/template/src/icons/svg/password.svg +1 -0
  135. package/template/src/icons/svg/pdf.svg +1 -0
  136. package/template/src/icons/svg/people.svg +1 -0
  137. package/template/src/icons/svg/peoples.svg +1 -0
  138. package/template/src/icons/svg/qq.svg +1 -0
  139. package/template/src/icons/svg/search.svg +1 -0
  140. package/template/src/icons/svg/shopping.svg +1 -0
  141. package/template/src/icons/svg/size.svg +1 -0
  142. package/template/src/icons/svg/skill.svg +1 -0
  143. package/template/src/icons/svg/star.svg +1 -0
  144. package/template/src/icons/svg/tab.svg +1 -0
  145. package/template/src/icons/svg/table.svg +1 -0
  146. package/template/src/icons/svg/theme.svg +1 -0
  147. package/template/src/icons/svg/tree-table.svg +1 -0
  148. package/template/src/icons/svg/tree.svg +1 -0
  149. package/template/src/icons/svg/user.svg +1 -0
  150. package/template/src/icons/svg/wechat.svg +1 -0
  151. package/template/src/icons/svg/zip.svg +1 -0
  152. package/template/src/icons/svgo.yml +22 -0
  153. package/template/src/layout/components/AppMain.vue +57 -0
  154. package/template/src/layout/components/Navbar.vue +167 -0
  155. package/template/src/layout/components/Settings/index.vue +108 -0
  156. package/template/src/layout/components/Sidebar/FixiOSBug.js +26 -0
  157. package/template/src/layout/components/Sidebar/Item.vue +41 -0
  158. package/template/src/layout/components/Sidebar/Link.vue +43 -0
  159. package/template/src/layout/components/Sidebar/Logo.vue +82 -0
  160. package/template/src/layout/components/Sidebar/SidebarItem.vue +95 -0
  161. package/template/src/layout/components/Sidebar/index.vue +54 -0
  162. package/template/src/layout/components/TagsView/ScrollPane.vue +94 -0
  163. package/template/src/layout/components/TagsView/index.vue +292 -0
  164. package/template/src/layout/components/index.js +5 -0
  165. package/template/src/layout/index.vue +102 -0
  166. package/template/src/layout/mixin/ResizeHandler.js +45 -0
  167. package/template/src/main.js +53 -0
  168. package/template/src/permission.js +74 -0
  169. package/template/src/router/index.js +404 -0
  170. package/template/src/router/modules/charts.js +36 -0
  171. package/template/src/router/modules/components.js +102 -0
  172. package/template/src/router/modules/nested.js +66 -0
  173. package/template/src/router/modules/table.js +41 -0
  174. package/template/src/settings.js +35 -0
  175. package/template/src/store/getters.js +15 -0
  176. package/template/src/store/index.js +25 -0
  177. package/template/src/store/modules/app.js +56 -0
  178. package/template/src/store/modules/errorLog.js +28 -0
  179. package/template/src/store/modules/permission.js +69 -0
  180. package/template/src/store/modules/settings.js +35 -0
  181. package/template/src/store/modules/tagsView.js +160 -0
  182. package/template/src/store/modules/user.js +131 -0
  183. package/template/src/styles/btn.scss +99 -0
  184. package/template/src/styles/element-ui.scss +84 -0
  185. package/template/src/styles/element-variables.scss +31 -0
  186. package/template/src/styles/index.scss +191 -0
  187. package/template/src/styles/mixin.scss +66 -0
  188. package/template/src/styles/sidebar.scss +226 -0
  189. package/template/src/styles/transition.scss +48 -0
  190. package/template/src/styles/variables.scss +35 -0
  191. package/template/src/utils/auth.js +15 -0
  192. package/template/src/utils/clipboard.js +32 -0
  193. package/template/src/utils/error-log.js +35 -0
  194. package/template/src/utils/get-page-title.js +10 -0
  195. package/template/src/utils/index.js +357 -0
  196. package/template/src/utils/open-window.js +25 -0
  197. package/template/src/utils/permission.js +21 -0
  198. package/template/src/utils/request.js +85 -0
  199. package/template/src/utils/scroll-to.js +58 -0
  200. package/template/src/utils/validate.js +87 -0
  201. package/template/src/vendor/Export2Excel.js +220 -0
  202. package/template/src/vendor/Export2Zip.js +24 -0
  203. package/template/src/views/charts/keyboard.vue +23 -0
  204. package/template/src/views/charts/line.vue +23 -0
  205. package/template/src/views/charts/mix-chart.vue +23 -0
  206. package/template/src/views/clipboard/index.vue +49 -0
  207. package/template/src/views/components-demo/avatar-upload.vue +61 -0
  208. package/template/src/views/components-demo/back-to-top.vue +154 -0
  209. package/template/src/views/components-demo/count-to.vue +218 -0
  210. package/template/src/views/components-demo/dnd-list.vue +39 -0
  211. package/template/src/views/components-demo/drag-dialog.vue +61 -0
  212. package/template/src/views/components-demo/drag-kanban.vue +66 -0
  213. package/template/src/views/components-demo/drag-select.vue +43 -0
  214. package/template/src/views/components-demo/dropzone.vue +31 -0
  215. package/template/src/views/components-demo/json-editor.vue +36 -0
  216. package/template/src/views/components-demo/markdown.vue +101 -0
  217. package/template/src/views/components-demo/mixin.vue +169 -0
  218. package/template/src/views/components-demo/split-pane.vue +67 -0
  219. package/template/src/views/components-demo/sticky.vue +135 -0
  220. package/template/src/views/components-demo/tinymce.vue +36 -0
  221. package/template/src/views/dashboard/admin/components/BarChart.vue +102 -0
  222. package/template/src/views/dashboard/admin/components/BoxCard.vue +118 -0
  223. package/template/src/views/dashboard/admin/components/LineChart.vue +135 -0
  224. package/template/src/views/dashboard/admin/components/PanelGroup.vue +181 -0
  225. package/template/src/views/dashboard/admin/components/PieChart.vue +79 -0
  226. package/template/src/views/dashboard/admin/components/RaddarChart.vue +116 -0
  227. package/template/src/views/dashboard/admin/components/TodoList/Todo.vue +81 -0
  228. package/template/src/views/dashboard/admin/components/TodoList/index.scss +320 -0
  229. package/template/src/views/dashboard/admin/components/TodoList/index.vue +127 -0
  230. package/template/src/views/dashboard/admin/components/TransactionTable.vue +55 -0
  231. package/template/src/views/dashboard/admin/components/mixins/resize.js +55 -0
  232. package/template/src/views/dashboard/admin/index.vue +124 -0
  233. package/template/src/views/dashboard/editor/index.vue +74 -0
  234. package/template/src/views/dashboard/index.vue +31 -0
  235. package/template/src/views/documentation/index.vue +57 -0
  236. package/template/src/views/error-log/components/ErrorTestA.vue +13 -0
  237. package/template/src/views/error-log/components/ErrorTestB.vue +11 -0
  238. package/template/src/views/error-log/index.vue +32 -0
  239. package/template/src/views/error-page/401.vue +99 -0
  240. package/template/src/views/error-page/404.vue +228 -0
  241. package/template/src/views/example/components/ArticleDetail.vue +289 -0
  242. package/template/src/views/example/components/Dropdown/Comment.vue +41 -0
  243. package/template/src/views/example/components/Dropdown/Platform.vue +46 -0
  244. package/template/src/views/example/components/Dropdown/SourceUrl.vue +38 -0
  245. package/template/src/views/example/components/Dropdown/index.js +3 -0
  246. package/template/src/views/example/components/Warning.vue +13 -0
  247. package/template/src/views/example/create.vue +13 -0
  248. package/template/src/views/example/edit.vue +13 -0
  249. package/template/src/views/example/list.vue +112 -0
  250. package/template/src/views/excel/components/AutoWidthOption.vue +34 -0
  251. package/template/src/views/excel/components/BookTypeOption.vue +39 -0
  252. package/template/src/views/excel/components/FilenameOption.vue +27 -0
  253. package/template/src/views/excel/export-excel.vue +116 -0
  254. package/template/src/views/excel/merge-header.vue +101 -0
  255. package/template/src/views/excel/select-excel.vue +107 -0
  256. package/template/src/views/excel/upload-excel.vue +42 -0
  257. package/template/src/views/guide/index.vue +36 -0
  258. package/template/src/views/guide/steps.js +53 -0
  259. package/template/src/views/icons/element-icons.js +3 -0
  260. package/template/src/views/icons/index.vue +101 -0
  261. package/template/src/views/icons/svg-icons.js +10 -0
  262. package/template/src/views/login/auth-redirect.vue +15 -0
  263. package/template/src/views/login/components/SocialSignin.vue +72 -0
  264. package/template/src/views/login/index.vue +324 -0
  265. package/template/src/views/nested/menu1/index.vue +7 -0
  266. package/template/src/views/nested/menu1/menu1-1/index.vue +7 -0
  267. package/template/src/views/nested/menu1/menu1-2/index.vue +7 -0
  268. package/template/src/views/nested/menu1/menu1-2/menu1-2-1/index.vue +5 -0
  269. package/template/src/views/nested/menu1/menu1-2/menu1-2-2/index.vue +5 -0
  270. package/template/src/views/nested/menu1/menu1-3/index.vue +5 -0
  271. package/template/src/views/nested/menu2/index.vue +5 -0
  272. package/template/src/views/pdf/content.js +58 -0
  273. package/template/src/views/pdf/download.vue +201 -0
  274. package/template/src/views/pdf/index.vue +13 -0
  275. package/template/src/views/permission/components/SwitchRoles.vue +32 -0
  276. package/template/src/views/permission/directive.vue +111 -0
  277. package/template/src/views/permission/page.vue +19 -0
  278. package/template/src/views/permission/role.vue +270 -0
  279. package/template/src/views/profile/components/Account.vue +38 -0
  280. package/template/src/views/profile/components/Activity.vue +185 -0
  281. package/template/src/views/profile/components/Timeline.vue +43 -0
  282. package/template/src/views/profile/components/UserCard.vue +134 -0
  283. package/template/src/views/profile/index.vue +68 -0
  284. package/template/src/views/qiniu/upload.vue +41 -0
  285. package/template/src/views/redirect/index.vue +12 -0
  286. package/template/src/views/tab/components/TabPane.vue +103 -0
  287. package/template/src/views/tab/index.vue +57 -0
  288. package/template/src/views/table/complex-table.vue +379 -0
  289. package/template/src/views/table/drag-table.vue +153 -0
  290. package/template/src/views/table/dynamic-table/components/FixedThead.vue +62 -0
  291. package/template/src/views/table/dynamic-table/components/UnfixedThead.vue +50 -0
  292. package/template/src/views/table/dynamic-table/index.vue +24 -0
  293. package/template/src/views/table/inline-edit-table.vue +149 -0
  294. package/template/src/views/theme/index.vue +120 -0
  295. package/template/src/views/zip/index.vue +77 -0
  296. package/template/tests/unit/.eslintrc.js +5 -0
  297. package/template/tests/unit/components/Hamburger.spec.js +18 -0
  298. package/template/tests/unit/components/SvgIcon.spec.js +22 -0
  299. package/template/tests/unit/utils/formatTime.spec.js +29 -0
  300. package/template/tests/unit/utils/param2Obj.spec.js +14 -0
  301. package/template/tests/unit/utils/parseTime.spec.js +37 -0
  302. package/template/tests/unit/utils/validate.spec.js +28 -0
  303. package/template/vue.config.js +124 -0
@@ -0,0 +1,84 @@
1
+ // cover some element-ui styles
2
+
3
+ .el-breadcrumb__inner,
4
+ .el-breadcrumb__inner a {
5
+ font-weight: 400 !important;
6
+ }
7
+
8
+ .el-upload {
9
+ input[type="file"] {
10
+ display: none !important;
11
+ }
12
+ }
13
+
14
+ .el-upload__input {
15
+ display: none;
16
+ }
17
+
18
+ .cell {
19
+ .el-tag {
20
+ margin-right: 0px;
21
+ }
22
+ }
23
+
24
+ .small-padding {
25
+ .cell {
26
+ padding-left: 5px;
27
+ padding-right: 5px;
28
+ }
29
+ }
30
+
31
+ .fixed-width {
32
+ .el-button--mini {
33
+ padding: 7px 10px;
34
+ min-width: 60px;
35
+ }
36
+ }
37
+
38
+ .status-col {
39
+ .cell {
40
+ padding: 0 10px;
41
+ text-align: center;
42
+
43
+ .el-tag {
44
+ margin-right: 0px;
45
+ }
46
+ }
47
+ }
48
+
49
+ // to fixed https://github.com/ElemeFE/element/issues/2461
50
+ .el-dialog {
51
+ transform: none;
52
+ left: 0;
53
+ position: relative;
54
+ margin: 0 auto;
55
+ }
56
+
57
+ // refine element ui upload
58
+ .upload-container {
59
+ .el-upload {
60
+ width: 100%;
61
+
62
+ .el-upload-dragger {
63
+ width: 100%;
64
+ height: 200px;
65
+ }
66
+ }
67
+ }
68
+
69
+ // dropdown
70
+ .el-dropdown-menu {
71
+ a {
72
+ display: block
73
+ }
74
+ }
75
+
76
+ // fix date-picker ui bug in filter-item
77
+ .el-range-editor.el-input__inner {
78
+ display: inline-flex !important;
79
+ }
80
+
81
+ // to fix el-date-picker css style
82
+ .el-range-separator {
83
+ box-sizing: content-box;
84
+ }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * I think element-ui's default theme color is too light for long-term use.
3
+ * So I modified the default color and you can modify it to your liking.
4
+ **/
5
+
6
+ /* theme color */
7
+ $--color-primary: #1890ff;
8
+ $--color-success: #13ce66;
9
+ $--color-warning: #ffba00;
10
+ $--color-danger: #ff4949;
11
+ // $--color-info: #1E1E1E;
12
+
13
+ $--button-font-weight: 400;
14
+
15
+ // $--color-text-regular: #1f2d3d;
16
+
17
+ $--border-color-light: #dfe4ed;
18
+ $--border-color-lighter: #e6ebf5;
19
+
20
+ $--table-border: 1px solid #dfe6ec;
21
+
22
+ /* icon font path, required */
23
+ $--font-path: "~element-ui/lib/theme-chalk/fonts";
24
+
25
+ @import "~element-ui/packages/theme-chalk/src/index";
26
+
27
+ // the :export directive is the magic sauce for webpack
28
+ // https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
29
+ :export {
30
+ theme: $--color-primary;
31
+ }
@@ -0,0 +1,191 @@
1
+ @import './variables.scss';
2
+ @import './mixin.scss';
3
+ @import './transition.scss';
4
+ @import './element-ui.scss';
5
+ @import './sidebar.scss';
6
+ @import './btn.scss';
7
+
8
+ body {
9
+ height: 100%;
10
+ -moz-osx-font-smoothing: grayscale;
11
+ -webkit-font-smoothing: antialiased;
12
+ text-rendering: optimizeLegibility;
13
+ font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
14
+ }
15
+
16
+ label {
17
+ font-weight: 700;
18
+ }
19
+
20
+ html {
21
+ height: 100%;
22
+ box-sizing: border-box;
23
+ }
24
+
25
+ #app {
26
+ height: 100%;
27
+ }
28
+
29
+ *,
30
+ *:before,
31
+ *:after {
32
+ box-sizing: inherit;
33
+ }
34
+
35
+ .no-padding {
36
+ padding: 0px !important;
37
+ }
38
+
39
+ .padding-content {
40
+ padding: 4px 0;
41
+ }
42
+
43
+ a:focus,
44
+ a:active {
45
+ outline: none;
46
+ }
47
+
48
+ a,
49
+ a:focus,
50
+ a:hover {
51
+ cursor: pointer;
52
+ color: inherit;
53
+ text-decoration: none;
54
+ }
55
+
56
+ div:focus {
57
+ outline: none;
58
+ }
59
+
60
+ .fr {
61
+ float: right;
62
+ }
63
+
64
+ .fl {
65
+ float: left;
66
+ }
67
+
68
+ .pr-5 {
69
+ padding-right: 5px;
70
+ }
71
+
72
+ .pl-5 {
73
+ padding-left: 5px;
74
+ }
75
+
76
+ .block {
77
+ display: block;
78
+ }
79
+
80
+ .pointer {
81
+ cursor: pointer;
82
+ }
83
+
84
+ .inlineBlock {
85
+ display: block;
86
+ }
87
+
88
+ .clearfix {
89
+ &:after {
90
+ visibility: hidden;
91
+ display: block;
92
+ font-size: 0;
93
+ content: " ";
94
+ clear: both;
95
+ height: 0;
96
+ }
97
+ }
98
+
99
+ aside {
100
+ background: #eef1f6;
101
+ padding: 8px 24px;
102
+ margin-bottom: 20px;
103
+ border-radius: 2px;
104
+ display: block;
105
+ line-height: 32px;
106
+ font-size: 16px;
107
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
108
+ color: #2c3e50;
109
+ -webkit-font-smoothing: antialiased;
110
+ -moz-osx-font-smoothing: grayscale;
111
+
112
+ a {
113
+ color: #337ab7;
114
+ cursor: pointer;
115
+
116
+ &:hover {
117
+ color: rgb(32, 160, 255);
118
+ }
119
+ }
120
+ }
121
+
122
+ //main-container全局样式
123
+ .app-container {
124
+ padding: 20px;
125
+ }
126
+
127
+ .components-container {
128
+ margin: 30px 50px;
129
+ position: relative;
130
+ }
131
+
132
+ .pagination-container {
133
+ margin-top: 30px;
134
+ }
135
+
136
+ .text-center {
137
+ text-align: center
138
+ }
139
+
140
+ .sub-navbar {
141
+ height: 50px;
142
+ line-height: 50px;
143
+ position: relative;
144
+ width: 100%;
145
+ text-align: right;
146
+ padding-right: 20px;
147
+ transition: 600ms ease position;
148
+ background: linear-gradient(90deg, rgba(32, 182, 249, 1) 0%, rgba(32, 182, 249, 1) 0%, rgba(33, 120, 241, 1) 100%, rgba(33, 120, 241, 1) 100%);
149
+
150
+ .subtitle {
151
+ font-size: 20px;
152
+ color: #fff;
153
+ }
154
+
155
+ &.draft {
156
+ background: #d0d0d0;
157
+ }
158
+
159
+ &.deleted {
160
+ background: #d0d0d0;
161
+ }
162
+ }
163
+
164
+ .link-type,
165
+ .link-type:focus {
166
+ color: #337ab7;
167
+ cursor: pointer;
168
+
169
+ &:hover {
170
+ color: rgb(32, 160, 255);
171
+ }
172
+ }
173
+
174
+ .filter-container {
175
+ padding-bottom: 10px;
176
+
177
+ .filter-item {
178
+ display: inline-block;
179
+ vertical-align: middle;
180
+ margin-bottom: 10px;
181
+ }
182
+ }
183
+
184
+ //refine vue-multiselect plugin
185
+ .multiselect {
186
+ line-height: 16px;
187
+ }
188
+
189
+ .multiselect--active {
190
+ z-index: 1000 !important;
191
+ }
@@ -0,0 +1,66 @@
1
+ @mixin clearfix {
2
+ &:after {
3
+ content: "";
4
+ display: table;
5
+ clear: both;
6
+ }
7
+ }
8
+
9
+ @mixin scrollBar {
10
+ &::-webkit-scrollbar-track-piece {
11
+ background: #d3dce6;
12
+ }
13
+
14
+ &::-webkit-scrollbar {
15
+ width: 6px;
16
+ }
17
+
18
+ &::-webkit-scrollbar-thumb {
19
+ background: #99a9bf;
20
+ border-radius: 20px;
21
+ }
22
+ }
23
+
24
+ @mixin relative {
25
+ position: relative;
26
+ width: 100%;
27
+ height: 100%;
28
+ }
29
+
30
+ @mixin pct($pct) {
31
+ width: #{$pct};
32
+ position: relative;
33
+ margin: 0 auto;
34
+ }
35
+
36
+ @mixin triangle($width, $height, $color, $direction) {
37
+ $width: $width/2;
38
+ $color-border-style: $height solid $color;
39
+ $transparent-border-style: $width solid transparent;
40
+ height: 0;
41
+ width: 0;
42
+
43
+ @if $direction==up {
44
+ border-bottom: $color-border-style;
45
+ border-left: $transparent-border-style;
46
+ border-right: $transparent-border-style;
47
+ }
48
+
49
+ @else if $direction==right {
50
+ border-left: $color-border-style;
51
+ border-top: $transparent-border-style;
52
+ border-bottom: $transparent-border-style;
53
+ }
54
+
55
+ @else if $direction==down {
56
+ border-top: $color-border-style;
57
+ border-left: $transparent-border-style;
58
+ border-right: $transparent-border-style;
59
+ }
60
+
61
+ @else if $direction==left {
62
+ border-right: $color-border-style;
63
+ border-top: $transparent-border-style;
64
+ border-bottom: $transparent-border-style;
65
+ }
66
+ }
@@ -0,0 +1,226 @@
1
+ #app {
2
+
3
+ .main-container {
4
+ min-height: 100%;
5
+ transition: margin-left .28s;
6
+ margin-left: $sideBarWidth;
7
+ position: relative;
8
+ }
9
+
10
+ .sidebar-container {
11
+ transition: width 0.28s;
12
+ width: $sideBarWidth !important;
13
+ background-color: $menuBg;
14
+ height: 100%;
15
+ position: fixed;
16
+ font-size: 0px;
17
+ top: 0;
18
+ bottom: 0;
19
+ left: 0;
20
+ z-index: 1001;
21
+ overflow: hidden;
22
+
23
+ // reset element-ui css
24
+ .horizontal-collapse-transition {
25
+ transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
26
+ }
27
+
28
+ .scrollbar-wrapper {
29
+ overflow-x: hidden !important;
30
+ }
31
+
32
+ .el-scrollbar__bar.is-vertical {
33
+ right: 0px;
34
+ }
35
+
36
+ .el-scrollbar {
37
+ height: 100%;
38
+ }
39
+
40
+ &.has-logo {
41
+ .el-scrollbar {
42
+ height: calc(100% - 50px);
43
+ }
44
+ }
45
+
46
+ .is-horizontal {
47
+ display: none;
48
+ }
49
+
50
+ a {
51
+ display: inline-block;
52
+ width: 100%;
53
+ overflow: hidden;
54
+ }
55
+
56
+ .svg-icon {
57
+ margin-right: 16px;
58
+ }
59
+
60
+ .sub-el-icon {
61
+ margin-right: 12px;
62
+ margin-left: -2px;
63
+ }
64
+
65
+ .el-menu {
66
+ border: none;
67
+ height: 100%;
68
+ width: 100% !important;
69
+ }
70
+
71
+ // menu hover
72
+ .submenu-title-noDropdown,
73
+ .el-submenu__title {
74
+ &:hover {
75
+ background-color: $menuHover !important;
76
+ }
77
+ }
78
+
79
+ .is-active>.el-submenu__title {
80
+ color: $subMenuActiveText !important;
81
+ }
82
+
83
+ & .nest-menu .el-submenu>.el-submenu__title,
84
+ & .el-submenu .el-menu-item {
85
+ min-width: $sideBarWidth !important;
86
+ background-color: $subMenuBg !important;
87
+
88
+ &:hover {
89
+ background-color: $subMenuHover !important;
90
+ }
91
+ }
92
+ }
93
+
94
+ .hideSidebar {
95
+ .sidebar-container {
96
+ width: 54px !important;
97
+ }
98
+
99
+ .main-container {
100
+ margin-left: 54px;
101
+ }
102
+
103
+ .submenu-title-noDropdown {
104
+ padding: 0 !important;
105
+ position: relative;
106
+
107
+ .el-tooltip {
108
+ padding: 0 !important;
109
+
110
+ .svg-icon {
111
+ margin-left: 20px;
112
+ }
113
+
114
+ .sub-el-icon {
115
+ margin-left: 19px;
116
+ }
117
+ }
118
+ }
119
+
120
+ .el-submenu {
121
+ overflow: hidden;
122
+
123
+ &>.el-submenu__title {
124
+ padding: 0 !important;
125
+
126
+ .svg-icon {
127
+ margin-left: 20px;
128
+ }
129
+
130
+ .sub-el-icon {
131
+ margin-left: 19px;
132
+ }
133
+
134
+ .el-submenu__icon-arrow {
135
+ display: none;
136
+ }
137
+ }
138
+ }
139
+
140
+ .el-menu--collapse {
141
+ .el-submenu {
142
+ &>.el-submenu__title {
143
+ &>span {
144
+ height: 0;
145
+ width: 0;
146
+ overflow: hidden;
147
+ visibility: hidden;
148
+ display: inline-block;
149
+ }
150
+ }
151
+ }
152
+ }
153
+ }
154
+
155
+ .el-menu--collapse .el-menu .el-submenu {
156
+ min-width: $sideBarWidth !important;
157
+ }
158
+
159
+ // mobile responsive
160
+ .mobile {
161
+ .main-container {
162
+ margin-left: 0px;
163
+ }
164
+
165
+ .sidebar-container {
166
+ transition: transform .28s;
167
+ width: $sideBarWidth !important;
168
+ }
169
+
170
+ &.hideSidebar {
171
+ .sidebar-container {
172
+ pointer-events: none;
173
+ transition-duration: 0.3s;
174
+ transform: translate3d(-$sideBarWidth, 0, 0);
175
+ }
176
+ }
177
+ }
178
+
179
+ .withoutAnimation {
180
+
181
+ .main-container,
182
+ .sidebar-container {
183
+ transition: none;
184
+ }
185
+ }
186
+ }
187
+
188
+ // when menu collapsed
189
+ .el-menu--vertical {
190
+ &>.el-menu {
191
+ .svg-icon {
192
+ margin-right: 16px;
193
+ }
194
+ .sub-el-icon {
195
+ margin-right: 12px;
196
+ margin-left: -2px;
197
+ }
198
+ }
199
+
200
+ .nest-menu .el-submenu>.el-submenu__title,
201
+ .el-menu-item {
202
+ &:hover {
203
+ // you can use $subMenuHover
204
+ background-color: $menuHover !important;
205
+ }
206
+ }
207
+
208
+ // the scroll bar appears when the subMenu is too long
209
+ >.el-menu--popup {
210
+ max-height: 100vh;
211
+ overflow-y: auto;
212
+
213
+ &::-webkit-scrollbar-track-piece {
214
+ background: #d3dce6;
215
+ }
216
+
217
+ &::-webkit-scrollbar {
218
+ width: 6px;
219
+ }
220
+
221
+ &::-webkit-scrollbar-thumb {
222
+ background: #99a9bf;
223
+ border-radius: 20px;
224
+ }
225
+ }
226
+ }
@@ -0,0 +1,48 @@
1
+ // global transition css
2
+
3
+ /* fade */
4
+ .fade-enter-active,
5
+ .fade-leave-active {
6
+ transition: opacity 0.28s;
7
+ }
8
+
9
+ .fade-enter,
10
+ .fade-leave-active {
11
+ opacity: 0;
12
+ }
13
+
14
+ /* fade-transform */
15
+ .fade-transform-leave-active,
16
+ .fade-transform-enter-active {
17
+ transition: all .5s;
18
+ }
19
+
20
+ .fade-transform-enter {
21
+ opacity: 0;
22
+ transform: translateX(-30px);
23
+ }
24
+
25
+ .fade-transform-leave-to {
26
+ opacity: 0;
27
+ transform: translateX(30px);
28
+ }
29
+
30
+ /* breadcrumb transition */
31
+ .breadcrumb-enter-active,
32
+ .breadcrumb-leave-active {
33
+ transition: all .5s;
34
+ }
35
+
36
+ .breadcrumb-enter,
37
+ .breadcrumb-leave-active {
38
+ opacity: 0;
39
+ transform: translateX(20px);
40
+ }
41
+
42
+ .breadcrumb-move {
43
+ transition: all .5s;
44
+ }
45
+
46
+ .breadcrumb-leave-active {
47
+ position: absolute;
48
+ }
@@ -0,0 +1,35 @@
1
+ // base color
2
+ $blue:#324157;
3
+ $light-blue:#3A71A8;
4
+ $red:#C03639;
5
+ $pink: #E65D6E;
6
+ $green: #30B08F;
7
+ $tiffany: #4AB7BD;
8
+ $yellow:#FEC171;
9
+ $panGreen: #30B08F;
10
+
11
+ // sidebar
12
+ $menuText:#bfcbd9;
13
+ $menuActiveText:#409EFF;
14
+ $subMenuActiveText:#f4f4f5; // https://github.com/ElemeFE/element/issues/12951
15
+
16
+ $menuBg:#304156;
17
+ $menuHover:#263445;
18
+
19
+ $subMenuBg:#1f2d3d;
20
+ $subMenuHover:#001528;
21
+
22
+ $sideBarWidth: 210px;
23
+
24
+ // the :export directive is the magic sauce for webpack
25
+ // https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
26
+ :export {
27
+ menuText: $menuText;
28
+ menuActiveText: $menuActiveText;
29
+ subMenuActiveText: $subMenuActiveText;
30
+ menuBg: $menuBg;
31
+ menuHover: $menuHover;
32
+ subMenuBg: $subMenuBg;
33
+ subMenuHover: $subMenuHover;
34
+ sideBarWidth: $sideBarWidth;
35
+ }
@@ -0,0 +1,15 @@
1
+ import Cookies from 'js-cookie'
2
+
3
+ const TokenKey = 'Admin-Token'
4
+
5
+ export function getToken() {
6
+ return Cookies.get(TokenKey)
7
+ }
8
+
9
+ export function setToken(token) {
10
+ return Cookies.set(TokenKey, token)
11
+ }
12
+
13
+ export function removeToken() {
14
+ return Cookies.remove(TokenKey)
15
+ }
@@ -0,0 +1,32 @@
1
+ import Vue from 'vue'
2
+ import Clipboard from 'clipboard'
3
+
4
+ function clipboardSuccess() {
5
+ Vue.prototype.$message({
6
+ message: 'Copy successfully',
7
+ type: 'success',
8
+ duration: 1500
9
+ })
10
+ }
11
+
12
+ function clipboardError() {
13
+ Vue.prototype.$message({
14
+ message: 'Copy failed',
15
+ type: 'error'
16
+ })
17
+ }
18
+
19
+ export default function handleClipboard(text, event) {
20
+ const clipboard = new Clipboard(event.target, {
21
+ text: () => text
22
+ })
23
+ clipboard.on('success', () => {
24
+ clipboardSuccess()
25
+ clipboard.destroy()
26
+ })
27
+ clipboard.on('error', () => {
28
+ clipboardError()
29
+ clipboard.destroy()
30
+ })
31
+ clipboard.onClick(event)
32
+ }