├── .editorconfig ├── .eslintrc.js ├── .gitignore ├── .vscode └── launch.json ├── README.md ├── assets ├── css │ ├── common.less │ ├── fonts │ │ ├── ionicons.eot │ │ ├── ionicons.svg │ │ ├── ionicons.ttf │ │ └── ionicons.woff │ ├── loading.less │ ├── main.css │ └── main.less └── images │ ├── cropper-test.png │ ├── logo-min.jpg │ └── logo.jpg ├── backpack.config.js ├── build ├── main.js └── main.map ├── components ├── access │ ├── access-test.vue │ ├── access.less │ └── access.vue ├── advanced-router │ ├── advanced-router.less │ ├── argument-page.vue │ ├── component │ │ ├── expandRow.vue │ │ ├── order-info.vue │ │ └── shopping-info.vue │ └── mutative-router.vue ├── error-page │ ├── 403.less │ ├── 403.vue │ ├── 404.less │ ├── 404.vue │ ├── 500.less │ ├── 500.vue │ ├── error-page.less │ └── error-page.vue ├── form │ ├── article-publish │ │ ├── article-publish.less │ │ ├── article-publish.vue │ │ ├── preview.less │ │ └── preview.vue │ └── work-flow │ │ ├── work-flow.less │ │ └── work-flow.vue ├── home │ ├── components │ │ ├── countUp.vue │ │ ├── dataSourcePie.vue │ │ ├── inforCard.vue │ │ ├── map.vue │ │ ├── mapDataTable.vue │ │ ├── serviceRequests.vue │ │ ├── styles │ │ │ ├── infor-card.less │ │ │ └── to-do-list-item.less │ │ ├── toDoListItem.vue │ │ ├── userFlow.vue │ │ └── visiteVolume.vue │ ├── home.less │ ├── home.vue │ └── map-data │ │ ├── china.json │ │ ├── get-city-value.js │ │ ├── get-geography-value.js │ │ └── get-style-json.js ├── loading.vue ├── main-components │ ├── breadcrumb-nav.vue │ ├── fullscreen.vue │ ├── lockscreen │ │ ├── components │ │ │ ├── locking-page.vue │ │ │ └── unlock.vue │ │ ├── lockscreen.vue │ │ └── styles │ │ │ └── unlock.less │ ├── message-tip.vue │ ├── shrinkable-menu │ │ ├── components │ │ │ ├── sidebarMenu.vue │ │ │ └── sidebarMenuShrink.vue │ │ ├── shrinkable-menu.vue │ │ └── styles │ │ │ └── menu.less │ ├── tags-page-opened.vue │ └── theme-switch │ │ ├── theme-switch.vue │ │ └── theme │ │ ├── g.css │ │ ├── r.css │ │ └── y.css ├── main.less ├── message │ ├── message.less │ └── message.vue ├── my-components │ ├── area-linkage │ │ ├── area-linkage.less │ │ ├── area-linkage.vue │ │ ├── components │ │ │ ├── al-cascader.vue │ │ │ └── al-selector.vue │ │ └── util │ │ │ └── index.js │ ├── count-to │ │ ├── CountTo.vue │ │ ├── count-to.less │ │ └── count-to.vue │ ├── draggable-list │ │ ├── draggable-list.less │ │ └── draggable-list.vue │ ├── file-upload │ │ ├── file-upload.vue │ │ └── upload.less │ ├── image-editor │ │ ├── cropper.min.css │ │ ├── image-editor.less │ │ └── image-editor.vue │ ├── markdown-editor │ │ ├── markdown-editor.less │ │ ├── markdown-editor.vue │ │ └── simplemde.min.css │ ├── scroll-bar │ │ ├── scroll-bar-page.vue │ │ └── vue-scroller-bars │ │ │ ├── index.js │ │ │ ├── scroll-bar.less │ │ │ └── scroll-bar.vue │ ├── split-pane │ │ ├── split-pane-page.vue │ │ └── split-pane │ │ │ ├── index.js │ │ │ ├── split-pane.less │ │ │ └── split-pane.vue │ └── text-editor │ │ ├── text-editor.vue │ │ └── tinymce │ │ ├── langs │ │ ├── en_GB.js │ │ └── zh_CN.GB2312.js │ │ ├── plugins │ │ ├── advlist │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── anchor │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── autolink │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── autoresize │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── autosave │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── bbcode │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── charmap │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── code │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── codesample │ │ │ ├── css │ │ │ │ └── prism.css │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── colorpicker │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── contextmenu │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── directionality │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── emoticons │ │ │ ├── img │ │ │ │ ├── smiley-cool.gif │ │ │ │ ├── smiley-cry.gif │ │ │ │ ├── smiley-embarassed.gif │ │ │ │ ├── smiley-foot-in-mouth.gif │ │ │ │ ├── smiley-frown.gif │ │ │ │ ├── smiley-innocent.gif │ │ │ │ ├── smiley-kiss.gif │ │ │ │ ├── smiley-laughing.gif │ │ │ │ ├── smiley-money-mouth.gif │ │ │ │ ├── smiley-sealed.gif │ │ │ │ ├── smiley-smile.gif │ │ │ │ ├── smiley-surprised.gif │ │ │ │ ├── smiley-tongue-out.gif │ │ │ │ ├── smiley-undecided.gif │ │ │ │ ├── smiley-wink.gif │ │ │ │ └── smiley-yell.gif │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── fullpage │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── fullscreen │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── help │ │ │ ├── img │ │ │ │ └── logo.png │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── hr │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── image │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── imagetools │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── importcss │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── insertdatetime │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── legacyoutput │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── link │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── lists │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── media │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── nonbreaking │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── noneditable │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── pagebreak │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── paste │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── preview │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── print │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── save │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── searchreplace │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── spellchecker │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── tabfocus │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── table │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── template │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── textcolor │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── textpattern │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── toc │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── visualblocks │ │ │ ├── css │ │ │ │ └── visualblocks.css │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── visualchars │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ └── wordcount │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── skins │ │ └── lightgray │ │ │ ├── content.inline.min.css │ │ │ ├── content.min.css │ │ │ ├── content.mobile.min.css │ │ │ ├── fonts │ │ │ ├── tinymce-mobile.woff │ │ │ ├── tinymce-small.eot │ │ │ ├── tinymce-small.svg │ │ │ ├── tinymce-small.ttf │ │ │ ├── tinymce-small.woff │ │ │ ├── tinymce.eot │ │ │ ├── tinymce.svg │ │ │ ├── tinymce.ttf │ │ │ └── tinymce.woff │ │ │ ├── img │ │ │ ├── anchor.gif │ │ │ ├── loader.gif │ │ │ ├── object.gif │ │ │ └── trans.gif │ │ │ ├── skin.min.css │ │ │ └── skin.mobile.min.css │ │ └── themes │ │ ├── inlite │ │ ├── index.js │ │ ├── theme.js │ │ └── theme.min.js │ │ └── modern │ │ ├── index.js │ │ ├── theme.js │ │ └── theme.min.js ├── other.vue └── tables │ ├── components │ ├── ExportExcel.vue │ ├── canEditTable.vue │ ├── dragableTable.vue │ ├── editable-table.less │ ├── multiPageTable.vue │ ├── table.less │ └── table_data.js │ ├── data │ ├── search.js │ ├── table2csv.js │ └── table2excel.js │ ├── dragable-table.vue │ ├── editable-table.vue │ ├── exportable-table.vue │ ├── searchable-table.vue │ └── table-to-image.vue ├── ecosystem.config.js ├── layouts ├── default.vue ├── error.vue └── full.vue ├── libs ├── md5.js ├── table2excel.js └── util.js ├── middleware ├── auth.js ├── redirect.js └── route.js ├── nuxt.config.js ├── package.json ├── pages ├── error-page │ ├── 403.vue │ ├── 404.vue │ ├── 500.vue │ └── error-page.vue ├── form │ ├── article-publish.vue │ ├── preview.vue │ └── work-flow.vue ├── index.vue ├── login.vue └── tables │ ├── dragable-table.vue │ └── editable-table.vue ├── plugins ├── axios.js ├── axios2.js ├── flexible.js └── iview.js ├── router └── router.js ├── screenshot ├── sc1.png ├── sc2.png ├── sc3.png └── sc4.png ├── server ├── config │ └── index.js ├── controller │ └── user.js ├── index.js ├── routers │ └── index.js └── src │ ├── styles │ ├── fonts │ │ ├── ionicons.eot │ │ ├── ionicons.svg │ │ ├── ionicons.ttf │ │ └── ionicons.woff │ └── iview.css │ └── theme │ ├── g.css │ ├── r.css │ └── y.css ├── static └── favicon.ico ├── store ├── index.js └── modules │ ├── app.js │ └── user.js ├── test ├── config.test.js ├── helpers │ └── create-nuxt.js └── login.test.js └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_size = 2 6 | indent_style = space 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | parser: 'babel-eslint', 4 | env: { 5 | browser: true, 6 | node: true 7 | }, 8 | extends: 'standard', 9 | // required to lint *.vue files 10 | plugins: [ 11 | 'html' 12 | ], 13 | // add your custom rules here 14 | rules: { 15 | 'space-before-function-paren': [ 16 | 2, 17 | { 18 | anonymous: 'always', 19 | named: 'never' 20 | } 21 | ] 22 | }, 23 | globals: {} 24 | } 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # dependencies 2 | node_modules 3 | 4 | # logs 5 | npm-debug.log 6 | 7 | # Nuxt build 8 | .nuxt 9 | 10 | # Nuxt generate 11 | dist 12 | 13 | .idea 14 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "type": "node", 6 | "request": "launch", 7 | "name": "npm run dev", 8 | "protocol": "inspector", 9 | // "program": "${workspaceRoot}/node_modules/nuxt/bin/nuxt", 10 | // "args": ["dev"], 11 | // "stopOnEntry": false, 12 | // "cwd": "${workspaceRoot}", 13 | // "sourceMaps": true, 14 | // "env": { 15 | // "NODE_ENV": "development", 16 | // "DEBUG": "nuxt:*,app" 17 | // }, 18 | "runtimeExecutable": "npm", 19 | "runtimeArgs": ["run-script", "dev-debug"] 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # nuxt-demo 2 | 3 | > 最近公司CRM项目采用 nuxt+ivew+iview-admin+koa2的组合模式开发,目前正在踩坑中,demo还不完整,后面会继续更新 4 | 5 | 6 | ### 相关页面效果 7 | 8 | 截图一: 账号和密码随意填写 9 | 10 | ![截图1](./screenshot/sc1.png) 11 | 12 | 截图二: 13 | 14 | ![截图2](./screenshot/sc2.png) 15 | 16 | 截图三: 17 | 18 | ![截图3](./screenshot/sc3.png) 19 | 20 | 刷新浏览器,重新从服务器端获取页面,看到是已经渲染过的html 21 | 22 | ![截图4](./screenshot/sc4.png) 23 | 24 | 25 | ### 项目地址 26 | 27 | ```bash 28 | git clone https://github.com/moedong/nuxt-iview.git 29 | ``` 30 | ### 安装 31 | ```bash 32 | npm install 33 | ``` 34 | 35 | ### 开发 36 | ```bash 37 | npm run dev 38 | 39 | // GO to http://127.0.0.1:3000 40 | ``` 41 | 42 | ### 测试环境 43 | ```bash 44 | // 需要pm2,如果没有安装的先安装 npm install -g pm2 45 | npm run publish:test 46 | ``` 47 | 48 | ### 生产环境 49 | ```bash 50 | // 需要pm2,如果没有安装的先安装 npm install -g pm2 51 | npm run publish:prod 52 | ``` 53 | 54 | 参考资料 55 | 56 | [Nuxt.js docs](https://github.com/nuxt/nuxt.js) 57 | 58 | [iview docs](https://www.iviewui.com/docs/guide/install) 59 | 60 | [iview-admin](https://github.com/iview/iview-admin) 61 | 62 | [koa-template](https://github.com/nuxt-community/koa-template) 63 | 64 | 65 | -------------------------------------------------------------------------------- /assets/css/common.less: -------------------------------------------------------------------------------- 1 | .margin-top-8{ 2 | margin-top: 8px; 3 | } 4 | .margin-top-10{ 5 | margin-top: 10px; 6 | } 7 | .margin-top-20{ 8 | margin-top: 20px; 9 | } 10 | .margin-left-10{ 11 | margin-left: 10px; 12 | } 13 | .margin-bottom-10{ 14 | margin-bottom: 10px; 15 | } 16 | .margin-bottom-100{ 17 | margin-bottom: 100px; 18 | } 19 | .margin-right-10{ 20 | margin-right: 10px; 21 | } 22 | .padding-left-6{ 23 | padding-left: 6px; 24 | } 25 | .padding-left-8{ 26 | padding-left: 5px; 27 | } 28 | .padding-left-10{ 29 | padding-left: 10px; 30 | } 31 | .padding-left-20{ 32 | padding-left: 20px; 33 | } 34 | .height-100{ 35 | height: 100%; 36 | } 37 | .height-120px{ 38 | height: 100px; 39 | } 40 | .height-200px{ 41 | height: 200px; 42 | } 43 | .height-492px{ 44 | height: 492px; 45 | } 46 | .height-460px{ 47 | height: 460px; 48 | } 49 | .line-gray{ 50 | height: 0; 51 | border-bottom: 2px solid #dcdcdc; 52 | } 53 | .notwrap{ 54 | word-break:keep-all; 55 | white-space:nowrap; 56 | overflow: hidden; 57 | text-overflow: ellipsis; 58 | } 59 | .padding-left-5{ 60 | padding-left: 10px; 61 | } 62 | [v-cloak]{ 63 | display: none; 64 | } -------------------------------------------------------------------------------- /assets/css/fonts/ionicons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/assets/css/fonts/ionicons.eot -------------------------------------------------------------------------------- /assets/css/fonts/ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/assets/css/fonts/ionicons.ttf -------------------------------------------------------------------------------- /assets/css/fonts/ionicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/assets/css/fonts/ionicons.woff -------------------------------------------------------------------------------- /assets/css/loading.less: -------------------------------------------------------------------------------- 1 | .demo-spin-icon-load{ 2 | animation: ani-demo-spin 1s linear infinite; 3 | } 4 | @keyframes ani-demo-spin { 5 | from { transform: rotate(0deg);} 6 | 50% { transform: rotate(180deg);} 7 | to { transform: rotate(360deg);} 8 | } -------------------------------------------------------------------------------- /assets/css/main.css: -------------------------------------------------------------------------------- 1 | html, 2 | body { 3 | background-color: #eaeaea; 4 | letter-spacing: 0.5px; 5 | height: 100vh; 6 | margin: 0; 7 | color: #464c5b; 8 | } 9 | 10 | * { 11 | font-size: 13px; 12 | font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif; 13 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 14 | } 15 | *, 16 | :after, 17 | :before { 18 | box-sizing: border-box; 19 | } 20 | 21 | a, 22 | a:hover, 23 | a:focus, 24 | a:visited {} 25 | 26 | article, 27 | aside, 28 | blockquote, 29 | body, 30 | button, 31 | code, 32 | dd, 33 | details, 34 | div, 35 | dl, 36 | dt, 37 | fieldset, 38 | figcaption, 39 | figure, 40 | footer, 41 | form, 42 | h1, 43 | h2, 44 | h3, 45 | h4, 46 | h5, 47 | h6, 48 | header, 49 | hgroup, 50 | hr, 51 | input, 52 | legend, 53 | li, 54 | menu, 55 | nav, 56 | ol, 57 | p, 58 | pre, 59 | section, 60 | td, 61 | textarea, 62 | th, 63 | ul { 64 | margin: 0; 65 | padding: 0; 66 | } 67 | -------------------------------------------------------------------------------- /assets/css/main.less: -------------------------------------------------------------------------------- 1 | html { 2 | font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; 3 | font-size: 100px; 4 | word-spacing: 1px; 5 | -ms-text-size-adjust: 100%; 6 | -webkit-text-size-adjust: 100%; 7 | -moz-osx-font-smoothing: grayscale; 8 | -webkit-font-smoothing: antialiased; 9 | box-sizing: border-box; 10 | } 11 | 12 | *, *:before, *:after { 13 | box-sizing: border-box; 14 | margin: 0; 15 | } 16 | -------------------------------------------------------------------------------- /assets/images/cropper-test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/assets/images/cropper-test.png -------------------------------------------------------------------------------- /assets/images/logo-min.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/assets/images/logo-min.jpg -------------------------------------------------------------------------------- /assets/images/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/assets/images/logo.jpg -------------------------------------------------------------------------------- /backpack.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | webpack: (config, options, webpack) => { 3 | config.entry.main = './server/index.js' 4 | return config 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /components/access/access-test.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | 15 | 18 | -------------------------------------------------------------------------------- /components/access/access.less: -------------------------------------------------------------------------------- 1 | .access{ 2 | &-user-con{ 3 | height: 200px; 4 | } 5 | &-current-user-con{ 6 | text-align: center; 7 | padding-top: 10px; 8 | img{ 9 | display: block; 10 | width: 100px; 11 | height: 100px; 12 | border: 2px solid #dddde2; 13 | border-radius: 50%; 14 | margin: 0px auto 10px; 15 | } 16 | p{ 17 | display: block; 18 | padding: 20px 0 0; 19 | b{ 20 | margin: 0 10px; 21 | color: #2d8cf0; 22 | } 23 | } 24 | } 25 | &-change-access-con{ 26 | &-row{ 27 | height: 200px; 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /components/access/access.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 44 | 45 | 74 | 75 | 78 | -------------------------------------------------------------------------------- /components/advanced-router/advanced-router.less: -------------------------------------------------------------------------------- 1 | .advanced-router{ 2 | height: 240px !important; 3 | &-tip-p{ 4 | padding: 10px 0; 5 | } 6 | } -------------------------------------------------------------------------------- /components/advanced-router/argument-page.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 20 | 21 | 95 | -------------------------------------------------------------------------------- /components/advanced-router/component/expandRow.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 37 | -------------------------------------------------------------------------------- /components/advanced-router/component/shopping-info.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 19 | 20 | 75 | -------------------------------------------------------------------------------- /components/advanced-router/mutative-router.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 22 | 23 | 93 | -------------------------------------------------------------------------------- /components/error-page/403.less: -------------------------------------------------------------------------------- 1 | @keyframes error403animation { 2 | 0% { 3 | transform: rotateZ(0deg); 4 | } 5 | 40% { 6 | transform: rotateZ(-20deg); 7 | } 8 | 45% { 9 | transform: rotateZ(-15deg); 10 | } 11 | 50% { 12 | transform: rotateZ(-20deg); 13 | } 14 | 55% { 15 | transform: rotateZ(-15deg); 16 | } 17 | 60% { 18 | transform: rotateZ(-20deg); 19 | } 20 | 100% { 21 | transform: rotateZ(0deg); 22 | } 23 | } 24 | .error403{ 25 | &-body-con{ 26 | width: 700px; 27 | height: 500px; 28 | position: absolute; 29 | left: 50%; 30 | top: 50%; 31 | transform: translate(-50%,-50%); 32 | &-title{ 33 | text-align: center; 34 | font-size: 240px; 35 | font-weight: 700; 36 | color: #2d8cf0; 37 | height: 260px; 38 | line-height: 260px; 39 | margin-top: 40px; 40 | .error403-0-span{ 41 | display: inline-block; 42 | position: relative; 43 | width: 170px; 44 | height: 170px; 45 | border-radius: 50%; 46 | border: 20px solid #ed3f14; 47 | color: #ed3f14; 48 | margin-right: 10px; 49 | i{ 50 | display: inline-block; 51 | font-size: 120px; 52 | position: absolute; 53 | left: 50%; 54 | top: 50%; 55 | transform: translate(-50%,-50%); 56 | } 57 | } 58 | .error403-key-span{ 59 | display: inline-block; 60 | position: relative; 61 | width: 100px; 62 | height: 190px; 63 | border-radius: 50%; 64 | margin-right: 10px; 65 | i{ 66 | display: inline-block; 67 | font-size: 190px; 68 | position: absolute; 69 | left: 20px; 70 | transform: translate(-50%,-60%); 71 | transform-origin: center bottom; 72 | animation: error403animation 2.8s ease 0s infinite; 73 | } 74 | } 75 | } 76 | &-message{ 77 | display: block; 78 | text-align: center; 79 | font-size: 30px; 80 | font-weight: 500; 81 | letter-spacing: 4px; 82 | color: #dddde2; 83 | } 84 | } 85 | &-btn-con{ 86 | text-align: center; 87 | padding: 20px 0; 88 | margin-bottom: 40px; 89 | } 90 | } -------------------------------------------------------------------------------- /components/error-page/403.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 19 | 20 | 35 | -------------------------------------------------------------------------------- /components/error-page/404.less: -------------------------------------------------------------------------------- 1 | @keyframes error404animation { 2 | 0% { 3 | transform: rotateZ(0deg); 4 | } 5 | 20% { 6 | transform: rotateZ(-60deg); 7 | } 8 | 40% { 9 | transform: rotateZ(-10deg); 10 | } 11 | 60% { 12 | transform: rotateZ(50deg); 13 | } 14 | 80% { 15 | transform: rotateZ(-20deg); 16 | } 17 | 100% { 18 | transform: rotateZ(0deg); 19 | } 20 | } 21 | .error404{ 22 | &-body-con{ 23 | width: 700px; 24 | height: 500px; 25 | position: absolute; 26 | left: 50%; 27 | top: 50%; 28 | transform: translate(-50%,-50%); 29 | &-title{ 30 | text-align: center; 31 | font-size: 240px; 32 | font-weight: 700; 33 | color: #2d8cf0; 34 | height: 260px; 35 | line-height: 260px; 36 | margin-top: 40px; 37 | span{ 38 | display: inline-block; 39 | color: #19be6b; 40 | font-size: 230px; 41 | animation: error404animation 3s ease 0s infinite alternate; 42 | } 43 | } 44 | &-message{ 45 | display: block; 46 | text-align: center; 47 | font-size: 30px; 48 | font-weight: 500; 49 | letter-spacing: 12px; 50 | color: #dddde2; 51 | } 52 | } 53 | &-btn-con{ 54 | text-align: center; 55 | padding: 20px 0; 56 | margin-bottom: 40px; 57 | } 58 | } -------------------------------------------------------------------------------- /components/error-page/404.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 19 | 20 | 35 | -------------------------------------------------------------------------------- /components/error-page/500.less: -------------------------------------------------------------------------------- 1 | @keyframes error500animation { 2 | 0% { 3 | transform: rotateZ(0deg); 4 | } 5 | 20% { 6 | transform: rotateZ(-10deg); 7 | } 8 | 40% { 9 | transform: rotateZ(5deg); 10 | } 11 | 60% { 12 | transform: rotateZ(-5deg); 13 | } 14 | 80% { 15 | transform: rotateZ(10deg); 16 | } 17 | 100% { 18 | transform: rotateZ(0deg); 19 | } 20 | } 21 | .error500{ 22 | &-body-con{ 23 | width: 700px; 24 | height: 500px; 25 | position: absolute; 26 | left: 50%; 27 | top: 50%; 28 | transform: translate(-50%,-50%); 29 | &-title{ 30 | text-align: center; 31 | font-size: 240px; 32 | font-weight: 700; 33 | color: #2d8cf0; 34 | height: 260px; 35 | line-height: 260px; 36 | margin-top: 40px; 37 | .error500-0-span{ 38 | display: inline-block; 39 | position: relative; 40 | width: 170px; 41 | height: 170px; 42 | border-radius: 50%; 43 | border: 20px solid #ed3f14; 44 | color: #ed3f14; 45 | margin-right: 10px; 46 | i{ 47 | display: inline-block; 48 | font-size: 120px; 49 | position: absolute; 50 | bottom: -10px; 51 | left: 10px; 52 | transform-origin: center bottom; 53 | animation: error500animation 3s ease 0s infinite alternate; 54 | } 55 | } 56 | } 57 | &-message{ 58 | display: block; 59 | text-align: center; 60 | font-size: 30px; 61 | font-weight: 500; 62 | letter-spacing: 4px; 63 | color: #dddde2; 64 | } 65 | } 66 | &-btn-con{ 67 | text-align: center; 68 | padding: 20px 0; 69 | margin-bottom: 40px; 70 | } 71 | } -------------------------------------------------------------------------------- /components/error-page/500.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 21 | 22 | 37 | -------------------------------------------------------------------------------- /components/error-page/error-page.less: -------------------------------------------------------------------------------- 1 | .error-page{ 2 | &-show{ 3 | width: 100%; 4 | height: 180px; 5 | transform: scale(0.4); 6 | } 7 | &-cover{ 8 | position: absolute; 9 | width: 100%; 10 | height: 100%; 11 | left: 0; 12 | top: 0; 13 | } 14 | &-intro-con{ 15 | height: 180px; 16 | p{ 17 | display: block; 18 | width: 100%; 19 | text-align: center; 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /components/form/article-publish/article-publish.less: -------------------------------------------------------------------------------- 1 | .article-link-con{ 2 | height: 32px; 3 | width: 100%; 4 | } 5 | .fixed-link-enter{ 6 | opacity: 0; 7 | } 8 | .fixed-link-enter-active, .fixed-link-leave-active { 9 | transition: opacity .3s 10 | } 11 | .fixed-link-enter-to{ 12 | opacity: 1 13 | } 14 | .openness-radio-con{ 15 | margin-left: 40px; 16 | padding-left: 10px; 17 | height: 130px; 18 | border-left: 1px dashed #ebe9f3; 19 | overflow: hidden; 20 | } 21 | .publish-time-picker-con{ 22 | margin-left: 40px; 23 | padding-left: 10px; 24 | height: 100px; 25 | border-left: 1px dashed #ebe9f3; 26 | overflow: hidden; 27 | } 28 | .openness-con-enter{ 29 | height: 0; 30 | } 31 | .openness-con-enter-active, .openness-con-leave-active{ 32 | transition: height .3s; 33 | } 34 | .openness-con-enter-to{ 35 | height: 130px; 36 | } 37 | .openness-con-leave{ 38 | height: 130px; 39 | } 40 | .openness-con-leave-to{ 41 | height: 0; 42 | } 43 | .publish-button-con{ 44 | border-top: 1px solid #f3eff1; 45 | padding-top: 14px; 46 | } 47 | .publish-button{ 48 | float: right; 49 | margin-left: 10px; 50 | } 51 | .publish-time-enter{ 52 | height: 0; 53 | } 54 | .publish-time-enter-active, .publish-time-leave-active{ 55 | transition: height .3s; 56 | } 57 | .publish-time-enter-to{ 58 | height: 100px; 59 | } 60 | .publish-time-leave{ 61 | height: 100px; 62 | } 63 | .publish-time-leave-to{ 64 | height: 0; 65 | } 66 | .classification-con{ 67 | height: 200px; 68 | margin-top: -16px; 69 | border-left: 1px solid #dddee1; 70 | border-right: 1px solid #dddee1; 71 | border-bottom: 1px solid #dddee1; 72 | border-radius: 0 0 3px 3px; 73 | padding: 10px; 74 | overflow: auto; 75 | } 76 | .add-new-tag-con{ 77 | margin-top: 20px; 78 | border-top: 1px dashed #dbdddf; 79 | padding: 20px 0; 80 | height: 60px; 81 | overflow: hidden; 82 | } 83 | .add-new-tag-enter{ 84 | height: 0; 85 | margin-top: 0; 86 | padding: 0px 0; 87 | } 88 | .add-new-tag-enter-active, .add-new-tag-leave-active{ 89 | transition: all .3s; 90 | } 91 | .add-new-tag-enter-to{ 92 | height: 60px; 93 | margin-top: 20px; 94 | padding: 20px 0; 95 | } 96 | .add-new-tag-leave{ 97 | height: 60px; 98 | margin-top: 20px; 99 | padding: 20px 0; 100 | } 101 | .add-new-tag-leave-to{ 102 | height: 0; 103 | margin-top: 0; 104 | padding: 0px 0; 105 | } -------------------------------------------------------------------------------- /components/form/article-publish/preview.less: -------------------------------------------------------------------------------- 1 | .preview{ 2 | &-main{ 3 | width: 100%; 4 | height: 100%; 5 | background: #d7e1ed; 6 | } 7 | &-header{ 8 | padding-right: 20px; 9 | height: 60px; 10 | background: #4a5161; 11 | text-align: right; 12 | ul{ 13 | display: inline-block !important; 14 | } 15 | } 16 | &-placeholderCon{ 17 | height: 200px; 18 | } 19 | &-placeholder{ 20 | height: 40px; 21 | margin-bottom: 10px; 22 | background: #9fafd4; 23 | border-radius: 3px; 24 | } 25 | &-tags-con{ 26 | padding: 5px 0; 27 | margin: 10px 0; 28 | } 29 | &-tip{ 30 | font-size: 12px; 31 | color: #c3c3c3; 32 | } 33 | &-content-con{ 34 | border-top: 1px solid #edeff1; 35 | border-bottom: 1px solid #edeff1; 36 | padding: 12px 0 20px; 37 | margin-bottom: 20px; 38 | } 39 | &-classifition-con{ 40 | padding: 5px 0; 41 | } 42 | &-classifition-item{ 43 | margin-right: 8px; 44 | } 45 | &-publish-time{ 46 | font-size: 12px; 47 | color: gray; 48 | margin-top: 5px; 49 | } 50 | } -------------------------------------------------------------------------------- /components/form/work-flow/work-flow.less: -------------------------------------------------------------------------------- 1 | .step{ 2 | &-header-con{ 3 | text-align: center; 4 | h3{ 5 | margin: 10px 0; 6 | } 7 | h5{ 8 | margin: 0 0 5px; 9 | } 10 | } 11 | &-content{ 12 | padding: 5px 20px 26px; 13 | margin-bottom: 20px; 14 | border-bottom: 1px solid #dbdddf; 15 | } 16 | &-form{ 17 | padding-bottom: 10px; 18 | border-bottom: 1px solid #dbdddf; 19 | margin-bottom: 20px; 20 | } 21 | } -------------------------------------------------------------------------------- /components/home/components/countUp.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 109 | -------------------------------------------------------------------------------- /components/home/components/dataSourcePie.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 59 | -------------------------------------------------------------------------------- /components/home/components/inforCard.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 30 | 31 | 60 | 61 | -------------------------------------------------------------------------------- /components/home/components/map.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /components/home/components/mapDataTable.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 32 | -------------------------------------------------------------------------------- /components/home/components/serviceRequests.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /components/home/components/styles/infor-card.less: -------------------------------------------------------------------------------- 1 | .infor-card-icon-con{ 2 | height: 100%; 3 | } 4 | .height-100{ 5 | height: 100%; 6 | } 7 | .infor-card-con{ 8 | height: 100px; 9 | } 10 | .infor-intro-text{ 11 | font-size:12px; 12 | font-weight:500; 13 | color:#C8C8C8; 14 | } -------------------------------------------------------------------------------- /components/home/components/styles/to-do-list-item.less: -------------------------------------------------------------------------------- 1 | .to-do-list-item-text{ 2 | word-break:keep-all; 3 | white-space:nowrap; 4 | overflow: hidden; 5 | text-overflow: ellipsis; 6 | font-weight: 500; 7 | cursor: pointer; 8 | height: 36px; 9 | 10 | .height-100{ 11 | height: 100%; 12 | } 13 | .infor-icon-row{ 14 | color: #c8c8c8; 15 | } 16 | } 17 | .hasDid{ 18 | text-decoration: line-through; 19 | color: gray; 20 | font-weight: 100; 21 | } -------------------------------------------------------------------------------- /components/home/components/toDoListItem.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 19 | 20 | -------------------------------------------------------------------------------- /components/home/components/userFlow.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 82 | -------------------------------------------------------------------------------- /components/home/components/visiteVolume.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 77 | -------------------------------------------------------------------------------- /components/home/home.less: -------------------------------------------------------------------------------- 1 | .user-infor{ 2 | height: 135px; 3 | } 4 | .avator-img{ 5 | display: block; 6 | width: 80%; 7 | max-width: 100px; 8 | height: auto; 9 | } 10 | .card-user-infor-name{ 11 | font-size: 2em; 12 | color: #2d8cf0; 13 | } 14 | .card-title{ 15 | color: #abafbd; 16 | } 17 | .made-child-con-middle{ 18 | height: 100%; 19 | } 20 | .to-do-list-con{ 21 | height: 145px; 22 | overflow: auto; 23 | } 24 | .to-do-item{ 25 | padding: 2px; 26 | } 27 | .infor-card-con{ 28 | height: 100px; 29 | } 30 | .infor-card-icon-con{ 31 | height: 100%; 32 | color: white; 33 | border-radius: 3px 0 0 3px; 34 | } 35 | .map-con{ 36 | height: 305px; 37 | } 38 | .map-incon{ 39 | height: 100%; 40 | } 41 | .data-source-row{ 42 | height: 200px; 43 | } 44 | .line-chart-con{ 45 | height: 150px; 46 | } 47 | -------------------------------------------------------------------------------- /components/home/map-data/get-city-value.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | {name: '海门', value: 45}, 3 | {name: '鄂尔多斯', value: 34}, 4 | {name: '招远', value: 47}, 5 | {name: '舟山', value: 22}, 6 | {name: '齐齐哈尔', value: 74}, 7 | {name: '广州', value: 138}, 8 | {name: '盐城', value: 15}, 9 | {name: '北京', value: 250}, 10 | {name: '深圳', value: 141}, 11 | {name: '赤峰', value: 16}, 12 | {name: '青岛', value: 89}, 13 | {name: '乳山', value: 18}, 14 | {name: '金昌', value: 34}, 15 | {name: '泉州', value: 21}, 16 | {name: '莱西', value: 66}, 17 | {name: '日照', value: 45}, 18 | {name: '胶南', value: 23}, 19 | {name: '南通', value: 54}, 20 | {name: '拉萨', value: 22}, 21 | {name: '云浮', value: 78}, 22 | {name: '梅州', value: 23}, 23 | {name: '文登', value: 78}, 24 | {name: '上海', value: 218} 25 | ]; 26 | -------------------------------------------------------------------------------- /components/home/map-data/get-geography-value.js: -------------------------------------------------------------------------------- 1 | export default { 2 | '海门': [121.15, 31.89], 3 | '鄂尔多斯': [109.781327, 39.608266], 4 | '招远': [120.38, 37.35], 5 | '舟山': [122.207216, 29.985295], 6 | '齐齐哈尔': [123.97, 47.33], 7 | '广州': [113.23, 23.16], 8 | '盐城': [120.13, 33.38], 9 | '赤峰': [118.87, 42.28], 10 | '深圳': [114.07, 22.62], 11 | '青岛': [120.33, 36.07], 12 | '北京': [116.46, 39.92], 13 | '乳山': [121.52, 36.89], 14 | '金昌': [102.188043, 38.520089], 15 | '泉州': [118.58, 24.93], 16 | '莱西': [120.53, 36.86], 17 | '日照': [119.46, 35.42], 18 | '胶南': [119.97, 35.88], 19 | '南通': [121.05, 32.08], 20 | '拉萨': [91.11, 29.97], 21 | '云浮': [112.02, 22.93], 22 | '梅州': [116.1, 24.55], 23 | '文登': [122.05, 37.2], 24 | '上海': [121.48, 31.22] 25 | }; 26 | -------------------------------------------------------------------------------- /components/home/map-data/get-style-json.js: -------------------------------------------------------------------------------- 1 | export default [{ 2 | 'featureType': 'water', 3 | 'elementType': 'all', 4 | 'stylers': { 5 | 'visibility': 'off' 6 | } 7 | }, { 8 | 'featureType': 'land', 9 | 'elementType': 'all', 10 | 'stylers': { 11 | 'color': 'red' 12 | } 13 | }, { 14 | 'featureType': 'railway', 15 | 'elementType': 'all', 16 | 'stylers': { 17 | 'visibility': 'off' 18 | } 19 | }, { 20 | 'featureType': 'highway', 21 | 'elementType': 'all', 22 | 'stylers': { 23 | 'color': '#fdfdfd' 24 | } 25 | }, { 26 | 'featureType': 'highway', 27 | 'elementType': 'labels', 28 | 'stylers': { 29 | 'visibility': 'off' 30 | } 31 | }, { 32 | 'featureType': 'arterial', 33 | 'elementType': 'geometry', 34 | 'stylers': { 35 | 'color': '#00ff00' 36 | } 37 | }, { 38 | 'featureType': 'arterial', 39 | 'elementType': 'geometry.fill', 40 | 'stylers': { 41 | 'color': '#fefefe' 42 | } 43 | }, { 44 | 'featureType': 'poi', 45 | 'elementType': 'all', 46 | 'stylers': { 47 | 'visibility': 'off' 48 | } 49 | }, { 50 | 'featureType': 'green', 51 | 'elementType': 'all', 52 | 'stylers': { 53 | 'visibility': 'off' 54 | } 55 | }, { 56 | 'featureType': 'subway', 57 | 'elementType': 'all', 58 | 'stylers': { 59 | 'visibility': 'off' 60 | } 61 | }, { 62 | 'featureType': 'manmade', 63 | 'elementType': 'all', 64 | 'stylers': { 65 | 'color': 'red' 66 | } 67 | }, { 68 | 'featureType': 'local', 69 | 'elementType': 'all', 70 | 'stylers': { 71 | 'color': 'red' 72 | } 73 | }, { 74 | 'featureType': 'arterial', 75 | 'elementType': 'labels', 76 | 'stylers': { 77 | 'visibility': 'off' 78 | } 79 | }, { 80 | 'featureType': 'boundary', 81 | 'elementType': 'all', 82 | 'stylers': { 83 | 'color': '#000' 84 | } 85 | }, { 86 | 'featureType': 'building', 87 | 'elementType': 'all', 88 | 'stylers': { 89 | 'color': '#d1d1d1' 90 | } 91 | }, { 92 | 'featureType': 'label', 93 | 'elementType': 'labels.text.fill', 94 | 'stylers': { 95 | 'color': '#999999' 96 | } 97 | }]; 98 | -------------------------------------------------------------------------------- /components/loading.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 22 | 23 | 37 | -------------------------------------------------------------------------------- /components/main-components/breadcrumb-nav.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 28 | 29 | -------------------------------------------------------------------------------- /components/main-components/fullscreen.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 75 | -------------------------------------------------------------------------------- /components/main-components/lockscreen/components/locking-page.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 45 | -------------------------------------------------------------------------------- /components/main-components/lockscreen/components/unlock.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 28 | 29 | 81 | -------------------------------------------------------------------------------- /components/main-components/lockscreen/lockscreen.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 66 | 67 | -------------------------------------------------------------------------------- /components/main-components/message-tip.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 31 | -------------------------------------------------------------------------------- /components/main-components/shrinkable-menu/components/sidebarMenu.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 28 | 29 | 65 | -------------------------------------------------------------------------------- /components/main-components/shrinkable-menu/components/sidebarMenuShrink.vue: -------------------------------------------------------------------------------- 1 | 27 | 28 | 58 | -------------------------------------------------------------------------------- /components/main-components/shrinkable-menu/shrinkable-menu.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 25 | 26 | 89 | -------------------------------------------------------------------------------- /components/main-components/shrinkable-menu/styles/menu.less: -------------------------------------------------------------------------------- 1 | .ivu-shrinkable-menu{ 2 | height: 100%; 3 | width: 100%; 4 | } -------------------------------------------------------------------------------- /components/my-components/area-linkage/area-linkage.less: -------------------------------------------------------------------------------- 1 | .area-linkage-page{ 2 | &-row1{ 3 | height: 366px !important; 4 | } 5 | &-row2{ 6 | height: 112px !important; 7 | } 8 | } -------------------------------------------------------------------------------- /components/my-components/area-linkage/util/index.js: -------------------------------------------------------------------------------- 1 | let util = {}; 2 | 3 | util.levelArr = [0, 1, 2, 3]; 4 | 5 | util.oneOf = (item, arr) => { 6 | return arr.some(i => { 7 | return i === item; 8 | }); 9 | }; 10 | util.getIndex = (list, name) => { 11 | for (const i in list) { 12 | if (list[i] === name) { 13 | return i; 14 | } 15 | } 16 | }; 17 | 18 | util.dataType = ['all', 'code', 'name']; 19 | 20 | util.checkLevel = val => { 21 | return util.oneOf(val, util.levelArr); 22 | }; 23 | 24 | export default util; 25 | -------------------------------------------------------------------------------- /components/my-components/count-to/count-to.less: -------------------------------------------------------------------------------- 1 | .countto-page-row{ 2 | height: 200px; 3 | } 4 | .count-to-con{ 5 | display: block; 6 | width: 100%; 7 | text-align: center; 8 | } 9 | .pre-code-show-con p{ 10 | height: 30px; 11 | margin: 0; 12 | } -------------------------------------------------------------------------------- /components/my-components/draggable-list/draggable-list.less: -------------------------------------------------------------------------------- 1 | .iview-admin-draggable-list{ 2 | height: 100%; 3 | } 4 | .iview-admin-draggable-list li{ 5 | padding: 9px; 6 | border: 1px solid #e7ebee; 7 | border-radius: 3px; 8 | margin-bottom: 5px; 9 | cursor: pointer; 10 | position: relative; 11 | transition: all .2s; 12 | } 13 | .iview-admin-draggable-list li:hover{ 14 | color: #87b4ee; 15 | border-color: #87b4ee; 16 | transition: all .2s; 17 | } 18 | .iview-admin-draggable-delete{ 19 | height: 100%; 20 | position: absolute; 21 | right: -8px; 22 | top: 0px; 23 | display: none; 24 | } 25 | .iview-admin-draggable-list li:hover .iview-admin-draggable-delete{ 26 | display: block; 27 | } 28 | .placeholder-style{ 29 | display: block !important; 30 | color: transparent; 31 | border-style: dashed !important; 32 | } 33 | .delte-item-animation{ 34 | opacity: 0; 35 | transition: all .2s; 36 | } 37 | .iview-admin-draggable-list{ 38 | overflow: auto 39 | } -------------------------------------------------------------------------------- /components/my-components/file-upload/upload.less: -------------------------------------------------------------------------------- 1 | .admin-upload-list{ 2 | display: inline-block; 3 | width: 60px; 4 | height: 60px; 5 | text-align: center; 6 | line-height: 60px; 7 | border: 1px solid transparent; 8 | border-radius: 4px; 9 | overflow: hidden; 10 | background: #fff; 11 | position: relative; 12 | box-shadow: 0 1px 1px rgba(0,0,0,.2); 13 | margin-right: 4px; 14 | } 15 | .admin-upload-list img{ 16 | width: 100%; 17 | height: 100%; 18 | } 19 | .admin-upload-list-cover{ 20 | display: none; 21 | position: absolute; 22 | top: 0; 23 | bottom: 0; 24 | left: 0; 25 | right: 0; 26 | background: rgba(0,0,0,.6); 27 | } 28 | .admin-upload-list:hover .admin-upload-list-cover{ 29 | display: block; 30 | } 31 | .admin-upload-list-cover i{ 32 | color: #fff; 33 | font-size: 20px; 34 | cursor: pointer; 35 | margin: 0 2px; 36 | } -------------------------------------------------------------------------------- /components/my-components/image-editor/image-editor.less: -------------------------------------------------------------------------------- 1 | .image-editor{ 2 | .cropper{ 3 | box-sizing: border-box; 4 | border: 1px solid #c3c3c3; 5 | width: 100%; 6 | height: 100%; 7 | img{ 8 | max-height: 100%; 9 | } 10 | } 11 | .fileinput{ 12 | display: none; 13 | } 14 | .filelabel{ 15 | display: block; 16 | padding: 6px 15px; 17 | background: #2d8cf0; 18 | display: inline-block; 19 | border: 1px solid #2d8cf0; 20 | border-radius: 4px; 21 | cursor: pointer; 22 | color: white; 23 | font-size: 12px; 24 | text-align: center; 25 | transition: all .2s; 26 | &:hover{ 27 | background: #5cadff; 28 | border: 1px solid #5cadff; 29 | transition: all .2s; 30 | } 31 | } 32 | &-con1{ 33 | height: 300px; 34 | &-preview-con{ 35 | width: 100% !important; 36 | height: 200px !important; 37 | border: 1px solid #c3c3c3; 38 | #preview1{ 39 | width: 100%; 40 | height: 100%; 41 | overflow: hidden; 42 | } 43 | } 44 | } 45 | &-con2{ 46 | height: 300px; 47 | p{ 48 | font-size: 14px; 49 | padding: 6px; 50 | border-bottom: 1px solid #c3c3c3; 51 | b{ 52 | display: inline-block; 53 | width: 80px; 54 | } 55 | } 56 | } 57 | &-con3{ 58 | height: 300px; 59 | .cropper3{ 60 | box-sizing: border-box; 61 | border: 1px solid #c3c3c3; 62 | width: 100%; 63 | height: 100%; 64 | img{ 65 | max-height: 100%; 66 | } 67 | } 68 | &-btn-box{ 69 | text-align: center; 70 | } 71 | .filelabel3{ 72 | width: 190px; 73 | box-sizing: border-box; 74 | } 75 | .crop3-btn-box{ 76 | text-align: center; 77 | } 78 | &-preview-con{ 79 | width: 100% !important; 80 | height: 300px !important; 81 | border: 1px solid #c3c3c3; 82 | #preview3{ 83 | width: 100%; 84 | height: 100%; 85 | overflow: hidden; 86 | } 87 | } 88 | } 89 | } -------------------------------------------------------------------------------- /components/my-components/markdown-editor/markdown-editor.less: -------------------------------------------------------------------------------- 1 | .CodeMirror, .CodeMirror-scroll { 2 | min-height: 600px !important; 3 | } 4 | .CodeMirror{ 5 | height: 400px; 6 | } -------------------------------------------------------------------------------- /components/my-components/markdown-editor/markdown-editor.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 20 | 21 | 34 | -------------------------------------------------------------------------------- /components/my-components/scroll-bar/scroll-bar-page.vue: -------------------------------------------------------------------------------- 1 | 83 | 84 | 93 | 94 | 103 | -------------------------------------------------------------------------------- /components/my-components/scroll-bar/vue-scroller-bars/index.js: -------------------------------------------------------------------------------- 1 | import scrollBar from './scroll-bar.vue'; 2 | 3 | export default scrollBar; 4 | -------------------------------------------------------------------------------- /components/my-components/scroll-bar/vue-scroller-bars/scroll-bar.less: -------------------------------------------------------------------------------- 1 | @prefix: ~'vue-scroller-bars'; 2 | 3 | .@{prefix}{ 4 | &-wraper{ 5 | height: 100%; 6 | width: 100%; 7 | overflow: hidden; 8 | position: relative; 9 | &.show-when-hover{ 10 | .@{prefix}-scroll{ 11 | opacity: 0; 12 | } 13 | .@{prefix}-place-holder{ 14 | opacity: 0; 15 | } 16 | } 17 | &.show-when-hover:hover{ 18 | .@{prefix}-scroll{ 19 | opacity: 1; 20 | } 21 | .@{prefix}-place-holder{ 22 | opacity: 1; 23 | } 24 | } 25 | } 26 | &-content{ 27 | position: absolute; 28 | min-width: 100%; 29 | left: 0; 30 | top: 0; 31 | } 32 | &-scroll{ 33 | position: relative; 34 | transition: opacity .3s ease .2s; 35 | background: rgba(250, 250, 250, 1); 36 | box-sizing: border-box; 37 | padding: 1px 2px; 38 | z-index: 9999999; 39 | &:hover &-bar{ 40 | background: rgb(100, 100, 100); 41 | } 42 | &-y{ 43 | width: 14px; 44 | height: 100%; 45 | float: right; 46 | border-left: 1px solid rgba(190, 190, 190, .5); 47 | border-right: 1px solid rgba(190, 190, 190, .5); 48 | &.scroll-y-cover{ 49 | position: absolute; 50 | right: 0px; 51 | top: 0px; 52 | } 53 | } 54 | &-x{ 55 | width: 100%; 56 | height: 14px; 57 | float: right; 58 | border-top: 1px solid rgba(190, 190, 190, .5); 59 | border-bottom: 1px solid rgba(190, 190, 190, .5); 60 | &.scroll-x-cover{ 61 | position: absolute; 62 | left: 0px; 63 | bottom: 0px; 64 | } 65 | } 66 | &-bar{ 67 | background: rgba(190, 190, 190, 1); 68 | position: absolute; 69 | border-radius: 4px; 70 | transition: background .2s ease; 71 | &-y{ 72 | width: ~'calc(100% - 4px)'; 73 | min-height: 14px; 74 | } 75 | &-x{ 76 | height: ~'calc(100% - 4px)'; 77 | min-width: 14px; 78 | } 79 | } 80 | } 81 | &-place-holder{ 82 | position: absolute; 83 | transition: opacity .3s ease .2s; 84 | right: 0px; 85 | bottom: 0px; 86 | width: 14px; 87 | height: 14px; 88 | background: rgba(250, 250, 250, 1); 89 | } 90 | } -------------------------------------------------------------------------------- /components/my-components/split-pane/split-pane/index.js: -------------------------------------------------------------------------------- 1 | import splitPane from './split-pane.vue'; 2 | 3 | export default splitPane; 4 | -------------------------------------------------------------------------------- /components/my-components/split-pane/split-pane/split-pane.less: -------------------------------------------------------------------------------- 1 | @prefix: ~"split-pane"; 2 | @container: ~"@{prefix}-container"; 3 | @trigger: ~"@{prefix}-trigger"; 4 | 5 | .@{prefix}{ 6 | position: relative; 7 | &-container{ 8 | height: 100%; 9 | width: 100%; 10 | } 11 | 12 | &-horizontal{ 13 | & > div > .@{trigger}{ 14 | transform: translateX(-50%); 15 | cursor: col-resize; 16 | width: 8px; 17 | height: 100%; 18 | margin: 0 1px; 19 | .trigger-middle-point{ 20 | width: 3px; 21 | height: 20px; 22 | p{ 23 | width: 100%; 24 | height: 1px; 25 | margin-top: 2px; 26 | } 27 | } 28 | } 29 | } 30 | 31 | &-vertical{ 32 | & > div > .@{trigger}{ 33 | transform: translateY(-50%); 34 | cursor: row-resize; 35 | height: 8px; 36 | width: 100%; 37 | margin: 1px 0; 38 | .trigger-middle-point{ 39 | width: 20px; 40 | height: 3px; 41 | p{ 42 | height: 100%; 43 | width: 1px; 44 | display: inline-block; 45 | margin-left: 2px; 46 | } 47 | } 48 | } 49 | } 50 | 51 | &-trigger{ 52 | position: absolute; 53 | z-index: 3; 54 | background: #F8F8F9; 55 | box-shadow: 0 0 4px 0 rgba(28,36,56,0.32); 56 | .trigger-middle-point{ 57 | position: absolute; 58 | top: 50%; 59 | left: 50%; 60 | transform: translate(-50%,-87%); 61 | line-height: 0px; 62 | p{ 63 | background: rgba(23,35,61,0.25); 64 | } 65 | } 66 | } 67 | 68 | &-left-area{ 69 | height: 100%; 70 | float: left; 71 | z-index: 2; 72 | // overflow: auto; 73 | } 74 | 75 | &-right-area{ 76 | height: 100%; 77 | float: left; 78 | z-index: 2; 79 | // overflow: auto; 80 | } 81 | 82 | &-top-area{ 83 | width: 100%; 84 | z-index: 2; 85 | // overflow: auto; 86 | } 87 | 88 | &-bottom-area{ 89 | width: 100%; 90 | z-index: 2; 91 | // overflow: auto; 92 | } 93 | } -------------------------------------------------------------------------------- /components/my-components/text-editor/text-editor.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 16 | 17 | 74 | 75 | 78 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/advlist/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "advlist" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/advlist') 5 | // ES2015: 6 | // import 'tinymce/plugins/advlist' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/anchor/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "anchor" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/anchor') 5 | // ES2015: 6 | // import 'tinymce/plugins/anchor' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/anchor/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('5', tinymce.util.Tools.resolve), g('1', ['5'], function (a) { return a('tinymce.PluginManager'); }), g('7', [], function () { var a = function (a) { return /^[A-Za-z][A-Za-z0-9\-:._]*$/.test(a); }, b = function (a) { var b = a.selection.getNode(), c = b.tagName === 'A' && a.dom.getAttrib(b, 'href') === ''; return c ? b.id || b.name : ''; }, c = function (a, b) { var c = a.selection.getNode(), d = c.tagName === 'A' && a.dom.getAttrib(c, 'href') === ''; d ? (c.removeAttribute('name'), c.id = b) : (a.focus(), a.selection.collapse(!0), a.execCommand('mceInsertContent', !1, a.dom.createHTML('a', {id: b}))); }; return {isValidId: a, getId: b, insert: c}; }), g('6', ['7'], function (a) { var b = function (b, c) { return a.isValidId(c) ? (a.insert(b, c), !1) : (b.windowManager.alert('Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.'), !0); }, c = function (c) { var d = a.getId(c); c.windowManager.open({title: 'Anchor', body: {type: 'textbox', name: 'id', size: 40, label: 'Id', value: d}, onsubmit: function (a) { var d = a.data.id; b(c, d) && a.preventDefault(); }}); }; return {open: c}; }), g('2', ['6'], function (a) { var b = function (b) { b.addCommand('mceAnchor', function () { a.open(b); }); }; return {register: b}; }), g('3', [], function () { var a = function (a) { return !a.attr('href') && (a.attr('id') || a.attr('name')) && !a.firstChild; }, b = function (b) { return function (c) { for (var d = 0; d < c.length; d++)a(c[d]) && c[d].attr('contenteditable', b); }; }, c = function (a) { a.on('PreInit', function () { a.parser.addNodeFilter('a', b('false')), a.serializer.addNodeFilter('a', b(null)); }); }; return {setup: c}; }), g('4', [], function () { var a = function (a) { a.addButton('anchor', {icon: 'anchor', tooltip: 'Anchor', cmd: 'mceAnchor', stateSelector: 'a:not([href])'}), a.addMenuItem('anchor', {icon: 'anchor', text: 'Anchor', context: 'insert', cmd: 'mceAnchor'}); }; return {register: a}; }), g('0', ['1', '2', '3', '4'], function (a, b, c, d) { return a.add('anchor', function (a) { c.setup(a), b.register(a), d.register(a); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/autolink/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "autolink" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/autolink') 5 | // ES2015: 6 | // import 'tinymce/plugins/autolink' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/autoresize/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "autoresize" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/autoresize') 5 | // ES2015: 6 | // import 'tinymce/plugins/autoresize' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/autosave/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "autosave" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/autosave') 5 | // ES2015: 6 | // import 'tinymce/plugins/autosave' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/bbcode/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "bbcode" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/bbcode') 5 | // ES2015: 6 | // import 'tinymce/plugins/bbcode' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/charmap/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "charmap" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/charmap') 5 | // ES2015: 6 | // import 'tinymce/plugins/charmap' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/code/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "code" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/code') 5 | // ES2015: 6 | // import 'tinymce/plugins/code' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/code/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('4', tinymce.util.Tools.resolve), g('1', ['4'], function (a) { return a('tinymce.PluginManager'); }), g('8', ['4'], function (a) { return a('tinymce.dom.DOMUtils'); }), g('6', ['8'], function (a) { var b = function (a) { return a.getParam('code_dialog_width', 600); }, c = function (b) { return b.getParam('code_dialog_height', Math.min(a.DOM.getViewPort().h - 200, 500)); }; return {getMinWidth: b, getMinHeight: c}; }), g('7', [], function () { var a = function (a, b) { a.focus(), a.undoManager.transact(function () { a.setContent(b); }), a.selection.setCursorLocation(), a.nodeChanged(); }, b = function (a) { return a.getContent({source_view: !0}); }; return {setContent: a, getContent: b}; }), g('5', ['6', '7'], function (a, b) { var c = function (c) { var d = a.getMinWidth(c), e = a.getMinHeight(c), f = c.windowManager.open({title: 'Source code', body: {type: 'textbox', name: 'code', multiline: !0, minWidth: d, minHeight: e, spellcheck: !1, style: 'direction: ltr; text-align: left'}, onSubmit: function (a) { b.setContent(c, a.data.code); }}); f.find('#code').value(b.getContent(c)); }; return {open: c}; }), g('2', ['5'], function (a) { var b = function (b) { b.addCommand('mceCodeEditor', function () { a.open(b); }); }; return {register: b}; }), g('3', ['5'], function (a) { var b = function (b) { b.addButton('code', {icon: 'code', tooltip: 'Source code', onclick: function () { a.open(b); }}), b.addMenuItem('code', {icon: 'code', text: 'Source code', onclick: function () { a.open(b); }}); }; return {register: b}; }), g('0', ['1', '2', '3'], function (a, b, c) { return a.add('code', function (a) { return b.register(a), c.register(a), {}; }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/codesample/css/prism.css: -------------------------------------------------------------------------------- 1 | /* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript */ 2 | /** 3 | * prism.js default theme for JavaScript, CSS and HTML 4 | * Based on dabblet (http://dabblet.com) 5 | * @author Lea Verou 6 | */ 7 | 8 | code[class*="language-"], 9 | pre[class*="language-"] { 10 | color: black; 11 | text-shadow: 0 1px white; 12 | font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; 13 | direction: ltr; 14 | text-align: left; 15 | white-space: pre; 16 | word-spacing: normal; 17 | word-break: normal; 18 | word-wrap: normal; 19 | line-height: 1.5; 20 | 21 | -moz-tab-size: 4; 22 | -o-tab-size: 4; 23 | tab-size: 4; 24 | 25 | -webkit-hyphens: none; 26 | -moz-hyphens: none; 27 | -ms-hyphens: none; 28 | hyphens: none; 29 | } 30 | 31 | pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection, 32 | code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection { 33 | text-shadow: none; 34 | background: #b3d4fc; 35 | } 36 | 37 | pre[class*="language-"]::selection, pre[class*="language-"] ::selection, 38 | code[class*="language-"]::selection, code[class*="language-"] ::selection { 39 | text-shadow: none; 40 | background: #b3d4fc; 41 | } 42 | 43 | @media print { 44 | code[class*="language-"], 45 | pre[class*="language-"] { 46 | text-shadow: none; 47 | } 48 | } 49 | 50 | /* Code blocks */ 51 | pre[class*="language-"] { 52 | padding: 1em; 53 | margin: .5em 0; 54 | overflow: auto; 55 | } 56 | 57 | :not(pre) > code[class*="language-"], 58 | pre[class*="language-"] { 59 | background: #f5f2f0; 60 | } 61 | 62 | /* Inline code */ 63 | :not(pre) > code[class*="language-"] { 64 | padding: .1em; 65 | border-radius: .3em; 66 | } 67 | 68 | .token.comment, 69 | .token.prolog, 70 | .token.doctype, 71 | .token.cdata { 72 | color: slategray; 73 | } 74 | 75 | .token.punctuation { 76 | color: #999; 77 | } 78 | 79 | .namespace { 80 | opacity: .7; 81 | } 82 | 83 | .token.property, 84 | .token.tag, 85 | .token.boolean, 86 | .token.number, 87 | .token.constant, 88 | .token.symbol, 89 | .token.deleted { 90 | color: #905; 91 | } 92 | 93 | .token.selector, 94 | .token.attr-name, 95 | .token.string, 96 | .token.char, 97 | .token.builtin, 98 | .token.inserted { 99 | color: #690; 100 | } 101 | 102 | .token.operator, 103 | .token.entity, 104 | .token.url, 105 | .language-css .token.string, 106 | .style .token.string { 107 | color: #a67f59; 108 | background: hsla(0, 0%, 100%, .5); 109 | } 110 | 111 | .token.atrule, 112 | .token.attr-value, 113 | .token.keyword { 114 | color: #07a; 115 | } 116 | 117 | .token.function { 118 | color: #DD4A68; 119 | } 120 | 121 | .token.regex, 122 | .token.important, 123 | .token.variable { 124 | color: #e90; 125 | } 126 | 127 | .token.important, 128 | .token.bold { 129 | font-weight: bold; 130 | } 131 | .token.italic { 132 | font-style: italic; 133 | } 134 | 135 | .token.entity { 136 | cursor: help; 137 | } 138 | 139 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/codesample/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "codesample" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/codesample') 5 | // ES2015: 6 | // import 'tinymce/plugins/codesample' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/colorpicker/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "colorpicker" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/colorpicker') 5 | // ES2015: 6 | // import 'tinymce/plugins/colorpicker' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/colorpicker/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('3', tinymce.util.Tools.resolve), g('1', ['3'], function (a) { return a('tinymce.PluginManager'); }), g('4', ['3'], function (a) { return a('tinymce.util.Color'); }), g('2', ['4'], function (a) { var b = function (a, b) { a.find('#preview')[0].getEl().style.background = b; }, c = function (c, d) { var e = new a(d), f = e.toRgb(); c.fromJSON({r: f.r, g: f.g, b: f.b, hex: e.toHex().substr(1)}), b(c, e.toHex()); }, d = function (a, d, e) { var f = a.windowManager.open({title: 'Color', items: {type: 'container', layout: 'flex', direction: 'row', align: 'stretch', padding: 5, spacing: 10, items: [{type: 'colorpicker', value: e, onchange: function () { var a = this.rgb(); f && (f.find('#r').value(a.r), f.find('#g').value(a.g), f.find('#b').value(a.b), f.find('#hex').value(this.value().substr(1)), b(f, this.value())); }}, {type: 'form', padding: 0, labelGap: 5, defaults: {type: 'textbox', size: 7, value: '0', flex: 1, spellcheck: !1, onchange: function () { var a, b, d = f.find('colorpicker')[0]; return a = this.name(), b = this.value(), a === 'hex' ? (b = '#' + b, c(f, b), void d.value(b)) : (b = {r: f.find('#r').value(), g: f.find('#g').value(), b: f.find('#b').value()}, d.value(b), void c(f, b)); }}, items: [{name: 'r', label: 'R', autofocus: 1}, {name: 'g', label: 'G'}, {name: 'b', label: 'B'}, {name: 'hex', label: '#', value: '000000'}, {name: 'preview', type: 'container', border: 1}]}]}, onSubmit: function () { d('#' + f.toJSON().hex); }}); c(f, e); }; return {open: d}; }), g('0', ['1', '2'], function (a, b) { return a.add('colorpicker', function (a) { a.settings.color_picker_callback || (a.settings.color_picker_callback = function (c, d) { b.open(a, c, d); }); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/contextmenu/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "contextmenu" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/contextmenu') 5 | // ES2015: 6 | // import 'tinymce/plugins/contextmenu' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/directionality/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "directionality" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/directionality') 5 | // ES2015: 6 | // import 'tinymce/plugins/directionality' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/directionality/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('4', tinymce.util.Tools.resolve), g('1', ['4'], function (a) { return a('tinymce.PluginManager'); }), g('6', ['4'], function (a) { return a('tinymce.util.Tools'); }), g('5', ['6'], function (a) { var b = function (b, c) { var d, e = b.dom, f = b.selection.getSelectedBlocks(); f.length && (d = e.getAttrib(f[0], 'dir'), a.each(f, function (a) { e.getParent(a.parentNode, '*[dir="' + c + '"]', e.getRoot()) || e.setAttrib(a, 'dir', d !== c ? c : null); }), b.nodeChanged()); }; return {setDir: b}; }), g('2', ['5'], function (a) { var b = function (b) { b.addCommand('mceDirectionLTR', function () { a.setDir(b, 'ltr'); }), b.addCommand('mceDirectionRTL', function () { a.setDir(b, 'rtl'); }); }; return {register: b}; }), g('3', ['6'], function (a) { var b = function (b) { var c = []; return a.each('h1 h2 h3 h4 h5 h6 div p'.split(' '), function (a) { c.push(a + '[dir=' + b + ']'); }), c.join(','); }, c = function (a) { a.addButton('ltr', {title: 'Left to right', cmd: 'mceDirectionLTR', stateSelector: b('ltr')}), a.addButton('rtl', {title: 'Right to left', cmd: 'mceDirectionRTL', stateSelector: b('rtl')}); }; return {register: c}; }), g('0', ['1', '2', '3'], function (a, b, c) { return a.add('directionality', function (a) { b.register(a), c.register(a); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-cool.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-cool.gif -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-cry.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-cry.gif -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-embarassed.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-embarassed.gif -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-foot-in-mouth.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-foot-in-mouth.gif -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-frown.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-frown.gif -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-innocent.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-innocent.gif -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-kiss.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-kiss.gif -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-laughing.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-laughing.gif -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-money-mouth.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-money-mouth.gif -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-sealed.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-sealed.gif -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-smile.gif -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-surprised.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-surprised.gif -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-tongue-out.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-tongue-out.gif -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-undecided.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-undecided.gif -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-wink.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-wink.gif -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-yell.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/components/my-components/text-editor/tinymce/plugins/emoticons/img/smiley-yell.gif -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/emoticons/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "emoticons" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/emoticons') 5 | // ES2015: 6 | // import 'tinymce/plugins/emoticons' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/emoticons/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('3', tinymce.util.Tools.resolve), g('1', ['3'], function (a) { return a('tinymce.PluginManager'); }), g('5', ['3'], function (a) { return a('tinymce.util.Tools'); }), g('4', ['5'], function (a) { var b = [['cool', 'cry', 'embarassed', 'foot-in-mouth'], ['frown', 'innocent', 'kiss', 'laughing'], ['money-mouth', 'sealed', 'smile', 'surprised'], ['tongue-out', 'undecided', 'wink', 'yell']], c = function (c) { var d; return d = '', a.each(b, function (b) { d += '', a.each(b, function (a) { var b = c + '/img/smiley-' + a + '.gif'; d += ''; }), d += ''; }), d += '
'; }; return {getHtml: c}; }), g('2', ['4'], function (a) { var b = function (a, b, c) { a.insertContent(a.dom.createHTML('img', {src: b, alt: c})); }, c = function (c, d) { var e = a.getHtml(d); c.addButton('emoticons', {type: 'panelbutton', panel: {role: 'application', autohide: !0, html: e, onclick: function (a) { var d = c.dom.getParent(a.target, 'a'); d && (b(c, d.getAttribute('data-mce-url'), d.getAttribute('data-mce-alt')), this.hide()); }}, tooltip: 'Emoticons'}); }; return {register: c}; }), g('0', ['1', '2'], function (a, b) { return a.add('emoticons', function (a, c) { b.register(a, c); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/fullpage/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "fullpage" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/fullpage') 5 | // ES2015: 6 | // import 'tinymce/plugins/fullpage' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/fullscreen/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "fullscreen" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/fullscreen') 5 | // ES2015: 6 | // import 'tinymce/plugins/fullscreen' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/help/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/components/my-components/text-editor/tinymce/plugins/help/img/logo.png -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/help/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "help" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/help') 5 | // ES2015: 6 | // import 'tinymce/plugins/help' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/hr/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "hr" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/hr') 5 | // ES2015: 6 | // import 'tinymce/plugins/hr' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/hr/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('4', tinymce.util.Tools.resolve), g('1', ['4'], function (a) { return a('tinymce.PluginManager'); }), g('2', [], function () { var a = function (a) { a.addCommand('InsertHorizontalRule', function () { a.execCommand('mceInsertContent', !1, '
'); }); }; return {register: a}; }), g('3', [], function () { var a = function (a) { a.addButton('hr', {icon: 'hr', tooltip: 'Horizontal line', cmd: 'InsertHorizontalRule'}), a.addMenuItem('hr', {icon: 'hr', text: 'Horizontal line', cmd: 'InsertHorizontalRule', context: 'insert'}); }; return {register: a}; }), g('0', ['1', '2', '3'], function (a, b, c) { return a.add('hr', function (a) { b.register(a), c.register(a); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/image/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "image" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/image') 5 | // ES2015: 6 | // import 'tinymce/plugins/image' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/imagetools/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "imagetools" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/imagetools') 5 | // ES2015: 6 | // import 'tinymce/plugins/imagetools' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/importcss/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "importcss" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/importcss') 5 | // ES2015: 6 | // import 'tinymce/plugins/importcss' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/insertdatetime/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "insertdatetime" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/insertdatetime') 5 | // ES2015: 6 | // import 'tinymce/plugins/insertdatetime' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/legacyoutput/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "legacyoutput" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/legacyoutput') 5 | // ES2015: 6 | // import 'tinymce/plugins/legacyoutput' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/link/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "link" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/link') 5 | // ES2015: 6 | // import 'tinymce/plugins/link' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/lists/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "lists" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/lists') 5 | // ES2015: 6 | // import 'tinymce/plugins/lists' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/media/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "media" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/media') 5 | // ES2015: 6 | // import 'tinymce/plugins/media' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/nonbreaking/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "nonbreaking" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/nonbreaking') 5 | // ES2015: 6 | // import 'tinymce/plugins/nonbreaking' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/nonbreaking/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('5', tinymce.util.Tools.resolve), g('1', ['5'], function (a) { return a('tinymce.PluginManager'); }), g('6', [], function () { var a = function (a, b) { for (var c = '', d = 0; d < b; d++)c += a; return c; }, b = function (a) { return !!a.plugins.visualchars && a.plugins.visualchars.isEnabled(); }, c = function (c, d) { var e = b(c) ? ' ' : ' '; c.insertContent(a(e, d)), c.dom.setAttrib(c.dom.select('span.mce-nbsp'), 'data-mce-bogus', '1'); }; return {insertNbsp: c}; }), g('2', ['6'], function (a) { var b = function (b) { b.addCommand('mceNonBreaking', function () { a.insertNbsp(b, 1); }); }; return {register: b}; }), g('7', [], function () { var a = function (a) { var b = a.getParam('nonbreaking_force_tab', 0); return typeof tabs === 'boolean' ? b === !0 ? 3 : 0 : b; }; return {getKeyboardSpaces: a}; }), g('3', ['7', '6'], function (a, b) { var c = function (c) { var d = a.getKeyboardSpaces(c); d > 0 && c.on('keydown', function (a) { if (a.keyCode === 9) { if (a.shiftKey) return; a.preventDefault(), b.insertNbsp(c, d); } }); }; return {setup: c}; }), g('4', [], function () { var a = function (a) { a.addButton('nonbreaking', {title: 'Nonbreaking space', cmd: 'mceNonBreaking'}), a.addMenuItem('nonbreaking', {text: 'Nonbreaking space', cmd: 'mceNonBreaking', context: 'insert'}); }; return {register: a}; }), g('0', ['1', '2', '3', '4'], function (a, b, c, d) { return a.add('nonbreaking', function (a) { b.register(a), d.register(a), c.setup(a); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/noneditable/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "noneditable" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/noneditable') 5 | // ES2015: 6 | // import 'tinymce/plugins/noneditable' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/noneditable/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('3', tinymce.util.Tools.resolve), g('1', ['3'], function (a) { return a('tinymce.PluginManager'); }), g('4', ['3'], function (a) { return a('tinymce.util.Tools'); }), g('5', [], function () { var a = function (a) { return a.getParam('noneditable_noneditable_class', 'mceNonEditable'); }, b = function (a) { return a.getParam('noneditable_editable_class', 'mceEditable'); }, c = function (a) { var b = a.getParam('noneditable_regexp', []); return b && b.constructor === RegExp ? [b] : b; }; return {getNonEditableClass: a, getEditableClass: b, getNonEditableRegExps: c}; }), g('2', ['4', '5'], function (a, b) { var c = function (a) { return function (b) { return (' ' + b.attr('class') + ' ').indexOf(a) !== -1; }; }, d = function (a, b, c) { return function (d) { var e = arguments, f = e[e.length - 2], g = f > 0 ? b.charAt(f - 1) : ''; if (g === '"') return d; if (g === '>') { var h = b.lastIndexOf('<', f); if (h !== -1) { var i = b.substring(h, f); if (i.indexOf('contenteditable="false"') !== -1) return d; } } return '' + a.dom.encode(typeof e[1] === 'string' ? e[1] : e[0]) + ''; }; }, e = function (a, c, e) { var f = c.length, g = e.content; if (e.format !== 'raw') { for (;f--;)g = g.replace(c[f], d(a, g, b.getNonEditableClass(a))); e.content = g; } }, f = function (d) { var f, g, h = 'contenteditable'; f = ' ' + a.trim(b.getEditableClass(d)) + ' ', g = ' ' + a.trim(b.getNonEditableClass(d)) + ' '; var i = c(f), j = c(g), k = b.getNonEditableRegExps(d); d.on('PreInit', function () { k.length > 0 && d.on('BeforeSetContent', function (a) { e(d, k, a); }), d.parser.addAttributeFilter('class', function (a) { for (var b, c = a.length; c--;)b = a[c], i(b) ? b.attr(h, 'true') : j(b) && b.attr(h, 'false'); }), d.serializer.addAttributeFilter(h, function (a) { for (var b, c = a.length; c--;)b = a[c], (i(b) || j(b)) && (k.length > 0 && b.attr('data-mce-content') ? (b.name = '#text', b.type = 3, b.raw = !0, b.value = b.attr('data-mce-content')) : b.attr(h, null)); }); }); }; return {setup: f}; }), g('0', ['1', '2'], function (a, b) { return a.add('noneditable', function (a) { b.setup(a); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/pagebreak/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "pagebreak" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/pagebreak') 5 | // ES2015: 6 | // import 'tinymce/plugins/pagebreak' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/pagebreak/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('7', tinymce.util.Tools.resolve), g('1', ['7'], function (a) { return a('tinymce.Env'); }), g('2', ['7'], function (a) { return a('tinymce.PluginManager'); }), g('8', [], function () { var a = function (a) { return a.getParam('pagebreak_separator', ''); }, b = function (a) { return a.getParam('pagebreak_split_block', !1); }; return {getSeparatorHtml: a, shouldSplitBlock: b}; }), g('4', ['1', '8'], function (a, b) { var c = function () { return 'mce-pagebreak'; }, d = function () { return ''; }, e = function (a) { var c = b.getSeparatorHtml(a), e = new RegExp(c.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g, function (a) { return '\\' + a; }), 'gi'); a.on('BeforeSetContent', function (a) { a.content = a.content.replace(e, d()); }), a.on('PreInit', function () { a.serializer.addNodeFilter('img', function (d) { for (var e, f, g = d.length; g--;) if (e = d[g], f = e.attr('class'), f && f.indexOf('mce-pagebreak') !== -1) { var h = e.parent; if (a.schema.getBlockElements()[h.name] && b.shouldSplitBlock(a)) { h.type = 3, h.value = c, h.raw = !0, e.remove(); continue; }e.type = 3, e.value = c, e.raw = !0; } }); }); }; return {setup: e, getPlaceholderHtml: d, getPageBreakClass: c}; }), g('3', ['4'], function (a) { var b = function (b) { b.addCommand('mcePageBreak', function () { b.settings.pagebreak_split_block ? b.insertContent('

