├── static └── .gitkeep ├── src ├── views │ ├── designerPage │ │ ├── components │ │ │ ├── template │ │ │ │ ├── README.md │ │ │ │ ├── Common │ │ │ │ │ ├── index.js │ │ │ │ │ ├── Br.js │ │ │ │ │ ├── Text.js │ │ │ │ │ ├── Div.js │ │ │ │ │ ├── Img.js │ │ │ │ │ └── A.js │ │ │ │ ├── Mint-UI │ │ │ │ │ ├── index.js │ │ │ │ │ ├── Switch.js │ │ │ │ │ ├── Header.js │ │ │ │ │ └── Progress.js │ │ │ │ ├── Muse-UI │ │ │ │ │ ├── Tbody.js │ │ │ │ │ ├── Tfoot.js │ │ │ │ │ ├── Thead.js │ │ │ │ │ ├── Td.js │ │ │ │ │ ├── Card Text.js │ │ │ │ │ ├── Divider.js │ │ │ │ │ ├── Tr.js │ │ │ │ │ ├── Sub Header.js │ │ │ │ │ ├── Icon.js │ │ │ │ │ ├── Breadcrumb Item.js │ │ │ │ │ ├── Card Title.js │ │ │ │ │ ├── Paper.js │ │ │ │ │ ├── Back Top.js │ │ │ │ │ └── App Bar.js │ │ │ │ └── iView-UI │ │ │ │ │ ├── index.js │ │ │ │ │ ├── Icon.js │ │ │ │ │ ├── Option.js │ │ │ │ │ ├── iSwitch.js │ │ │ │ │ ├── Rate.js │ │ │ │ │ └── Radio.js │ │ │ ├── list │ │ │ │ ├── muse-ui │ │ │ │ │ ├── README.MD │ │ │ │ │ ├── radio.vue │ │ │ │ │ ├── switch.vue │ │ │ │ │ ├── appbar.vue │ │ │ │ │ ├── checkBox.vue │ │ │ │ │ ├── RaisedButton.vue │ │ │ │ │ ├── circularProgress.vue │ │ │ │ │ ├── linearProgress.vue │ │ │ │ │ ├── subHeader.vue │ │ │ │ │ ├── FlatButton.vue │ │ │ │ │ ├── pagination.vue │ │ │ │ │ ├── slider.vue │ │ │ │ │ ├── textField.vue │ │ │ │ │ ├── avatar.vue │ │ │ │ │ ├── badge.vue │ │ │ │ │ ├── grid.vue │ │ │ │ │ ├── list.vue │ │ │ │ │ ├── listItem.vue │ │ │ │ │ ├── timePicker.vue │ │ │ │ │ ├── backTop.vue │ │ │ │ │ ├── datePicker.vue │ │ │ │ │ ├── icon.vue │ │ │ │ │ ├── iconButton.vue │ │ │ │ │ ├── floatingActionButton.vue │ │ │ │ │ ├── divider.vue │ │ │ │ │ ├── selectField.vue │ │ │ │ │ ├── chip.vue │ │ │ │ │ ├── paper.vue │ │ │ │ │ ├── cardHeader.vue │ │ │ │ │ ├── tab.vue │ │ │ │ │ ├── breadcurmb.vue │ │ │ │ │ ├── breadcrumb.vue │ │ │ │ │ ├── nav.vue │ │ │ │ │ ├── shanGe.vue │ │ │ │ │ └── card.vue │ │ │ │ ├── iview-ui │ │ │ │ │ ├── CheckboxGroup.vue │ │ │ │ │ ├── Card.vue │ │ │ │ │ ├── RadioGroup.vue │ │ │ │ │ ├── Row.vue │ │ │ │ │ ├── ButtonGroup.vue │ │ │ │ │ ├── index.js │ │ │ │ │ ├── Select.vue │ │ │ │ │ └── Form.vue │ │ │ │ └── mint-ui │ │ │ │ │ ├── Progress.vue │ │ │ │ │ ├── index.js │ │ │ │ │ └── Swipe.vue │ │ │ ├── preview_mobile.vue │ │ │ ├── mount.js │ │ │ ├── iconPicker.vue │ │ │ └── componentTree.vue │ │ └── utils │ │ │ ├── guid.js │ │ │ ├── leancloud storage.js │ │ │ └── mergeDeep.js │ ├── login │ │ └── index.less │ ├── homePage │ │ ├── index.less │ │ └── index.vue │ └── colorPage │ │ └── index.less ├── assets │ ├── logo.png │ ├── favicon.png │ └── css │ │ ├── highlight │ │ ├── pojoaque.jpg │ │ ├── school-book.png │ │ ├── brown-papersq.png │ │ ├── darkula.css │ │ ├── ascetic.css │ │ ├── mono-blue.css │ │ ├── dark.css │ │ ├── androidstudio.css │ │ ├── codepen-embed.css │ │ ├── brown-paper.css │ │ ├── vs.css │ │ ├── far.css │ │ ├── arta.css │ │ ├── ir-black.css │ │ ├── magula.css │ │ ├── color-brewer.css │ │ ├── github-gist.css │ │ ├── monokai.css │ │ ├── darcula.css │ │ ├── tomorrow.css │ │ ├── zenburn.css │ │ ├── school-book.css │ │ ├── ocean.css │ │ ├── paraiso-dark.css │ │ ├── paraiso-light.css │ │ ├── dracula.css │ │ ├── qtcreator_dark.css │ │ ├── qtcreator_light.css │ │ ├── rainbow.css │ │ ├── kimbie.dark.css │ │ ├── kimbie.light.css │ │ ├── atelier-dune-dark.css │ │ ├── atelier-dune-light.css │ │ ├── monokai-sublime.css │ │ ├── atelier-heath-dark.css │ │ ├── atelier-heath-light.css │ │ ├── tomorrow-night-bright.css │ │ ├── atelier-forest-dark.css │ │ ├── atelier-forest-light.css │ │ ├── atelier-seaside-dark.css │ │ ├── hopscotch.css │ │ ├── tomorrow-night-eighties.css │ │ ├── atelier-seaside-light.css │ │ ├── atelier-lakeside-dark.css │ │ ├── atelier-lakeside-light.css │ │ ├── arduino-light.css │ │ ├── googlecode.css │ │ ├── xt256.css │ │ ├── atelier-sulphurpool-dark.css │ │ ├── atelier-sulphurpool-light.css │ │ ├── obsidian.css │ │ ├── foundation.css │ │ ├── tomorrow-night.css │ │ ├── xcode.css │ │ ├── pojoaque.css │ │ ├── tomorrow-night-blue.css │ │ ├── solarized-dark.css │ │ ├── solarized-light.css │ │ ├── docco.css │ │ ├── idea.css │ │ ├── atelier-cave-dark.css │ │ ├── atelier-cave-light.css │ │ ├── atelier-estuary-dark.css │ │ ├── atelier-estuary-light.css │ │ ├── atelier-plateau-dark.css │ │ ├── atelier-plateau-light.css │ │ ├── atelier-savanna-dark.css │ │ ├── atelier-savanna-light.css │ │ ├── github.css │ │ ├── atom-one-dark.css │ │ ├── atom-one-light.css │ │ ├── default.css │ │ └── sunburst.css │ │ └── common.less ├── components │ ├── vue-color-picker │ │ └── index.js │ └── layout │ │ └── index.less ├── App.vue └── router │ └── index.js ├── config ├── prod.env.js ├── test.env.js └── dev.env.js ├── doc-img ├── 图片1.png ├── 图片10.png ├── 图片11.png ├── 图片12.png ├── 图片13.png ├── 图片14.png ├── 图片15.png ├── 图片16.png ├── 图片17.png ├── 图片18.png ├── 图片19.png ├── 图片2.png ├── 图片20.png ├── 图片21.png ├── 图片3.png ├── 图片4.png ├── 图片5.png ├── 图片6.png ├── 图片7.png ├── 图片8.png └── 图片9.png ├── test ├── unit │ ├── .eslintrc │ ├── specs │ │ └── HelloWorld.spec.js │ ├── index.js │ └── karma.conf.js └── e2e │ ├── specs │ └── test.js │ ├── custom-assertions │ └── elementCount.js │ ├── nightwatch.conf.js │ └── runner.js ├── .eslintignore ├── .editorconfig ├── .gitignore ├── .postcssrc.js ├── .babelrc ├── server ├── routes │ ├── auth.js │ ├── colorDisk.js │ └── projectManage.js ├── config │ └── db.js ├── schema │ ├── projectManage.js │ ├── user.js │ ├── projectPermission.js │ └── templetPage.js ├── models │ ├── projectManage.js │ ├── user.js │ ├── templetPage.js │ ├── colorDisk.js │ └── projectPermission.js └── controllers │ └── colorDisk.js ├── index.html └── .eslintrc.js /static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/designerPage/components/template/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/README.MD: -------------------------------------------------------------------------------- 1 | 这里是组件栏中muse-ui组件的所有列表项 -------------------------------------------------------------------------------- /config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"' 4 | } 5 | -------------------------------------------------------------------------------- /doc-img/图片1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoluting/front-end-designer/HEAD/doc-img/图片1.png -------------------------------------------------------------------------------- /doc-img/图片10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoluting/front-end-designer/HEAD/doc-img/图片10.png -------------------------------------------------------------------------------- /doc-img/图片11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoluting/front-end-designer/HEAD/doc-img/图片11.png -------------------------------------------------------------------------------- /doc-img/图片12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoluting/front-end-designer/HEAD/doc-img/图片12.png -------------------------------------------------------------------------------- /doc-img/图片13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoluting/front-end-designer/HEAD/doc-img/图片13.png -------------------------------------------------------------------------------- /doc-img/图片14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoluting/front-end-designer/HEAD/doc-img/图片14.png -------------------------------------------------------------------------------- /doc-img/图片15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoluting/front-end-designer/HEAD/doc-img/图片15.png -------------------------------------------------------------------------------- /doc-img/图片16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoluting/front-end-designer/HEAD/doc-img/图片16.png -------------------------------------------------------------------------------- /doc-img/图片17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoluting/front-end-designer/HEAD/doc-img/图片17.png -------------------------------------------------------------------------------- /doc-img/图片18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoluting/front-end-designer/HEAD/doc-img/图片18.png -------------------------------------------------------------------------------- /doc-img/图片19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoluting/front-end-designer/HEAD/doc-img/图片19.png -------------------------------------------------------------------------------- /doc-img/图片2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoluting/front-end-designer/HEAD/doc-img/图片2.png -------------------------------------------------------------------------------- /doc-img/图片20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoluting/front-end-designer/HEAD/doc-img/图片20.png -------------------------------------------------------------------------------- /doc-img/图片21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoluting/front-end-designer/HEAD/doc-img/图片21.png -------------------------------------------------------------------------------- /doc-img/图片3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoluting/front-end-designer/HEAD/doc-img/图片3.png -------------------------------------------------------------------------------- /doc-img/图片4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoluting/front-end-designer/HEAD/doc-img/图片4.png -------------------------------------------------------------------------------- /doc-img/图片5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoluting/front-end-designer/HEAD/doc-img/图片5.png -------------------------------------------------------------------------------- /doc-img/图片6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoluting/front-end-designer/HEAD/doc-img/图片6.png -------------------------------------------------------------------------------- /doc-img/图片7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoluting/front-end-designer/HEAD/doc-img/图片7.png -------------------------------------------------------------------------------- /doc-img/图片8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoluting/front-end-designer/HEAD/doc-img/图片8.png -------------------------------------------------------------------------------- /doc-img/图片9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoluting/front-end-designer/HEAD/doc-img/图片9.png -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoluting/front-end-designer/HEAD/src/assets/logo.png -------------------------------------------------------------------------------- /src/assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoluting/front-end-designer/HEAD/src/assets/favicon.png -------------------------------------------------------------------------------- /src/views/designerPage/components/list/iview-ui/CheckboxGroup.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /src/assets/css/highlight/pojoaque.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoluting/front-end-designer/HEAD/src/assets/css/highlight/pojoaque.jpg -------------------------------------------------------------------------------- /src/assets/css/highlight/school-book.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoluting/front-end-designer/HEAD/src/assets/css/highlight/school-book.png -------------------------------------------------------------------------------- /src/assets/css/highlight/brown-papersq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhaoluting/front-end-designer/HEAD/src/assets/css/highlight/brown-papersq.png -------------------------------------------------------------------------------- /test/unit/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "mocha": true 4 | }, 5 | "globals": { 6 | "expect": true, 7 | "sinon": true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /config/ 3 | /dist/ 4 | /*.js 5 | /test/unit/coverage/ 6 | /src/components/vue-color-picker/ 7 | /src/views/designerPage/components/template 8 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/radio.vue: -------------------------------------------------------------------------------- 1 | 4 | 9 | -------------------------------------------------------------------------------- /config/test.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const devEnv = require('./dev.env') 4 | 5 | module.exports = merge(devEnv, { 6 | NODE_ENV: '"testing"' 7 | }) 8 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/switch.vue: -------------------------------------------------------------------------------- 1 | 4 | 9 | -------------------------------------------------------------------------------- /config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"' 7 | }) 8 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/iview-ui/Card.vue: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/mint-ui/Progress.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/mint-ui/index.js: -------------------------------------------------------------------------------- 1 | import mintSwipe from './Swipe'; 2 | import mintProgress from './Progress'; 3 | 4 | export default{ 5 | mintSwipe, 6 | mintProgress, 7 | }; 8 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/appbar.vue: -------------------------------------------------------------------------------- 1 | 4 | 9 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/checkBox.vue: -------------------------------------------------------------------------------- 1 | 4 | 9 | -------------------------------------------------------------------------------- /src/assets/css/highlight/darkula.css: -------------------------------------------------------------------------------- 1 | /* 2 | Deprecated due to a typo in the name and left here for compatibility purpose only. 3 | Please use darcula.css instead. 4 | */ 5 | 6 | @import url('darcula.css'); 7 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/RaisedButton.vue: -------------------------------------------------------------------------------- 1 | 4 | 9 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/circularProgress.vue: -------------------------------------------------------------------------------- 1 | 4 | 9 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/linearProgress.vue: -------------------------------------------------------------------------------- 1 | 4 | 9 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/iview-ui/RadioGroup.vue: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/subHeader.vue: -------------------------------------------------------------------------------- 1 | 4 | 9 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/FlatButton.vue: -------------------------------------------------------------------------------- 1 | 4 | 9 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/iview-ui/Row.vue: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/pagination.vue: -------------------------------------------------------------------------------- 1 | 5 | 10 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/slider.vue: -------------------------------------------------------------------------------- 1 | 7 | 12 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/textField.vue: -------------------------------------------------------------------------------- 1 | 4 | 9 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/avatar.vue: -------------------------------------------------------------------------------- 1 | 7 | 12 | -------------------------------------------------------------------------------- /src/views/designerPage/utils/guid.js: -------------------------------------------------------------------------------- 1 | const guid = () => { // 获取随机ID,组件拖到预览视图后就会被设置个ID 2 | function s4() { 3 | return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1); 4 | } 5 | return `${s4()}${s4()}-${s4()}`; 6 | }; 7 | export default guid; 8 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/badge.vue: -------------------------------------------------------------------------------- 1 | 7 | 12 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/grid.vue: -------------------------------------------------------------------------------- 1 | 7 | 12 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/list.vue: -------------------------------------------------------------------------------- 1 | 7 | 12 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/listItem.vue: -------------------------------------------------------------------------------- 1 | 7 | 12 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/timePicker.vue: -------------------------------------------------------------------------------- 1 | 7 | 12 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/backTop.vue: -------------------------------------------------------------------------------- 1 | 7 | 12 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/datePicker.vue: -------------------------------------------------------------------------------- 1 | 7 | 12 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/icon.vue: -------------------------------------------------------------------------------- 1 | 6 | 11 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/iconButton.vue: -------------------------------------------------------------------------------- 1 | 5 | 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | /dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | /test/unit/coverage/ 8 | /test/e2e/reports/ 9 | selenium-debug.log 10 | 11 | # Editor directories and files 12 | .idea 13 | .vscode 14 | *.suo 15 | *.ntvs* 16 | *.njsproj 17 | *.sln 18 | -------------------------------------------------------------------------------- /.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-import": {}, 6 | "postcss-url": {}, 7 | // to edit target browsers: use "browserslist" field in package.json 8 | "autoprefixer": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/floatingActionButton.vue: -------------------------------------------------------------------------------- 1 | 6 | 11 | -------------------------------------------------------------------------------- /src/views/designerPage/utils/leancloud storage.js: -------------------------------------------------------------------------------- 1 | import AV from 'leancloud-storage'; 2 | 3 | const APP_ID = 'jtP7IlVD1aOBkUvgoue8BsWG-gzGzoHsz'; 4 | const APP_KEY = 'SQbJtem0VkQlb1VGc4RiaI2u'; 5 | 6 | AV.init({ 7 | appId: APP_ID, 8 | appKey: APP_KEY, 9 | }); 10 | 11 | export default AV; 12 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/divider.vue: -------------------------------------------------------------------------------- 1 | 6 | 11 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/selectField.vue: -------------------------------------------------------------------------------- 1 | 6 | 11 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/chip.vue: -------------------------------------------------------------------------------- 1 | 8 | 13 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/paper.vue: -------------------------------------------------------------------------------- 1 | 10 | 15 | -------------------------------------------------------------------------------- /src/views/designerPage/components/template/Common/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import Text from './Text' 3 | import Img from './Img' 4 | import Br from './Br' 5 | import Div from './Div' 6 | import A from './A' 7 | var obj = { 8 | Text, 9 | Img, 10 | Br, 11 | Div, 12 | A 13 | } 14 | 15 | export default obj 16 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/cardHeader.vue: -------------------------------------------------------------------------------- 1 | 6 | 11 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/tab.vue: -------------------------------------------------------------------------------- 1 | 8 | 13 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/breadcurmb.vue: -------------------------------------------------------------------------------- 1 | 8 | 13 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/iview-ui/ButtonGroup.vue: -------------------------------------------------------------------------------- 1 | 13 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/breadcrumb.vue: -------------------------------------------------------------------------------- 1 | 8 | 13 | -------------------------------------------------------------------------------- /src/components/vue-color-picker/index.js: -------------------------------------------------------------------------------- 1 | // http://vue-color-picker.rxshc.com/ 2 | // 导入组件 3 | import colorPicker from './colorPicker.vue' 4 | 5 | // 定义插件,可通过 Vue.use() 方法注册插件,然后全局使用组件 6 | const install = function (Vue, opts = {}) { 7 | // 定义全局组件 8 | Vue.component('colorPicker', colorPicker) 9 | } 10 | 11 | export { colorPicker } 12 | 13 | // 默认导出 install 方法 14 | export default { 15 | install 16 | } 17 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-vue-jsx", "transform-runtime"], 12 | "env": { 13 | "test": { 14 | "presets": ["env", "stage-2"], 15 | "plugins": ["transform-vue-jsx", "istanbul"] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /test/unit/specs/HelloWorld.spec.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import HelloWorld from '@/components/HelloWorld'; 3 | 4 | describe('HelloWorld.vue', () => { 5 | it('should render correct contents', () => { 6 | const Constructor = Vue.extend(HelloWorld); 7 | const vm = new Constructor().$mount(); 8 | expect(vm.$el.querySelector('.hello h1').textContent) 9 | .to.equal('Welcome to Your Vue.js App'); 10 | }); 11 | }); 12 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/mint-ui/Swipe.vue: -------------------------------------------------------------------------------- 1 | 8 | 18 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/iview-ui/index.js: -------------------------------------------------------------------------------- 1 | import iviewRow from './Row'; 2 | import iviewButtonGroup from './ButtonGroup'; 3 | import iviewRadioGroup from './RadioGroup'; 4 | import iviewSelect from './Select'; 5 | import iviewForm from './Form'; 6 | import iviewCard from './Card'; 7 | 8 | export default{ 9 | iviewRow, 10 | iviewButtonGroup, 11 | iviewRadioGroup, 12 | iviewSelect, 13 | iviewForm, 14 | iviewCard, 15 | }; 16 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/nav.vue: -------------------------------------------------------------------------------- 1 | 8 | 13 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/shanGe.vue: -------------------------------------------------------------------------------- 1 | 9 | 14 | -------------------------------------------------------------------------------- /server/routes/auth.js: -------------------------------------------------------------------------------- 1 | const auth = require('../controllers/user.js'); 2 | const router = require('koa-router')(); 3 | 4 | router.get('/user/getAllUsers', auth.getAllUsers); 5 | router.get('/user/:id', auth.getUserById); 6 | router.post('/user/postUserAuth', auth.postUserAuth); 7 | router.post('/user/getUserByName', auth.getUserByName); 8 | router.post('/user/createUser', auth.createUser); 9 | router.post('/user/updateUser', auth.updateUser); 10 | 11 | module.exports = router; 12 | -------------------------------------------------------------------------------- /src/assets/css/common.less: -------------------------------------------------------------------------------- 1 | @import '~iview/src/styles/index.less'; 2 | 3 | // 下面是要覆盖的变量,例如: 4 | @primary-color: #ce5656; 5 | 6 | .fc-primary { 7 | color: #ce5656; 8 | } 9 | .fl-left { 10 | float: left; 11 | } 12 | .fl-right { 13 | float: right; 14 | } 15 | 16 | #placeholder { 17 | min-height: 50px; 18 | border: 1px dashed lightgray; 19 | } 20 | 21 | #placeholder.inline { 22 | min-height: 50px; 23 | min-width: 50px; 24 | border: 1px dashed lightgray; 25 | display: inline-block; 26 | vertical-align: middle; 27 | } -------------------------------------------------------------------------------- /server/routes/colorDisk.js: -------------------------------------------------------------------------------- 1 | // server/routes/api.js 2 | 3 | const colorDisk = require('../controllers/colorDisk.js'); 4 | const router = require('koa-router')(); 5 | 6 | router.get('/getAllColorDisk', colorDisk.getAllColorDisk); 7 | router.get('/getQueryColorDisk', colorDisk.getQueryColorDisk); 8 | router.post('/createColorDisk', colorDisk.createColorDisk); 9 | router.delete('/removeColorDisk/:id', colorDisk.removeColorDisk); 10 | router.post('/updateColorDisk', colorDisk.updateColorDisk); 11 | 12 | module.exports = router; // 导出router规则 13 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/muse-ui/card.vue: -------------------------------------------------------------------------------- 1 | 15 | 20 | -------------------------------------------------------------------------------- /server/config/db.js: -------------------------------------------------------------------------------- 1 | // db.js 2 | 3 | /* 4 | sequelize-auto -o "./server/schema" 5 | -d front-end-designer -h 127.0.0.1 -u root -p 3306 -x 123456 -e mysql 6 | */ 7 | 8 | const Sequelize = require('sequelize'); // 引入sequelize 9 | 10 | // 使用url连接的形式进行连接,注意将root: 后面的XXXX改成自己数据库的密码 11 | const FEDSQL = new Sequelize('mysql://root:123456@localhost/front-end-designer', { 12 | define: { 13 | timestamps: false, // 取消Sequelzie自动给数据表加入时间戳(createdAt以及updatedAt) 14 | }, 15 | }); 16 | 17 | module.exports = { 18 | FEDSQL, // 将Todolist暴露出接口方便Model调用 19 | }; 20 | -------------------------------------------------------------------------------- /test/unit/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | 3 | Vue.config.productionTip = false; 4 | 5 | // require all test files (files that ends with .spec.js) 6 | const testsContext = require.context('./specs', true, /\.spec$/); 7 | testsContext.keys().forEach(testsContext); 8 | 9 | // require all src files except main.js for coverage. 10 | // you can also change this to match only the subset of files that 11 | // you want coverage for. 12 | const srcContext = require.context('../../src', true, /^\.\/(?!main(\.js)?$)/); 13 | srcContext.keys().forEach(srcContext); 14 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/iview-ui/Select.vue: -------------------------------------------------------------------------------- 1 | 6 | 25 | -------------------------------------------------------------------------------- /test/e2e/specs/test.js: -------------------------------------------------------------------------------- 1 | // For authoring Nightwatch tests, see 2 | // http://nightwatchjs.org/guide#usage 3 | 4 | module.exports = { 5 | 'default e2e tests': function test(browser) { 6 | // automatically uses dev Server port from /config.index.js 7 | // default: http://localhost:8080 8 | // see nightwatch.conf.js 9 | const devServer = browser.globals.devServerURL; 10 | 11 | browser 12 | .url(devServer) 13 | .waitForElementVisible('#app', 5000) 14 | .assert.elementPresent('.hello') 15 | .assert.containsText('h1', 'Welcome to Your Vue.js App') 16 | .assert.elementCount('img', 1) 17 | .end(); 18 | }, 19 | }; 20 | -------------------------------------------------------------------------------- /src/views/designerPage/components/template/Mint-UI/index.js: -------------------------------------------------------------------------------- 1 | 2 | /* eslint-disable */ 3 | // Mint-UI template 4 | import Header from './Header' 5 | import Button from './Button' 6 | import SwipeItem from './Swipe item' 7 | import Swipe from './Swipe' 8 | import Range from './Range' 9 | import Progress from './Progress' 10 | import Cell from './Cell' 11 | import Switch from './Switch' 12 | import Field from './Field' 13 | import Badge from './Badge' 14 | 15 | var obj = { 16 | Header, 17 | Button, 18 | ['Swipe item']: SwipeItem, 19 | Swipe, 20 | Range, 21 | Progress, 22 | Cell, 23 | Switch, 24 | Field, 25 | Badge 26 | } 27 | 28 | export default obj 29 | -------------------------------------------------------------------------------- /server/schema/projectManage.js: -------------------------------------------------------------------------------- 1 | /* jshint indent: 2 */ 2 | 3 | module.exports = (sequelize, DataTypes) => { 4 | console.log('projectManage Table'); 5 | return sequelize.define('projectManage', { 6 | id: { 7 | type: DataTypes.INTEGER(11).UNSIGNED, 8 | allowNull: false, 9 | primaryKey: true, 10 | autoIncrement: true, 11 | }, 12 | project_name: { 13 | type: DataTypes.CHAR(255), 14 | allowNull: true, 15 | }, 16 | creator: { 17 | type: DataTypes.CHAR(50), 18 | allowNull: true, 19 | }, 20 | descr: { 21 | type: DataTypes.CHAR(255), 22 | allowNull: true, 23 | }, 24 | }, { 25 | tableName: 'projectManage', 26 | }); 27 | }; 28 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 15 | 16 | 37 | -------------------------------------------------------------------------------- /src/views/designerPage/components/preview_mobile.vue: -------------------------------------------------------------------------------- 1 | 9 | 22 | 35 | -------------------------------------------------------------------------------- /src/assets/css/highlight/ascetic.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Original style from softwaremaniacs.org (c) Ivan Sagalaev 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: white; 12 | color: black; 13 | } 14 | 15 | .hljs-string, 16 | .hljs-variable, 17 | .hljs-template-variable, 18 | .hljs-symbol, 19 | .hljs-bullet, 20 | .hljs-section, 21 | .hljs-addition, 22 | .hljs-attribute, 23 | .hljs-link { 24 | color: #888; 25 | } 26 | 27 | .hljs-comment, 28 | .hljs-quote, 29 | .hljs-meta, 30 | .hljs-deletion { 31 | color: #ccc; 32 | } 33 | 34 | .hljs-keyword, 35 | .hljs-selector-tag, 36 | .hljs-section, 37 | .hljs-name, 38 | .hljs-type, 39 | .hljs-strong { 40 | font-weight: bold; 41 | } 42 | 43 | .hljs-emphasis { 44 | font-style: italic; 45 | } 46 | -------------------------------------------------------------------------------- /server/schema/user.js: -------------------------------------------------------------------------------- 1 | /* jshint indent: 2 */ 2 | 3 | module.exports = (sequelize, DataTypes) => { 4 | console.log('user Table'); 5 | return sequelize.define('user', { 6 | id: { 7 | type: DataTypes.INTEGER(11).UNSIGNED, 8 | allowNull: false, 9 | primaryKey: true, 10 | autoIncrement: true, 11 | }, 12 | userName: { 13 | type: DataTypes.CHAR(50), 14 | allowNull: false, 15 | defaultValue: '', 16 | }, 17 | password: { 18 | type: DataTypes.CHAR(128), 19 | allowNull: false, 20 | defaultValue: '', 21 | }, 22 | email: { 23 | type: DataTypes.CHAR(50), 24 | allowNull: true, 25 | }, 26 | character: { 27 | type: DataTypes.CHAR(20), 28 | allowNull: true, 29 | }, 30 | }, { 31 | tableName: 'user', 32 | }); 33 | }; 34 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 可视化网站配色布局工具 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /server/schema/projectPermission.js: -------------------------------------------------------------------------------- 1 | /* jshint indent: 2 */ 2 | 3 | module.exports = (sequelize, DataTypes) => { 4 | console.log('projectPermission Table'); 5 | return sequelize.define('projectPermission', { 6 | id: { 7 | type: DataTypes.INTEGER(11).UNSIGNED, 8 | allowNull: false, 9 | primaryKey: true, 10 | autoIncrement: true, 11 | }, 12 | user_id: { 13 | type: DataTypes.INTEGER(11), 14 | allowNull: true, 15 | }, 16 | project_id: { 17 | type: DataTypes.INTEGER(11), 18 | allowNull: false, 19 | }, 20 | write: { 21 | type: DataTypes.INTEGER(1), 22 | allowNull: false, 23 | defaultValue: '0', 24 | }, 25 | setting: { 26 | type: DataTypes.INTEGER(1), 27 | allowNull: false, 28 | defaultValue: '0', 29 | }, 30 | }, { 31 | tableName: 'projectPermission', 32 | }); 33 | }; 34 | -------------------------------------------------------------------------------- /src/views/designerPage/utils/mergeDeep.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Simple object check. 3 | * @param item 4 | * @returns {boolean} 5 | */ 6 | function isObject(item) { 7 | return (item && typeof item === 'object' && !Array.isArray(item)); 8 | } 9 | 10 | /** 11 | * Deep merge two objects. 12 | * @param target 13 | * @param ...sources 14 | */ 15 | export default function mergeDeep(target, ...sources) { 16 | if (!sources.length) return target; 17 | const source = sources.shift(); 18 | 19 | if (isObject(target) && isObject(source)) { 20 | for (const key in source) { 21 | if (isObject(source[key])) { 22 | if (!target[key]) Object.assign(target, { [key]: {} }); 23 | mergeDeep(target[key], source[key]); 24 | } else { 25 | Object.assign(target, { [key]: source[key] }); 26 | } 27 | } 28 | } 29 | 30 | return mergeDeep(target, ...sources); 31 | } 32 | -------------------------------------------------------------------------------- /server/schema/templetPage.js: -------------------------------------------------------------------------------- 1 | /* jshint indent: 2 */ 2 | 3 | module.exports = (sequelize, DataTypes) => { 4 | console.log('templetPage Table'); 5 | return sequelize.define('templetPage', { 6 | id: { 7 | type: DataTypes.INTEGER(11).UNSIGNED, 8 | allowNull: false, 9 | primaryKey: true, 10 | autoIncrement: true, 11 | }, 12 | templet_name: { 13 | type: DataTypes.CHAR(255), 14 | allowNull: true, 15 | }, 16 | project_id: { 17 | type: DataTypes.INTEGER(11), 18 | allowNull: false, 19 | }, 20 | creator: { 21 | type: DataTypes.CHAR(255), 22 | allowNull: true, 23 | }, 24 | descr: { 25 | type: DataTypes.CHAR(255), 26 | allowNull: true, 27 | }, 28 | detail: { 29 | type: DataTypes.TEXT, 30 | allowNull: true, 31 | }, 32 | }, { 33 | tableName: 'templetPage', 34 | }); 35 | }; 36 | -------------------------------------------------------------------------------- /test/e2e/custom-assertions/elementCount.js: -------------------------------------------------------------------------------- 1 | // A custom Nightwatch assertion. 2 | // The assertion name is the filename. 3 | // Example usage: 4 | // 5 | // browser.assert.elementCount(selector, count) 6 | // 7 | // For more information on custom assertions see: 8 | // http://nightwatchjs.org/guide#writing-custom-assertions 9 | 10 | exports.assertion = function (selector, count) { 11 | this.message = 'Testing if element <' + selector + '> has count: ' + count 12 | this.expected = count 13 | this.pass = function (val) { 14 | return val === this.expected 15 | } 16 | this.value = function (res) { 17 | return res.value 18 | } 19 | this.command = function (cb) { 20 | var self = this 21 | return this.api.execute(function (selector) { 22 | return document.querySelectorAll(selector).length 23 | }, [selector], function (res) { 24 | cb.call(self, res) 25 | }) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/views/login/index.less: -------------------------------------------------------------------------------- 1 | .loginPage { 2 | background-color: #ce5656; 3 | width: 100%; 4 | height: 100%; 5 | margin: 0; 6 | position: absolute; 7 | .logo-title { 8 | display: inline-block; 9 | vertical-align: middle; 10 | margin-top: 4%; 11 | .title { 12 | font-size: 40px; 13 | color: #fff; 14 | margin-left: 10px; 15 | font-weight: bolder; 16 | } 17 | } 18 | .loginCard { 19 | position: absolute; 20 | width: 30%; 21 | left: 35%; 22 | top: 22%; 23 | } 24 | /* 可以设置不同的进入和离开动画 */ 25 | /* 设置持续时间和动画函数 */ 26 | .slide-fade-enter-active { 27 | transition: all .5s ease; 28 | } 29 | .slide-fade-leave-active { 30 | transition: all .5s; 31 | } 32 | .slide-fade-enter, .slide-fade-leave-to 33 | /* .slide-fade-leave-active for below version 2.1.8 */ { 34 | transform: translateY(10px); 35 | opacity: 0; 36 | } 37 | } -------------------------------------------------------------------------------- /src/assets/css/highlight/mono-blue.css: -------------------------------------------------------------------------------- 1 | /* 2 | Five-color theme from a single blue hue. 3 | */ 4 | .hljs { 5 | display: block; 6 | overflow-x: auto; 7 | padding: 0.5em; 8 | background: #eaeef3; 9 | } 10 | 11 | .hljs { 12 | color: #00193a; 13 | } 14 | 15 | .hljs-keyword, 16 | .hljs-selector-tag, 17 | .hljs-title, 18 | .hljs-section, 19 | .hljs-doctag, 20 | .hljs-name, 21 | .hljs-strong { 22 | font-weight: bold; 23 | } 24 | 25 | .hljs-comment { 26 | color: #738191; 27 | } 28 | 29 | .hljs-string, 30 | .hljs-title, 31 | .hljs-section, 32 | .hljs-built_in, 33 | .hljs-literal, 34 | .hljs-type, 35 | .hljs-addition, 36 | .hljs-tag, 37 | .hljs-quote, 38 | .hljs-name, 39 | .hljs-selector-id, 40 | .hljs-selector-class { 41 | color: #0048ab; 42 | } 43 | 44 | .hljs-meta, 45 | .hljs-subst, 46 | .hljs-symbol, 47 | .hljs-regexp, 48 | .hljs-attribute, 49 | .hljs-deletion, 50 | .hljs-variable, 51 | .hljs-template-variable, 52 | .hljs-link, 53 | .hljs-bullet { 54 | color: #4c81c9; 55 | } 56 | 57 | .hljs-emphasis { 58 | font-style: italic; 59 | } 60 | -------------------------------------------------------------------------------- /src/views/designerPage/components/template/Common/Br.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { getTemplate, getSlotContent, getStringTypeAttr } from '@/views/designerPage/components/template' 3 | 4 | var handle = function(_attr, _slots) { 5 | //定义默认属性 6 | let attributes = { 7 | }, 8 | slots = {} 9 | 10 | //覆盖默认属性 11 | Object.assign(slots, _slots) 12 | Object.assign(attributes, _attr) 13 | 14 | //根据组件不同需要做的不同操作 15 | 16 | 17 | //获取插槽模板内容 18 | var subContent = getSlotContent(slots) || ' ' 19 | //设置当前组件的slot 20 | if (attributes.slot && attributes.slot !== 'default') { 21 | attributes.slot = { 22 | type: 'text', 23 | value: attributes.slot 24 | } 25 | } else { 26 | attributes.slot = { 27 | type: 'text', 28 | value: '' 29 | } 30 | } 31 | 32 | //字符串模板操作 33 | let stringAttr = getStringTypeAttr(attributes) 34 | let template = `
` 35 | 36 | return { template, attributes, slots } 37 | } 38 | export default handle 39 | -------------------------------------------------------------------------------- /server/routes/projectManage.js: -------------------------------------------------------------------------------- 1 | const projectManage = require('../controllers/projectManage.js'); 2 | const router = require('koa-router')(); 3 | 4 | router.get('/getAllProject', projectManage.getAllProject); 5 | router.get('/getProjectByUserId/:id', projectManage.getProjectByUserId); 6 | router.get('/getProjectById/:id', projectManage.getProjectById); 7 | router.get('/getTempletById/:id', projectManage.getTempletById); 8 | router.post('/createProject', projectManage.createProject); 9 | router.post('/createProjectPermission', projectManage.createProjectPermission); 10 | router.post('/createTemplet', projectManage.createTemplet); 11 | router.post('/updateProject', projectManage.updateProject); 12 | router.post('/updateProjectPermission', projectManage.updateProjectPermission); 13 | router.post('/updateTemplet', projectManage.updateTemplet); 14 | router.delete('/removeProject/:id', projectManage.removeProject); 15 | router.delete('/removeProjectPermission/:id', projectManage.removeProjectPermission); 16 | router.delete('/removeTemplet/:id', projectManage.removeTemplet); 17 | 18 | module.exports = router; 19 | -------------------------------------------------------------------------------- /src/assets/css/highlight/dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Dark style from softwaremaniacs.org (c) Ivan Sagalaev 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #444; 12 | } 13 | 14 | .hljs-keyword, 15 | .hljs-selector-tag, 16 | .hljs-literal, 17 | .hljs-section, 18 | .hljs-link { 19 | color: white; 20 | } 21 | 22 | .hljs, 23 | .hljs-subst { 24 | color: #ddd; 25 | } 26 | 27 | .hljs-string, 28 | .hljs-title, 29 | .hljs-name, 30 | .hljs-type, 31 | .hljs-attribute, 32 | .hljs-symbol, 33 | .hljs-bullet, 34 | .hljs-built_in, 35 | .hljs-addition, 36 | .hljs-variable, 37 | .hljs-template-tag, 38 | .hljs-template-variable { 39 | color: #d88; 40 | } 41 | 42 | .hljs-comment, 43 | .hljs-quote, 44 | .hljs-deletion, 45 | .hljs-meta { 46 | color: #777; 47 | } 48 | 49 | .hljs-keyword, 50 | .hljs-selector-tag, 51 | .hljs-literal, 52 | .hljs-title, 53 | .hljs-section, 54 | .hljs-doctag, 55 | .hljs-type, 56 | .hljs-name, 57 | .hljs-strong { 58 | font-weight: bold; 59 | } 60 | 61 | .hljs-emphasis { 62 | font-style: italic; 63 | } 64 | -------------------------------------------------------------------------------- /src/assets/css/highlight/androidstudio.css: -------------------------------------------------------------------------------- 1 | /* 2 | Date: 24 Fev 2015 3 | Author: Pedro Oliveira 4 | */ 5 | 6 | .hljs { 7 | color: #a9b7c6; 8 | background: #282b2e; 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | } 13 | 14 | .hljs-number, 15 | .hljs-literal, 16 | .hljs-symbol, 17 | .hljs-bullet { 18 | color: #6897BB; 19 | } 20 | 21 | .hljs-keyword, 22 | .hljs-selector-tag, 23 | .hljs-deletion { 24 | color: #cc7832; 25 | } 26 | 27 | .hljs-variable, 28 | .hljs-template-variable, 29 | .hljs-link { 30 | color: #629755; 31 | } 32 | 33 | .hljs-comment, 34 | .hljs-quote { 35 | color: #808080; 36 | } 37 | 38 | .hljs-meta { 39 | color: #bbb529; 40 | } 41 | 42 | .hljs-string, 43 | .hljs-attribute, 44 | .hljs-addition { 45 | color: #6A8759; 46 | } 47 | 48 | .hljs-section, 49 | .hljs-title, 50 | .hljs-type { 51 | color: #ffc66d; 52 | } 53 | 54 | .hljs-name, 55 | .hljs-selector-id, 56 | .hljs-selector-class { 57 | color: #e8bf6a; 58 | } 59 | 60 | .hljs-emphasis { 61 | font-style: italic; 62 | } 63 | 64 | .hljs-strong { 65 | font-weight: bold; 66 | } 67 | -------------------------------------------------------------------------------- /src/assets/css/highlight/codepen-embed.css: -------------------------------------------------------------------------------- 1 | /* 2 | codepen.io Embed Theme 3 | Author: Justin Perry 4 | Original theme - https://github.com/chriskempson/tomorrow-theme 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #222; 12 | color: #fff; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-quote { 17 | color: #777; 18 | } 19 | 20 | .hljs-variable, 21 | .hljs-template-variable, 22 | .hljs-tag, 23 | .hljs-regexp, 24 | .hljs-meta, 25 | .hljs-number, 26 | .hljs-built_in, 27 | .hljs-builtin-name, 28 | .hljs-literal, 29 | .hljs-params, 30 | .hljs-symbol, 31 | .hljs-bullet, 32 | .hljs-link, 33 | .hljs-deletion { 34 | color: #ab875d; 35 | } 36 | 37 | .hljs-section, 38 | .hljs-title, 39 | .hljs-name, 40 | .hljs-selector-id, 41 | .hljs-selector-class, 42 | .hljs-type, 43 | .hljs-attribute { 44 | color: #9b869b; 45 | } 46 | 47 | .hljs-string, 48 | .hljs-keyword, 49 | .hljs-selector-tag, 50 | .hljs-addition { 51 | color: #8f9c6c; 52 | } 53 | 54 | .hljs-emphasis { 55 | font-style: italic; 56 | } 57 | 58 | .hljs-strong { 59 | font-weight: bold; 60 | } 61 | -------------------------------------------------------------------------------- /src/assets/css/highlight/brown-paper.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Brown Paper style from goldblog.com.ua (c) Zaripov Yura 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background:#b7a68e url(./brown-papersq.png); 12 | } 13 | 14 | .hljs-keyword, 15 | .hljs-selector-tag, 16 | .hljs-literal { 17 | color:#005599; 18 | font-weight:bold; 19 | } 20 | 21 | .hljs, 22 | .hljs-subst { 23 | color: #363c69; 24 | } 25 | 26 | .hljs-string, 27 | .hljs-title, 28 | .hljs-section, 29 | .hljs-type, 30 | .hljs-attribute, 31 | .hljs-symbol, 32 | .hljs-bullet, 33 | .hljs-built_in, 34 | .hljs-addition, 35 | .hljs-variable, 36 | .hljs-template-tag, 37 | .hljs-template-variable, 38 | .hljs-link, 39 | .hljs-name { 40 | color: #2c009f; 41 | } 42 | 43 | .hljs-comment, 44 | .hljs-quote, 45 | .hljs-meta, 46 | .hljs-deletion { 47 | color: #802022; 48 | } 49 | 50 | .hljs-keyword, 51 | .hljs-selector-tag, 52 | .hljs-literal, 53 | .hljs-doctag, 54 | .hljs-title, 55 | .hljs-section, 56 | .hljs-type, 57 | .hljs-name, 58 | .hljs-strong { 59 | font-weight: bold; 60 | } 61 | 62 | .hljs-emphasis { 63 | font-style: italic; 64 | } 65 | -------------------------------------------------------------------------------- /test/unit/karma.conf.js: -------------------------------------------------------------------------------- 1 | // This is a karma config file. For more details see 2 | // http://karma-runner.github.io/0.13/config/configuration-file.html 3 | // we are also using it with karma-webpack 4 | // https://github.com/webpack/karma-webpack 5 | 6 | const webpackConfig = require('../../build/webpack.test.conf'); 7 | 8 | module.exports = function karmaConfig(config) { 9 | config.set({ 10 | // to run in additional browsers: 11 | // 1. install corresponding karma launcher 12 | // http://karma-runner.github.io/0.13/config/browsers.html 13 | // 2. add it to the `browsers` array below. 14 | browsers: ['PhantomJS'], 15 | frameworks: ['mocha', 'sinon-chai', 'phantomjs-shim'], 16 | reporters: ['spec', 'coverage'], 17 | files: ['./index.js'], 18 | preprocessors: { 19 | './index.js': ['webpack', 'sourcemap'], 20 | }, 21 | webpack: webpackConfig, 22 | webpackMiddleware: { 23 | noInfo: true, 24 | }, 25 | coverageReporter: { 26 | dir: './coverage', 27 | reporters: [ 28 | { type: 'lcov', subdir: '.' }, 29 | { type: 'text-summary' }, 30 | ], 31 | }, 32 | }); 33 | }; 34 | -------------------------------------------------------------------------------- /src/assets/css/highlight/vs.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Visual Studio-like style based on original C# coloring by Jason Diamond 4 | 5 | */ 6 | .hljs { 7 | display: block; 8 | overflow-x: auto; 9 | padding: 0.5em; 10 | background: white; 11 | color: black; 12 | } 13 | 14 | .hljs-comment, 15 | .hljs-quote, 16 | .hljs-variable { 17 | color: #008000; 18 | } 19 | 20 | .hljs-keyword, 21 | .hljs-selector-tag, 22 | .hljs-built_in, 23 | .hljs-name, 24 | .hljs-tag { 25 | color: #00f; 26 | } 27 | 28 | .hljs-string, 29 | .hljs-title, 30 | .hljs-section, 31 | .hljs-attribute, 32 | .hljs-literal, 33 | .hljs-template-tag, 34 | .hljs-template-variable, 35 | .hljs-type, 36 | .hljs-addition { 37 | color: #a31515; 38 | } 39 | 40 | .hljs-deletion, 41 | .hljs-selector-attr, 42 | .hljs-selector-pseudo, 43 | .hljs-meta { 44 | color: #2b91af; 45 | } 46 | 47 | .hljs-doctag { 48 | color: #808080; 49 | } 50 | 51 | .hljs-attr { 52 | color: #f00; 53 | } 54 | 55 | .hljs-symbol, 56 | .hljs-bullet, 57 | .hljs-link { 58 | color: #00b0e8; 59 | } 60 | 61 | 62 | .hljs-emphasis { 63 | font-style: italic; 64 | } 65 | 66 | .hljs-strong { 67 | font-weight: bold; 68 | } 69 | -------------------------------------------------------------------------------- /src/assets/css/highlight/far.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | FAR Style (c) MajestiC 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #000080; 12 | } 13 | 14 | .hljs, 15 | .hljs-subst { 16 | color: #0ff; 17 | } 18 | 19 | .hljs-string, 20 | .hljs-attribute, 21 | .hljs-symbol, 22 | .hljs-bullet, 23 | .hljs-built_in, 24 | .hljs-builtin-name, 25 | .hljs-template-tag, 26 | .hljs-template-variable, 27 | .hljs-addition { 28 | color: #ff0; 29 | } 30 | 31 | .hljs-keyword, 32 | .hljs-selector-tag, 33 | .hljs-section, 34 | .hljs-type, 35 | .hljs-name, 36 | .hljs-selector-id, 37 | .hljs-selector-class, 38 | .hljs-variable { 39 | color: #fff; 40 | } 41 | 42 | .hljs-comment, 43 | .hljs-quote, 44 | .hljs-doctag, 45 | .hljs-deletion { 46 | color: #888; 47 | } 48 | 49 | .hljs-number, 50 | .hljs-regexp, 51 | .hljs-literal, 52 | .hljs-link { 53 | color: #0f0; 54 | } 55 | 56 | .hljs-meta { 57 | color: #008080; 58 | } 59 | 60 | .hljs-keyword, 61 | .hljs-selector-tag, 62 | .hljs-title, 63 | .hljs-section, 64 | .hljs-name, 65 | .hljs-strong { 66 | font-weight: bold; 67 | } 68 | 69 | .hljs-emphasis { 70 | font-style: italic; 71 | } 72 | -------------------------------------------------------------------------------- /src/assets/css/highlight/arta.css: -------------------------------------------------------------------------------- 1 | /* 2 | Date: 17.V.2011 3 | Author: pumbur 4 | */ 5 | 6 | .hljs { 7 | display: block; 8 | overflow-x: auto; 9 | padding: 0.5em; 10 | background: #222; 11 | } 12 | 13 | .hljs, 14 | .hljs-subst { 15 | color: #aaa; 16 | } 17 | 18 | .hljs-section { 19 | color: #fff; 20 | } 21 | 22 | .hljs-comment, 23 | .hljs-quote, 24 | .hljs-meta { 25 | color: #444; 26 | } 27 | 28 | .hljs-string, 29 | .hljs-symbol, 30 | .hljs-bullet, 31 | .hljs-regexp { 32 | color: #ffcc33; 33 | } 34 | 35 | .hljs-number, 36 | .hljs-addition { 37 | color: #00cc66; 38 | } 39 | 40 | .hljs-built_in, 41 | .hljs-builtin-name, 42 | .hljs-literal, 43 | .hljs-type, 44 | .hljs-template-variable, 45 | .hljs-attribute, 46 | .hljs-link { 47 | color: #32aaee; 48 | } 49 | 50 | .hljs-keyword, 51 | .hljs-selector-tag, 52 | .hljs-name, 53 | .hljs-selector-id, 54 | .hljs-selector-class { 55 | color: #6644aa; 56 | } 57 | 58 | .hljs-title, 59 | .hljs-variable, 60 | .hljs-deletion, 61 | .hljs-template-tag { 62 | color: #bb1166; 63 | } 64 | 65 | .hljs-section, 66 | .hljs-doctag, 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | 71 | .hljs-emphasis { 72 | font-style: italic; 73 | } 74 | -------------------------------------------------------------------------------- /server/models/projectManage.js: -------------------------------------------------------------------------------- 1 | // server/models/todolist.js 2 | 3 | const db = require('../config/db.js'); 4 | 5 | const projectManage = '../schema/projectManage.js'; 6 | 7 | const FEDSQL = db.FEDSQL; // 引入数据库 8 | 9 | const projects = FEDSQL.import(projectManage); 10 | 11 | const getAllProject = async () => { // 获取全部 12 | const allProject = await projects.findAll();// 查找全部 13 | return allProject; // 返回数据 14 | }; 15 | 16 | const getProjectById = async (id) => { 17 | const project = await projects.findOne({ 18 | where: { id }, 19 | }); 20 | 21 | return project; // 返回数据 22 | }; 23 | 24 | const createProject = async (data) => { 25 | const project = await projects.create(data); 26 | return project; 27 | }; 28 | 29 | const removeProject = async (id) => { 30 | await projects.destroy({ 31 | where: { 32 | id, 33 | }, 34 | }); 35 | 36 | return true; 37 | }; 38 | 39 | const updateProject = async (data) => { 40 | await projects.update(data, { 41 | where: { 42 | id: data.id, 43 | }, 44 | }); 45 | 46 | return true; 47 | }; 48 | 49 | module.exports = { 50 | getAllProject, 51 | getProjectById, 52 | createProject, 53 | removeProject, 54 | updateProject, 55 | }; 56 | -------------------------------------------------------------------------------- /src/views/designerPage/components/template/Muse-UI/Tbody.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { getTemplate, getSlotContent, getStringTypeAttr } from '@/views/designerPage/components/template' 3 | 4 | var handle = function(_attr, _slots) { 5 | //定义默认属性 6 | let attributes = { 7 | }, 8 | slots = { 9 | default: [] 10 | } 11 | 12 | //覆盖默认属性 13 | Object.assign(slots, _slots) 14 | Object.assign(attributes, _attr) 15 | 16 | //根据组件不同需要做的不同操作 17 | 18 | 19 | //获取插槽模板内容 20 | var subContent = getSlotContent(slots) || ' ' 21 | //设置当前组件的slot 22 | if (attributes.slot && attributes.slot!=='default') { 23 | attributes.slot = { 24 | type: 'text', 25 | value: attributes.slot 26 | } 27 | } else { 28 | attributes.slot = { 29 | type: 'text', 30 | value: '' 31 | } 32 | } 33 | 34 | //字符串模板操作 35 | let stringAttr = getStringTypeAttr(attributes) 36 | let template = ` 38 | ${subContent} 39 | ` 40 | 41 | return { template, attributes, slots } 42 | } 43 | export default handle 44 | -------------------------------------------------------------------------------- /src/views/designerPage/components/template/Muse-UI/Tfoot.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { getTemplate, getSlotContent, getStringTypeAttr } from '@/views/designerPage/components/template' 3 | 4 | var handle = function(_attr, _slots) { 5 | //定义默认属性 6 | let attributes = { 7 | }, 8 | slots = { 9 | default: [] 10 | } 11 | 12 | //覆盖默认属性 13 | Object.assign(slots, _slots) 14 | Object.assign(attributes, _attr) 15 | 16 | //根据组件不同需要做的不同操作 17 | 18 | 19 | //获取插槽模板内容 20 | var subContent = getSlotContent(slots) || ' ' 21 | //设置当前组件的slot 22 | if (attributes.slot && attributes.slot!=='default') { 23 | attributes.slot = { 24 | type: 'text', 25 | value: attributes.slot 26 | } 27 | } else { 28 | attributes.slot = { 29 | type: 'text', 30 | value: '' 31 | } 32 | } 33 | 34 | //字符串模板操作 35 | let stringAttr = getStringTypeAttr(attributes) 36 | let template = ` 38 | ${subContent} 39 | ` 40 | 41 | return { template, attributes, slots } 42 | } 43 | export default handle 44 | -------------------------------------------------------------------------------- /src/assets/css/highlight/ir-black.css: -------------------------------------------------------------------------------- 1 | /* 2 | IR_Black style (c) Vasily Mikhailitchenko 3 | */ 4 | 5 | .hljs { 6 | display: block; 7 | overflow-x: auto; 8 | padding: 0.5em; 9 | background: #000; 10 | color: #f8f8f8; 11 | } 12 | 13 | .hljs-comment, 14 | .hljs-quote, 15 | .hljs-meta { 16 | color: #7c7c7c; 17 | } 18 | 19 | .hljs-keyword, 20 | .hljs-selector-tag, 21 | .hljs-tag, 22 | .hljs-name { 23 | color: #96cbfe; 24 | } 25 | 26 | .hljs-attribute, 27 | .hljs-selector-id { 28 | color: #ffffb6; 29 | } 30 | 31 | .hljs-string, 32 | .hljs-selector-attr, 33 | .hljs-selector-pseudo, 34 | .hljs-addition { 35 | color: #a8ff60; 36 | } 37 | 38 | .hljs-subst { 39 | color: #daefa3; 40 | } 41 | 42 | .hljs-regexp, 43 | .hljs-link { 44 | color: #e9c062; 45 | } 46 | 47 | .hljs-title, 48 | .hljs-section, 49 | .hljs-type, 50 | .hljs-doctag { 51 | color: #ffffb6; 52 | } 53 | 54 | .hljs-symbol, 55 | .hljs-bullet, 56 | .hljs-variable, 57 | .hljs-template-variable, 58 | .hljs-literal { 59 | color: #c6c5fe; 60 | } 61 | 62 | .hljs-number, 63 | .hljs-deletion { 64 | color:#ff73fd; 65 | } 66 | 67 | .hljs-emphasis { 68 | font-style: italic; 69 | } 70 | 71 | .hljs-strong { 72 | font-weight: bold; 73 | } 74 | -------------------------------------------------------------------------------- /src/assets/css/highlight/magula.css: -------------------------------------------------------------------------------- 1 | /* 2 | Description: Magula style for highligh.js 3 | Author: Ruslan Keba 4 | Website: http://rukeba.com/ 5 | Version: 1.0 6 | Date: 2009-01-03 7 | Music: Aphex Twin / Xtal 8 | */ 9 | 10 | .hljs { 11 | display: block; 12 | overflow-x: auto; 13 | padding: 0.5em; 14 | background-color: #f4f4f4; 15 | } 16 | 17 | .hljs, 18 | .hljs-subst { 19 | color: black; 20 | } 21 | 22 | .hljs-string, 23 | .hljs-title, 24 | .hljs-symbol, 25 | .hljs-bullet, 26 | .hljs-attribute, 27 | .hljs-addition, 28 | .hljs-variable, 29 | .hljs-template-tag, 30 | .hljs-template-variable { 31 | color: #050; 32 | } 33 | 34 | .hljs-comment, 35 | .hljs-quote { 36 | color: #777; 37 | } 38 | 39 | .hljs-number, 40 | .hljs-regexp, 41 | .hljs-literal, 42 | .hljs-type, 43 | .hljs-link { 44 | color: #800; 45 | } 46 | 47 | .hljs-deletion, 48 | .hljs-meta { 49 | color: #00e; 50 | } 51 | 52 | .hljs-keyword, 53 | .hljs-selector-tag, 54 | .hljs-doctag, 55 | .hljs-title, 56 | .hljs-section, 57 | .hljs-built_in, 58 | .hljs-tag, 59 | .hljs-name { 60 | font-weight: bold; 61 | color: navy; 62 | } 63 | 64 | .hljs-emphasis { 65 | font-style: italic; 66 | } 67 | 68 | .hljs-strong { 69 | font-weight: bold; 70 | } 71 | -------------------------------------------------------------------------------- /src/assets/css/highlight/color-brewer.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Colorbrewer theme 4 | Original: https://github.com/mbostock/colorbrewer-theme (c) Mike Bostock 5 | Ported by Fabrício Tavares de Oliveira 6 | 7 | */ 8 | 9 | .hljs { 10 | display: block; 11 | overflow-x: auto; 12 | padding: 0.5em; 13 | background: #fff; 14 | } 15 | 16 | .hljs, 17 | .hljs-subst { 18 | color: #000; 19 | } 20 | 21 | .hljs-string, 22 | .hljs-meta, 23 | .hljs-symbol, 24 | .hljs-template-tag, 25 | .hljs-template-variable, 26 | .hljs-addition { 27 | color: #756bb1; 28 | } 29 | 30 | .hljs-comment, 31 | .hljs-quote { 32 | color: #636363; 33 | } 34 | 35 | .hljs-number, 36 | .hljs-regexp, 37 | .hljs-literal, 38 | .hljs-bullet, 39 | .hljs-link { 40 | color: #31a354; 41 | } 42 | 43 | .hljs-deletion, 44 | .hljs-variable { 45 | color: #88f; 46 | } 47 | 48 | 49 | 50 | .hljs-keyword, 51 | .hljs-selector-tag, 52 | .hljs-title, 53 | .hljs-section, 54 | .hljs-built_in, 55 | .hljs-doctag, 56 | .hljs-type, 57 | .hljs-tag, 58 | .hljs-name, 59 | .hljs-selector-id, 60 | .hljs-selector-class, 61 | .hljs-strong { 62 | color: #3182bd; 63 | } 64 | 65 | .hljs-emphasis { 66 | font-style: italic; 67 | } 68 | 69 | .hljs-attribute { 70 | color: #e6550d; 71 | } 72 | -------------------------------------------------------------------------------- /test/e2e/nightwatch.conf.js: -------------------------------------------------------------------------------- 1 | require('babel-register') 2 | var config = require('../../config') 3 | 4 | // http://nightwatchjs.org/gettingstarted#settings-file 5 | module.exports = { 6 | src_folders: ['test/e2e/specs'], 7 | output_folder: 'test/e2e/reports', 8 | custom_assertions_path: ['test/e2e/custom-assertions'], 9 | 10 | selenium: { 11 | start_process: true, 12 | server_path: require('selenium-server').path, 13 | host: '127.0.0.1', 14 | port: 4444, 15 | cli_args: { 16 | 'webdriver.chrome.driver': require('chromedriver').path 17 | } 18 | }, 19 | 20 | test_settings: { 21 | default: { 22 | selenium_port: 4444, 23 | selenium_host: 'localhost', 24 | silent: true, 25 | globals: { 26 | devServerURL: 'http://localhost:' + (process.env.PORT || config.dev.port) 27 | } 28 | }, 29 | 30 | chrome: { 31 | desiredCapabilities: { 32 | browserName: 'chrome', 33 | javascriptEnabled: true, 34 | acceptSslCerts: true 35 | } 36 | }, 37 | 38 | firefox: { 39 | desiredCapabilities: { 40 | browserName: 'firefox', 41 | javascriptEnabled: true, 42 | acceptSslCerts: true 43 | } 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/views/designerPage/components/template/Muse-UI/Thead.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { getTemplate, getSlotContent, getStringTypeAttr } from '@/views/designerPage/components/template' 3 | 4 | var handle = function(_attr, _slots) { 5 | //定义默认属性 6 | let attributes = { 7 | }, 8 | slots = { 9 | default: [] 10 | } 11 | 12 | //覆盖默认属性 13 | Object.assign(slots, _slots) 14 | Object.assign(attributes, _attr) 15 | 16 | //根据组件不同需要做的不同操作 17 | 18 | 19 | //获取插槽模板内容 20 | var subContent = getSlotContent(slots) || ' ' 21 | //设置当前组件的slot 22 | if (attributes.slot && attributes.slot!=='default') { 23 | attributes.slot = { 24 | type: 'text', 25 | value: attributes.slot 26 | } 27 | } else { 28 | attributes.slot = { 29 | type: 'text', 30 | value: '' 31 | } 32 | } 33 | 34 | //字符串模板操作 35 | let stringAttr = getStringTypeAttr(attributes) 36 | let template = ` 38 | ${subContent} 39 | ` 40 | 41 | return { template, attributes, slots } 42 | } 43 | export default handle 44 | -------------------------------------------------------------------------------- /src/assets/css/highlight/github-gist.css: -------------------------------------------------------------------------------- 1 | /** 2 | * GitHub Gist Theme 3 | * Author : Louis Barranqueiro - https://github.com/LouisBarranqueiro 4 | */ 5 | 6 | .hljs { 7 | display: block; 8 | background: white; 9 | padding: 0.5em; 10 | color: #333333; 11 | overflow-x: auto; 12 | } 13 | 14 | .hljs-comment, 15 | .hljs-meta { 16 | color: #969896; 17 | } 18 | 19 | .hljs-string, 20 | .hljs-variable, 21 | .hljs-template-variable, 22 | .hljs-strong, 23 | .hljs-emphasis, 24 | .hljs-quote { 25 | color: #df5000; 26 | } 27 | 28 | .hljs-keyword, 29 | .hljs-selector-tag, 30 | .hljs-type { 31 | color: #a71d5d; 32 | } 33 | 34 | .hljs-literal, 35 | .hljs-symbol, 36 | .hljs-bullet, 37 | .hljs-attribute { 38 | color: #0086b3; 39 | } 40 | 41 | .hljs-section, 42 | .hljs-name { 43 | color: #63a35c; 44 | } 45 | 46 | .hljs-tag { 47 | color: #333333; 48 | } 49 | 50 | .hljs-title, 51 | .hljs-attr, 52 | .hljs-selector-id, 53 | .hljs-selector-class, 54 | .hljs-selector-attr, 55 | .hljs-selector-pseudo { 56 | color: #795da3; 57 | } 58 | 59 | .hljs-addition { 60 | color: #55a532; 61 | background-color: #eaffea; 62 | } 63 | 64 | .hljs-deletion { 65 | color: #bd2c00; 66 | background-color: #ffecec; 67 | } 68 | 69 | .hljs-link { 70 | text-decoration: underline; 71 | } 72 | -------------------------------------------------------------------------------- /src/assets/css/highlight/monokai.css: -------------------------------------------------------------------------------- 1 | /* 2 | Monokai style - ported by Luigi Maselli - http://grigio.org 3 | */ 4 | 5 | .hljs { 6 | display: block; 7 | overflow-x: auto; 8 | padding: 0.5em; 9 | background: #272822; color: #ddd; 10 | } 11 | 12 | .hljs-tag, 13 | .hljs-keyword, 14 | .hljs-selector-tag, 15 | .hljs-literal, 16 | .hljs-strong, 17 | .hljs-name { 18 | color: #f92672; 19 | } 20 | 21 | .hljs-code { 22 | color: #66d9ef; 23 | } 24 | 25 | .hljs-class .hljs-title { 26 | color: white; 27 | } 28 | 29 | .hljs-attribute, 30 | .hljs-symbol, 31 | .hljs-regexp, 32 | .hljs-link { 33 | color: #bf79db; 34 | } 35 | 36 | .hljs-string, 37 | .hljs-bullet, 38 | .hljs-subst, 39 | .hljs-title, 40 | .hljs-section, 41 | .hljs-emphasis, 42 | .hljs-type, 43 | .hljs-built_in, 44 | .hljs-builtin-name, 45 | .hljs-selector-attr, 46 | .hljs-selector-pseudo, 47 | .hljs-addition, 48 | .hljs-variable, 49 | .hljs-template-tag, 50 | .hljs-template-variable { 51 | color: #a6e22e; 52 | } 53 | 54 | .hljs-comment, 55 | .hljs-quote, 56 | .hljs-deletion, 57 | .hljs-meta { 58 | color: #75715e; 59 | } 60 | 61 | .hljs-keyword, 62 | .hljs-selector-tag, 63 | .hljs-literal, 64 | .hljs-doctag, 65 | .hljs-title, 66 | .hljs-section, 67 | .hljs-type, 68 | .hljs-selector-id { 69 | font-weight: bold; 70 | } 71 | -------------------------------------------------------------------------------- /src/assets/css/highlight/darcula.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Darcula color scheme from the JetBrains family of IDEs 4 | 5 | */ 6 | 7 | 8 | .hljs { 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | background: #2b2b2b; 13 | } 14 | 15 | .hljs { 16 | color: #bababa; 17 | } 18 | 19 | .hljs-strong, 20 | .hljs-emphasis { 21 | color: #a8a8a2; 22 | } 23 | 24 | .hljs-bullet, 25 | .hljs-quote, 26 | .hljs-link, 27 | .hljs-number, 28 | .hljs-regexp, 29 | .hljs-literal { 30 | color: #6896ba; 31 | } 32 | 33 | .hljs-code, 34 | .hljs-selector-class { 35 | color: #a6e22e; 36 | } 37 | 38 | .hljs-emphasis { 39 | font-style: italic; 40 | } 41 | 42 | .hljs-keyword, 43 | .hljs-selector-tag, 44 | .hljs-section, 45 | .hljs-attribute, 46 | .hljs-name, 47 | .hljs-variable { 48 | color: #cb7832; 49 | } 50 | 51 | .hljs-params { 52 | color: #b9b9b9; 53 | } 54 | 55 | .hljs-string { 56 | color: #6a8759; 57 | } 58 | 59 | .hljs-subst, 60 | .hljs-type, 61 | .hljs-built_in, 62 | .hljs-builtin-name, 63 | .hljs-symbol, 64 | .hljs-selector-id, 65 | .hljs-selector-attr, 66 | .hljs-selector-pseudo, 67 | .hljs-template-tag, 68 | .hljs-template-variable, 69 | .hljs-addition { 70 | color: #e0c46c; 71 | } 72 | 73 | .hljs-comment, 74 | .hljs-deletion, 75 | .hljs-meta { 76 | color: #7f7f7f; 77 | } 78 | -------------------------------------------------------------------------------- /src/views/designerPage/components/mount.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import Vue from 'vue'; 3 | 4 | // 给定模板,和要挂载的元素id,挂载组件 5 | const mount = (id, _component) => { 6 | const components = myVue.$store.state.components; 7 | const component = components.find(c => c.info.id === id); 8 | return new Promise((resolve) => { 9 | // 需要延迟才能取到document.getElementById(id) 10 | setTimeout(() => { 11 | const data = {}; 12 | if (_component.attributes) { 13 | Object.keys(_component.attributes).forEach((key) => { 14 | data[key] = _component.attributes[key].value; 15 | }); 16 | } 17 | if (component.uid) { // 销毁旧实例 18 | 19 | } 20 | const vm = new Vue({ 21 | name: id.toString(), 22 | data() { 23 | return data; 24 | }, 25 | template: _component.template, 26 | el: document.getElementById(id), 27 | mounted() { 28 | this.$el.id = id; 29 | if (component) { 30 | component.uid = this._uid; 31 | } 32 | // 添加选中效果 33 | const info = myVue.$store.state.currentComponent.info; 34 | if (!info) this.$el.click(); 35 | }, 36 | }); 37 | resolve(vm); 38 | }, 200); 39 | }); 40 | }; 41 | 42 | export default mount; 43 | -------------------------------------------------------------------------------- /src/views/designerPage/components/template/iView-UI/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import Row from './Row' 3 | import Col from './Col' 4 | import Button from './Button' 5 | import ButtonGroup from './ButtonGroup' 6 | import Icon from './Icon' 7 | import Input from './Input' 8 | import Radio from './Radio' 9 | import RadioGroup from './RadioGroup' 10 | import Checkbox from './Checkbox' 11 | import iSwitch from './iSwitch' 12 | import Select from './Select' 13 | import Option from './Option' 14 | import Slider from './Slider' 15 | import DatePicker from './DatePicker' 16 | import TimePicker from './TimePicker' 17 | import InputNumber from './InputNumber' 18 | import Rate from './Rate' 19 | import Form from './Form' 20 | import FormItem from './FormItem' 21 | import ColorPicker from './ColorPicker' 22 | import Alert from './Alert' 23 | import Card from './Card' 24 | 25 | var obj = { 26 | Row, 27 | Col, 28 | Button, 29 | ButtonGroup, 30 | Icon, 31 | Input, 32 | Radio, 33 | RadioGroup, 34 | Checkbox, 35 | iSwitch, 36 | Select, 37 | Option, 38 | Slider, 39 | DatePicker, 40 | TimePicker, 41 | InputNumber, 42 | Rate, 43 | Form, 44 | FormItem, 45 | ColorPicker, 46 | Alert, 47 | Card 48 | } 49 | 50 | export default obj 51 | -------------------------------------------------------------------------------- /src/views/homePage/index.less: -------------------------------------------------------------------------------- 1 | .home-page { 2 | background-color: #ce5655; 3 | height: calc(~"100%"); 4 | .left-block { 5 | display: block; 6 | position: relative; 7 | width: 60%; 8 | text-align: left; 9 | margin: auto; 10 | margin-top: 15px; 11 | padding: 15px 60px; 12 | border: solid 0px #fff; 13 | border-radius: 15px; 14 | .left-icon { 15 | display: inline-block; 16 | height: 100px; 17 | width: 100px; 18 | } 19 | .block-title { 20 | position: absolute; 21 | top: 30px; 22 | left: 230px; 23 | color: #fff; 24 | } 25 | .block-dec { 26 | position: absolute; 27 | top: 80px; 28 | left: 230px; 29 | color: #5a4b4b; 30 | width: 65%; 31 | } 32 | } 33 | .left-block:hover { 34 | display: block; 35 | position: relative; 36 | width: 60%; 37 | margin: auto; 38 | margin-top: 15px; 39 | padding: 15px 60px; 40 | border-radius: 15px; 41 | background-color: #d46363; 42 | border: solid 0px #cf6666; 43 | // border-width: 1px 0; 44 | box-shadow: 2px 2px 5px 0px #884949; 45 | } 46 | } -------------------------------------------------------------------------------- /src/views/designerPage/components/template/Muse-UI/Td.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { getTemplate, getSlotContent, getStringTypeAttr } from '@/views/designerPage/components/template' 3 | 4 | var handle = function(_attr, _slots) { 5 | //定义默认属性 6 | let attributes = { 7 | name:{ 8 | type:'text', 9 | value:'' 10 | } 11 | }, 12 | slots = { 13 | default: [] 14 | } 15 | 16 | //覆盖默认属性 17 | Object.assign(slots, _slots) 18 | Object.assign(attributes, _attr) 19 | 20 | //根据组件不同需要做的不同操作 21 | 22 | 23 | //获取插槽模板内容 24 | var subContent = getSlotContent(slots) || ' ' 25 | //设置当前组件的slot 26 | if (attributes.slot && attributes.slot!=='default') { 27 | attributes.slot = { 28 | type: 'text', 29 | value: attributes.slot 30 | } 31 | } else { 32 | attributes.slot = { 33 | type: 'text', 34 | value: '' 35 | } 36 | } 37 | 38 | //字符串模板操作 39 | let stringAttr = getStringTypeAttr(attributes) 40 | let template = ` 42 | ${subContent} 43 | ` 44 | 45 | return { template, attributes, slots } 46 | } 47 | export default handle 48 | -------------------------------------------------------------------------------- /src/assets/css/highlight/tomorrow.css: -------------------------------------------------------------------------------- 1 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 2 | 3 | /* Tomorrow Comment */ 4 | .hljs-comment, 5 | .hljs-quote { 6 | color: #8e908c; 7 | } 8 | 9 | /* Tomorrow Red */ 10 | .hljs-variable, 11 | .hljs-template-variable, 12 | .hljs-tag, 13 | .hljs-name, 14 | .hljs-selector-id, 15 | .hljs-selector-class, 16 | .hljs-regexp, 17 | .hljs-deletion { 18 | color: #c82829; 19 | } 20 | 21 | /* Tomorrow Orange */ 22 | .hljs-number, 23 | .hljs-built_in, 24 | .hljs-builtin-name, 25 | .hljs-literal, 26 | .hljs-type, 27 | .hljs-params, 28 | .hljs-meta, 29 | .hljs-link { 30 | color: #f5871f; 31 | } 32 | 33 | /* Tomorrow Yellow */ 34 | .hljs-attribute { 35 | color: #eab700; 36 | } 37 | 38 | /* Tomorrow Green */ 39 | .hljs-string, 40 | .hljs-symbol, 41 | .hljs-bullet, 42 | .hljs-addition { 43 | color: #718c00; 44 | } 45 | 46 | /* Tomorrow Blue */ 47 | .hljs-title, 48 | .hljs-section { 49 | color: #4271ae; 50 | } 51 | 52 | /* Tomorrow Purple */ 53 | .hljs-keyword, 54 | .hljs-selector-tag { 55 | color: #8959a8; 56 | } 57 | 58 | .hljs { 59 | display: block; 60 | overflow-x: auto; 61 | background: white; 62 | color: #4d4d4c; 63 | padding: 0.5em; 64 | } 65 | 66 | .hljs-emphasis { 67 | font-style: italic; 68 | } 69 | 70 | .hljs-strong { 71 | font-weight: bold; 72 | } 73 | -------------------------------------------------------------------------------- /src/views/designerPage/components/template/Mint-UI/Switch.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { getTemplate, getSlotContent , getStringTypeAttr } from '@/views/designerPage/components/template' 3 | var handle = function(_attr, _slots) { 4 | //定义默认属性 5 | let attributes = { 6 | value:{ 7 | type:'boolean', 8 | value:false 9 | } 10 | }, 11 | slots = { 12 | default: [] 13 | } 14 | 15 | //覆盖默认属性 16 | Object.assign(slots, _slots) 17 | Object.assign(attributes, _attr) 18 | 19 | //根据组件不同需要做的不同操作 20 | 21 | 22 | //获取插槽模板内容 23 | var subContent = getSlotContent(slots) 24 | 25 | //设置当前组件的slot 26 | if (attributes.slot && attributes.slot!=='default') { 27 | attributes.slot = { 28 | type: 'text', 29 | value: attributes.slot 30 | } 31 | } else { 32 | attributes.slot = { 33 | type: 'text', 34 | value: '' 35 | } 36 | } 37 | 38 | //字符串模板操作 39 | let stringAttr = getStringTypeAttr(attributes) 40 | let template = ` 42 | ${subContent} 43 | ` 44 | 45 | return { template, attributes, slots } 46 | } 47 | export default handle 48 | -------------------------------------------------------------------------------- /src/assets/css/highlight/zenburn.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Zenburn style from voldmar.ru (c) Vladimir Epifanov 4 | based on dark.css by Ivan Sagalaev 5 | 6 | */ 7 | 8 | .hljs { 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | background: #3f3f3f; 13 | color: #dcdcdc; 14 | } 15 | 16 | .hljs-keyword, 17 | .hljs-selector-tag, 18 | .hljs-tag { 19 | color: #e3ceab; 20 | } 21 | 22 | .hljs-template-tag { 23 | color: #dcdcdc; 24 | } 25 | 26 | .hljs-number { 27 | color: #8cd0d3; 28 | } 29 | 30 | .hljs-variable, 31 | .hljs-template-variable, 32 | .hljs-attribute { 33 | color: #efdcbc; 34 | } 35 | 36 | .hljs-literal { 37 | color: #efefaf; 38 | } 39 | 40 | .hljs-subst { 41 | color: #8f8f8f; 42 | } 43 | 44 | .hljs-title, 45 | .hljs-name, 46 | .hljs-selector-id, 47 | .hljs-selector-class, 48 | .hljs-section, 49 | .hljs-type { 50 | color: #efef8f; 51 | } 52 | 53 | .hljs-symbol, 54 | .hljs-bullet, 55 | .hljs-link { 56 | color: #dca3a3; 57 | } 58 | 59 | .hljs-deletion, 60 | .hljs-string, 61 | .hljs-built_in, 62 | .hljs-builtin-name { 63 | color: #cc9393; 64 | } 65 | 66 | .hljs-addition, 67 | .hljs-comment, 68 | .hljs-quote, 69 | .hljs-meta { 70 | color: #7f9f7f; 71 | } 72 | 73 | 74 | .hljs-emphasis { 75 | font-style: italic; 76 | } 77 | 78 | .hljs-strong { 79 | font-weight: bold; 80 | } 81 | -------------------------------------------------------------------------------- /src/views/designerPage/components/template/Muse-UI/Card Text.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { getTemplate, getSlotContent , getStringTypeAttr } from '@/views/designerPage/components/template' 3 | import guid from '@/views/designerPage/utils/guid' 4 | 5 | var handle = function(_attr, _slots, _info) { 6 | //定义默认属性 7 | let attributes = { 8 | text: { 9 | type: 'text', 10 | value: '正文' 11 | } 12 | }, 13 | slots = { 14 | } 15 | 16 | //覆盖默认属性 17 | Object.assign(slots, _slots) 18 | Object.assign(attributes, _attr) 19 | 20 | //根据组件不同需要做的不同操作 21 | 22 | 23 | //获取插槽模板内容 24 | var subContent = getSlotContent(slots) 25 | 26 | //设置当前组件的slot 27 | if (attributes.slot && attributes.slot!=='default') { 28 | attributes.slot = { 29 | type: 'text', 30 | value: attributes.slot 31 | } 32 | } else { 33 | attributes.slot = { 34 | type: 'text', 35 | value: '' 36 | } 37 | } 38 | 39 | //字符串模板操作 40 | let stringAttr = getStringTypeAttr(attributes) 41 | let template = ` 42 | ${attributes.text.value} 43 | ` 44 | 45 | return { template, attributes, slots } 46 | } 47 | export default handle 48 | -------------------------------------------------------------------------------- /src/assets/css/highlight/school-book.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | School Book style from goldblog.com.ua (c) Zaripov Yura 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 15px 0.5em 0.5em 30px; 11 | font-size: 11px; 12 | line-height:16px; 13 | } 14 | 15 | pre{ 16 | background:#f6f6ae url(./school-book.png); 17 | border-top: solid 2px #d2e8b9; 18 | border-bottom: solid 1px #d2e8b9; 19 | } 20 | 21 | .hljs-keyword, 22 | .hljs-selector-tag, 23 | .hljs-literal { 24 | color:#005599; 25 | font-weight:bold; 26 | } 27 | 28 | .hljs, 29 | .hljs-subst { 30 | color: #3e5915; 31 | } 32 | 33 | .hljs-string, 34 | .hljs-title, 35 | .hljs-section, 36 | .hljs-type, 37 | .hljs-symbol, 38 | .hljs-bullet, 39 | .hljs-attribute, 40 | .hljs-built_in, 41 | .hljs-builtin-name, 42 | .hljs-addition, 43 | .hljs-variable, 44 | .hljs-template-tag, 45 | .hljs-template-variable, 46 | .hljs-link { 47 | color: #2c009f; 48 | } 49 | 50 | .hljs-comment, 51 | .hljs-quote, 52 | .hljs-deletion, 53 | .hljs-meta { 54 | color: #e60415; 55 | } 56 | 57 | .hljs-keyword, 58 | .hljs-selector-tag, 59 | .hljs-literal, 60 | .hljs-doctag, 61 | .hljs-title, 62 | .hljs-section, 63 | .hljs-type, 64 | .hljs-name, 65 | .hljs-selector-id, 66 | .hljs-strong { 67 | font-weight: bold; 68 | } 69 | 70 | .hljs-emphasis { 71 | font-style: italic; 72 | } 73 | -------------------------------------------------------------------------------- /src/views/designerPage/components/template/Muse-UI/Divider.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { getTemplate, getSlotContent , getStringTypeAttr } from '@/views/designerPage/components/template' 3 | 4 | var handle = function(_attr, _slots) { 5 | //定义默认属性 6 | let attributes = { 7 | inset:{ 8 | type:'boolean', 9 | value:false 10 | }, 11 | shallowInset:{ 12 | type:'boolean', 13 | value:false 14 | } 15 | }, 16 | slots = { 17 | } 18 | 19 | //覆盖默认属性 20 | Object.assign(slots, _slots) 21 | Object.assign(attributes, _attr) 22 | 23 | //根据组件不同需要做的不同操作 24 | 25 | 26 | //获取插槽模板内容 27 | var subContent = getSlotContent(slots) 28 | 29 | //设置当前组件的slot 30 | if (attributes.slot && attributes.slot!=='default') { 31 | attributes.slot = { 32 | type: 'text', 33 | value: attributes.slot 34 | } 35 | } else { 36 | attributes.slot = { 37 | type: 'text', 38 | value: '' 39 | } 40 | } 41 | 42 | //字符串模板操作 43 | let stringAttr = getStringTypeAttr(attributes) 44 | let template = `` 46 | 47 | return { template, attributes, slots } 48 | } 49 | export default handle 50 | -------------------------------------------------------------------------------- /src/views/designerPage/components/template/Common/Text.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { getTemplate, getSlotContent, getStringTypeAttr } from '@/views/designerPage/components/template' 3 | 4 | var handle = function(_attr, _slots) { 5 | //定义默认属性 6 | let attributes = { 7 | text: { 8 | type: 'text', 9 | value: '' 10 | } 11 | }, 12 | slots = {} 13 | 14 | //覆盖默认属性 15 | Object.assign(slots, _slots) 16 | Object.assign(attributes, _attr) 17 | 18 | //根据组件不同需要做的不同操作 19 | 20 | 21 | //获取插槽模板内容 22 | var subContent = getSlotContent(slots) || ' ' 23 | //设置当前组件的slot 24 | if (attributes.slot && attributes.slot !== 'default') { 25 | attributes.slot = { 26 | type: 'text', 27 | value: attributes.slot 28 | } 29 | } else { 30 | attributes.slot = { 31 | type: 'text', 32 | value: '' 33 | } 34 | } 35 | 36 | //字符串模板操作 37 | let text = JSON.parse(JSON.stringify(attributes)).text.value || 'Text' 38 | let stringAttr = getStringTypeAttr(attributes) 39 | let template = `${text}` 40 | 41 | template = template.replace(/text=".*?"/g, '')//模板字符串中删除text属性 42 | 43 | return { template, attributes, slots } 44 | } 45 | export default handle 46 | -------------------------------------------------------------------------------- /src/assets/css/highlight/ocean.css: -------------------------------------------------------------------------------- 1 | /* Ocean Dark Theme */ 2 | /* https://github.com/gavsiu */ 3 | /* Original theme - https://github.com/chriskempson/base16 */ 4 | 5 | /* Ocean Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #65737e; 9 | } 10 | 11 | /* Ocean Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-tag, 15 | .hljs-name, 16 | .hljs-selector-id, 17 | .hljs-selector-class, 18 | .hljs-regexp, 19 | .hljs-deletion { 20 | color: #bf616a; 21 | } 22 | 23 | /* Ocean Orange */ 24 | .hljs-number, 25 | .hljs-built_in, 26 | .hljs-builtin-name, 27 | .hljs-literal, 28 | .hljs-type, 29 | .hljs-params, 30 | .hljs-meta, 31 | .hljs-link { 32 | color: #d08770; 33 | } 34 | 35 | /* Ocean Yellow */ 36 | .hljs-attribute { 37 | color: #ebcb8b; 38 | } 39 | 40 | /* Ocean Green */ 41 | .hljs-string, 42 | .hljs-symbol, 43 | .hljs-bullet, 44 | .hljs-addition { 45 | color: #a3be8c; 46 | } 47 | 48 | /* Ocean Blue */ 49 | .hljs-title, 50 | .hljs-section { 51 | color: #8fa1b3; 52 | } 53 | 54 | /* Ocean Purple */ 55 | .hljs-keyword, 56 | .hljs-selector-tag { 57 | color: #b48ead; 58 | } 59 | 60 | .hljs { 61 | display: block; 62 | overflow-x: auto; 63 | background: #2b303b; 64 | color: #c0c5ce; 65 | padding: 0.5em; 66 | } 67 | 68 | .hljs-emphasis { 69 | font-style: italic; 70 | } 71 | 72 | .hljs-strong { 73 | font-weight: bold; 74 | } 75 | -------------------------------------------------------------------------------- /src/assets/css/highlight/paraiso-dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | Paraíso (dark) 3 | Created by Jan T. Sott (http://github.com/idleberg) 4 | Inspired by the art of Rubens LP (http://www.rubenslp.com.br) 5 | */ 6 | 7 | /* Paraíso Comment */ 8 | .hljs-comment, 9 | .hljs-quote { 10 | color: #8d8687; 11 | } 12 | 13 | /* Paraíso Red */ 14 | .hljs-variable, 15 | .hljs-template-variable, 16 | .hljs-tag, 17 | .hljs-name, 18 | .hljs-selector-id, 19 | .hljs-selector-class, 20 | .hljs-regexp, 21 | .hljs-link, 22 | .hljs-meta { 23 | color: #ef6155; 24 | } 25 | 26 | /* Paraíso Orange */ 27 | .hljs-number, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params, 33 | .hljs-deletion { 34 | color: #f99b15; 35 | } 36 | 37 | /* Paraíso Yellow */ 38 | .hljs-title, 39 | .hljs-section, 40 | .hljs-attribute { 41 | color: #fec418; 42 | } 43 | 44 | /* Paraíso Green */ 45 | .hljs-string, 46 | .hljs-symbol, 47 | .hljs-bullet, 48 | .hljs-addition { 49 | color: #48b685; 50 | } 51 | 52 | /* Paraíso Purple */ 53 | .hljs-keyword, 54 | .hljs-selector-tag { 55 | color: #815ba4; 56 | } 57 | 58 | .hljs { 59 | display: block; 60 | overflow-x: auto; 61 | background: #2f1e2e; 62 | color: #a39e9b; 63 | padding: 0.5em; 64 | } 65 | 66 | .hljs-emphasis { 67 | font-style: italic; 68 | } 69 | 70 | .hljs-strong { 71 | font-weight: bold; 72 | } 73 | -------------------------------------------------------------------------------- /src/assets/css/highlight/paraiso-light.css: -------------------------------------------------------------------------------- 1 | /* 2 | Paraíso (light) 3 | Created by Jan T. Sott (http://github.com/idleberg) 4 | Inspired by the art of Rubens LP (http://www.rubenslp.com.br) 5 | */ 6 | 7 | /* Paraíso Comment */ 8 | .hljs-comment, 9 | .hljs-quote { 10 | color: #776e71; 11 | } 12 | 13 | /* Paraíso Red */ 14 | .hljs-variable, 15 | .hljs-template-variable, 16 | .hljs-tag, 17 | .hljs-name, 18 | .hljs-selector-id, 19 | .hljs-selector-class, 20 | .hljs-regexp, 21 | .hljs-link, 22 | .hljs-meta { 23 | color: #ef6155; 24 | } 25 | 26 | /* Paraíso Orange */ 27 | .hljs-number, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params, 33 | .hljs-deletion { 34 | color: #f99b15; 35 | } 36 | 37 | /* Paraíso Yellow */ 38 | .hljs-title, 39 | .hljs-section, 40 | .hljs-attribute { 41 | color: #fec418; 42 | } 43 | 44 | /* Paraíso Green */ 45 | .hljs-string, 46 | .hljs-symbol, 47 | .hljs-bullet, 48 | .hljs-addition { 49 | color: #48b685; 50 | } 51 | 52 | /* Paraíso Purple */ 53 | .hljs-keyword, 54 | .hljs-selector-tag { 55 | color: #815ba4; 56 | } 57 | 58 | .hljs { 59 | display: block; 60 | overflow-x: auto; 61 | background: #e7e9db; 62 | color: #4f424c; 63 | padding: 0.5em; 64 | } 65 | 66 | .hljs-emphasis { 67 | font-style: italic; 68 | } 69 | 70 | .hljs-strong { 71 | font-weight: bold; 72 | } 73 | -------------------------------------------------------------------------------- /src/assets/css/highlight/dracula.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Dracula Theme v1.2.0 4 | 5 | https://github.com/zenorocha/dracula-theme 6 | 7 | Copyright 2015, All rights reserved 8 | 9 | Code licensed under the MIT license 10 | http://zenorocha.mit-license.org 11 | 12 | @author Éverton Ribeiro 13 | @author Zeno Rocha 14 | 15 | */ 16 | 17 | .hljs { 18 | display: block; 19 | overflow-x: auto; 20 | padding: 0.5em; 21 | background: #282a36; 22 | } 23 | 24 | .hljs-keyword, 25 | .hljs-selector-tag, 26 | .hljs-literal, 27 | .hljs-section, 28 | .hljs-link { 29 | color: #8be9fd; 30 | } 31 | 32 | .hljs-function .hljs-keyword { 33 | color: #ff79c6; 34 | } 35 | 36 | .hljs, 37 | .hljs-subst { 38 | color: #f8f8f2; 39 | } 40 | 41 | .hljs-string, 42 | .hljs-title, 43 | .hljs-name, 44 | .hljs-type, 45 | .hljs-attribute, 46 | .hljs-symbol, 47 | .hljs-bullet, 48 | .hljs-addition, 49 | .hljs-variable, 50 | .hljs-template-tag, 51 | .hljs-template-variable { 52 | color: #f1fa8c; 53 | } 54 | 55 | .hljs-comment, 56 | .hljs-quote, 57 | .hljs-deletion, 58 | .hljs-meta { 59 | color: #6272a4; 60 | } 61 | 62 | .hljs-keyword, 63 | .hljs-selector-tag, 64 | .hljs-literal, 65 | .hljs-title, 66 | .hljs-section, 67 | .hljs-doctag, 68 | .hljs-type, 69 | .hljs-name, 70 | .hljs-strong { 71 | font-weight: bold; 72 | } 73 | 74 | .hljs-emphasis { 75 | font-style: italic; 76 | } 77 | -------------------------------------------------------------------------------- /src/assets/css/highlight/qtcreator_dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Qt Creator dark color scheme 4 | 5 | */ 6 | 7 | 8 | .hljs { 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | background: #000000; 13 | } 14 | 15 | .hljs, 16 | .hljs-subst, 17 | .hljs-tag, 18 | .hljs-title { 19 | color: #aaaaaa; 20 | } 21 | 22 | .hljs-strong, 23 | .hljs-emphasis { 24 | color: #a8a8a2; 25 | } 26 | 27 | .hljs-bullet, 28 | .hljs-quote, 29 | .hljs-number, 30 | .hljs-regexp, 31 | .hljs-literal { 32 | color: #ff55ff; 33 | } 34 | 35 | .hljs-code 36 | .hljs-selector-class { 37 | color: #aaaaff; 38 | } 39 | 40 | .hljs-emphasis, 41 | .hljs-stronge, 42 | .hljs-type { 43 | font-style: italic; 44 | } 45 | 46 | .hljs-keyword, 47 | .hljs-selector-tag, 48 | .hljs-function, 49 | .hljs-section, 50 | .hljs-symbol, 51 | .hljs-name { 52 | color: #ffff55; 53 | } 54 | 55 | .hljs-attribute { 56 | color: #ff5555; 57 | } 58 | 59 | .hljs-variable, 60 | .hljs-params, 61 | .hljs-class .hljs-title { 62 | color: #8888ff; 63 | } 64 | 65 | .hljs-string, 66 | .hljs-selector-id, 67 | .hljs-selector-attr, 68 | .hljs-selector-pseudo, 69 | .hljs-type, 70 | .hljs-built_in, 71 | .hljs-builtin-name, 72 | .hljs-template-tag, 73 | .hljs-template-variable, 74 | .hljs-addition, 75 | .hljs-link { 76 | color: #ff55ff; 77 | } 78 | 79 | .hljs-comment, 80 | .hljs-meta, 81 | .hljs-deletion { 82 | color: #55ffff; 83 | } 84 | -------------------------------------------------------------------------------- /src/assets/css/highlight/qtcreator_light.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Qt Creator light color scheme 4 | 5 | */ 6 | 7 | 8 | .hljs { 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | background: #ffffff; 13 | } 14 | 15 | .hljs, 16 | .hljs-subst, 17 | .hljs-tag, 18 | .hljs-title { 19 | color: #000000; 20 | } 21 | 22 | .hljs-strong, 23 | .hljs-emphasis { 24 | color: #000000; 25 | } 26 | 27 | .hljs-bullet, 28 | .hljs-quote, 29 | .hljs-number, 30 | .hljs-regexp, 31 | .hljs-literal { 32 | color: #000080; 33 | } 34 | 35 | .hljs-code 36 | .hljs-selector-class { 37 | color: #800080; 38 | } 39 | 40 | .hljs-emphasis, 41 | .hljs-stronge, 42 | .hljs-type { 43 | font-style: italic; 44 | } 45 | 46 | .hljs-keyword, 47 | .hljs-selector-tag, 48 | .hljs-function, 49 | .hljs-section, 50 | .hljs-symbol, 51 | .hljs-name { 52 | color: #808000; 53 | } 54 | 55 | .hljs-attribute { 56 | color: #800000; 57 | } 58 | 59 | .hljs-variable, 60 | .hljs-params, 61 | .hljs-class .hljs-title { 62 | color: #0055AF; 63 | } 64 | 65 | .hljs-string, 66 | .hljs-selector-id, 67 | .hljs-selector-attr, 68 | .hljs-selector-pseudo, 69 | .hljs-type, 70 | .hljs-built_in, 71 | .hljs-builtin-name, 72 | .hljs-template-tag, 73 | .hljs-template-variable, 74 | .hljs-addition, 75 | .hljs-link { 76 | color: #008000; 77 | } 78 | 79 | .hljs-comment, 80 | .hljs-meta, 81 | .hljs-deletion { 82 | color: #008000; 83 | } 84 | -------------------------------------------------------------------------------- /src/assets/css/highlight/rainbow.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Style with support for rainbow parens 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #474949; 12 | color: #d1d9e1; 13 | } 14 | 15 | 16 | .hljs-comment, 17 | .hljs-quote { 18 | color: #969896; 19 | font-style: italic; 20 | } 21 | 22 | .hljs-keyword, 23 | .hljs-selector-tag, 24 | .hljs-literal, 25 | .hljs-type, 26 | .hljs-addition { 27 | color: #cc99cc; 28 | } 29 | 30 | .hljs-number, 31 | .hljs-selector-attr, 32 | .hljs-selector-pseudo { 33 | color: #f99157; 34 | } 35 | 36 | .hljs-string, 37 | .hljs-doctag, 38 | .hljs-regexp { 39 | color: #8abeb7; 40 | } 41 | 42 | .hljs-title, 43 | .hljs-name, 44 | .hljs-section, 45 | .hljs-built_in { 46 | color: #b5bd68; 47 | } 48 | 49 | .hljs-variable, 50 | .hljs-template-variable, 51 | .hljs-selector-id, 52 | .hljs-class .hljs-title { 53 | color: #ffcc66; 54 | } 55 | 56 | .hljs-section, 57 | .hljs-name, 58 | .hljs-strong { 59 | font-weight: bold; 60 | } 61 | 62 | .hljs-symbol, 63 | .hljs-bullet, 64 | .hljs-subst, 65 | .hljs-meta, 66 | .hljs-link { 67 | color: #f99157; 68 | } 69 | 70 | .hljs-deletion { 71 | color: #dc322f; 72 | } 73 | 74 | .hljs-formula { 75 | background: #eee8d5; 76 | } 77 | 78 | .hljs-attr, 79 | .hljs-attribute { 80 | color: #81a2be; 81 | } 82 | 83 | .hljs-emphasis { 84 | font-style: italic; 85 | } 86 | -------------------------------------------------------------------------------- /server/models/user.js: -------------------------------------------------------------------------------- 1 | // models/user.js 2 | const db = require('../config/db.js'); 3 | 4 | const userModel = '../schema/user.js'; // 引入user的表结构 5 | 6 | const FEDSQL = db.FEDSQL; // 引入数据库 7 | 8 | const User = FEDSQL.import(userModel); // 用sequelize的import方法引入表结构,实例化了User。 9 | 10 | const getAllUsers = async () => { // 获取全部用户 11 | const result = await User.findAll();// 查找全部的用户 12 | const allUsers = result.map((user) => { 13 | return { 14 | id: user.id, 15 | userName: user.userName, 16 | character: user.character, 17 | }; 18 | }); 19 | return allUsers; // 返回数据 20 | }; 21 | 22 | const getUserById = async (id) => { 23 | const userInfo = await User.findOne({ 24 | where: { id }, 25 | }); 26 | 27 | return userInfo; // 返回数据 28 | }; 29 | 30 | // 新增一个方法,通过用户名查找 31 | const getUserByName = async (name) => { 32 | const userInfo = await User.findOne({ 33 | where: { userName: name }, 34 | }); 35 | 36 | return userInfo; 37 | }; 38 | 39 | const createUser = async (data) => { // 创建一个用户创建 40 | await User.create(data); 41 | return true; 42 | }; 43 | 44 | const updateUser = async (data) => { 45 | await User.update(data, { 46 | where: { 47 | id: data.id, 48 | }, 49 | }); 50 | 51 | return true; 52 | }; 53 | 54 | module.exports = { 55 | getAllUsers, 56 | getUserById, // 导出getUserById的方法,将会在controller里调用 57 | getUserByName, 58 | createUser, 59 | updateUser, 60 | }; 61 | -------------------------------------------------------------------------------- /src/assets/css/highlight/kimbie.dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | Name: Kimbie (dark) 3 | Author: Jan T. Sott 4 | License: Creative Commons Attribution-ShareAlike 4.0 Unported License 5 | URL: https://github.com/idleberg/Kimbie-highlight.js 6 | */ 7 | 8 | /* Kimbie Comment */ 9 | .hljs-comment, 10 | .hljs-quote { 11 | color: #d6baad; 12 | } 13 | 14 | /* Kimbie Red */ 15 | .hljs-variable, 16 | .hljs-template-variable, 17 | .hljs-tag, 18 | .hljs-name, 19 | .hljs-selector-id, 20 | .hljs-selector-class, 21 | .hljs-regexp, 22 | .hljs-meta { 23 | color: #dc3958; 24 | } 25 | 26 | /* Kimbie Orange */ 27 | .hljs-number, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params, 33 | .hljs-deletion, 34 | .hljs-link { 35 | color: #f79a32; 36 | } 37 | 38 | /* Kimbie Yellow */ 39 | .hljs-title, 40 | .hljs-section, 41 | .hljs-attribute { 42 | color: #f06431; 43 | } 44 | 45 | /* Kimbie Green */ 46 | .hljs-string, 47 | .hljs-symbol, 48 | .hljs-bullet, 49 | .hljs-addition { 50 | color: #889b4a; 51 | } 52 | 53 | /* Kimbie Purple */ 54 | .hljs-keyword, 55 | .hljs-selector-tag, 56 | .hljs-function { 57 | color: #98676a; 58 | } 59 | 60 | .hljs { 61 | display: block; 62 | overflow-x: auto; 63 | background: #221a0f; 64 | color: #d3af86; 65 | padding: 0.5em; 66 | } 67 | 68 | .hljs-emphasis { 69 | font-style: italic; 70 | } 71 | 72 | .hljs-strong { 73 | font-weight: bold; 74 | } 75 | -------------------------------------------------------------------------------- /src/assets/css/highlight/kimbie.light.css: -------------------------------------------------------------------------------- 1 | /* 2 | Name: Kimbie (light) 3 | Author: Jan T. Sott 4 | License: Creative Commons Attribution-ShareAlike 4.0 Unported License 5 | URL: https://github.com/idleberg/Kimbie-highlight.js 6 | */ 7 | 8 | /* Kimbie Comment */ 9 | .hljs-comment, 10 | .hljs-quote { 11 | color: #a57a4c; 12 | } 13 | 14 | /* Kimbie Red */ 15 | .hljs-variable, 16 | .hljs-template-variable, 17 | .hljs-tag, 18 | .hljs-name, 19 | .hljs-selector-id, 20 | .hljs-selector-class, 21 | .hljs-regexp, 22 | .hljs-meta { 23 | color: #dc3958; 24 | } 25 | 26 | /* Kimbie Orange */ 27 | .hljs-number, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params, 33 | .hljs-deletion, 34 | .hljs-link { 35 | color: #f79a32; 36 | } 37 | 38 | /* Kimbie Yellow */ 39 | .hljs-title, 40 | .hljs-section, 41 | .hljs-attribute { 42 | color: #f06431; 43 | } 44 | 45 | /* Kimbie Green */ 46 | .hljs-string, 47 | .hljs-symbol, 48 | .hljs-bullet, 49 | .hljs-addition { 50 | color: #889b4a; 51 | } 52 | 53 | /* Kimbie Purple */ 54 | .hljs-keyword, 55 | .hljs-selector-tag, 56 | .hljs-function { 57 | color: #98676a; 58 | } 59 | 60 | .hljs { 61 | display: block; 62 | overflow-x: auto; 63 | background: #fbebd4; 64 | color: #84613d; 65 | padding: 0.5em; 66 | } 67 | 68 | .hljs-emphasis { 69 | font-style: italic; 70 | } 71 | 72 | .hljs-strong { 73 | font-weight: bold; 74 | } 75 | -------------------------------------------------------------------------------- /src/views/colorPage/index.less: -------------------------------------------------------------------------------- 1 | .color-page { 2 | width: 100%; 3 | .color-search { 4 | padding: 12px; 5 | background-color: #ffffffcc; 6 | .search-order { 7 | margin-right: 8px; 8 | line-height: 32px; 9 | color: #e76264; 10 | a { 11 | color: #e76264; 12 | } 13 | } 14 | .add-button { 15 | font-size: 42px; 16 | color: #e76264; 17 | transition: All 0.4s ease-in-out; 18 | } 19 | .add-button:hover { 20 | font-size: 42px; 21 | color: #e76264; 22 | transform: rotate(180deg); 23 | } 24 | } 25 | .item-move { 26 | transition: all .5s cubic-bezier(.55,0,.1,1); 27 | -webkit-transition: all .5s cubic-bezier(.55,0,.1,1); 28 | } 29 | .color-cards { 30 | width: 90%; 31 | margin: auto; 32 | // background-color: #e78686; 33 | .single-card { 34 | width: 260px; 35 | margin: 15px; 36 | float: left; 37 | .cards-content { 38 | width: 100%; 39 | height: 30px; 40 | line-height: 30px; 41 | } 42 | .cards-dec { 43 | font-size: 12px; 44 | color: rgb(129, 129, 129); 45 | margin:10px 0; 46 | } 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /src/views/designerPage/components/template/Common/Div.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { getTemplate, getSlotContent, getStringTypeAttr } from '@/views/designerPage/components/template' 3 | 4 | var handle = function(_attr, _slots) { 5 | //定义默认属性 6 | let attributes = { 7 | text: { 8 | type: 'text', 9 | value: '' 10 | } 11 | }, 12 | slots = { 13 | default: [] 14 | } 15 | 16 | //覆盖默认属性 17 | Object.assign(slots, _slots) 18 | Object.assign(attributes, _attr) 19 | 20 | //根据组件不同需要做的不同操作 21 | 22 | 23 | //获取插槽模板内容 24 | var subContent = getSlotContent(slots) || ' ' 25 | //设置当前组件的slot 26 | if (attributes.slot && attributes.slot !== 'default') { 27 | attributes.slot = { 28 | type: 'text', 29 | value: attributes.slot 30 | } 31 | } else { 32 | attributes.slot = { 33 | type: 'text', 34 | value: '' 35 | } 36 | } 37 | 38 | //字符串模板操作 39 | let stringAttr = getStringTypeAttr(attributes) 40 | let template = `
41 | ${subContent||attributes.text.value?attributes.text.value:' '} 42 |
` 43 | 44 | template = template.replace(/text=".*?"/g, '') //模板字符串中删除text属性 45 | 46 | return { template, attributes, slots } 47 | } 48 | export default handle 49 | -------------------------------------------------------------------------------- /src/assets/css/highlight/atelier-dune-dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Dune Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Dune Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #999580; 9 | } 10 | 11 | /* Atelier-Dune Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #d73737; 23 | } 24 | 25 | /* Atelier-Dune Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #b65611; 34 | } 35 | 36 | /* Atelier-Dune Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #60ac39; 41 | } 42 | 43 | /* Atelier-Dune Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #6684e1; 47 | } 48 | 49 | /* Atelier-Dune Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #b854d4; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #20201d; 59 | color: #a6a28c; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /src/assets/css/highlight/atelier-dune-light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Dune Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Dune Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #7d7a68; 9 | } 10 | 11 | /* Atelier-Dune Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #d73737; 23 | } 24 | 25 | /* Atelier-Dune Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #b65611; 34 | } 35 | 36 | /* Atelier-Dune Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #60ac39; 41 | } 42 | 43 | /* Atelier-Dune Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #6684e1; 47 | } 48 | 49 | /* Atelier-Dune Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #b854d4; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #fefbec; 59 | color: #6e6b5e; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /src/assets/css/highlight/monokai-sublime.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-license.org/ 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #23241f; 12 | } 13 | 14 | .hljs, 15 | .hljs-tag, 16 | .hljs-subst { 17 | color: #f8f8f2; 18 | } 19 | 20 | .hljs-strong, 21 | .hljs-emphasis { 22 | color: #a8a8a2; 23 | } 24 | 25 | .hljs-bullet, 26 | .hljs-quote, 27 | .hljs-number, 28 | .hljs-regexp, 29 | .hljs-literal, 30 | .hljs-link { 31 | color: #ae81ff; 32 | } 33 | 34 | .hljs-code, 35 | .hljs-title, 36 | .hljs-section, 37 | .hljs-selector-class { 38 | color: #a6e22e; 39 | } 40 | 41 | .hljs-strong { 42 | font-weight: bold; 43 | } 44 | 45 | .hljs-emphasis { 46 | font-style: italic; 47 | } 48 | 49 | .hljs-keyword, 50 | .hljs-selector-tag, 51 | .hljs-name, 52 | .hljs-attr { 53 | color: #f92672; 54 | } 55 | 56 | .hljs-symbol, 57 | .hljs-attribute { 58 | color: #66d9ef; 59 | } 60 | 61 | .hljs-params, 62 | .hljs-class .hljs-title { 63 | color: #f8f8f2; 64 | } 65 | 66 | .hljs-string, 67 | .hljs-type, 68 | .hljs-built_in, 69 | .hljs-builtin-name, 70 | .hljs-selector-id, 71 | .hljs-selector-attr, 72 | .hljs-selector-pseudo, 73 | .hljs-addition, 74 | .hljs-variable, 75 | .hljs-template-variable { 76 | color: #e6db74; 77 | } 78 | 79 | .hljs-comment, 80 | .hljs-deletion, 81 | .hljs-meta { 82 | color: #75715e; 83 | } 84 | -------------------------------------------------------------------------------- /server/models/templetPage.js: -------------------------------------------------------------------------------- 1 | // server/models/todolist.js 2 | 3 | const db = require('../config/db.js'); 4 | 5 | const templetPageModel = '../schema/templetPage.js'; 6 | 7 | const FEDSQL = db.FEDSQL; // 引入数据库 8 | 9 | const templets = FEDSQL.import(templetPageModel); 10 | 11 | const getAllTemplet = async () => { // 获取全部 12 | const allTemplet = await templets.findAll();// 查找全部 13 | return allTemplet; // 返回数据 14 | }; 15 | 16 | const getTempletById = async (id) => { 17 | const templet = await templets.findOne({ 18 | where: { id }, 19 | }); 20 | 21 | return templet; // 返回数据 22 | }; 23 | 24 | const getQueryTemplet = async (form) => { 25 | const queryStr = { 26 | where: form, 27 | }; 28 | const Templet = await templets.findAll(queryStr); 29 | 30 | return Templet; // 返回数据 31 | }; 32 | 33 | const createTemplet = async (data) => { 34 | const result = await templets.create(data); 35 | return result; 36 | }; 37 | 38 | const removeTemplet = async (id) => { 39 | await templets.destroy({ 40 | where: { 41 | id, 42 | }, 43 | }); 44 | 45 | return true; 46 | }; 47 | 48 | const updateTemplet = async (data) => { 49 | await templets.update(data, { 50 | where: { 51 | id: data.id, 52 | }, 53 | }); 54 | 55 | return true; 56 | }; 57 | 58 | module.exports = { 59 | getAllTemplet, 60 | getTempletById, 61 | getQueryTemplet, 62 | createTemplet, 63 | removeTemplet, 64 | updateTemplet, 65 | }; 66 | -------------------------------------------------------------------------------- /src/assets/css/highlight/atelier-heath-dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Heath Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Heath Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #9e8f9e; 9 | } 10 | 11 | /* Atelier-Heath Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #ca402b; 23 | } 24 | 25 | /* Atelier-Heath Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #a65926; 34 | } 35 | 36 | /* Atelier-Heath Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #918b3b; 41 | } 42 | 43 | /* Atelier-Heath Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #516aec; 47 | } 48 | 49 | /* Atelier-Heath Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #7b59c0; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #1b181b; 59 | color: #ab9bab; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /src/assets/css/highlight/atelier-heath-light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Heath Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Heath Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #776977; 9 | } 10 | 11 | /* Atelier-Heath Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #ca402b; 23 | } 24 | 25 | /* Atelier-Heath Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #a65926; 34 | } 35 | 36 | /* Atelier-Heath Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #918b3b; 41 | } 42 | 43 | /* Atelier-Heath Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #516aec; 47 | } 48 | 49 | /* Atelier-Heath Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #7b59c0; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #f7f3f7; 59 | color: #695d69; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /src/assets/css/highlight/tomorrow-night-bright.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Night Bright Theme */ 2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 3 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 4 | 5 | /* Tomorrow Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #969896; 9 | } 10 | 11 | /* Tomorrow Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-tag, 15 | .hljs-name, 16 | .hljs-selector-id, 17 | .hljs-selector-class, 18 | .hljs-regexp, 19 | .hljs-deletion { 20 | color: #d54e53; 21 | } 22 | 23 | /* Tomorrow Orange */ 24 | .hljs-number, 25 | .hljs-built_in, 26 | .hljs-builtin-name, 27 | .hljs-literal, 28 | .hljs-type, 29 | .hljs-params, 30 | .hljs-meta, 31 | .hljs-link { 32 | color: #e78c45; 33 | } 34 | 35 | /* Tomorrow Yellow */ 36 | .hljs-attribute { 37 | color: #e7c547; 38 | } 39 | 40 | /* Tomorrow Green */ 41 | .hljs-string, 42 | .hljs-symbol, 43 | .hljs-bullet, 44 | .hljs-addition { 45 | color: #b9ca4a; 46 | } 47 | 48 | /* Tomorrow Blue */ 49 | .hljs-title, 50 | .hljs-section { 51 | color: #7aa6da; 52 | } 53 | 54 | /* Tomorrow Purple */ 55 | .hljs-keyword, 56 | .hljs-selector-tag { 57 | color: #c397d8; 58 | } 59 | 60 | .hljs { 61 | display: block; 62 | overflow-x: auto; 63 | background: black; 64 | color: #eaeaea; 65 | padding: 0.5em; 66 | } 67 | 68 | .hljs-emphasis { 69 | font-style: italic; 70 | } 71 | 72 | .hljs-strong { 73 | font-weight: bold; 74 | } 75 | -------------------------------------------------------------------------------- /src/views/designerPage/components/template/Muse-UI/Tr.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { getTemplate, getSlotContent, getStringTypeAttr } from '@/views/designerPage/components/template' 3 | 4 | var handle = function(_attr, _slots) { 5 | //定义默认属性 6 | let attributes = { 7 | selectable:{ 8 | type:'boolean', 9 | value:false 10 | }, 11 | selected:{ 12 | type:'boolean', 13 | value:false 14 | } 15 | }, 16 | slots = { 17 | default: [] 18 | } 19 | 20 | //覆盖默认属性 21 | Object.assign(slots, _slots) 22 | Object.assign(attributes, _attr) 23 | 24 | //根据组件不同需要做的不同操作 25 | 26 | 27 | //获取插槽模板内容 28 | var subContent = getSlotContent(slots) || ' ' 29 | //设置当前组件的slot 30 | if (attributes.slot && attributes.slot!=='default') { 31 | attributes.slot = { 32 | type: 'text', 33 | value: attributes.slot 34 | } 35 | } else { 36 | attributes.slot = { 37 | type: 'text', 38 | value: '' 39 | } 40 | } 41 | 42 | //字符串模板操作 43 | let stringAttr = getStringTypeAttr(attributes) 44 | let template = ` 46 | ${subContent} 47 | ` 48 | 49 | return { template, attributes, slots } 50 | } 51 | export default handle 52 | -------------------------------------------------------------------------------- /src/assets/css/highlight/atelier-forest-dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Forest Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Forest Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #9c9491; 9 | } 10 | 11 | /* Atelier-Forest Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #f22c40; 23 | } 24 | 25 | /* Atelier-Forest Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #df5320; 34 | } 35 | 36 | /* Atelier-Forest Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #7b9726; 41 | } 42 | 43 | /* Atelier-Forest Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #407ee7; 47 | } 48 | 49 | /* Atelier-Forest Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #6666ea; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #1b1918; 59 | color: #a8a19f; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /src/assets/css/highlight/atelier-forest-light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Forest Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Forest Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #766e6b; 9 | } 10 | 11 | /* Atelier-Forest Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #f22c40; 23 | } 24 | 25 | /* Atelier-Forest Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #df5320; 34 | } 35 | 36 | /* Atelier-Forest Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #7b9726; 41 | } 42 | 43 | /* Atelier-Forest Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #407ee7; 47 | } 48 | 49 | /* Atelier-Forest Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #6666ea; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #f1efee; 59 | color: #68615e; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /src/assets/css/highlight/atelier-seaside-dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Seaside Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Seaside Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #809980; 9 | } 10 | 11 | /* Atelier-Seaside Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #e6193c; 23 | } 24 | 25 | /* Atelier-Seaside Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #87711d; 34 | } 35 | 36 | /* Atelier-Seaside Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #29a329; 41 | } 42 | 43 | /* Atelier-Seaside Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #3d62f5; 47 | } 48 | 49 | /* Atelier-Seaside Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #ad2bee; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #131513; 59 | color: #8ca68c; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /src/assets/css/highlight/hopscotch.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Hopscotch 3 | * by Jan T. Sott 4 | * https://github.com/idleberg/Hopscotch 5 | * 6 | * This work is licensed under the Creative Commons CC0 1.0 Universal License 7 | */ 8 | 9 | /* Comment */ 10 | .hljs-comment, 11 | .hljs-quote { 12 | color: #989498; 13 | } 14 | 15 | /* Red */ 16 | .hljs-variable, 17 | .hljs-template-variable, 18 | .hljs-attribute, 19 | .hljs-tag, 20 | .hljs-name, 21 | .hljs-selector-id, 22 | .hljs-selector-class, 23 | .hljs-regexp, 24 | .hljs-link, 25 | .hljs-deletion { 26 | color: #dd464c; 27 | } 28 | 29 | /* Orange */ 30 | .hljs-number, 31 | .hljs-built_in, 32 | .hljs-builtin-name, 33 | .hljs-literal, 34 | .hljs-type, 35 | .hljs-params { 36 | color: #fd8b19; 37 | } 38 | 39 | /* Yellow */ 40 | .hljs-class .hljs-title { 41 | color: #fdcc59; 42 | } 43 | 44 | /* Green */ 45 | .hljs-string, 46 | .hljs-symbol, 47 | .hljs-bullet, 48 | .hljs-addition { 49 | color: #8fc13e; 50 | } 51 | 52 | /* Aqua */ 53 | .hljs-meta { 54 | color: #149b93; 55 | } 56 | 57 | /* Blue */ 58 | .hljs-function, 59 | .hljs-section, 60 | .hljs-title { 61 | color: #1290bf; 62 | } 63 | 64 | /* Purple */ 65 | .hljs-keyword, 66 | .hljs-selector-tag { 67 | color: #c85e7c; 68 | } 69 | 70 | .hljs { 71 | display: block; 72 | background: #322931; 73 | color: #b9b5b8; 74 | padding: 0.5em; 75 | } 76 | 77 | .hljs-emphasis { 78 | font-style: italic; 79 | } 80 | 81 | .hljs-strong { 82 | font-weight: bold; 83 | } 84 | -------------------------------------------------------------------------------- /src/assets/css/highlight/tomorrow-night-eighties.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Night Eighties Theme */ 2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 3 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 4 | 5 | /* Tomorrow Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #999999; 9 | } 10 | 11 | /* Tomorrow Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-tag, 15 | .hljs-name, 16 | .hljs-selector-id, 17 | .hljs-selector-class, 18 | .hljs-regexp, 19 | .hljs-deletion { 20 | color: #f2777a; 21 | } 22 | 23 | /* Tomorrow Orange */ 24 | .hljs-number, 25 | .hljs-built_in, 26 | .hljs-builtin-name, 27 | .hljs-literal, 28 | .hljs-type, 29 | .hljs-params, 30 | .hljs-meta, 31 | .hljs-link { 32 | color: #f99157; 33 | } 34 | 35 | /* Tomorrow Yellow */ 36 | .hljs-attribute { 37 | color: #ffcc66; 38 | } 39 | 40 | /* Tomorrow Green */ 41 | .hljs-string, 42 | .hljs-symbol, 43 | .hljs-bullet, 44 | .hljs-addition { 45 | color: #99cc99; 46 | } 47 | 48 | /* Tomorrow Blue */ 49 | .hljs-title, 50 | .hljs-section { 51 | color: #6699cc; 52 | } 53 | 54 | /* Tomorrow Purple */ 55 | .hljs-keyword, 56 | .hljs-selector-tag { 57 | color: #cc99cc; 58 | } 59 | 60 | .hljs { 61 | display: block; 62 | overflow-x: auto; 63 | background: #2d2d2d; 64 | color: #cccccc; 65 | padding: 0.5em; 66 | } 67 | 68 | .hljs-emphasis { 69 | font-style: italic; 70 | } 71 | 72 | .hljs-strong { 73 | font-weight: bold; 74 | } 75 | -------------------------------------------------------------------------------- /src/views/designerPage/components/list/iview-ui/Form.vue: -------------------------------------------------------------------------------- 1 | 21 | 50 | -------------------------------------------------------------------------------- /src/assets/css/highlight/atelier-seaside-light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Seaside Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Seaside Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #687d68; 9 | } 10 | 11 | /* Atelier-Seaside Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #e6193c; 23 | } 24 | 25 | /* Atelier-Seaside Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #87711d; 34 | } 35 | 36 | /* Atelier-Seaside Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #29a329; 41 | } 42 | 43 | /* Atelier-Seaside Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #3d62f5; 47 | } 48 | 49 | /* Atelier-Seaside Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #ad2bee; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #f4fbf4; 59 | color: #5e6e5e; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /src/assets/css/highlight/atelier-lakeside-dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Lakeside Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Lakeside Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #7195a8; 9 | } 10 | 11 | /* Atelier-Lakeside Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #d22d72; 23 | } 24 | 25 | /* Atelier-Lakeside Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #935c25; 34 | } 35 | 36 | /* Atelier-Lakeside Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #568c3b; 41 | } 42 | 43 | /* Atelier-Lakeside Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #257fad; 47 | } 48 | 49 | /* Atelier-Lakeside Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #6b6bb8; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #161b1d; 59 | color: #7ea2b4; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /src/views/designerPage/components/template/Mint-UI/Header.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { getTemplate, getSlotContent , getStringTypeAttr } from '@/views/designerPage/components/template' 3 | var handle = function(_attr, _slots) { 4 | //定义默认属性 5 | let attributes = { 6 | title: { 7 | type: 'text', 8 | value: 'title' 9 | }, 10 | fixed:{ 11 | type:'boolean', 12 | value:false 13 | } 14 | }, 15 | slots = { 16 | left: [], 17 | right: [] 18 | } 19 | 20 | //覆盖默认属性 21 | Object.assign(slots, _slots) 22 | Object.assign(attributes, _attr) 23 | 24 | //根据组件不同需要做的不同操作 25 | 26 | 27 | //获取插槽模板内容 28 | var subContent = getSlotContent(slots) 29 | 30 | //设置当前组件的slot 31 | if (attributes.slot && attributes.slot!=='default') { 32 | attributes.slot = { 33 | type: 'text', 34 | value: attributes.slot 35 | } 36 | } else { 37 | attributes.slot = { 38 | type: 'text', 39 | value: '' 40 | } 41 | } 42 | 43 | //字符串模板操作 44 | let stringAttr = getStringTypeAttr(attributes) 45 | let template = ` 47 | ${subContent} 48 | ` 49 | 50 | return { template, attributes, slots } 51 | } 52 | export default handle 53 | -------------------------------------------------------------------------------- /src/views/designerPage/components/template/Mint-UI/Progress.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { getTemplate, getSlotContent, getStringTypeAttr } from '@/views/designerPage/components/template' 3 | 4 | var handle = function(_attr, _slots) { 5 | //定义默认属性 6 | let attributes = { 7 | value: { 8 | type: 'number', 9 | value: 0 10 | }, 11 | barHeight: { 12 | type: 'number', 13 | value: 1 14 | } 15 | }, 16 | slots = { 17 | start: [], 18 | end: [] 19 | } 20 | 21 | //覆盖默认属性 22 | Object.assign(slots, _slots) 23 | Object.assign(attributes, _attr) 24 | 25 | //根据组件不同需要做的不同操作 26 | 27 | 28 | //获取插槽模板内容 29 | var subContent = getSlotContent(slots) 30 | 31 | //设置当前组件的slot 32 | if (attributes.slot && attributes.slot !== 'default') { 33 | attributes.slot = { 34 | type: 'text', 35 | value: attributes.slot 36 | } 37 | } else { 38 | attributes.slot = { 39 | type: 'text', 40 | value: '' 41 | } 42 | } 43 | 44 | //字符串模板操作 45 | let stringAttr = getStringTypeAttr(attributes) 46 | let template = ` 48 | ${subContent} 49 | ` 50 | 51 | return { template, attributes, slots } 52 | } 53 | export default handle 54 | -------------------------------------------------------------------------------- /src/assets/css/highlight/atelier-lakeside-light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Lakeside Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Lakeside Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #5a7b8c; 9 | } 10 | 11 | /* Atelier-Lakeside Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #d22d72; 23 | } 24 | 25 | /* Atelier-Lakeside Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #935c25; 34 | } 35 | 36 | /* Atelier-Lakeside Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #568c3b; 41 | } 42 | 43 | /* Atelier-Lakeside Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #257fad; 47 | } 48 | 49 | /* Atelier-Lakeside Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #6b6bb8; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #ebf8ff; 59 | color: #516d7b; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /src/views/designerPage/components/iconPicker.vue: -------------------------------------------------------------------------------- 1 | 2 | 14 | 59 | 61 | -------------------------------------------------------------------------------- /src/assets/css/highlight/arduino-light.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Arduino® Light Theme - Stefania Mellai 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #FFFFFF; 12 | } 13 | 14 | .hljs, 15 | .hljs-subst { 16 | color: #434f54; 17 | } 18 | 19 | .hljs-keyword, 20 | .hljs-attribute, 21 | .hljs-selector-tag, 22 | .hljs-doctag, 23 | .hljs-name { 24 | color: #00979D; 25 | } 26 | 27 | .hljs-built_in, 28 | .hljs-literal, 29 | .hljs-bullet, 30 | .hljs-code, 31 | .hljs-addition { 32 | color: #D35400; 33 | } 34 | 35 | .hljs-regexp, 36 | .hljs-symbol, 37 | .hljs-variable, 38 | .hljs-template-variable, 39 | .hljs-link, 40 | .hljs-selector-attr, 41 | .hljs-selector-pseudo { 42 | color: #00979D; 43 | } 44 | 45 | .hljs-type, 46 | .hljs-string, 47 | .hljs-selector-id, 48 | .hljs-selector-class, 49 | .hljs-quote, 50 | .hljs-template-tag, 51 | .hljs-deletion { 52 | color: #005C5F; 53 | } 54 | 55 | .hljs-title, 56 | .hljs-section { 57 | color: #880000; 58 | font-weight: bold; 59 | } 60 | 61 | .hljs-comment { 62 | color: rgba(149,165,166,.8); 63 | } 64 | 65 | .hljs-meta-keyword { 66 | color: #728E00; 67 | } 68 | 69 | .hljs-meta { 70 | color: #728E00; 71 | color: #434f54; 72 | } 73 | 74 | .hljs-emphasis { 75 | font-style: italic; 76 | } 77 | 78 | .hljs-strong { 79 | font-weight: bold; 80 | } 81 | 82 | .hljs-function { 83 | color: #728E00; 84 | } 85 | 86 | .hljs-number { 87 | color: #8A7B52; 88 | } 89 | -------------------------------------------------------------------------------- /src/assets/css/highlight/googlecode.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Google Code style (c) Aahan Krish 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: white; 12 | color: black; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-quote { 17 | color: #800; 18 | } 19 | 20 | .hljs-keyword, 21 | .hljs-selector-tag, 22 | .hljs-section, 23 | .hljs-title, 24 | .hljs-name { 25 | color: #008; 26 | } 27 | 28 | .hljs-variable, 29 | .hljs-template-variable { 30 | color: #660; 31 | } 32 | 33 | .hljs-string, 34 | .hljs-selector-attr, 35 | .hljs-selector-pseudo, 36 | .hljs-regexp { 37 | color: #080; 38 | } 39 | 40 | .hljs-literal, 41 | .hljs-symbol, 42 | .hljs-bullet, 43 | .hljs-meta, 44 | .hljs-number, 45 | .hljs-link { 46 | color: #066; 47 | } 48 | 49 | .hljs-title, 50 | .hljs-doctag, 51 | .hljs-type, 52 | .hljs-attr, 53 | .hljs-built_in, 54 | .hljs-builtin-name, 55 | .hljs-params { 56 | color: #606; 57 | } 58 | 59 | .hljs-attribute, 60 | .hljs-subst { 61 | color: #000; 62 | } 63 | 64 | .hljs-formula { 65 | background-color: #eee; 66 | font-style: italic; 67 | } 68 | 69 | .hljs-selector-id, 70 | .hljs-selector-class { 71 | color: #9B703F 72 | } 73 | 74 | .hljs-addition { 75 | background-color: #baeeba; 76 | } 77 | 78 | .hljs-deletion { 79 | background-color: #ffc8bd; 80 | } 81 | 82 | .hljs-doctag, 83 | .hljs-strong { 84 | font-weight: bold; 85 | } 86 | 87 | .hljs-emphasis { 88 | font-style: italic; 89 | } 90 | -------------------------------------------------------------------------------- /src/assets/css/highlight/xt256.css: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | xt256.css 4 | 5 | Contact: initbar [at] protonmail [dot] ch 6 | : github.com/initbar 7 | */ 8 | 9 | .hljs { 10 | display: block; 11 | overflow-x: auto; 12 | color: #eaeaea; 13 | background: #000; 14 | padding: 0.5; 15 | } 16 | 17 | .hljs-subst { 18 | color: #eaeaea; 19 | } 20 | 21 | .hljs-emphasis { 22 | font-style: italic; 23 | } 24 | 25 | .hljs-strong { 26 | font-weight: bold; 27 | } 28 | 29 | .hljs-builtin-name, 30 | .hljs-type { 31 | color: #eaeaea; 32 | } 33 | 34 | .hljs-params { 35 | color: #da0000; 36 | } 37 | 38 | .hljs-literal, 39 | .hljs-number, 40 | .hljs-name { 41 | color: #ff0000; 42 | font-weight: bolder; 43 | } 44 | 45 | .hljs-comment { 46 | color: #969896; 47 | } 48 | 49 | .hljs-selector-id, 50 | .hljs-quote { 51 | color: #00ffff; 52 | } 53 | 54 | .hljs-template-variable, 55 | .hljs-variable, 56 | .hljs-title { 57 | color: #00ffff; 58 | font-weight: bold; 59 | } 60 | 61 | .hljs-selector-class, 62 | .hljs-keyword, 63 | .hljs-symbol { 64 | color: #fff000; 65 | } 66 | 67 | .hljs-string, 68 | .hljs-bullet { 69 | color: #00ff00; 70 | } 71 | 72 | .hljs-tag, 73 | .hljs-section { 74 | color: #000fff; 75 | } 76 | 77 | .hljs-selector-tag { 78 | color: #000fff; 79 | font-weight: bold; 80 | } 81 | 82 | .hljs-attribute, 83 | .hljs-built_in, 84 | .hljs-regexp, 85 | .hljs-link { 86 | color: #ff00ff; 87 | } 88 | 89 | .hljs-meta { 90 | color: #fff; 91 | font-weight: bolder; 92 | } 93 | -------------------------------------------------------------------------------- /server/controllers/colorDisk.js: -------------------------------------------------------------------------------- 1 | // server/controllers/colorDisk 2 | 3 | const colorModel = require('../models/colorDisk.js'); // 引入user的表结构 4 | 5 | const getAllColorDisk = async (ctx) => { // 获取所有色盘 6 | const result = await colorModel.getAllColorDisk(); 7 | ctx.body = { 8 | total: result.length, 9 | success: true, 10 | result, 11 | }; // 将请求的结果放到response的body里返回 12 | }; 13 | 14 | const getQueryColorDisk = async (ctx) => { // 获取色盘 15 | const queryForm = ctx.query; 16 | const result = await colorModel.getQueryColorDisk(queryForm); 17 | 18 | ctx.body = { 19 | total: result.length, 20 | success: true, 21 | result, 22 | }; 23 | }; 24 | 25 | const createColorDisk = async (ctx) => { // 给某个用户创建一色盘 26 | const data = ctx.request.body; // post请求,数据是在request.body里的 27 | const result = await colorModel.createColorDisk(data); 28 | 29 | ctx.body = { 30 | success: result, 31 | }; 32 | }; 33 | 34 | const removeColorDisk = async (ctx) => { 35 | const id = ctx.params.id; 36 | const result = await colorModel.removeColorDisk(id); 37 | 38 | ctx.body = { 39 | success: result, 40 | }; 41 | }; 42 | 43 | const updateColorDisk = async (ctx) => { 44 | const data = ctx.request.body; 45 | const result = await colorModel.updateColorDisk(data); 46 | 47 | ctx.body = { 48 | success: result, 49 | }; 50 | }; 51 | 52 | module.exports = { 53 | getAllColorDisk, 54 | getQueryColorDisk, 55 | createColorDisk, 56 | removeColorDisk, 57 | updateColorDisk, 58 | }; 59 | -------------------------------------------------------------------------------- /src/assets/css/highlight/atelier-sulphurpool-dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Sulphurpool Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Sulphurpool Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #898ea4; 9 | } 10 | 11 | /* Atelier-Sulphurpool Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #c94922; 23 | } 24 | 25 | /* Atelier-Sulphurpool Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #c76b29; 34 | } 35 | 36 | /* Atelier-Sulphurpool Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #ac9739; 41 | } 42 | 43 | /* Atelier-Sulphurpool Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #3d8fd1; 47 | } 48 | 49 | /* Atelier-Sulphurpool Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #6679cc; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #202746; 59 | color: #979db4; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /src/assets/css/highlight/atelier-sulphurpool-light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Sulphurpool Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Sulphurpool Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #6b7394; 9 | } 10 | 11 | /* Atelier-Sulphurpool Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #c94922; 23 | } 24 | 25 | /* Atelier-Sulphurpool Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #c76b29; 34 | } 35 | 36 | /* Atelier-Sulphurpool Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #ac9739; 41 | } 42 | 43 | /* Atelier-Sulphurpool Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #3d8fd1; 47 | } 48 | 49 | /* Atelier-Sulphurpool Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #6679cc; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #f5f7ff; 59 | color: #5e6687; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /src/views/designerPage/components/template/Muse-UI/Sub Header.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { getTemplate, getSlotContent , getStringTypeAttr } from '@/views/designerPage/components/template' 3 | import guid from '@/views/designerPage/utils/guid' 4 | 5 | var handle = function(_attr, _slots, _info) { 6 | //定义默认属性 7 | let attributes = { 8 | text: { 9 | type: 'text', 10 | value: '正文' 11 | }, 12 | indset:{ 13 | type:'boolean', 14 | value:false 15 | } 16 | }, 17 | slots = { 18 | default: [] 19 | } 20 | 21 | //覆盖默认属性 22 | Object.assign(slots, _slots) 23 | Object.assign(attributes, _attr) 24 | 25 | //根据组件不同需要做的不同操作 26 | 27 | 28 | //获取插槽模板内容 29 | var subContent = getSlotContent(slots) 30 | 31 | //设置当前组件的slot 32 | if (attributes.slot && attributes.slot!=='default') { 33 | attributes.slot = { 34 | type: 'text', 35 | value: attributes.slot 36 | } 37 | } else { 38 | attributes.slot = { 39 | type: 'text', 40 | value: '' 41 | } 42 | } 43 | 44 | //字符串模板操作 45 | let stringAttr = getStringTypeAttr(attributes) 46 | let template = ` 47 | ${subContent||attributes.text.value} 48 | ` 49 | 50 | return { template, attributes, slots } 51 | } 52 | export default handle 53 | -------------------------------------------------------------------------------- /src/assets/css/highlight/obsidian.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Obsidian style 3 | * ported by Alexander Marenin (http://github.com/ioncreature) 4 | */ 5 | 6 | .hljs { 7 | display: block; 8 | overflow-x: auto; 9 | padding: 0.5em; 10 | background: #282b2e; 11 | } 12 | 13 | .hljs-keyword, 14 | .hljs-selector-tag, 15 | .hljs-literal, 16 | .hljs-selector-id { 17 | color: #93c763; 18 | } 19 | 20 | .hljs-number { 21 | color: #ffcd22; 22 | } 23 | 24 | .hljs { 25 | color: #e0e2e4; 26 | } 27 | 28 | .hljs-attribute { 29 | color: #668bb0; 30 | } 31 | 32 | .hljs-code, 33 | .hljs-class .hljs-title, 34 | .hljs-section { 35 | color: white; 36 | } 37 | 38 | .hljs-regexp, 39 | .hljs-link { 40 | color: #d39745; 41 | } 42 | 43 | .hljs-meta { 44 | color: #557182; 45 | } 46 | 47 | .hljs-tag, 48 | .hljs-name, 49 | .hljs-bullet, 50 | .hljs-subst, 51 | .hljs-emphasis, 52 | .hljs-type, 53 | .hljs-built_in, 54 | .hljs-selector-attr, 55 | .hljs-selector-pseudo, 56 | .hljs-addition, 57 | .hljs-variable, 58 | .hljs-template-tag, 59 | .hljs-template-variable { 60 | color: #8cbbad; 61 | } 62 | 63 | .hljs-string, 64 | .hljs-symbol { 65 | color: #ec7600; 66 | } 67 | 68 | .hljs-comment, 69 | .hljs-quote, 70 | .hljs-deletion { 71 | color: #818e96; 72 | } 73 | 74 | .hljs-selector-class { 75 | color: #A082BD 76 | } 77 | 78 | .hljs-keyword, 79 | .hljs-selector-tag, 80 | .hljs-literal, 81 | .hljs-doctag, 82 | .hljs-title, 83 | .hljs-section, 84 | .hljs-type, 85 | .hljs-name, 86 | .hljs-strong { 87 | font-weight: bold; 88 | } 89 | -------------------------------------------------------------------------------- /src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import Router from 'vue-router'; 3 | import HomePage from '@/views/homePage/index'; 4 | import Login from '@/views/login/index'; 5 | import ColorPage from '@/views/colorPage/index'; 6 | import PersonPage from '@/views/personPage/index'; 7 | import designerPage from '@/views/designerPage/index'; 8 | import previewMobile from '@/views/designerPage/components/preview_mobile'; 9 | import previewProduct from '@/views/designerPage/components/preview_product'; 10 | 11 | Vue.use(Router); 12 | 13 | export default new Router({ 14 | routes: [ 15 | { 16 | path: '/', 17 | name: 'homePage', 18 | component: HomePage, 19 | }, 20 | { 21 | path: '/login', 22 | name: 'login', 23 | component: Login, 24 | }, 25 | { 26 | path: '/colorPage', 27 | name: 'colorPage', 28 | component: ColorPage, 29 | }, 30 | { 31 | path: '/personPage', 32 | name: 'personPage', 33 | component: PersonPage, 34 | }, 35 | { 36 | path: '/designerPage', 37 | name: 'designerPage', 38 | component: designerPage, 39 | }, 40 | { 41 | path: '*', 42 | redirect: '/', // 输入其他不存在的地址自动跳回首页 43 | }, 44 | { 45 | path: '/preview/mobile', // 手机预览 46 | name: 'preview_mobile', 47 | component: previewMobile, 48 | }, 49 | { 50 | path: '/preview/pc', // 手机预览 51 | name: 'preview_product', 52 | component: previewProduct, 53 | }, 54 | ], 55 | }); 56 | -------------------------------------------------------------------------------- /src/assets/css/highlight/foundation.css: -------------------------------------------------------------------------------- 1 | /* 2 | Description: Foundation 4 docs style for highlight.js 3 | Author: Dan Allen 4 | Website: http://foundation.zurb.com/docs/ 5 | Version: 1.0 6 | Date: 2013-04-02 7 | */ 8 | 9 | .hljs { 10 | display: block; 11 | overflow-x: auto; 12 | padding: 0.5em; 13 | background: #eee; color: black; 14 | } 15 | 16 | .hljs-link, 17 | .hljs-emphasis, 18 | .hljs-attribute, 19 | .hljs-addition { 20 | color: #070; 21 | } 22 | 23 | .hljs-emphasis { 24 | font-style: italic; 25 | } 26 | 27 | .hljs-strong, 28 | .hljs-string, 29 | .hljs-deletion { 30 | color: #d14; 31 | } 32 | 33 | .hljs-strong { 34 | font-weight: bold; 35 | } 36 | 37 | .hljs-quote, 38 | .hljs-comment { 39 | color: #998; 40 | font-style: italic; 41 | } 42 | 43 | .hljs-section, 44 | .hljs-title { 45 | color: #900; 46 | } 47 | 48 | .hljs-class .hljs-title, 49 | .hljs-type { 50 | color: #458; 51 | } 52 | 53 | .hljs-variable, 54 | .hljs-template-variable { 55 | color: #336699; 56 | } 57 | 58 | .hljs-bullet { 59 | color: #997700; 60 | } 61 | 62 | .hljs-meta { 63 | color: #3344bb; 64 | } 65 | 66 | .hljs-code, 67 | .hljs-number, 68 | .hljs-literal, 69 | .hljs-keyword, 70 | .hljs-selector-tag { 71 | color: #099; 72 | } 73 | 74 | .hljs-regexp { 75 | background-color: #fff0ff; 76 | color: #880088; 77 | } 78 | 79 | .hljs-symbol { 80 | color: #990073; 81 | } 82 | 83 | .hljs-tag, 84 | .hljs-name, 85 | .hljs-selector-id, 86 | .hljs-selector-class { 87 | color: #007700; 88 | } 89 | -------------------------------------------------------------------------------- /src/assets/css/highlight/tomorrow-night.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Night Theme */ 2 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 3 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 4 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 5 | 6 | /* Tomorrow Comment */ 7 | .hljs-comment, 8 | .hljs-quote { 9 | color: #969896; 10 | } 11 | 12 | /* Tomorrow Red */ 13 | .hljs-variable, 14 | .hljs-template-variable, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-selector-id, 18 | .hljs-selector-class, 19 | .hljs-regexp, 20 | .hljs-deletion { 21 | color: #cc6666; 22 | } 23 | 24 | /* Tomorrow Orange */ 25 | .hljs-number, 26 | .hljs-built_in, 27 | .hljs-builtin-name, 28 | .hljs-literal, 29 | .hljs-type, 30 | .hljs-params, 31 | .hljs-meta, 32 | .hljs-link { 33 | color: #de935f; 34 | } 35 | 36 | /* Tomorrow Yellow */ 37 | .hljs-attribute { 38 | color: #f0c674; 39 | } 40 | 41 | /* Tomorrow Green */ 42 | .hljs-string, 43 | .hljs-symbol, 44 | .hljs-bullet, 45 | .hljs-addition { 46 | color: #b5bd68; 47 | } 48 | 49 | /* Tomorrow Blue */ 50 | .hljs-title, 51 | .hljs-section { 52 | color: #81a2be; 53 | } 54 | 55 | /* Tomorrow Purple */ 56 | .hljs-keyword, 57 | .hljs-selector-tag { 58 | color: #b294bb; 59 | } 60 | 61 | .hljs { 62 | display: block; 63 | overflow-x: auto; 64 | background: #1d1f21; 65 | color: #c5c8c6; 66 | padding: 0.5em; 67 | } 68 | 69 | .hljs-emphasis { 70 | font-style: italic; 71 | } 72 | 73 | .hljs-strong { 74 | font-weight: bold; 75 | } 76 | -------------------------------------------------------------------------------- /src/views/designerPage/components/template/iView-UI/Icon.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { getTemplate, getSlotContent, getStringTypeAttr } from '@/views/designerPage/components/template' 3 | 4 | var handle = function(_attr, _slots) { 5 | //定义默认属性 6 | let attributes = { 7 | type:{ 8 | type:'ionicon', 9 | value:'happy-outline' 10 | }, 11 | size:{ 12 | type:'number', 13 | value: 12 14 | }, 15 | color:{ 16 | type:'color', 17 | value:'' 18 | } 19 | }, 20 | slots = { 21 | } 22 | 23 | //覆盖默认属性 24 | Object.assign(slots, _slots) 25 | Object.assign(attributes, _attr) 26 | 27 | //根据组件不同需要做的不同操作 28 | 29 | 30 | //获取插槽模板内容 31 | var subContent = getSlotContent(slots) 32 | //设置当前组件的slot 33 | if (attributes.slot && attributes.slot!=='default') { 34 | attributes.slot = { 35 | type: 'text', 36 | value: attributes.slot 37 | } 38 | } else { 39 | attributes.slot = { 40 | type: 'text', 41 | value: '' 42 | } 43 | } 44 | 45 | //字符串模板操作 46 | let stringAttr = getStringTypeAttr(attributes) 47 | let template = ` 49 | ${subContent} 50 | ` 51 | 52 | return { template, attributes, slots } 53 | } 54 | export default handle 55 | -------------------------------------------------------------------------------- /src/assets/css/highlight/xcode.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | XCode style (c) Angel Garcia 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #fff; 12 | color: black; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-quote { 17 | color: #006a00; 18 | } 19 | 20 | .hljs-keyword, 21 | .hljs-selector-tag, 22 | .hljs-literal { 23 | color: #aa0d91; 24 | } 25 | 26 | .hljs-name { 27 | color: #008; 28 | } 29 | 30 | .hljs-variable, 31 | .hljs-template-variable { 32 | color: #660; 33 | } 34 | 35 | .hljs-string { 36 | color: #c41a16; 37 | } 38 | 39 | .hljs-regexp, 40 | .hljs-link { 41 | color: #080; 42 | } 43 | 44 | .hljs-title, 45 | .hljs-tag, 46 | .hljs-symbol, 47 | .hljs-bullet, 48 | .hljs-number, 49 | .hljs-meta { 50 | color: #1c00cf; 51 | } 52 | 53 | .hljs-section, 54 | .hljs-class .hljs-title, 55 | .hljs-type, 56 | .hljs-attr, 57 | .hljs-built_in, 58 | .hljs-builtin-name, 59 | .hljs-params { 60 | color: #5c2699; 61 | } 62 | 63 | .hljs-attribute, 64 | .hljs-subst { 65 | color: #000; 66 | } 67 | 68 | .hljs-formula { 69 | background-color: #eee; 70 | font-style: italic; 71 | } 72 | 73 | .hljs-addition { 74 | background-color: #baeeba; 75 | } 76 | 77 | .hljs-deletion { 78 | background-color: #ffc8bd; 79 | } 80 | 81 | .hljs-selector-id, 82 | .hljs-selector-class { 83 | color: #9b703f; 84 | } 85 | 86 | .hljs-doctag, 87 | .hljs-strong { 88 | font-weight: bold; 89 | } 90 | 91 | .hljs-emphasis { 92 | font-style: italic; 93 | } 94 | -------------------------------------------------------------------------------- /src/views/designerPage/components/template/Muse-UI/Icon.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { getTemplate, getSlotContent , getStringTypeAttr } from '@/views/designerPage/components/template' 3 | 4 | var handle = function(_attr, _slots) { 5 | //定义默认属性 6 | let attributes = { 7 | value:{ 8 | type:'icon', 9 | value:'insert_emoticon' 10 | }, 11 | size:{ 12 | type:'number', 13 | value: 24 14 | }, 15 | color:{ 16 | type:'color', 17 | value:'' 18 | } 19 | }, 20 | slots = { 21 | } 22 | 23 | //覆盖默认属性 24 | Object.assign(slots, _slots) 25 | Object.assign(attributes, _attr) 26 | 27 | //根据组件不同需要做的不同操作 28 | 29 | 30 | //获取插槽模板内容 31 | var subContent = getSlotContent(slots) 32 | 33 | //设置当前组件的slot 34 | if (attributes.slot && attributes.slot!=='default') { 35 | attributes.slot = { 36 | type: 'text', 37 | value: attributes.slot 38 | } 39 | } else { 40 | attributes.slot = { 41 | type: 'text', 42 | value: '' 43 | } 44 | } 45 | 46 | //字符串模板操作 47 | let stringAttr = getStringTypeAttr(attributes) 48 | let template = ` 50 | ${subContent} 51 | ` 52 | 53 | return { template, attributes, slots } 54 | } 55 | export default handle 56 | -------------------------------------------------------------------------------- /src/assets/css/highlight/pojoaque.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Pojoaque Style by Jason Tate 4 | http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html 5 | Based on Solarized Style from http://ethanschoonover.com/solarized 6 | 7 | */ 8 | 9 | .hljs { 10 | display: block; 11 | overflow-x: auto; 12 | padding: 0.5em; 13 | color: #dccf8f; 14 | background: url(./pojoaque.jpg) repeat scroll left top #181914; 15 | } 16 | 17 | .hljs-comment, 18 | .hljs-quote { 19 | color: #586e75; 20 | font-style: italic; 21 | } 22 | 23 | .hljs-keyword, 24 | .hljs-selector-tag, 25 | .hljs-literal, 26 | .hljs-addition { 27 | color: #b64926; 28 | } 29 | 30 | .hljs-number, 31 | .hljs-string, 32 | .hljs-doctag, 33 | .hljs-regexp { 34 | color: #468966; 35 | } 36 | 37 | .hljs-title, 38 | .hljs-section, 39 | .hljs-built_in, 40 | .hljs-name { 41 | color: #ffb03b; 42 | } 43 | 44 | .hljs-variable, 45 | .hljs-template-variable, 46 | .hljs-class .hljs-title, 47 | .hljs-type, 48 | .hljs-tag { 49 | color: #b58900; 50 | } 51 | 52 | .hljs-attribute { 53 | color: #b89859; 54 | } 55 | 56 | .hljs-symbol, 57 | .hljs-bullet, 58 | .hljs-link, 59 | .hljs-subst, 60 | .hljs-meta { 61 | color: #cb4b16; 62 | } 63 | 64 | .hljs-deletion { 65 | color: #dc322f; 66 | } 67 | 68 | .hljs-selector-id, 69 | .hljs-selector-class { 70 | color: #d3a60c; 71 | } 72 | 73 | .hljs-formula { 74 | background: #073642; 75 | } 76 | 77 | .hljs-emphasis { 78 | font-style: italic; 79 | } 80 | 81 | .hljs-strong { 82 | font-weight: bold; 83 | } 84 | -------------------------------------------------------------------------------- /src/assets/css/highlight/tomorrow-night-blue.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Night Blue Theme */ 2 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 3 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 4 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 5 | 6 | /* Tomorrow Comment */ 7 | .hljs-comment, 8 | .hljs-quote { 9 | color: #7285b7; 10 | } 11 | 12 | /* Tomorrow Red */ 13 | .hljs-variable, 14 | .hljs-template-variable, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-selector-id, 18 | .hljs-selector-class, 19 | .hljs-regexp, 20 | .hljs-deletion { 21 | color: #ff9da4; 22 | } 23 | 24 | /* Tomorrow Orange */ 25 | .hljs-number, 26 | .hljs-built_in, 27 | .hljs-builtin-name, 28 | .hljs-literal, 29 | .hljs-type, 30 | .hljs-params, 31 | .hljs-meta, 32 | .hljs-link { 33 | color: #ffc58f; 34 | } 35 | 36 | /* Tomorrow Yellow */ 37 | .hljs-attribute { 38 | color: #ffeead; 39 | } 40 | 41 | /* Tomorrow Green */ 42 | .hljs-string, 43 | .hljs-symbol, 44 | .hljs-bullet, 45 | .hljs-addition { 46 | color: #d1f1a9; 47 | } 48 | 49 | /* Tomorrow Blue */ 50 | .hljs-title, 51 | .hljs-section { 52 | color: #bbdaff; 53 | } 54 | 55 | /* Tomorrow Purple */ 56 | .hljs-keyword, 57 | .hljs-selector-tag { 58 | color: #ebbbff; 59 | } 60 | 61 | .hljs { 62 | display: block; 63 | overflow-x: auto; 64 | background: #002451; 65 | color: white; 66 | padding: 0.5em; 67 | } 68 | 69 | .hljs-emphasis { 70 | font-style: italic; 71 | } 72 | 73 | .hljs-strong { 74 | font-weight: bold; 75 | } 76 | -------------------------------------------------------------------------------- /src/views/designerPage/components/template/iView-UI/Option.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { getTemplate, getSlotContent, getStringTypeAttr } from '@/views/designerPage/components/template' 3 | 4 | var handle = function(_attr, _slots) { 5 | //定义默认属性 6 | let attributes = { 7 | label: { 8 | type: 'text', 9 | value: 'Option' 10 | }, 11 | value:{ 12 | type:'text', 13 | value:'' 14 | }, 15 | disabled: { 16 | type: 'boolean', 17 | value: false 18 | } 19 | }, 20 | slots = { 21 | } 22 | 23 | //覆盖默认属性 24 | Object.assign(slots, _slots) 25 | Object.assign(attributes, _attr) 26 | 27 | //根据组件不同需要做的不同操作 28 | 29 | 30 | //获取插槽模板内容 31 | var subContent = getSlotContent(slots) 32 | //设置当前组件的slot 33 | if (attributes.slot && attributes.slot !== 'default') { 34 | attributes.slot = { 35 | type: 'text', 36 | value: attributes.slot 37 | } 38 | } else { 39 | attributes.slot = { 40 | type: 'text', 41 | value: '' 42 | } 43 | } 44 | 45 | //字符串模板操作 46 | let stringAttr = getStringTypeAttr(attributes) 47 | let template = `` 51 | return { template, attributes, slots } 52 | } 53 | export default handle 54 | -------------------------------------------------------------------------------- /server/models/colorDisk.js: -------------------------------------------------------------------------------- 1 | // server/models/todolist.js 2 | 3 | const db = require('../config/db.js'); 4 | 5 | const colorModel = '../schema/colorDisk.js'; 6 | 7 | const FEDSQL = db.FEDSQL; // 引入数据库 8 | 9 | const colorDisk = FEDSQL.import(colorModel); 10 | 11 | const getAllColorDisk = async () => { // 获取全部色盘 12 | const allDisk = await colorDisk.findAll();// 查找全部的色盘 13 | return allDisk; // 返回数据 14 | }; 15 | 16 | const getQueryColorDisk = async (queryForm) => { // 获取某个用户的全部色盘 17 | const queryStr = { 18 | where: {}, 19 | order: [[queryForm.orderBy, queryForm.order]], 20 | }; 21 | if (queryForm.value && queryForm.key) { 22 | if (queryForm.value === 'user_id') queryStr.where[queryForm.value] = queryForm.key; 23 | else queryStr.where[queryForm.value] = { $like: `%${queryForm.key}%` }; 24 | } 25 | const disk = await colorDisk.findAll(queryStr); 26 | 27 | return disk; // 返回数据 28 | }; 29 | 30 | const createColorDisk = async (data) => { // 给某个用户创建一色盘 31 | await colorDisk.create(data); 32 | return true; 33 | }; 34 | 35 | const removeColorDisk = async (id) => { 36 | await colorDisk.destroy({ 37 | where: { 38 | id, 39 | }, 40 | }); 41 | 42 | return true; 43 | }; 44 | 45 | const updateColorDisk = async (data) => { 46 | await colorDisk.update(data, { 47 | where: { 48 | id: data.id, 49 | }, 50 | }); 51 | 52 | return true; 53 | }; 54 | 55 | module.exports = { 56 | getAllColorDisk, 57 | getQueryColorDisk, 58 | createColorDisk, 59 | removeColorDisk, 60 | updateColorDisk, 61 | }; 62 | -------------------------------------------------------------------------------- /src/views/designerPage/components/template/Muse-UI/Breadcrumb Item.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { getTemplate, getSlotContent, getStringTypeAttr } from '@/views/designerPage/components/template' 3 | 4 | var handle = function(_attr, _slots) { 5 | //定义默认属性 6 | let attributes = { 7 | text:{ 8 | type:'text', 9 | value:'text' 10 | }, 11 | href:{ 12 | type:'text', 13 | value:'#' 14 | } 15 | }, 16 | slots = { 17 | } 18 | 19 | //覆盖默认属性 20 | Object.assign(slots, _slots) 21 | Object.assign(attributes, _attr) 22 | 23 | //根据组件不同需要做的不同操作 24 | let text=attributes.text.value 25 | 26 | //获取插槽模板内容 27 | var subContent = getSlotContent(slots) 28 | //设置当前组件的slot 29 | if (attributes.slot && attributes.slot!=='default') { 30 | attributes.slot = { 31 | type: 'text', 32 | value: attributes.slot 33 | } 34 | } else { 35 | attributes.slot = { 36 | type: 'text', 37 | value: '' 38 | } 39 | } 40 | 41 | //字符串模板操作 42 | let stringAttr = getStringTypeAttr(attributes) 43 | let template = ` 45 | ${text} 46 | ` 47 | 48 | //删除自定义非ui属性 49 | template = template.replace(`text="${text}"`, '') 50 | 51 | return { template, attributes, slots } 52 | } 53 | export default handle 54 | -------------------------------------------------------------------------------- /src/assets/css/highlight/solarized-dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #002b36; 12 | color: #839496; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-quote { 17 | color: #586e75; 18 | } 19 | 20 | /* Solarized Green */ 21 | .hljs-keyword, 22 | .hljs-selector-tag, 23 | .hljs-addition { 24 | color: #859900; 25 | } 26 | 27 | /* Solarized Cyan */ 28 | .hljs-number, 29 | .hljs-string, 30 | .hljs-meta .hljs-meta-string, 31 | .hljs-literal, 32 | .hljs-doctag, 33 | .hljs-regexp { 34 | color: #2aa198; 35 | } 36 | 37 | /* Solarized Blue */ 38 | .hljs-title, 39 | .hljs-section, 40 | .hljs-name, 41 | .hljs-selector-id, 42 | .hljs-selector-class { 43 | color: #268bd2; 44 | } 45 | 46 | /* Solarized Yellow */ 47 | .hljs-attribute, 48 | .hljs-attr, 49 | .hljs-variable, 50 | .hljs-template-variable, 51 | .hljs-class .hljs-title, 52 | .hljs-type { 53 | color: #b58900; 54 | } 55 | 56 | /* Solarized Orange */ 57 | .hljs-symbol, 58 | .hljs-bullet, 59 | .hljs-subst, 60 | .hljs-meta, 61 | .hljs-meta .hljs-keyword, 62 | .hljs-selector-attr, 63 | .hljs-selector-pseudo, 64 | .hljs-link { 65 | color: #cb4b16; 66 | } 67 | 68 | /* Solarized Red */ 69 | .hljs-built_in, 70 | .hljs-deletion { 71 | color: #dc322f; 72 | } 73 | 74 | .hljs-formula { 75 | background: #073642; 76 | } 77 | 78 | .hljs-emphasis { 79 | font-style: italic; 80 | } 81 | 82 | .hljs-strong { 83 | font-weight: bold; 84 | } 85 | -------------------------------------------------------------------------------- /src/assets/css/highlight/solarized-light.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #fdf6e3; 12 | color: #657b83; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-quote { 17 | color: #93a1a1; 18 | } 19 | 20 | /* Solarized Green */ 21 | .hljs-keyword, 22 | .hljs-selector-tag, 23 | .hljs-addition { 24 | color: #859900; 25 | } 26 | 27 | /* Solarized Cyan */ 28 | .hljs-number, 29 | .hljs-string, 30 | .hljs-meta .hljs-meta-string, 31 | .hljs-literal, 32 | .hljs-doctag, 33 | .hljs-regexp { 34 | color: #2aa198; 35 | } 36 | 37 | /* Solarized Blue */ 38 | .hljs-title, 39 | .hljs-section, 40 | .hljs-name, 41 | .hljs-selector-id, 42 | .hljs-selector-class { 43 | color: #268bd2; 44 | } 45 | 46 | /* Solarized Yellow */ 47 | .hljs-attribute, 48 | .hljs-attr, 49 | .hljs-variable, 50 | .hljs-template-variable, 51 | .hljs-class .hljs-title, 52 | .hljs-type { 53 | color: #b58900; 54 | } 55 | 56 | /* Solarized Orange */ 57 | .hljs-symbol, 58 | .hljs-bullet, 59 | .hljs-subst, 60 | .hljs-meta, 61 | .hljs-meta .hljs-keyword, 62 | .hljs-selector-attr, 63 | .hljs-selector-pseudo, 64 | .hljs-link { 65 | color: #cb4b16; 66 | } 67 | 68 | /* Solarized Red */ 69 | .hljs-built_in, 70 | .hljs-deletion { 71 | color: #dc322f; 72 | } 73 | 74 | .hljs-formula { 75 | background: #eee8d5; 76 | } 77 | 78 | .hljs-emphasis { 79 | font-style: italic; 80 | } 81 | 82 | .hljs-strong { 83 | font-weight: bold; 84 | } 85 | -------------------------------------------------------------------------------- /src/views/designerPage/components/template/Common/Img.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { getTemplate, getSlotContent, getStringTypeAttr } from '@/views/designerPage/components/template' 3 | 4 | var handle = function(_attr, _slots) { 5 | //定义默认属性 6 | let attributes = { 7 | src: { 8 | type: 'text', 9 | value: 'http://img.hb.aicdn.com/94651ef194a0fcaab03e7215ba4ecb9e865052736b722-CAcFuk_fw658' 10 | }, 11 | alt:{ 12 | type:'text', 13 | value:'' 14 | }, 15 | width:{ 16 | type:'text', 17 | value:'' 18 | }, 19 | height:{ 20 | type:'text', 21 | value:'' 22 | } 23 | }, 24 | slots = {} 25 | 26 | //覆盖默认属性 27 | Object.assign(slots, _slots) 28 | Object.assign(attributes, _attr) 29 | 30 | //根据组件不同需要做的不同操作 31 | 32 | 33 | //获取插槽模板内容 34 | var subContent = getSlotContent(slots) || ' ' 35 | //设置当前组件的slot 36 | if (attributes.slot && attributes.slot !== 'default') { 37 | attributes.slot = { 38 | type: 'text', 39 | value: attributes.slot 40 | } 41 | } else { 42 | attributes.slot = { 43 | type: 'text', 44 | value: '' 45 | } 46 | } 47 | 48 | //字符串模板操作 49 | let stringAttr = getStringTypeAttr(attributes) 50 | let template = `` 51 | 52 | return { template, attributes, slots } 53 | } 54 | export default handle 55 | -------------------------------------------------------------------------------- /src/views/designerPage/components/template/iView-UI/iSwitch.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { getTemplate, getSlotContent, getStringTypeAttr } from '@/views/designerPage/components/template' 3 | 4 | var handle = function(_attr, _slots) { 5 | //定义默认属性 6 | let attributes = { 7 | value:{ 8 | type:'boolean', 9 | value:false 10 | }, 11 | size:{ 12 | type:['large','small',''], 13 | value:'' 14 | }, 15 | disabled:{ 16 | type:'boolean', 17 | value:false 18 | } 19 | }, 20 | slots = { 21 | open: [], 22 | close:[] 23 | } 24 | 25 | //覆盖默认属性 26 | Object.assign(slots, _slots) 27 | Object.assign(attributes, _attr) 28 | 29 | //根据组件不同需要做的不同操作 30 | 31 | 32 | //获取插槽模板内容 33 | var subContent = getSlotContent(slots) 34 | //设置当前组件的slot 35 | if (attributes.slot && attributes.slot !== 'default') { 36 | attributes.slot = { 37 | type: 'text', 38 | value: attributes.slot 39 | } 40 | } else { 41 | attributes.slot = { 42 | type: 'text', 43 | value: '' 44 | } 45 | } 46 | 47 | //字符串模板操作 48 | let stringAttr = getStringTypeAttr(attributes) 49 | let template = ` 51 | ${subContent} 52 | ` 53 | return { template, attributes, slots } 54 | } 55 | export default handle 56 | -------------------------------------------------------------------------------- /server/models/projectPermission.js: -------------------------------------------------------------------------------- 1 | // server/models/todolist.js 2 | 3 | const db = require('../config/db.js'); 4 | 5 | const permissionModel = '../schema/projectPermission.js'; 6 | 7 | const FEDSQL = db.FEDSQL; // 引入数据库 8 | 9 | const projectPermission = FEDSQL.import(permissionModel); 10 | 11 | const getAllProjectPermission = async () => { 12 | const allProjectPermission = await projectPermission.findAll(); 13 | return allProjectPermission; // 返回数据 14 | }; 15 | 16 | const getQueryProjectPermission = async (form) => { 17 | const queryStr = { 18 | where: form, 19 | }; 20 | const Permission = await projectPermission.findAll(queryStr); 21 | for (const index in Permission) { 22 | Permission[index].write = Boolean(Permission[index].write); 23 | Permission[index].setting = Boolean(Permission[index].setting); 24 | } 25 | 26 | return Permission; // 返回数据 27 | }; 28 | 29 | const createProjectPermission = async (data) => { 30 | const result = await projectPermission.create(data); 31 | return result; 32 | }; 33 | 34 | const removeProjectPermission = async (id) => { 35 | await projectPermission.destroy({ 36 | where: { 37 | id, 38 | }, 39 | }); 40 | 41 | return true; 42 | }; 43 | 44 | const updateProjectPermission = async (data) => { 45 | await projectPermission.update(data, { 46 | where: { 47 | id: data.id, 48 | }, 49 | }); 50 | 51 | return true; 52 | }; 53 | 54 | module.exports = { 55 | getAllProjectPermission, 56 | getQueryProjectPermission, 57 | createProjectPermission, 58 | removeProjectPermission, 59 | updateProjectPermission, 60 | }; 61 | -------------------------------------------------------------------------------- /src/assets/css/highlight/docco.css: -------------------------------------------------------------------------------- 1 | /* 2 | Docco style used in http://jashkenas.github.com/docco/ converted by Simon Madine (@thingsinjars) 3 | */ 4 | 5 | .hljs { 6 | display: block; 7 | overflow-x: auto; 8 | padding: 0.5em; 9 | color: #000; 10 | background: #f8f8ff; 11 | } 12 | 13 | .hljs-comment, 14 | .hljs-quote { 15 | color: #408080; 16 | font-style: italic; 17 | } 18 | 19 | .hljs-keyword, 20 | .hljs-selector-tag, 21 | .hljs-literal, 22 | .hljs-subst { 23 | color: #954121; 24 | } 25 | 26 | .hljs-number { 27 | color: #40a070; 28 | } 29 | 30 | .hljs-string, 31 | .hljs-doctag { 32 | color: #219161; 33 | } 34 | 35 | .hljs-selector-id, 36 | .hljs-selector-class, 37 | .hljs-section, 38 | .hljs-type { 39 | color: #19469d; 40 | } 41 | 42 | .hljs-params { 43 | color: #00f; 44 | } 45 | 46 | .hljs-title { 47 | color: #458; 48 | font-weight: bold; 49 | } 50 | 51 | .hljs-tag, 52 | .hljs-name, 53 | .hljs-attribute { 54 | color: #000080; 55 | font-weight: normal; 56 | } 57 | 58 | .hljs-variable, 59 | .hljs-template-variable { 60 | color: #008080; 61 | } 62 | 63 | .hljs-regexp, 64 | .hljs-link { 65 | color: #b68; 66 | } 67 | 68 | .hljs-symbol, 69 | .hljs-bullet { 70 | color: #990073; 71 | } 72 | 73 | .hljs-built_in, 74 | .hljs-builtin-name { 75 | color: #0086b3; 76 | } 77 | 78 | .hljs-meta { 79 | color: #999; 80 | font-weight: bold; 81 | } 82 | 83 | .hljs-deletion { 84 | background: #fdd; 85 | } 86 | 87 | .hljs-addition { 88 | background: #dfd; 89 | } 90 | 91 | .hljs-emphasis { 92 | font-style: italic; 93 | } 94 | 95 | .hljs-strong { 96 | font-weight: bold; 97 | } 98 | -------------------------------------------------------------------------------- /src/assets/css/highlight/idea.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Intellij Idea-like styling (c) Vasily Polovnyov 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | color: #000; 12 | background: #fff; 13 | } 14 | 15 | .hljs-subst, 16 | .hljs-title { 17 | font-weight: normal; 18 | color: #000; 19 | } 20 | 21 | .hljs-comment, 22 | .hljs-quote { 23 | color: #808080; 24 | font-style: italic; 25 | } 26 | 27 | .hljs-meta { 28 | color: #808000; 29 | } 30 | 31 | .hljs-tag { 32 | background: #efefef; 33 | } 34 | 35 | .hljs-section, 36 | .hljs-name, 37 | .hljs-literal, 38 | .hljs-keyword, 39 | .hljs-selector-tag, 40 | .hljs-type, 41 | .hljs-selector-id, 42 | .hljs-selector-class { 43 | font-weight: bold; 44 | color: #000080; 45 | } 46 | 47 | .hljs-attribute, 48 | .hljs-number, 49 | .hljs-regexp, 50 | .hljs-link { 51 | font-weight: bold; 52 | color: #0000ff; 53 | } 54 | 55 | .hljs-number, 56 | .hljs-regexp, 57 | .hljs-link { 58 | font-weight: normal; 59 | } 60 | 61 | .hljs-string { 62 | color: #008000; 63 | font-weight: bold; 64 | } 65 | 66 | .hljs-symbol, 67 | .hljs-bullet, 68 | .hljs-formula { 69 | color: #000; 70 | background: #d0eded; 71 | font-style: italic; 72 | } 73 | 74 | .hljs-doctag { 75 | text-decoration: underline; 76 | } 77 | 78 | .hljs-variable, 79 | .hljs-template-variable { 80 | color: #660e7a; 81 | } 82 | 83 | .hljs-addition { 84 | background: #baeeba; 85 | } 86 | 87 | .hljs-deletion { 88 | background: #ffc8bd; 89 | } 90 | 91 | .hljs-emphasis { 92 | font-style: italic; 93 | } 94 | 95 | .hljs-strong { 96 | font-weight: bold; 97 | } 98 | -------------------------------------------------------------------------------- /src/views/designerPage/components/template/Muse-UI/Card Title.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { getTemplate, getSlotContent , getStringTypeAttr } from '@/views/designerPage/components/template' 3 | import guid from '@/views/designerPage/utils/guid' 4 | 5 | var handle = function(_attr, _slots, _info) { 6 | //定义默认属性 7 | let attributes = { 8 | title: { 9 | type: 'text', 10 | value: 'Title' 11 | }, 12 | titleClass:{ 13 | type:'text', 14 | value:'' 15 | }, 16 | subTitle:{ 17 | type:'text', 18 | value:'subTitle' 19 | }, 20 | subTitleClass:{ 21 | type:'text', 22 | value:'' 23 | } 24 | }, 25 | slots = { 26 | } 27 | 28 | //覆盖默认属性 29 | Object.assign(slots, _slots) 30 | Object.assign(attributes, _attr) 31 | 32 | //根据组件不同需要做的不同操作 33 | 34 | 35 | //获取插槽模板内容 36 | var subContent = getSlotContent(slots) 37 | 38 | //设置当前组件的slot 39 | if (attributes.slot && attributes.slot!=='default') { 40 | attributes.slot = { 41 | type: 'text', 42 | value: attributes.slot 43 | } 44 | } else { 45 | attributes.slot = { 46 | type: 'text', 47 | value: '' 48 | } 49 | } 50 | 51 | //字符串模板操作 52 | let stringAttr = getStringTypeAttr(attributes) 53 | let template = `` 55 | 56 | return { template, attributes, slots } 57 | } 58 | export default handle 59 | -------------------------------------------------------------------------------- /src/views/designerPage/components/template/Muse-UI/Paper.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { getTemplate, getSlotContent , getStringTypeAttr } from '@/views/designerPage/components/template' 3 | 4 | var handle = function(_attr, _slots) { 5 | //定义默认属性 6 | let attributes = { 7 | circle:{ 8 | type:'boolean', 9 | value:false 10 | }, 11 | rounded:{ 12 | type:'boolean', 13 | value:false 14 | }, 15 | zDepth: { 16 | type: 'slider', 17 | value: 0, 18 | max: 5, 19 | min: 0, 20 | step: 1 21 | } 22 | }, 23 | slots = { 24 | default: [] 25 | } 26 | 27 | //覆盖默认属性 28 | Object.assign(slots, _slots) 29 | Object.assign(attributes, _attr) 30 | 31 | //根据组件不同需要做的不同操作 32 | 33 | 34 | //获取插槽模板内容 35 | var subContent = getSlotContent(slots) 36 | 37 | //设置当前组件的slot 38 | if (attributes.slot && attributes.slot!=='default') { 39 | attributes.slot = { 40 | type: 'text', 41 | value: attributes.slot 42 | } 43 | } else { 44 | attributes.slot = { 45 | type: 'text', 46 | value: '' 47 | } 48 | } 49 | 50 | //字符串模板操作 51 | let stringAttr = getStringTypeAttr(attributes) 52 | let template = ` 54 | ${subContent||' '} 55 | ` 56 | 57 | return { template, attributes, slots } 58 | } 59 | export default handle 60 | -------------------------------------------------------------------------------- /src/components/layout/index.less: -------------------------------------------------------------------------------- 1 | @keyframes rotating{ 2 | from{transform:rotate(0)} 3 | to{transform:rotate(360deg)} 4 | } 5 | .layout{ 6 | border: 0px solid #d7dde4; 7 | background: #f5f7f9; 8 | } 9 | .layout-top { 10 | .ivu-menu-primary.ivu-menu-horizontal .ivu-menu-item-active { 11 | background: #d87675; 12 | color: #ffffff; 13 | } 14 | .ivu-menu-primary.ivu-menu-horizontal .ivu-menu-item:hover, .ivu-menu-primary.ivu-menu-horizontal .ivu-menu-submenu:hover { 15 | background: #d87675; 16 | color: #ffffff; 17 | } 18 | } 19 | .layout-logo{ 20 | float: left; 21 | position: relative; 22 | left: 20px; 23 | top: 10px; 24 | font-size: 50px; 25 | line-height: 50px; 26 | color: #fff; 27 | } 28 | .rotate-icon{ 29 | animation: rotating 4s linear infinite; 30 | } 31 | .layout-title{ 32 | font-size: 20px; 33 | float: left; 34 | position: relative; 35 | left: 33px; 36 | color: #fff; 37 | font-weight: bold; 38 | } 39 | .layout-nav{ 40 | width: 420px; 41 | margin: 0 auto; 42 | } 43 | .layout-right { 44 | float: right; 45 | margin-right: 20px; 46 | .right-link { 47 | color: #fff; 48 | margin: 5px; 49 | } 50 | .right-icon { 51 | font-size: 20px; 52 | line-height: 60px; 53 | color: #fff; 54 | } 55 | } 56 | .layout-content{ 57 | min-height: 200px; 58 | margin: 15px; 59 | overflow: hidden; 60 | background: #fff; 61 | border-radius: 4px; 62 | } 63 | .layout-content-main{ 64 | padding: 10px; 65 | } 66 | .layout-copy{ 67 | text-align: center; 68 | padding: 10px 0 20px; 69 | color: #9ea7b4; 70 | } -------------------------------------------------------------------------------- /src/views/designerPage/components/template/Muse-UI/Back Top.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { getTemplate, getSlotContent , getStringTypeAttr } from '@/views/designerPage/components/template' 3 | 4 | var handle = function(_attr, _slots) { 5 | //定义默认属性 6 | let attributes = { 7 | height:{ 8 | type:'number', 9 | value: 200 10 | }, 11 | bottom:{ 12 | type:'number', 13 | value: 30 14 | }, 15 | right:{ 16 | type:'number', 17 | value: 30 18 | }, 19 | duration:{ 20 | type:'number', 21 | value: 500 22 | } 23 | }, 24 | slots = { 25 | default: [] 26 | } 27 | 28 | //覆盖默认属性 29 | Object.assign(slots, _slots) 30 | Object.assign(attributes, _attr) 31 | 32 | //根据组件不同需要做的不同操作 33 | 34 | 35 | //获取插槽模板内容 36 | var subContent = getSlotContent(slots) 37 | 38 | //设置当前组件的slot 39 | if (attributes.slot && attributes.slot!=='default') { 40 | attributes.slot = { 41 | type: 'text', 42 | value: attributes.slot 43 | } 44 | } else { 45 | attributes.slot = { 46 | type: 'text', 47 | value: '' 48 | } 49 | } 50 | 51 | //字符串模板操作 52 | let stringAttr = getStringTypeAttr(attributes) 53 | let template = ` 55 | ${subContent} 56 | ` 57 | 58 | return { template, attributes, slots } 59 | } 60 | export default handle 61 | -------------------------------------------------------------------------------- /src/assets/css/highlight/atelier-cave-dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Cave Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Cave Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #7e7887; 9 | } 10 | 11 | /* Atelier-Cave Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-regexp, 16 | .hljs-link, 17 | .hljs-tag, 18 | .hljs-name, 19 | .hljs-selector-id, 20 | .hljs-selector-class { 21 | color: #be4678; 22 | } 23 | 24 | /* Atelier-Cave Orange */ 25 | .hljs-number, 26 | .hljs-meta, 27 | .hljs-built_in, 28 | .hljs-builtin-name, 29 | .hljs-literal, 30 | .hljs-type, 31 | .hljs-params { 32 | color: #aa573c; 33 | } 34 | 35 | /* Atelier-Cave Green */ 36 | .hljs-string, 37 | .hljs-symbol, 38 | .hljs-bullet { 39 | color: #2a9292; 40 | } 41 | 42 | /* Atelier-Cave Blue */ 43 | .hljs-title, 44 | .hljs-section { 45 | color: #576ddb; 46 | } 47 | 48 | /* Atelier-Cave Purple */ 49 | .hljs-keyword, 50 | .hljs-selector-tag { 51 | color: #955ae7; 52 | } 53 | 54 | .hljs-deletion, 55 | .hljs-addition { 56 | color: #19171c; 57 | display: inline-block; 58 | width: 100%; 59 | } 60 | 61 | .hljs-deletion { 62 | background-color: #be4678; 63 | } 64 | 65 | .hljs-addition { 66 | background-color: #2a9292; 67 | } 68 | 69 | .hljs { 70 | display: block; 71 | overflow-x: auto; 72 | background: #19171c; 73 | color: #8b8792; 74 | padding: 0.5em; 75 | } 76 | 77 | .hljs-emphasis { 78 | font-style: italic; 79 | } 80 | 81 | .hljs-strong { 82 | font-weight: bold; 83 | } 84 | -------------------------------------------------------------------------------- /src/views/designerPage/components/template/Muse-UI/App Bar.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { getTemplate, getSlotContent, getStringTypeAttr } from '@/views/designerPage/components/template' 3 | 4 | var handle = function(_attr, _slots, info) { 5 | //定义默认属性 6 | let attributes = { 7 | title: { 8 | type: 'text', 9 | value: 'App Bar' 10 | }, 11 | zDepth: { 12 | type: 'slider', 13 | value: 0, 14 | max: 5, 15 | min: 0, 16 | step: 1 17 | }, 18 | titleClass: { 19 | type: 'text', 20 | value: '' 21 | } 22 | }, 23 | slots = { 24 | left: [], 25 | right: [], 26 | default: [] 27 | } 28 | 29 | //覆盖默认属性 30 | Object.assign(slots, _slots) 31 | Object.assign(attributes, _attr) 32 | 33 | //根据组件不同需要做的不同操作 34 | 35 | 36 | //获取插槽模板内容 37 | var subContent = getSlotContent(slots) 38 | 39 | //设置当前组件的slot 40 | if (attributes.slot && attributes.slot !== 'default') { 41 | attributes.slot = { 42 | type: 'text', 43 | value: attributes.slot 44 | } 45 | } else { 46 | attributes.slot = { 47 | type: 'text', 48 | value: '' 49 | } 50 | } 51 | 52 | //字符串模板操作 53 | let stringAttr = getStringTypeAttr(attributes) 54 | let template = ` 56 | ${subContent} 57 | ` 58 | 59 | return { template, attributes, slots } 60 | } 61 | export default handle 62 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | // https://eslint.org/docs/user-guide/configuring 2 | 3 | module.exports = { 4 | root: true, 5 | parserOptions: { 6 | parser: 'babel-eslint' 7 | }, 8 | env: { 9 | browser: true, 10 | }, 11 | // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention 12 | // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. 13 | extends: ['plugin:vue/essential', 'airbnb-base'], 14 | // required to lint *.vue files 15 | plugins: [ 16 | 'vue' 17 | ], 18 | // check if imports actually resolve 19 | settings: { 20 | 'import/resolver': { 21 | webpack: { 22 | config: 'build/webpack.base.conf.js' 23 | } 24 | } 25 | }, 26 | // add your custom rules here 27 | rules: { 28 | "vue/no-parsing-error": [2, { "x-invalid-end-tag": false }], 29 | "no-underscore-dangle": [ 30 | "error", 31 | { "allow": ["_d", "_date"] } 32 | ], 33 | 'no-param-reassign': 'off', // 允许修改函数引用类型入参 34 | 'no-plusplus': 'off', // 允许 ++ 35 | 'no-restricted-syntax': [ // 覆盖掉对 for-in 和 for-of 的限制 36 | 'error', 37 | 'LabeledStatement', 38 | 'WithStatement', 39 | ], 40 | "no-shadow": [ 41 | "error", 42 | { 43 | "allow": 44 | ["state"] 45 | } 46 | ], 47 | 'import/extensions': ['off', 'never'], 48 | 'indent': ['error', 2], 49 | 'no-console': 0, 50 | 'no-debugger': 0, 51 | 'import/no-extraneous-dependencies': 0, 52 | 'no-useless-return': 0, 53 | 'import/no-unresolved': 0, 54 | 'no-prototype-builtins': 0, 55 | 'strict': 0, 56 | "class-methods-use-this": 0, 57 | 'no-undef': 0, 58 | 'no-use-before-define': 0, 59 | 'no-extend-native': 0, 60 | 'no-script-url': 0, 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/assets/css/highlight/atelier-cave-light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Cave Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Cave Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #655f6d; 9 | } 10 | 11 | /* Atelier-Cave Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-name, 21 | .hljs-selector-id, 22 | .hljs-selector-class { 23 | color: #be4678; 24 | } 25 | 26 | /* Atelier-Cave Orange */ 27 | .hljs-number, 28 | .hljs-meta, 29 | .hljs-built_in, 30 | .hljs-builtin-name, 31 | .hljs-literal, 32 | .hljs-type, 33 | .hljs-params { 34 | color: #aa573c; 35 | } 36 | 37 | /* Atelier-Cave Green */ 38 | .hljs-string, 39 | .hljs-symbol, 40 | .hljs-bullet { 41 | color: #2a9292; 42 | } 43 | 44 | /* Atelier-Cave Blue */ 45 | .hljs-title, 46 | .hljs-section { 47 | color: #576ddb; 48 | } 49 | 50 | /* Atelier-Cave Purple */ 51 | .hljs-keyword, 52 | .hljs-selector-tag { 53 | color: #955ae7; 54 | } 55 | 56 | .hljs-deletion, 57 | .hljs-addition { 58 | color: #19171c; 59 | display: inline-block; 60 | width: 100%; 61 | } 62 | 63 | .hljs-deletion { 64 | background-color: #be4678; 65 | } 66 | 67 | .hljs-addition { 68 | background-color: #2a9292; 69 | } 70 | 71 | .hljs { 72 | display: block; 73 | overflow-x: auto; 74 | background: #efecf4; 75 | color: #585260; 76 | padding: 0.5em; 77 | } 78 | 79 | .hljs-emphasis { 80 | font-style: italic; 81 | } 82 | 83 | .hljs-strong { 84 | font-weight: bold; 85 | } 86 | -------------------------------------------------------------------------------- /src/assets/css/highlight/atelier-estuary-dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Estuary Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Estuary Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #878573; 9 | } 10 | 11 | /* Atelier-Estuary Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #ba6236; 23 | } 24 | 25 | /* Atelier-Estuary Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #ae7313; 34 | } 35 | 36 | /* Atelier-Estuary Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #7d9726; 41 | } 42 | 43 | /* Atelier-Estuary Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #36a166; 47 | } 48 | 49 | /* Atelier-Estuary Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #5f9182; 53 | } 54 | 55 | .hljs-deletion, 56 | .hljs-addition { 57 | color: #22221b; 58 | display: inline-block; 59 | width: 100%; 60 | } 61 | 62 | .hljs-deletion { 63 | background-color: #ba6236; 64 | } 65 | 66 | .hljs-addition { 67 | background-color: #7d9726; 68 | } 69 | 70 | .hljs { 71 | display: block; 72 | overflow-x: auto; 73 | background: #22221b; 74 | color: #929181; 75 | padding: 0.5em; 76 | } 77 | 78 | .hljs-emphasis { 79 | font-style: italic; 80 | } 81 | 82 | .hljs-strong { 83 | font-weight: bold; 84 | } 85 | -------------------------------------------------------------------------------- /src/assets/css/highlight/atelier-estuary-light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Estuary Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Estuary Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #6c6b5a; 9 | } 10 | 11 | /* Atelier-Estuary Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #ba6236; 23 | } 24 | 25 | /* Atelier-Estuary Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #ae7313; 34 | } 35 | 36 | /* Atelier-Estuary Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #7d9726; 41 | } 42 | 43 | /* Atelier-Estuary Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #36a166; 47 | } 48 | 49 | /* Atelier-Estuary Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #5f9182; 53 | } 54 | 55 | .hljs-deletion, 56 | .hljs-addition { 57 | color: #22221b; 58 | display: inline-block; 59 | width: 100%; 60 | } 61 | 62 | .hljs-deletion { 63 | background-color: #ba6236; 64 | } 65 | 66 | .hljs-addition { 67 | background-color: #7d9726; 68 | } 69 | 70 | .hljs { 71 | display: block; 72 | overflow-x: auto; 73 | background: #f4f3ec; 74 | color: #5f5e4e; 75 | padding: 0.5em; 76 | } 77 | 78 | .hljs-emphasis { 79 | font-style: italic; 80 | } 81 | 82 | .hljs-strong { 83 | font-weight: bold; 84 | } 85 | -------------------------------------------------------------------------------- /src/assets/css/highlight/atelier-plateau-dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Plateau Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/plateau) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Plateau Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #7e7777; 9 | } 10 | 11 | /* Atelier-Plateau Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #ca4949; 23 | } 24 | 25 | /* Atelier-Plateau Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #b45a3c; 34 | } 35 | 36 | /* Atelier-Plateau Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #4b8b8b; 41 | } 42 | 43 | /* Atelier-Plateau Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #7272ca; 47 | } 48 | 49 | /* Atelier-Plateau Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #8464c4; 53 | } 54 | 55 | .hljs-deletion, 56 | .hljs-addition { 57 | color: #1b1818; 58 | display: inline-block; 59 | width: 100%; 60 | } 61 | 62 | .hljs-deletion { 63 | background-color: #ca4949; 64 | } 65 | 66 | .hljs-addition { 67 | background-color: #4b8b8b; 68 | } 69 | 70 | .hljs { 71 | display: block; 72 | overflow-x: auto; 73 | background: #1b1818; 74 | color: #8a8585; 75 | padding: 0.5em; 76 | } 77 | 78 | .hljs-emphasis { 79 | font-style: italic; 80 | } 81 | 82 | .hljs-strong { 83 | font-weight: bold; 84 | } 85 | -------------------------------------------------------------------------------- /src/assets/css/highlight/atelier-plateau-light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Plateau Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/plateau) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Plateau Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #655d5d; 9 | } 10 | 11 | /* Atelier-Plateau Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #ca4949; 23 | } 24 | 25 | /* Atelier-Plateau Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #b45a3c; 34 | } 35 | 36 | /* Atelier-Plateau Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #4b8b8b; 41 | } 42 | 43 | /* Atelier-Plateau Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #7272ca; 47 | } 48 | 49 | /* Atelier-Plateau Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #8464c4; 53 | } 54 | 55 | .hljs-deletion, 56 | .hljs-addition { 57 | color: #1b1818; 58 | display: inline-block; 59 | width: 100%; 60 | } 61 | 62 | .hljs-deletion { 63 | background-color: #ca4949; 64 | } 65 | 66 | .hljs-addition { 67 | background-color: #4b8b8b; 68 | } 69 | 70 | .hljs { 71 | display: block; 72 | overflow-x: auto; 73 | background: #f4ecec; 74 | color: #585050; 75 | padding: 0.5em; 76 | } 77 | 78 | .hljs-emphasis { 79 | font-style: italic; 80 | } 81 | 82 | .hljs-strong { 83 | font-weight: bold; 84 | } 85 | -------------------------------------------------------------------------------- /src/assets/css/highlight/atelier-savanna-dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Savanna Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/savanna) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Savanna Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #78877d; 9 | } 10 | 11 | /* Atelier-Savanna Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #b16139; 23 | } 24 | 25 | /* Atelier-Savanna Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #9f713c; 34 | } 35 | 36 | /* Atelier-Savanna Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #489963; 41 | } 42 | 43 | /* Atelier-Savanna Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #478c90; 47 | } 48 | 49 | /* Atelier-Savanna Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #55859b; 53 | } 54 | 55 | .hljs-deletion, 56 | .hljs-addition { 57 | color: #171c19; 58 | display: inline-block; 59 | width: 100%; 60 | } 61 | 62 | .hljs-deletion { 63 | background-color: #b16139; 64 | } 65 | 66 | .hljs-addition { 67 | background-color: #489963; 68 | } 69 | 70 | .hljs { 71 | display: block; 72 | overflow-x: auto; 73 | background: #171c19; 74 | color: #87928a; 75 | padding: 0.5em; 76 | } 77 | 78 | .hljs-emphasis { 79 | font-style: italic; 80 | } 81 | 82 | .hljs-strong { 83 | font-weight: bold; 84 | } 85 | -------------------------------------------------------------------------------- /src/assets/css/highlight/atelier-savanna-light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Savanna Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/savanna) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Savanna Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #5f6d64; 9 | } 10 | 11 | /* Atelier-Savanna Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #b16139; 23 | } 24 | 25 | /* Atelier-Savanna Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #9f713c; 34 | } 35 | 36 | /* Atelier-Savanna Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #489963; 41 | } 42 | 43 | /* Atelier-Savanna Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #478c90; 47 | } 48 | 49 | /* Atelier-Savanna Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #55859b; 53 | } 54 | 55 | .hljs-deletion, 56 | .hljs-addition { 57 | color: #171c19; 58 | display: inline-block; 59 | width: 100%; 60 | } 61 | 62 | .hljs-deletion { 63 | background-color: #b16139; 64 | } 65 | 66 | .hljs-addition { 67 | background-color: #489963; 68 | } 69 | 70 | .hljs { 71 | display: block; 72 | overflow-x: auto; 73 | background: #ecf4ee; 74 | color: #526057; 75 | padding: 0.5em; 76 | } 77 | 78 | .hljs-emphasis { 79 | font-style: italic; 80 | } 81 | 82 | .hljs-strong { 83 | font-weight: bold; 84 | } 85 | -------------------------------------------------------------------------------- /src/assets/css/highlight/github.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | github.com style (c) Vasily Polovnyov 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | color: #333; 12 | background: #f8f8f8; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-quote { 17 | color: #998; 18 | font-style: italic; 19 | } 20 | 21 | .hljs-keyword, 22 | .hljs-selector-tag, 23 | .hljs-subst { 24 | color: #333; 25 | font-weight: bold; 26 | } 27 | 28 | .hljs-number, 29 | .hljs-literal, 30 | .hljs-variable, 31 | .hljs-template-variable, 32 | .hljs-tag .hljs-attr { 33 | color: #008080; 34 | } 35 | 36 | .hljs-string, 37 | .hljs-doctag { 38 | color: #d14; 39 | } 40 | 41 | .hljs-title, 42 | .hljs-section, 43 | .hljs-selector-id { 44 | color: #900; 45 | font-weight: bold; 46 | } 47 | 48 | .hljs-subst { 49 | font-weight: normal; 50 | } 51 | 52 | .hljs-type, 53 | .hljs-class .hljs-title { 54 | color: #458; 55 | font-weight: bold; 56 | } 57 | 58 | .hljs-tag, 59 | .hljs-name, 60 | .hljs-attribute { 61 | color: #000080; 62 | font-weight: normal; 63 | } 64 | 65 | .hljs-regexp, 66 | .hljs-link { 67 | color: #009926; 68 | } 69 | 70 | .hljs-symbol, 71 | .hljs-bullet { 72 | color: #990073; 73 | } 74 | 75 | .hljs-built_in, 76 | .hljs-builtin-name { 77 | color: #0086b3; 78 | } 79 | 80 | .hljs-meta { 81 | color: #999; 82 | font-weight: bold; 83 | } 84 | 85 | .hljs-deletion { 86 | background: #fdd; 87 | } 88 | 89 | .hljs-addition { 90 | background: #dfd; 91 | } 92 | 93 | .hljs-emphasis { 94 | font-style: italic; 95 | } 96 | 97 | .hljs-strong { 98 | font-weight: bold; 99 | } 100 | -------------------------------------------------------------------------------- /src/assets/css/highlight/atom-one-dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Atom One Dark by Daniel Gamage 4 | Original One Dark Syntax theme from https://github.com/atom/one-dark-syntax 5 | 6 | base: #282c34 7 | mono-1: #abb2bf 8 | mono-2: #818896 9 | mono-3: #5c6370 10 | hue-1: #56b6c2 11 | hue-2: #61aeee 12 | hue-3: #c678dd 13 | hue-4: #98c379 14 | hue-5: #e06c75 15 | hue-5-2: #be5046 16 | hue-6: #d19a66 17 | hue-6-2: #e6c07b 18 | 19 | */ 20 | 21 | .hljs { 22 | display: block; 23 | overflow-x: auto; 24 | padding: 0.5em; 25 | color: #abb2bf; 26 | background: #282c34; 27 | } 28 | 29 | .hljs-comment, 30 | .hljs-quote { 31 | color: #5c6370; 32 | font-style: italic; 33 | } 34 | 35 | .hljs-doctag, 36 | .hljs-keyword, 37 | .hljs-formula { 38 | color: #c678dd; 39 | } 40 | 41 | .hljs-section, 42 | .hljs-name, 43 | .hljs-selector-tag, 44 | .hljs-deletion, 45 | .hljs-subst { 46 | color: #e06c75; 47 | } 48 | 49 | .hljs-literal { 50 | color: #56b6c2; 51 | } 52 | 53 | .hljs-string, 54 | .hljs-regexp, 55 | .hljs-addition, 56 | .hljs-attribute, 57 | .hljs-meta-string { 58 | color: #98c379; 59 | } 60 | 61 | .hljs-built_in, 62 | .hljs-class .hljs-title { 63 | color: #e6c07b; 64 | } 65 | 66 | .hljs-attr, 67 | .hljs-variable, 68 | .hljs-template-variable, 69 | .hljs-type, 70 | .hljs-selector-class, 71 | .hljs-selector-attr, 72 | .hljs-selector-pseudo, 73 | .hljs-number { 74 | color: #d19a66; 75 | } 76 | 77 | .hljs-symbol, 78 | .hljs-bullet, 79 | .hljs-link, 80 | .hljs-meta, 81 | .hljs-selector-id, 82 | .hljs-title { 83 | color: #61aeee; 84 | } 85 | 86 | .hljs-emphasis { 87 | font-style: italic; 88 | } 89 | 90 | .hljs-strong { 91 | font-weight: bold; 92 | } 93 | 94 | .hljs-link { 95 | text-decoration: underline; 96 | } 97 | -------------------------------------------------------------------------------- /src/assets/css/highlight/atom-one-light.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Atom One Light by Daniel Gamage 4 | Original One Light Syntax theme from https://github.com/atom/one-light-syntax 5 | 6 | base: #fafafa 7 | mono-1: #383a42 8 | mono-2: #686b77 9 | mono-3: #a0a1a7 10 | hue-1: #0184bb 11 | hue-2: #4078f2 12 | hue-3: #a626a4 13 | hue-4: #50a14f 14 | hue-5: #e45649 15 | hue-5-2: #c91243 16 | hue-6: #986801 17 | hue-6-2: #c18401 18 | 19 | */ 20 | 21 | .hljs { 22 | display: block; 23 | overflow-x: auto; 24 | padding: 0.5em; 25 | color: #383a42; 26 | background: #fafafa; 27 | } 28 | 29 | .hljs-comment, 30 | .hljs-quote { 31 | color: #a0a1a7; 32 | font-style: italic; 33 | } 34 | 35 | .hljs-doctag, 36 | .hljs-keyword, 37 | .hljs-formula { 38 | color: #a626a4; 39 | } 40 | 41 | .hljs-section, 42 | .hljs-name, 43 | .hljs-selector-tag, 44 | .hljs-deletion, 45 | .hljs-subst { 46 | color: #e45649; 47 | } 48 | 49 | .hljs-literal { 50 | color: #0184bb; 51 | } 52 | 53 | .hljs-string, 54 | .hljs-regexp, 55 | .hljs-addition, 56 | .hljs-attribute, 57 | .hljs-meta-string { 58 | color: #50a14f; 59 | } 60 | 61 | .hljs-built_in, 62 | .hljs-class .hljs-title { 63 | color: #c18401; 64 | } 65 | 66 | .hljs-attr, 67 | .hljs-variable, 68 | .hljs-template-variable, 69 | .hljs-type, 70 | .hljs-selector-class, 71 | .hljs-selector-attr, 72 | .hljs-selector-pseudo, 73 | .hljs-number { 74 | color: #986801; 75 | } 76 | 77 | .hljs-symbol, 78 | .hljs-bullet, 79 | .hljs-link, 80 | .hljs-meta, 81 | .hljs-selector-id, 82 | .hljs-title { 83 | color: #4078f2; 84 | } 85 | 86 | .hljs-emphasis { 87 | font-style: italic; 88 | } 89 | 90 | .hljs-strong { 91 | font-weight: bold; 92 | } 93 | 94 | .hljs-link { 95 | text-decoration: underline; 96 | } 97 | -------------------------------------------------------------------------------- /src/assets/css/highlight/default.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Original highlight.js style (c) Ivan Sagalaev 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #F0F0F0; 12 | } 13 | 14 | 15 | /* Base color: saturation 0; */ 16 | 17 | .hljs, 18 | .hljs-subst { 19 | color: #444; 20 | } 21 | 22 | .hljs-comment { 23 | color: #888888; 24 | } 25 | 26 | .hljs-keyword, 27 | .hljs-attribute, 28 | .hljs-selector-tag, 29 | .hljs-meta-keyword, 30 | .hljs-doctag, 31 | .hljs-name { 32 | font-weight: bold; 33 | } 34 | 35 | 36 | /* User color: hue: 0 */ 37 | 38 | .hljs-type, 39 | .hljs-string, 40 | .hljs-number, 41 | .hljs-selector-id, 42 | .hljs-selector-class, 43 | .hljs-quote, 44 | .hljs-template-tag, 45 | .hljs-deletion { 46 | color: #880000; 47 | } 48 | 49 | .hljs-title, 50 | .hljs-section { 51 | color: #880000; 52 | font-weight: bold; 53 | } 54 | 55 | .hljs-regexp, 56 | .hljs-symbol, 57 | .hljs-variable, 58 | .hljs-template-variable, 59 | .hljs-link, 60 | .hljs-selector-attr, 61 | .hljs-selector-pseudo { 62 | color: #BC6060; 63 | } 64 | 65 | 66 | /* Language color: hue: 90; */ 67 | 68 | .hljs-literal { 69 | color: #78A960; 70 | } 71 | 72 | .hljs-built_in, 73 | .hljs-bullet, 74 | .hljs-code, 75 | .hljs-addition { 76 | color: #397300; 77 | } 78 | 79 | 80 | /* Meta color: hue: 200 */ 81 | 82 | .hljs-meta { 83 | color: #1f7199; 84 | } 85 | 86 | .hljs-meta-string { 87 | color: #4d99bf; 88 | } 89 | 90 | 91 | /* Misc effects */ 92 | 93 | .hljs-emphasis { 94 | font-style: italic; 95 | } 96 | 97 | .hljs-strong { 98 | font-weight: bold; 99 | } 100 | -------------------------------------------------------------------------------- /test/e2e/runner.js: -------------------------------------------------------------------------------- 1 | // 1. start the dev server using production config 2 | process.env.NODE_ENV = 'testing' 3 | 4 | const webpack = require('webpack') 5 | const DevServer = require('webpack-dev-server') 6 | 7 | const webpackConfig = require('../../build/webpack.prod.conf') 8 | const devConfigPromise = require('../../build/webpack.dev.conf') 9 | 10 | let server 11 | 12 | devConfigPromise.then(devConfig => { 13 | const devServerOptions = devConfig.devServer 14 | const compiler = webpack(webpackConfig) 15 | server = new DevServer(compiler, devServerOptions) 16 | const port = devServerOptions.port 17 | const host = devServerOptions.host 18 | return server.listen(port, host) 19 | }) 20 | .then(() => { 21 | // 2. run the nightwatch test suite against it 22 | // to run in additional browsers: 23 | // 1. add an entry in test/e2e/nightwatch.conf.js under "test_settings" 24 | // 2. add it to the --env flag below 25 | // or override the environment flag, for example: `npm run e2e -- --env chrome,firefox` 26 | // For more information on Nightwatch's config file, see 27 | // http://nightwatchjs.org/guide#settings-file 28 | let opts = process.argv.slice(2) 29 | if (opts.indexOf('--config') === -1) { 30 | opts = opts.concat(['--config', 'test/e2e/nightwatch.conf.js']) 31 | } 32 | if (opts.indexOf('--env') === -1) { 33 | opts = opts.concat(['--env', 'chrome']) 34 | } 35 | 36 | const spawn = require('cross-spawn') 37 | const runner = spawn('./node_modules/.bin/nightwatch', opts, { stdio: 'inherit' }) 38 | 39 | runner.on('exit', function (code) { 40 | server.close() 41 | process.exit(code) 42 | }) 43 | 44 | runner.on('error', function (err) { 45 | server.close() 46 | throw err 47 | }) 48 | }) 49 | -------------------------------------------------------------------------------- /src/views/homePage/index.vue: -------------------------------------------------------------------------------- 1 | 37 | 38 | 54 | -------------------------------------------------------------------------------- /src/views/designerPage/components/template/Common/A.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { getTemplate, getSlotContent, getStringTypeAttr } from '@/views/designerPage/components/template' 3 | 4 | var handle = function(_attr, _slots) { 5 | //定义默认属性 6 | let attributes = { 7 | text: { 8 | type: 'text', 9 | value: 'Link' 10 | }, 11 | href:{ 12 | type:'text', 13 | value:'' 14 | }, 15 | target: { 16 | type: 'selection', 17 | value: '', 18 | items: ['_blank', 'self', '_parent', '_top'] 19 | }, 20 | title:{ 21 | type:'text', 22 | value:'' 23 | } 24 | }, 25 | slots = {} 26 | 27 | //覆盖默认属性 28 | Object.assign(slots, _slots) 29 | Object.assign(attributes, _attr) 30 | 31 | //根据组件不同需要做的不同操作 32 | 33 | 34 | //获取插槽模板内容 35 | // var subContent = getSlotContent(slots) || ' ' 36 | 37 | //设置当前组件的slot 38 | if (attributes.slot && attributes.slot !== 'default') { 39 | attributes.slot = { 40 | type: 'text', 41 | value: attributes.slot 42 | } 43 | } else { 44 | attributes.slot = { 45 | type: 'text', 46 | value: '' 47 | } 48 | } 49 | 50 | //字符串模板操作 51 | let stringAttr = getStringTypeAttr(attributes) 52 | let template = ` 53 | ${attributes.text.value||' '} 54 | ` 55 | 56 | template = template.replace(/text=".*?"/g, '')//模板字符串中删除text属性 57 | 58 | 59 | return { template, attributes, slots } 60 | } 61 | export default handle 62 | -------------------------------------------------------------------------------- /src/views/designerPage/components/template/iView-UI/Rate.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { getTemplate, getSlotContent, getStringTypeAttr } from '@/views/designerPage/components/template' 3 | 4 | var handle = function(_attr, _slots) { 5 | //定义默认属性 6 | let attributes = { 7 | count:{ 8 | type:'number', 9 | value: 5 10 | }, 11 | value:{ 12 | type:'number', 13 | value: 0 14 | }, 15 | ['allow-harf']:{ 16 | type:'boolean', 17 | value:false 18 | }, 19 | disabled:{ 20 | type:'boolean', 21 | value:false 22 | }, 23 | ['show-text']:{ 24 | type:'boolean', 25 | value:false 26 | } 27 | }, 28 | slots = { 29 | } 30 | 31 | //覆盖默认属性 32 | Object.assign(slots, _slots) 33 | Object.assign(attributes, _attr) 34 | 35 | //根据组件不同需要做的不同操作 36 | 37 | 38 | //获取插槽模板内容 39 | var subContent = getSlotContent(slots) 40 | //设置当前组件的slot 41 | if (attributes.slot && attributes.slot !== 'default') { 42 | attributes.slot = { 43 | type: 'text', 44 | value: attributes.slot 45 | } 46 | } else { 47 | attributes.slot = { 48 | type: 'text', 49 | value: '' 50 | } 51 | } 52 | 53 | //字符串模板操作 54 | let stringAttr = getStringTypeAttr(attributes) 55 | let template = ` 57 | ${subContent} 58 | ` 59 | 60 | return { template, attributes, slots } 61 | } 62 | export default handle 63 | -------------------------------------------------------------------------------- /src/assets/css/highlight/sunburst.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Sunburst-like style (c) Vasily Polovnyov 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #000; 12 | color: #f8f8f8; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-quote { 17 | color: #aeaeae; 18 | font-style: italic; 19 | } 20 | 21 | .hljs-keyword, 22 | .hljs-selector-tag, 23 | .hljs-type { 24 | color: #e28964; 25 | } 26 | 27 | .hljs-string { 28 | color: #65b042; 29 | } 30 | 31 | .hljs-subst { 32 | color: #daefa3; 33 | } 34 | 35 | .hljs-regexp, 36 | .hljs-link { 37 | color: #e9c062; 38 | } 39 | 40 | .hljs-title, 41 | .hljs-section, 42 | .hljs-tag, 43 | .hljs-name { 44 | color: #89bdff; 45 | } 46 | 47 | .hljs-class .hljs-title, 48 | .hljs-doctag { 49 | text-decoration: underline; 50 | } 51 | 52 | .hljs-symbol, 53 | .hljs-bullet, 54 | .hljs-number { 55 | color: #3387cc; 56 | } 57 | 58 | .hljs-params, 59 | .hljs-variable, 60 | .hljs-template-variable { 61 | color: #3e87e3; 62 | } 63 | 64 | .hljs-attribute { 65 | color: #cda869; 66 | } 67 | 68 | .hljs-meta { 69 | color: #8996a8; 70 | } 71 | 72 | .hljs-formula { 73 | background-color: #0e2231; 74 | color: #f8f8f8; 75 | font-style: italic; 76 | } 77 | 78 | .hljs-addition { 79 | background-color: #253b22; 80 | color: #f8f8f8; 81 | } 82 | 83 | .hljs-deletion { 84 | background-color: #420e09; 85 | color: #f8f8f8; 86 | } 87 | 88 | .hljs-selector-class { 89 | color: #9b703f; 90 | } 91 | 92 | .hljs-selector-id { 93 | color: #8b98ab; 94 | } 95 | 96 | .hljs-emphasis { 97 | font-style: italic; 98 | } 99 | 100 | .hljs-strong { 101 | font-weight: bold; 102 | } 103 | -------------------------------------------------------------------------------- /src/views/designerPage/components/componentTree.vue: -------------------------------------------------------------------------------- 1 | 18 | 45 | 62 | -------------------------------------------------------------------------------- /src/views/designerPage/components/template/iView-UI/Radio.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import { getTemplate, getSlotContent, getStringTypeAttr } from '@/views/designerPage/components/template' 3 | 4 | var handle = function(_attr, _slots) { 5 | //定义默认属性 6 | let attributes = { 7 | value:{ 8 | type:'boolean', 9 | value:false 10 | }, 11 | label:{ 12 | type:'text', 13 | value:'label' 14 | }, 15 | disabled:{ 16 | type:'text', 17 | value:'' 18 | }, 19 | ['true-value']:{ 20 | type:'text', 21 | value:'' 22 | }, 23 | ['false-value']:{ 24 | type:'text', 25 | value:'' 26 | } 27 | }, 28 | slots = { 29 | default: [] 30 | } 31 | 32 | //覆盖默认属性 33 | Object.assign(slots, _slots) 34 | Object.assign(attributes, _attr) 35 | 36 | //根据组件不同需要做的不同操作 37 | 38 | 39 | //获取插槽模板内容 40 | var subContent = getSlotContent(slots) 41 | //设置当前组件的slot 42 | if (attributes.slot && attributes.slot !== 'default') { 43 | attributes.slot = { 44 | type: 'text', 45 | value: attributes.slot 46 | } 47 | } else { 48 | attributes.slot = { 49 | type: 'text', 50 | value: '' 51 | } 52 | } 53 | 54 | //字符串模板操作 55 | let stringAttr = getStringTypeAttr(attributes) 56 | let template = ` 58 | ${subContent} 59 | ` 60 | 61 | 62 | return { template, attributes, slots } 63 | } 64 | export default handle 65 | --------------------------------------------------------------------------------