' + a.getPlaceholderHtml() + '

') : b.insertContent(a.getPlaceholderHtml()); }); }; return {register: b}; }), g('5', ['4'], function (a) { var b = function (b) { b.on('ResolveName', function (c) { c.target.nodeName === 'IMG' && b.dom.hasClass(c.target, a.getPageBreakClass()) && (c.name = 'pagebreak'); }); }; return {setup: b}; }), g('6', [], function () { var a = function (a) { a.addButton('pagebreak', {title: 'Page break', cmd: 'mcePageBreak'}), a.addMenuItem('pagebreak', {text: 'Page break', icon: 'pagebreak', cmd: 'mcePageBreak', context: 'insert'}); }; return {register: a}; }), g('0', ['1', '2', '3', '4', '5', '6'], function (a, b, c, d, e, f) { return b.add('pagebreak', function (a) { c.register(a), f.register(a), d.setup(a), e.setup(a); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/paste/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "paste" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/paste') 5 | // ES2015: 6 | // import 'tinymce/plugins/paste' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/preview/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "preview" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/preview') 5 | // ES2015: 6 | // import 'tinymce/plugins/preview' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/preview/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('4', tinymce.util.Tools.resolve), g('1', ['4'], function (a) { return a('tinymce.PluginManager'); }), g('6', ['4'], function (a) { return a('tinymce.Env'); }), g('7', ['4'], function (a) { return a('tinymce.util.Tools'); }), g('8', [], function () { var a = function (a) { return parseInt(a.getParam('plugin_preview_width', '650'), 10); }, b = function (a) { return parseInt(a.getParam('plugin_preview_height', '500'), 10); }; return {getPreviewDialogWidth: a, getPreviewDialogHeight: b}; }), g('9', ['7'], function (a) { var b = function (b, c, d) { var e, f = '', g = b.dom.encode; f += '', a.each(b.contentCSS, function (a) { f += ''; }); var h = b.settings.body_id || 'tinymce'; h.indexOf('=') !== -1 && (h = b.getParam('body_id', '', 'hash'), h = h[b.id] || h); var i = b.settings.body_class || ''; i.indexOf('=') !== -1 && (i = b.getParam('body_class', '', 'hash'), i = i[b.id] || ''); var j = ' ', k = b.settings.directionality ? ' dir="' + b.settings.directionality + '"' : ''; if (e = '' + f + '' + b.getContent() + j + '', d)c.src = 'data:text/html;charset=utf-8,' + encodeURIComponent(e); else { var l = c.contentWindow.document; l.open(), l.write(e), l.close(); } }; return {injectIframeContent: b}; }), g('5', ['6', '7', '8', '9'], function (a, b, c, d) { var e = function (b) { var e = !a.ie, f = '', g = c.getPreviewDialogWidth(b), h = c.getPreviewDialogHeight(b); b.windowManager.open({title: 'Preview', width: g, height: h, html: f, buttons: {text: 'Close', onclick: function (a) { a.control.parent().parent().close(); }}, onPostRender: function (a) { var c = a.control.getEl('body').firstChild; d.injectIframeContent(b, c, e); }}); }; return {open: e}; }), g('2', ['5'], function (a) { var b = function (b) { b.addCommand('mcePreview', function () { a.open(b); }); }; return {register: b}; }), g('3', [], function () { var a = function (a) { a.addButton('preview', {title: 'Preview', cmd: 'mcePreview'}), a.addMenuItem('preview', {text: 'Preview', cmd: 'mcePreview', context: 'view'}); }; return {register: a}; }), g('0', ['1', '2', '3'], function (a, b, c) { return a.add('preview', function (a) { b.register(a), c.register(a); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/print/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "print" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/print') 5 | // ES2015: 6 | // import 'tinymce/plugins/print' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/print/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('4', tinymce.util.Tools.resolve), g('1', ['4'], function (a) { return a('tinymce.PluginManager'); }), g('2', [], function () { var a = function (a) { a.addCommand('mcePrint', function () { a.getWin().print(); }); }; return {register: a}; }), g('3', [], function () { var a = function (a) { a.addButton('print', {title: 'Print', cmd: 'mcePrint'}), a.addMenuItem('print', {text: 'Print', cmd: 'mcePrint', icon: 'print'}); }; return {register: a}; }), g('0', ['1', '2', '3'], function (a, b, c) { return a.add('print', function (a) { b.register(a), c.register(a), a.addShortcut('Meta+P', '', 'mcePrint'); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/save/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "save" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/save') 5 | // ES2015: 6 | // import 'tinymce/plugins/save' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/save/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('4', tinymce.util.Tools.resolve), g('1', ['4'], function (a) { return a('tinymce.PluginManager'); }), g('7', ['4'], function (a) { return a('tinymce.dom.DOMUtils'); }), g('8', ['4'], function (a) { return a('tinymce.util.Tools'); }), g('6', [], function () { var a = function (a) { return a.getParam('save_enablewhendirty', !0); }, b = function (a) { return !!a.getParam('save_onsavecallback'); }, c = function (a) { return !!a.getParam('save_oncancelcallback'); }; return {enableWhenDirty: a, hasOnSaveCallback: b, hasOnCancelCallback: c}; }), g('5', ['7', '8', '6'], function (a, b, c) { var d = function (a, b) { a.notificationManager.open({text: a.translate(b), type: 'error'}); }, e = function (b) { var e; if (e = a.DOM.getParent(b.id, 'form'), !c.enableWhenDirty(b) || b.isDirty()) return b.save(), c.hasOnSaveCallback(b) ? (b.execCallback('save_onsavecallback', b), void b.nodeChanged()) : void (e ? (b.setDirty(!1), e.onsubmit && !e.onsubmit() || (typeof e.submit === 'function' ? e.submit() : d(b, 'Error: Form submit field collision.')), b.nodeChanged()) : d(b, 'Error: No form element found.')); }, f = function (a) { var d = b.trim(a.startContent); return c.hasOnCancelCallback(a) ? void a.execCallback('save_oncancelcallback', a) : (a.setContent(d), a.undoManager.clear(), void a.nodeChanged()); }; return {save: e, cancel: f}; }), g('2', ['5'], function (a) { var b = function (b) { b.addCommand('mceSave', function () { a.save(b); }), b.addCommand('mceCancel', function () { a.cancel(b); }); }; return {register: b}; }), g('3', ['6'], function (a) { var b = function (b) { return function (c) { var d = c.control; b.on('nodeChange dirty', function () { d.disabled(a.enableWhenDirty(b) && !b.isDirty()); }); }; }, c = function (a) { a.addButton('save', {icon: 'save', text: 'Save', cmd: 'mceSave', disabled: !0, onPostRender: b(a)}), a.addButton('cancel', {text: 'Cancel', icon: !1, cmd: 'mceCancel', disabled: !0, onPostRender: b(a)}), a.addShortcut('Meta+S', '', 'mceSave'); }; return {register: c}; }), g('0', ['1', '2', '3'], function (a, b, c) { return a.add('save', function (a) { c.register(a), b.register(a); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/searchreplace/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "searchreplace" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/searchreplace') 5 | // ES2015: 6 | // import 'tinymce/plugins/searchreplace' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/spellchecker/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "spellchecker" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/spellchecker') 5 | // ES2015: 6 | // import 'tinymce/plugins/spellchecker' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/tabfocus/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "tabfocus" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/tabfocus') 5 | // ES2015: 6 | // import 'tinymce/plugins/tabfocus' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/tabfocus/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('3', tinymce.util.Tools.resolve), g('1', ['3'], function (a) { return a('tinymce.PluginManager'); }), h('4', window), g('5', ['3'], function (a) { return a('tinymce.dom.DOMUtils'); }), g('6', ['3'], function (a) { return a('tinymce.EditorManager'); }), g('7', ['3'], function (a) { return a('tinymce.Env'); }), g('8', ['3'], function (a) { return a('tinymce.util.Delay'); }), g('9', ['3'], function (a) { return a('tinymce.util.Tools'); }), g('a', ['3'], function (a) { return a('tinymce.util.VK'); }), g('b', [], function () { var a = function (a) { return a.getParam('tabfocus_elements', ':prev,:next'); }, b = function (b) { return b.getParam('tab_focus', a(b)); }; return {getTabFocus: b}; }), g('2', ['4', '5', '6', '7', '8', '9', 'a', 'b'], function (a, b, c, d, e, f, g, h) { var i = b.DOM, j = function (a) { a.keyCode !== g.TAB || a.ctrlKey || a.altKey || a.metaKey || a.preventDefault(); }, k = function (b) { function k (j) { function k (a) { function d (a) { return a.nodeName === 'BODY' || a.type !== 'hidden' && a.style.display !== 'none' && a.style.visibility !== 'hidden' && d(a.parentNode); } function e (a) { return /INPUT|TEXTAREA|BUTTON/.test(a.tagName) && c.get(j.id) && a.tabIndex !== -1 && d(a); } if (m = i.select(':input:enabled,*[tabindex]:not(iframe)'), f.each(m, function (a, c) { if (a.id === b.id) return l = c, !1; }), a > 0) { for (o = l + 1; o < m.length; o++) if (e(m[o])) return m[o]; } else for (o = l - 1; o >= 0; o--) if (e(m[o])) return m[o]; return null; } var l, m, n, o; if (!(j.keyCode !== g.TAB || j.ctrlKey || j.altKey || j.metaKey || j.isDefaultPrevented()) && (n = f.explode(h.getTabFocus(b)), n.length === 1 && (n[1] = n[0], n[0] = ':prev'), m = j.shiftKey ? n[0] === ':prev' ? k(-1) : i.get(n[0]) : n[1] === ':next' ? k(1) : i.get(n[1]))) { var p = c.get(m.id || m.name); m.id && p ? p.focus() : e.setTimeout(function () { d.webkit || a.focus(), m.focus(); }, 10), j.preventDefault(); } }b.on('init', function () { b.inline && i.setAttrib(b.getBody(), 'tabIndex', null), b.on('keyup', j), d.gecko ? b.on('keypress keydown', k) : b.on('keydown', k); }); }; return {setup: k}; }), g('0', ['1', '2'], function (a, b) { return a.add('tabfocus', function (a) { b.setup(a); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/table/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "table" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/table') 5 | // ES2015: 6 | // import 'tinymce/plugins/table' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/template/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "template" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/template') 5 | // ES2015: 6 | // import 'tinymce/plugins/template' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/textcolor/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "textcolor" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/textcolor') 5 | // ES2015: 6 | // import 'tinymce/plugins/textcolor' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/textpattern/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "textpattern" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/textpattern') 5 | // ES2015: 6 | // import 'tinymce/plugins/textpattern' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/toc/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "toc" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/toc') 5 | // ES2015: 6 | // import 'tinymce/plugins/toc' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/visualblocks/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "visualblocks" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/visualblocks') 5 | // ES2015: 6 | // import 'tinymce/plugins/visualblocks' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/visualblocks/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; g('1', [], function () { var a = function (b) { var c = b, d = function () { return c; }, e = function (a) { c = a; }, f = function () { return a(d()); }; return {get: d, set: e, clone: f}; }; return a; }), h('6', tinymce.util.Tools.resolve), g('2', ['6'], function (a) { return a('tinymce.PluginManager'); }), g('9', [], function () { var a = function (a, b) { a.fire('VisualBlocks', {state: b}); }; return {fireVisualBlocks: a}; }), g('8', [], function () { var a = function (a) { return a.getParam('visualblocks_default_state', !1); }, b = function (a) { return a.settings.visualblocks_content_css; }; return {isEnabledByDefault: a, getContentCss: b}; }), g('b', ['6'], function (a) { return a('tinymce.dom.DOMUtils'); }), g('c', ['6'], function (a) { return a('tinymce.util.Tools'); }), g('a', ['b', 'c'], function (a, b) { var c = a.DOM.uniqueId(), d = function (d, e) { var f = b.toArray(d.getElementsByTagName('link')), g = b.grep(f, function (a) { return a.id === c; }); if (g.length === 0) { var h = a.DOM.create('link', {id: c, rel: 'stylesheet', href: e}); d.getElementsByTagName('head')[0].appendChild(h); } }; return {load: d}; }), g('7', ['9', '8', 'a'], function (a, b, c) { var d = function (d, e, f) { var g = d.dom, h = b.getContentCss(d); c.load(d.getDoc(), h || e + '/css/visualblocks.css'), g.toggleClass(d.getBody(), 'mce-visualblocks'), f.set(!f.get()), a.fireVisualBlocks(d, f.get()); }; return {toggleVisualBlocks: d}; }), g('3', ['7'], function (a) { var b = function (b, c, d) { b.addCommand('mceVisualBlocks', function () { a.toggleVisualBlocks(b, c, d); }); }; return {register: b}; }), g('4', ['8', '7'], function (a, b) { var c = function (c, d, e) { c.on('PreviewFormats AfterPreviewFormats', function (a) { e.get() && c.dom.toggleClass(c.getBody(), 'mce-visualblocks', a.type === 'afterpreviewformats'); }), c.on('init', function () { a.isEnabledByDefault(c) && b.toggleVisualBlocks(c, d, e); }), c.on('remove', function () { c.dom.removeClass(c.getBody(), 'mce-visualblocks'); }); }; return {setup: c}; }), g('5', ['7'], function (a) { var b = function (a, b) { return function (c) { var d = c.control; d.active(b.get()), a.on('VisualBlocks', function (a) { d.active(a.state); }); }; }, c = function (a, c) { a.addButton('visualblocks', {title: 'Show blocks', cmd: 'mceVisualBlocks', onPostRender: b(a, c)}), a.addMenuItem('visualblocks', {text: 'Show blocks', cmd: 'mceVisualBlocks', onPostRender: b(a, c), selectable: !0, context: 'view', prependToContext: !0}); }; return {register: c}; }), g('0', ['1', '2', '3', '4', '5'], function (a, b, c, d, e) { return b.add('visualblocks', function (b, f) { var g = a(!1); c.register(b, f, g), e.register(b, g), d.setup(b, f, g); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/visualchars/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "visualchars" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/visualchars') 5 | // ES2015: 6 | // import 'tinymce/plugins/visualchars' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/plugins/wordcount/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "wordcount" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/wordcount') 5 | // ES2015: 6 | // import 'tinymce/plugins/wordcount' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/skins/lightgray/content.inline.min.css: -------------------------------------------------------------------------------- 1 | .word-wrap{word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-ms-hyphens:auto;-moz-hyphens:auto;-webkit-hyphens:auto;hyphens:auto}.mce-content-body .mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:black;font-family:Arial;font-size:11px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;line-height:normal;font-weight:normal;text-align:left;-webkit-tap-highlight-color:transparent;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-object{border:1px dotted #3A3A3A;background:#D5D5D5 url(img/object.gif) no-repeat center}.mce-preview-object{display:inline-block;position:relative;margin:0 2px 0 2px;line-height:0;border:1px solid gray}.mce-preview-object[data-mce-selected="2"] .mce-shim{display:none}.mce-preview-object .mce-shim{position:absolute;top:0;left:0;width:100%;height:100%;background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}figure.align-left{float:left}figure.align-right{float:right}figure.image.align-center{display:table;margin-left:auto;margin-right:auto}figure.image{display:inline-block;border:1px solid gray;margin:0 2px 0 1px;background:#f5f2f0}figure.image img{margin:8px 8px 0 8px}figure.image figcaption{margin:6px 8px 6px 8px;text-align:center}.mce-toc{border:1px solid gray}.mce-toc h2{margin:4px}.mce-toc li{list-style-type:none}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px !important;height:9px !important;border:1px dotted #3A3A3A;background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-nbsp,.mce-shy{background:#AAA}.mce-shy::after{content:'-'}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#3399ff;color:#fff}.mce-spellchecker-word{border-bottom:2px solid rgba(208,2,27,0.5);cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid #008000;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td[data-mce-selected],th[data-mce-selected]{background-color:#2276d2 !important}.mce-edit-focus{outline:1px dotted #333}.mce-resize-bar-dragging{background-color:#2276d2;opacity:.25;filter:alpha(opacity=25);zoom:1}.mce-content-body *[contentEditable=false] *[contentEditable=true]:focus{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false] *[contentEditable=true]:hover{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false][data-mce-selected]{outline:2px solid #2276d2}.mce-content-body a[data-mce-selected],.mce-content-body code[data-mce-selected],.mce-content-body b[data-mce-selected],.mce-content-body i[data-mce-selected],.mce-content-body em[data-mce-selected],.mce-content-body strong[data-mce-selected],.mce-content-body sup[data-mce-selected],.mce-content-body sub[data-mce-selected]{background:#bfe6ff}.mce-content-body .mce-item-anchor[data-mce-selected]{background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-content-body hr{cursor:default}.mce-content-body{line-height:1.3} -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/skins/lightgray/content.mobile.min.css: -------------------------------------------------------------------------------- 1 | .tinymce-mobile-unfocused-selections .tinymce-mobile-unfocused-selection{position:absolute;display:inline-block;background-color:green;opacity:.5}body{-webkit-text-size-adjust:none}body img{max-width:96vw}body table img{max-width:95%} -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/skins/lightgray/fonts/tinymce-mobile.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/components/my-components/text-editor/tinymce/skins/lightgray/fonts/tinymce-mobile.woff -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/skins/lightgray/fonts/tinymce-small.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/components/my-components/text-editor/tinymce/skins/lightgray/fonts/tinymce-small.eot -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/skins/lightgray/fonts/tinymce-small.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/components/my-components/text-editor/tinymce/skins/lightgray/fonts/tinymce-small.ttf -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/skins/lightgray/fonts/tinymce-small.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/components/my-components/text-editor/tinymce/skins/lightgray/fonts/tinymce-small.woff -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/skins/lightgray/fonts/tinymce.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/components/my-components/text-editor/tinymce/skins/lightgray/fonts/tinymce.eot -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/skins/lightgray/fonts/tinymce.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/components/my-components/text-editor/tinymce/skins/lightgray/fonts/tinymce.ttf -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/skins/lightgray/fonts/tinymce.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/components/my-components/text-editor/tinymce/skins/lightgray/fonts/tinymce.woff -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/skins/lightgray/img/anchor.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/components/my-components/text-editor/tinymce/skins/lightgray/img/anchor.gif -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/skins/lightgray/img/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/components/my-components/text-editor/tinymce/skins/lightgray/img/loader.gif -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/skins/lightgray/img/object.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/components/my-components/text-editor/tinymce/skins/lightgray/img/object.gif -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/skins/lightgray/img/trans.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/components/my-components/text-editor/tinymce/skins/lightgray/img/trans.gif -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/themes/inlite/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "inlite" theme for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/themes/inlite') 5 | // ES2015: 6 | // import 'tinymce/themes/inlite' 7 | require('./theme.js'); 8 | -------------------------------------------------------------------------------- /components/my-components/text-editor/tinymce/themes/modern/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "modern" theme for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/themes/modern') 5 | // ES2015: 6 | // import 'tinymce/themes/modern' 7 | require('./theme.js'); 8 | -------------------------------------------------------------------------------- /components/other.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 58 | 59 | -------------------------------------------------------------------------------- /components/tables/components/ExportExcel.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 22 | -------------------------------------------------------------------------------- /components/tables/components/dragableTable.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 51 | 52 | -------------------------------------------------------------------------------- /components/tables/components/editable-table.less: -------------------------------------------------------------------------------- 1 | .show-edit-btn{ 2 | display: none; 3 | margin-left: -10px; 4 | } 5 | .ivu-table-cell:hover .show-edit-btn{ 6 | display: inline-block; 7 | } -------------------------------------------------------------------------------- /components/tables/components/table.less: -------------------------------------------------------------------------------- 1 | .dragging-tip-enter-active{ 2 | opacity: 1; 3 | transition: opacity .3s; 4 | } 5 | .dragging-tip-enter, .dragging-tip-leave-to{ 6 | opacity: 0; 7 | transition: opacity .3s 8 | } 9 | .dragging-tip-con{ 10 | display: block; 11 | text-align: center; 12 | width: 100%; 13 | height: 50px; 14 | } 15 | .dragging-tip-con span{ 16 | font-size: 18px; 17 | } 18 | .record-tip-con{ 19 | display: block; 20 | width: 100%; 21 | height: 292px; 22 | overflow: auto; 23 | } 24 | .record-item{ 25 | box-sizing: content-box; 26 | display: block; 27 | overflow: hidden; 28 | height: 24px; 29 | line-height: 24px; 30 | padding: 8px 10px; 31 | border-bottom: 1px dashed gainsboro; 32 | } 33 | .record-tip-con span{ 34 | font-size: 14px; 35 | } 36 | .edittable-test-con{ 37 | height: 160px; 38 | } 39 | .edittable-table-height-con{ 40 | height: 190px; 41 | } 42 | .edittable-con-1{ 43 | box-sizing: content-box; 44 | padding: 15px 0 0; 45 | height: 196px; 46 | } 47 | .edittable-table-get-currentdata-con{ 48 | height: 190px !important; 49 | } 50 | .exportable-table-download-con1{ 51 | padding: 16px 0 16px 20px; 52 | border-bottom: 1px dashed #c3c3c3; 53 | margin-bottom: 16px; 54 | } 55 | .exportable-table-download-con2{ 56 | padding-left: 20px; 57 | } 58 | .show-image{ 59 | padding: 20px 0px; 60 | } 61 | .show-image img{ 62 | display: block; 63 | width: 100%; 64 | height: auto; 65 | } 66 | .searchable-table{ 67 | &-con1{ 68 | height: 230px !important; 69 | } 70 | } -------------------------------------------------------------------------------- /components/tables/data/search.js: -------------------------------------------------------------------------------- 1 | export const columns1 = [ 2 | { 3 | key: 'name', 4 | title: '姓名' 5 | }, 6 | { 7 | key: 'tel', 8 | title: '电话号码' 9 | } 10 | ]; 11 | 12 | export const searchTable1 = [ 13 | { 14 | name: 'Aresn', 15 | tel: '17712345678' 16 | }, 17 | { 18 | name: 'Lison', 19 | tel: '17787654321' 20 | }, 21 | { 22 | name: 'Lili', 23 | tel: '12212345678' 24 | }, 25 | { 26 | name: 'Lucy', 27 | tel: '13312345678' 28 | } 29 | ]; 30 | 31 | export const searchTable2 = [ 32 | { 33 | name: 'Aresn', 34 | tel: '17712345678' 35 | }, 36 | { 37 | name: 'Lison', 38 | tel: '17787654321' 39 | }, 40 | { 41 | name: 'Lili', 42 | tel: '12212345678' 43 | }, 44 | { 45 | name: 'Lucy', 46 | tel: '13312345678' 47 | } 48 | ]; 49 | 50 | export const searchTable3 = [ 51 | { 52 | name: 'Aresn', 53 | tel: '17712345678' 54 | }, 55 | { 56 | name: 'Lison', 57 | tel: '17787654321' 58 | }, 59 | { 60 | name: 'Lili', 61 | tel: '12212345678' 62 | }, 63 | { 64 | name: 'Lucy', 65 | tel: '13312345678' 66 | } 67 | ]; 68 | -------------------------------------------------------------------------------- /ecosystem.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | apps: [ 3 | { 4 | name: 'nuxt-iview', 5 | script: 'build/main.js', 6 | watch: true, 7 | env: { 8 | NODE_ENV: 'development', 9 | BACKEND_URL: 'https://dev.domain.com', 10 | COOKIE_DOMAIN: '.domain.com' 11 | }, 12 | env_test: { 13 | NODE_ENV: 'test', 14 | BACKEND_URL: 'https://test.domain.com', 15 | COOKIE_DOMAIN: '.domain.com' 16 | }, 17 | env_production: { 18 | NODE_ENV: 'production', 19 | BACKEND_URL: 'https://pro.domain.com', 20 | COOKIE_DOMAIN: '.domain.com' 21 | } 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /layouts/error.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 24 | 25 | 67 | -------------------------------------------------------------------------------- /layouts/full.vue: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /middleware/auth.js: -------------------------------------------------------------------------------- 1 | export default function ({ store, error, redirect }) { 2 | // console.log('store', store.getters.getToken) 3 | if (!store.getters.token) { 4 | redirect('/login') 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /middleware/redirect.js: -------------------------------------------------------------------------------- 1 | export default function ({ store, error, redirect, req }) { 2 | redirect('/home') 3 | } 4 | -------------------------------------------------------------------------------- /middleware/route.js: -------------------------------------------------------------------------------- 1 | export default function ({ route }) { 2 | // console.log('路由中间件', route.fullPath) 3 | // return axios.post('http://my-stats-api.com', { 4 | // url: route.fullPath 5 | // }) 6 | } 7 | -------------------------------------------------------------------------------- /nuxt.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | /* 3 | ** Headers of the page 4 | */ 5 | head: { 6 | title: 'nuxt-temp', 7 | meta: [ 8 | { charset: 'utf-8' }, 9 | { hid: 'description', name: 'description', content: 'Nuxt.js project' } 10 | ], 11 | link: [ 12 | { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }, 13 | { rel: 'stylesheet', name: 'iview', href: '/styles/iview.css' }, 14 | { rel: 'stylesheet', name: 'theme', href: '' } 15 | ] 16 | }, 17 | css: [ 18 | { src: '~assets/css/main.css' } 19 | // { src: 'iview/dist/styles/iview.css' } 20 | ], 21 | plugins: [ 22 | { src: '~plugins/flexible.js', ssr: false }, 23 | { src: '~plugins/iview.js', ssr: true } 24 | ], 25 | loading: './components/loading.vue', 26 | env: { 27 | NODE_ENV: process.env.NODE_ENV 28 | }, 29 | cache: { 30 | max: 1000, 31 | maxAge: 900000 32 | }, 33 | router: { 34 | middleware: 'route' // 在每页渲染前运行 middleware/route.js 中间件的逻辑 35 | }, 36 | build: { 37 | vendor: ['axios', 'iview', './plugins/iview.js'], 38 | extend(config, ctx) { 39 | if (ctx.isClient) { 40 | // config.module.rules.push({ 41 | // enforce: 'pre', 42 | // test: /\.(js|vue)$/, 43 | // loader: 'eslint-loader', 44 | // exclude: /(node_modules)/ 45 | // }) 46 | } 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nuxt-demo", 3 | "version": "1.0.0", 4 | "description": "Nuxt.js project", 5 | "author": "moedong", 6 | "private": true, 7 | "scripts": { 8 | "dev": "backpack dev", 9 | "build:prod": "cross-env NODE_ENV=production nuxt build && cross-env NODE_ENV=production backpack build", 10 | "build:test": "cross-env NODE_ENV=test nuxt build && cross-env NODE_ENV=test backpack build", 11 | "start:prod": "pm2 start ecosystem.config.js --env production", 12 | "start:test": "pm2 start ecosystem.config.js --env test", 13 | "publish:prod": "npm run build:prod && npm run start:prod", 14 | "publish:test": "npm run build:test && npm run start:test", 15 | "generate": "nuxt generate", 16 | "precommit": "npm run lint", 17 | "lint": "eslint --ext .js,.vue --ignore-path .gitignore .", 18 | "dev-debug": "node node_modules/.bin/backpack dev --inspect-brk", 19 | "test": "nuxt build && ava --verbose --serial" 20 | }, 21 | "ava": { 22 | "require": [ 23 | "babel-register" 24 | ] 25 | }, 26 | "dependencies": { 27 | "@koa/cors": "^2.2.1", 28 | "@nuxtjs/router": "^1.0.1", 29 | "area-data": "^5.0.6", 30 | "axios": "^0.17.1", 31 | "clipboard": "^1.7.1", 32 | "countup": "^1.8.2", 33 | "cropperjs": "^1.2.2", 34 | "cross-env": "^5.0.1", 35 | "echarts": "^3.8.5", 36 | "html2canvas": "^0.5.0-beta4", 37 | "iview": "^2.14.2", 38 | "js-cookie": "^2.2.0", 39 | "koa": "^2.4.1", 40 | "koa-bodyparser": "^4.2.1", 41 | "koa-logger": "^3.2.0", 42 | "koa-router": "^7.4.0", 43 | "koa-session2": "^2.2.6", 44 | "koa-static": "^5.0.0", 45 | "nuxt": "latest", 46 | "rasterizehtml": "^1.2.4", 47 | "simplemde": "^1.11.2", 48 | "sortablejs": "^1.7.0", 49 | "source-map-support": "^0.4.15", 50 | "tinymce": "^4.7.4", 51 | "vuex-persist": "^1.2.2" 52 | }, 53 | "devDependencies": { 54 | "autoprefixer-loader": "^3.2.0", 55 | "ava": "^0.25.0", 56 | "axios-mock-adapter": "^1.15.0", 57 | "babel": "^6.23.0", 58 | "babel-core": "^6.23.1", 59 | "babel-eslint": "^8.2.1", 60 | "babel-loader": "^7.1.2", 61 | "babel-plugin-syntax-dynamic-import": "^6.18.0", 62 | "babel-plugin-transform-runtime": "^6.12.0", 63 | "babel-preset-env": "^1.6.1", 64 | "babel-preset-es2015": "^6.9.0", 65 | "babel-preset-stage-3": "^6.24.1", 66 | "babel-runtime": "^6.11.6", 67 | "backpack-core": "^0.4.1", 68 | "eslint": "^4.3.0", 69 | "eslint-config-standard": "^10.2.1", 70 | "eslint-loader": "^1.9.0", 71 | "eslint-plugin-html": "^3.1.1", 72 | "eslint-plugin-import": "^2.7.0", 73 | "eslint-plugin-node": "^5.1.1", 74 | "eslint-plugin-promise": "^3.5.0", 75 | "eslint-plugin-standard": "^3.0.1", 76 | "jsdom": "^11.11.0", 77 | "less": "^2.7.3", 78 | "less-loader": "^4.0.5", 79 | "nodemon": "^1.11.0", 80 | "scmp": "^2.0.0", 81 | "vue-i18n": "^7.6.0" 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /pages/error-page/404.vue: -------------------------------------------------------------------------------- 1 | 61 | 62 | 84 | 85 | 100 | -------------------------------------------------------------------------------- /pages/error-page/500.vue: -------------------------------------------------------------------------------- 1 | 74 | 75 | 102 | 103 | 118 | -------------------------------------------------------------------------------- /plugins/axios2.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 用于浏览器端ajax请求 3 | */ 4 | 5 | import Axios from 'axios' 6 | import { Message } from 'iview' 7 | 8 | // 环境变量 9 | const env = process.env.NODE_ENV || 'development' 10 | 11 | let baseUrl = { 12 | development: 'http://127.0.0.1:3000', 13 | test: 'https://crmfront.tiaoweilian.com', 14 | production: 'https://crm.youjiangliao.com' 15 | } 16 | 17 | let options = { 18 | baseURL: baseUrl[env], 19 | timeout: 5000, 20 | responseType: 'json', 21 | headers: { 22 | post: { 23 | 'Content-Type': 'application/json' 24 | } 25 | } 26 | } 27 | // 创建实例 28 | let axios = Axios.create(options) 29 | 30 | // 拦截 31 | axios.interceptors.response.use( 32 | res => { 33 | if (res.status && res.status === 200 && res.data.status === 'error') { 34 | return 35 | } 36 | return res 37 | }, 38 | err => { 39 | if (err.response.status !== 200) { 40 | if (process.client) { 41 | Message.error(err.response.data.msg || '') 42 | } 43 | } 44 | return Promise.resolve(err.response) 45 | } 46 | ) 47 | export default axios 48 | -------------------------------------------------------------------------------- /plugins/flexible.js: -------------------------------------------------------------------------------- 1 | !function(){var a="@charset \"utf-8\";html{color:#000;background:#fff;overflow-y:scroll;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}html *{outline:0;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}html,body{font-family:sans-serif}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td,hr,button,article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{margin:0;padding:0}input,select,textarea{font-size:100%}table{border-collapse:collapse;border-spacing:0}fieldset,img{border:0}abbr,acronym{border:0;font-variant:normal}del{text-decoration:line-through}address,caption,cite,code,dfn,em,th,var{font-style:normal;font-weight:500}ol,ul{list-style:none}caption,th{text-align:left}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:500}q:before,q:after{content:''}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}a:hover{text-decoration:underline}ins,a{text-decoration:none}",b=document.createElement("style");if(document.getElementsByTagName("head")[0].appendChild(b),b.styleSheet)b.styleSheet.disabled||(b.styleSheet.cssText=a);else try{b.innerHTML=a}catch(c){b.innerText=a}}();!function(a,b){function c(){var b=f.getBoundingClientRect().width;b/i>540&&(b=540*i);var c=b/10;f.style.fontSize=c+"px",k.rem=a.rem=c}var d,e=a.document,f=e.documentElement,g=e.querySelector('meta[name="viewport"]'),h=e.querySelector('meta[name="flexible"]'),i=0,j=0,k=b.flexible||(b.flexible={});if(g){console.warn("灏嗘牴鎹凡鏈夌殑meta鏍囩鏉ヨ缃缉鏀炬瘮渚�");var l=g.getAttribute("content").match(/initial\-scale=([\d\.]+)/);l&&(j=parseFloat(l[1]),i=parseInt(1/j))}else if(h){var m=h.getAttribute("content");if(m){var n=m.match(/initial\-dpr=([\d\.]+)/),o=m.match(/maximum\-dpr=([\d\.]+)/);n&&(i=parseFloat(n[1]),j=parseFloat((1/i).toFixed(2))),o&&(i=parseFloat(o[1]),j=parseFloat((1/i).toFixed(2)))}}if(!i&&!j){var p=(a.navigator.appVersion.match(/android/gi),a.navigator.appVersion.match(/iphone/gi)),q=a.devicePixelRatio;i=p?q>=3&&(!i||i>=3)?3:q>=2&&(!i||i>=2)?2:1:1,j=1/i}if(f.setAttribute("data-dpr",i),!g)if(g=e.createElement("meta"),g.setAttribute("name","viewport"),g.setAttribute("content","initial-scale="+j+", maximum-scale="+j+", minimum-scale="+j+", user-scalable=no"),f.firstElementChild)f.firstElementChild.appendChild(g);else{var r=e.createElement("div");r.appendChild(g),e.write(r.innerHTML)}a.addEventListener("resize",function(){clearTimeout(d),d=setTimeout(c,300)},!1),a.addEventListener("pageshow",function(a){a.persisted&&(clearTimeout(d),d=setTimeout(c,300))},!1),"complete"===e.readyState?e.body.style.fontSize=12*i+"px":e.addEventListener("DOMContentLoaded",function(){e.body.style.fontSize=12*i+"px"},!1),c(),k.dpr=a.dpr=i,k.refreshRem=c,k.rem2px=function(a){var b=parseFloat(a)*this.rem;return"string"==typeof a&&a.match(/rem$/)&&(b+="px"),b},k.px2rem=function(a){var b=parseFloat(a)/this.rem;return"string"==typeof a&&a.match(/px$/)&&(b+="rem"),b}}(window,window.lib||(window.lib={})); -------------------------------------------------------------------------------- /plugins/iview.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import iView from 'iview'; 3 | 4 | Vue.use(iView); 5 | -------------------------------------------------------------------------------- /router/router.js: -------------------------------------------------------------------------------- 1 | // router.js 2 | // 作为Main组件的子页面展示但是不在左侧菜单显示的路由写在otherRouter里 3 | export const otherRouter = { 4 | path: '/', 5 | name: 'otherRouter', 6 | children: [ 7 | { 8 | path: '/index', 9 | title: '主页', 10 | name: 'index', 11 | icon: 'ios-home' 12 | } 13 | ] 14 | } 15 | 16 | // 作为Main组件的子页面展示并且在左侧菜单显示的路由写在appRouter里 17 | export const appRouter = [ 18 | { 19 | path: '/form', 20 | icon: 'android-checkbox', 21 | name: 'form', 22 | title: '表单编辑', 23 | children: [ 24 | { 25 | path: '/form/work-flow', 26 | title: '工作流', 27 | name: 'form-work-flow', 28 | icon: 'arrow-swap' 29 | }, 30 | { 31 | path: '/form/article-publish', 32 | title: '发布文章', 33 | name: 'form-article-publish', 34 | icon: 'ios-home' 35 | } 36 | ] 37 | }, 38 | { 39 | path: '/tables', 40 | icon: 'ios-grid-view', 41 | title: '表格', 42 | name: 'tables', 43 | children: [ 44 | { 45 | path: '/tables/dragable-table', 46 | title: '可拖拽排序', 47 | icon: 'arrow-move', 48 | name: 'tables-dragable-table' 49 | }, 50 | { 51 | path: '/tables/editable-table', 52 | title: '可编辑表格', 53 | icon: 'edit', 54 | name: 'tables-editable-table' 55 | } 56 | ] 57 | }, 58 | { 59 | path: '/error-page', 60 | icon: 'android-sad', 61 | title: '错误页面', 62 | name: 'errorpage', 63 | children: [ 64 | { 65 | path: '/error-page/403', 66 | title: '403错误', 67 | name: 'error-page-403', 68 | icon: 'close-circled' 69 | }, 70 | { 71 | path: '/error-page/404', 72 | title: '404错误', 73 | name: 'error-page-404', 74 | icon: 'alert-circled' 75 | }, 76 | { 77 | path: '/error-page/500', 78 | title: '500错误', 79 | name: 'error-page-500', 80 | icon: 'settings' 81 | } 82 | ] 83 | } 84 | ] 85 | -------------------------------------------------------------------------------- /screenshot/sc1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/screenshot/sc1.png -------------------------------------------------------------------------------- /screenshot/sc2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/screenshot/sc2.png -------------------------------------------------------------------------------- /screenshot/sc3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/screenshot/sc3.png -------------------------------------------------------------------------------- /screenshot/sc4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/screenshot/sc4.png -------------------------------------------------------------------------------- /server/config/index.js: -------------------------------------------------------------------------------- 1 | const config = { 2 | base_url: 'https://crmback.tiaoweilian.com', 3 | sign_key: 'RFHIJUGVCFTRQKJMJKNHGBIOJUHGBNFG' 4 | } 5 | 6 | export default config 7 | -------------------------------------------------------------------------------- /server/controller/user.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios' 2 | import config from '../config' 3 | import MockAdapter from 'axios-mock-adapter' 4 | 5 | var mock = new MockAdapter(axios) 6 | mock.onPost(config.base_url + '/api/v1.user/login').reply(function (config) { 7 | // console.log(JSON.parse(config.data).mobile) 8 | return [ 9 | 200, 10 | {'ret': 200, 'msg': '请求成功', 'data': {'code': 0, 'message': '登录成功', 'token': 'PhU0Sd9zwUSwOQgXnJpj7pgSwdA7YD80', 'id': 1, 'mobile': '13770267077', 'name': JSON.parse(config.data).mobile, 'sex': 1, 'status': 1, 'role_id': 1, 'depart_id': 1, 'leader_id': 0}} 11 | ] 12 | }) 13 | 14 | export const userinfo = async (ctx, next) => { 15 | let token = ctx.session.user.token || '' 16 | return (ctx.body = { 17 | ret: 200, 18 | msg: '获取成功', 19 | data: { token: token } 20 | }) 21 | } 22 | 23 | export const login = async (ctx, next) => { 24 | const { mobile, psd } = ctx.request.body 25 | if (!mobile || !psd) { 26 | return (ctx.body = { 27 | ret: 303, 28 | msg: '缺少请求参数', 29 | data: {} 30 | }) 31 | } 32 | 33 | // 发起请求 34 | let _url = config.base_url + '/api/v1.user/login' 35 | let req = await axios.post(_url, { 36 | mobile: mobile, 37 | psd: psd, 38 | sign: '' 39 | }) 40 | // 网络异常 41 | if (req.status !== 200) { 42 | return (ctx.body = { 43 | ret: 400, 44 | msg: '网络通讯异常', 45 | data: {} 46 | }) 47 | } 48 | // 系统异常 49 | if (req.data.ret !== 200) { 50 | let ret = req.data.ret || 400 51 | let msg = req.data.msg || '失败' 52 | return (ctx.body = { 53 | ret: ret, 54 | msg: msg, 55 | data: {} 56 | }) 57 | } 58 | 59 | // 登陆失败 60 | if (req.data.data.code !== 0) { 61 | let code = req.data.data.code || -1 62 | let message = req.data.data.message || '登录失败' 63 | return (ctx.body = { 64 | ret: 200, 65 | msg: '请求成功', 66 | data: { 67 | code: code, 68 | message: message 69 | } 70 | }) 71 | } 72 | 73 | // 登陆成功 74 | let token = req.data.data.token 75 | let signkey = config.sign_key 76 | 77 | let info = { 78 | id: req.data.data.id, 79 | mobile: req.data.data.mobile, 80 | name: req.data.data.name, 81 | sex: req.data.data.sex, 82 | status: req.data.data.status, 83 | role_id: req.data.data.role_id, 84 | depart_id: req.data.data.depart_id, 85 | deader_id: req.data.data.deader_id 86 | } 87 | 88 | let session = ctx.session 89 | session.user = { 90 | token: token, 91 | sign_key: signkey, 92 | info: info 93 | } 94 | ctx.session = session 95 | 96 | return (ctx.body = { 97 | ret: 200, 98 | msg: '请求成功', 99 | data: { 100 | code: 0, 101 | message: '登录成功', 102 | token: token, 103 | info: info 104 | } 105 | }) 106 | } 107 | 108 | export const logout = async (ctx, next) => { 109 | try { 110 | ctx.session.user = null 111 | return (ctx.body = { 112 | ret: 200, 113 | msg: '请求成功', 114 | data: { 115 | code: 0, 116 | message: '退出成功' 117 | } 118 | }) 119 | } catch (e) { 120 | return (ctx.body = { 121 | ret: 200, 122 | msg: '请求成功', 123 | data: { 124 | code: -1, 125 | message: '退出失败' 126 | } 127 | }) 128 | } 129 | } 130 | -------------------------------------------------------------------------------- /server/index.js: -------------------------------------------------------------------------------- 1 | import Koa from 'koa' 2 | import { Nuxt, Builder } from 'nuxt' 3 | import session from 'koa-session2' 4 | import bodyParser from 'koa-bodyparser' 5 | import Router from 'koa-router' 6 | import koaLogger from 'koa-logger' 7 | import route from './routers' 8 | import cors from '@koa/cors' 9 | import koaStatic from 'koa-static' 10 | import path from 'path' 11 | 12 | async function start() { 13 | const app = new Koa() 14 | const host = process.env.HOST || '127.0.0.1' 15 | const port = process.env.PORT || 3000 16 | 17 | // session必须在路由前注册 18 | app.use( 19 | session({ 20 | key: '12345', 21 | overwrite: true 22 | }) 23 | ) 24 | // 配置控制台日志中间件 25 | app.use(koaLogger()) 26 | 27 | // 配置静态资源加载中间件 28 | app.use(koaStatic(path.join(__dirname, './src'))) 29 | 30 | app.use(cors()) 31 | app.use(bodyParser()) 32 | 33 | const router = new Router() 34 | router.use('', route.routes()) 35 | app.use(router.routes()).use(router.allowedMethods()) 36 | 37 | // Import and Set Nuxt.js options 38 | let config = require('../nuxt.config.js') 39 | // 由于涉及到三个环境变化,使用在test,production 时候,为false 40 | config.dev = !(app.env === 'production' || app.env === 'test') 41 | // console.log('env === ', app.env, env, process.env.COOKIE_DOMAIN, process.env.APP_ENV, config.dev) 42 | 43 | // Instantiate nuxt.js 44 | const nuxt = new Nuxt(config) 45 | 46 | // Build in development 47 | if (config.dev) { 48 | const builder = new Builder(nuxt) 49 | await builder.build() 50 | } 51 | 52 | app.use(async (ctx, next) => { 53 | await next() 54 | ctx.status = 200 // koa defaults to 404 when it sees that status is unset 55 | ctx.req.session = ctx.session // 必须将session添加进request中,否则nuxt的req获取不到session 56 | return new Promise((resolve, reject) => { 57 | ctx.res.on('close', resolve) 58 | ctx.res.on('finish', resolve) 59 | nuxt.render(ctx.req, ctx.res, promise => { 60 | // nuxt.render passes a rejected promise into callback on error. 61 | promise.then(resolve).catch(reject) 62 | }) 63 | }) 64 | }) 65 | 66 | app.listen(port, host) 67 | console.log('Server listening on ' + host + ':' + port) // eslint-disable-line no-console 68 | } 69 | 70 | start() 71 | -------------------------------------------------------------------------------- /server/routers/index.js: -------------------------------------------------------------------------------- 1 | import Router from 'koa-router' 2 | import { userinfo, login, logout } from '../controller/user' 3 | const router = new Router() 4 | 5 | router.get('/api/user', userinfo) 6 | router.post('/api/login', login) 7 | router.post('/api/logout', logout) 8 | router.get('/api/logout', logout) 9 | 10 | export default router 11 | -------------------------------------------------------------------------------- /server/src/styles/fonts/ionicons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/server/src/styles/fonts/ionicons.eot -------------------------------------------------------------------------------- /server/src/styles/fonts/ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/server/src/styles/fonts/ionicons.ttf -------------------------------------------------------------------------------- /server/src/styles/fonts/ionicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/server/src/styles/fonts/ionicons.woff -------------------------------------------------------------------------------- /static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/moedong/nuxt-iview/5f36c7789ee02e063b9ad608c3e306dbbcd27b8b/static/favicon.ico -------------------------------------------------------------------------------- /store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | import app from './modules/app' 4 | import user from './modules/user' 5 | 6 | Vue.use(Vuex) 7 | 8 | const store = () => 9 | new Vuex.Store({ 10 | state: { 11 | name: '' 12 | }, 13 | getters: { 14 | }, 15 | mutations: {}, 16 | actions: { 17 | nuxtServerInit: async ({ commit }, { req, res }) => { 18 | // console.log('nuxtServerInit', res.session) 19 | if (!!req.session && !!req.session.user && !!req.session.user.token) { 20 | commit('LOGIN', req.session) 21 | } else { 22 | commit('LOGOUT') 23 | } 24 | } 25 | }, 26 | modules: { 27 | app, 28 | user 29 | } 30 | }) 31 | 32 | export default store 33 | -------------------------------------------------------------------------------- /store/modules/user.js: -------------------------------------------------------------------------------- 1 | const user = { 2 | state: { 3 | token: null, // 登陆token 4 | sign_key: null, // 加密密钥 5 | info: {} // 用户的信息 6 | }, 7 | getters: { 8 | getToken: state => { 9 | return state.token 10 | }, 11 | getSignKey: state => { 12 | return state.sign_key 13 | }, 14 | token: state => { 15 | return state.token 16 | }, 17 | signkey: state => { 18 | return state.sign_key 19 | }, 20 | getUserId: state => { 21 | return state.info.id || null 22 | }, 23 | getInfo: state => { 24 | return state.info 25 | } 26 | }, 27 | mutations: { 28 | SET_TOKEN: (state, token) => { 29 | state.token = token 30 | }, 31 | SET_USERINFO: (state, info = {}) => { 32 | state.info = info 33 | }, 34 | // 登陆 35 | LOGIN: (state, session) => { 36 | state.token = session.user.token || null 37 | state.sign_key = session.user.sign_key || null 38 | state.info = session.user.info || {} 39 | }, 40 | // 登出 41 | LOGOUT: state => { 42 | state.token = null 43 | state.sign_key = null 44 | state.info = {} 45 | } 46 | }, 47 | actions: { 48 | // 登出 49 | LOGOUT: state => { 50 | state.token = null 51 | state.sign_key = null 52 | state.info = {} 53 | } 54 | } 55 | } 56 | 57 | export default user 58 | -------------------------------------------------------------------------------- /test/config.test.js: -------------------------------------------------------------------------------- 1 | import test from 'ava' 2 | import createNuxt from './helpers/create-nuxt' 3 | 4 | let nuxt = null 5 | const headers = { 6 | 'accept-language': 'zh' 7 | } 8 | // Init nuxt.js and create server listening on localhost:4000 9 | test.before('Init Nuxt.js', async t => { 10 | nuxt = createNuxt() 11 | await nuxt.listen(3000, '127.0.0.1') 12 | }) 13 | 14 | // 初始化 Nuxt.js 并创建一个监听 localhost:4000 的服务器 15 | // test.before('Init Nuxt.js', async t => { 16 | // const rootDir = resolve(__dirname, '..') 17 | // let config = {} 18 | // try { config = require(resolve(rootDir, 'nuxt.config.js')) } catch (e) {} 19 | // config.rootDir = rootDir // 项目目录 20 | // config.dev = false // 生产构建模式 21 | // nuxt = new Nuxt(config) 22 | // await new Builder(nuxt).build() 23 | // nuxt.listen(4000, 'localhost') 24 | // }) 25 | 26 | test('Vendor', async t => { 27 | const vendor = nuxt.options.build.vendor 28 | t.true(!!~vendor.indexOf('axios'), 'axios added to config') 29 | }) 30 | 31 | test('Plugin', async t => { 32 | const plugins = nuxt.options.plugins 33 | t.is( 34 | plugins[0].src, 35 | '~plugins/flexible.js', 36 | 'flexible plugin added to config' 37 | ) 38 | t.is(plugins[1].src, '~plugins/iview.js', 'iview plugin added to config') 39 | }) 40 | 41 | // 测试生成的html 42 | test('路由 / 有效且能渲染 HTML', async t => { 43 | const { html } = await nuxt.renderRoute('/', { 44 | req: { session: {}, headers } 45 | }) 46 | t.true(html.includes('
')) 47 | }) 48 | 49 | // 关掉服务器和Nuxt实例,停止文件监听。 50 | test.after('Closing server and nuxt.js', async t => { 51 | await nuxt.close() 52 | }) 53 | -------------------------------------------------------------------------------- /test/helpers/create-nuxt.js: -------------------------------------------------------------------------------- 1 | import { Nuxt } from 'nuxt' 2 | import { resolve } from 'path' 3 | 4 | export default function createNuxt () { 5 | const rootDir = resolve(__dirname, '../../') 6 | let config = require(resolve(rootDir, 'nuxt.config.js')) 7 | config.rootDir = rootDir // project folder 8 | config.dev = false // production build 9 | let nuxt = new Nuxt(config) 10 | return nuxt 11 | } 12 | -------------------------------------------------------------------------------- /test/login.test.js: -------------------------------------------------------------------------------- 1 | import test from 'ava' 2 | import createNuxt from './helpers/create-nuxt' 3 | 4 | // We keep the nuxt and server instance 5 | // So we can close them at the end of the test 6 | let nuxt = null 7 | const headers = { 8 | 'accept-language': 'zh' 9 | } 10 | // Init Nuxt.js and create a server listening on localhost:4000 11 | test.before('Init Nuxt.js', async t => { 12 | nuxt = createNuxt() 13 | await nuxt.listen(3000, 'localhost') 14 | }) 15 | 16 | test('Route /login', async t => { 17 | const { html } = await nuxt.renderRoute('/login', {req: {session: {}, headers}}) 18 | t.true(html.includes('欢迎'), 'login page render normal') 19 | }) 20 | 21 | // Close server and ask nuxt to stop listening to file changes 22 | test.after('Closing server and nuxt.js', async t => { 23 | await nuxt.close() 24 | }) 25 | --------------------------------------------------------------------------------