├── .eslintignore
├── babel.config.js
├── public
├── favicon.ico
└── index.html
├── src
├── views
│ ├── leetCode
│ │ ├── index.vue
│ │ ├── dynamic
│ │ │ ├── images
│ │ │ │ ├── 1.png
│ │ │ │ └── 2.png
│ │ │ ├── maxChildArray.vue
│ │ │ └── bagQuestion.vue
│ │ ├── BinaryTree
│ │ │ ├── BinaryTree4.vue
│ │ │ ├── BinaryTree2.vue
│ │ │ ├── BinaryTree1.vue
│ │ │ └── BinaryTree3.vue
│ │ ├── array
│ │ │ ├── array8.vue
│ │ │ ├── array2.vue
│ │ │ ├── array5.vue
│ │ │ ├── array1.vue
│ │ │ ├── array6.vue
│ │ │ ├── array7.vue
│ │ │ ├── array3.vue
│ │ │ └── array4.vue
│ │ └── String
│ │ │ ├── String1.vue
│ │ │ ├── String3.vue
│ │ │ └── String2.vue
│ ├── mxgraph
│ │ ├── components
│ │ │ ├── TextStyle.vue
│ │ │ ├── Arrange.vue
│ │ │ ├── noInfo.vue
│ │ │ ├── edgeStyle.vue
│ │ │ ├── index.js
│ │ │ ├── Item.vue
│ │ │ └── Style.vue
│ │ ├── toolbar.vue
│ │ ├── tabs.vue
│ │ └── rightSetting.vue
│ ├── friutGame
│ │ ├── images
│ │ │ ├── bigApple.png
│ │ │ ├── bigBanana.png
│ │ │ ├── bigMelon.png
│ │ │ ├── bigOrange.png
│ │ │ ├── bigPear.png
│ │ │ ├── bigStar.png
│ │ │ ├── smallPear.png
│ │ │ ├── smallStar.png
│ │ │ ├── smallApple.png
│ │ │ ├── smallBanana.png
│ │ │ ├── smallMelon.png
│ │ │ └── smallOrange.png
│ │ └── components
│ │ │ ├── friutItem.vue
│ │ │ └── areaForm.vue
│ ├── scrollTable
│ │ └── index.vue
│ ├── draggbleLayout
│ │ └── components
│ │ │ ├── test.vue
│ │ │ ├── test1.vue
│ │ │ └── calendar.vue
│ ├── echarts
│ │ ├── echartComponent
│ │ │ ├── data
│ │ │ │ ├── line
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── defaultline
│ │ │ │ │ │ └── defaultline.js
│ │ │ │ │ ├── lineSmooth
│ │ │ │ │ │ └── lineSmooth.js
│ │ │ │ │ ├── areaBasicData
│ │ │ │ │ │ └── areaBasicData.js
│ │ │ │ │ ├── lineStack
│ │ │ │ │ │ └── lineStack.js
│ │ │ │ │ ├── areaStack
│ │ │ │ │ │ └── areaStack.js
│ │ │ │ │ └── lineMarker
│ │ │ │ │ │ └── lineMarker.js
│ │ │ │ ├── pie
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── defaultPie
│ │ │ │ │ │ └── defaultPie.js
│ │ │ │ │ └── pieNest
│ │ │ │ │ │ └── pieNest.js
│ │ │ │ ├── scatter
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── defaultScatter
│ │ │ │ │ │ └── defaultScatter.js
│ │ │ │ ├── bar
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── defaultBar
│ │ │ │ │ │ └── defaultBar.js
│ │ │ │ │ ├── barTickAlign
│ │ │ │ │ │ └── barTickAlign.js
│ │ │ │ │ └── barAnimationDelay
│ │ │ │ │ │ └── barAnimationDelay.js
│ │ │ │ ├── radar
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── defaultRadar
│ │ │ │ │ │ └── defaultRadar.js
│ │ │ │ │ └── radar2
│ │ │ │ │ │ └── radar2.js
│ │ │ │ └── utils
│ │ │ │ │ └── common.js
│ │ │ └── echartTemplate.vue
│ │ ├── rightTool
│ │ │ ├── tabComponents
│ │ │ │ ├── echartData.vue
│ │ │ │ └── echartLevel.vue
│ │ │ ├── echartLevelComponents
│ │ │ │ └── index.vue
│ │ │ ├── components
│ │ │ │ ├── commonData
│ │ │ │ │ ├── yData.js
│ │ │ │ │ ├── legendData.js
│ │ │ │ │ ├── xData.js
│ │ │ │ │ └── commonData.js
│ │ │ │ ├── baseItem.vue
│ │ │ │ ├── mixins
│ │ │ │ │ └── component.js
│ │ │ │ ├── titleComponents
│ │ │ │ │ ├── index.vue
│ │ │ │ │ └── subTitle.vue
│ │ │ │ ├── xComponents
│ │ │ │ │ └── index.vue
│ │ │ │ ├── yComponents
│ │ │ │ │ └── index.vue
│ │ │ │ ├── rightHeader.vue
│ │ │ │ ├── settingDialog
│ │ │ │ │ └── index.vue
│ │ │ │ └── baseAttr.vue
│ │ │ └── index.vue
│ │ └── utils
│ │ │ ├── utils.js
│ │ │ ├── event.js
│ │ │ └── history.js
│ ├── documentation
│ │ ├── call.js
│ │ ├── utils.js
│ │ ├── c.vue
│ │ └── index.vue
│ ├── form
│ │ ├── CodeTypeDialog.vue
│ │ └── components
│ │ │ └── generator
│ │ │ ├── db.js
│ │ │ └── drawingDefalut.js
│ ├── SignCanvas
│ │ └── index.vue
│ ├── dashboard
│ │ ├── render.js
│ │ └── index.vue
│ ├── redirect
│ │ └── index.vue
│ ├── virtualList
│ │ └── index.vue
│ ├── adaptiveTable
│ │ └── index.vue
│ ├── editTable
│ │ └── index.vue
│ ├── circle
│ │ └── index.vue
│ ├── selectProvince
│ │ └── index.vue
│ ├── loadsh
│ │ └── index.vue
│ └── treeSelect
│ │ └── index.vue
├── assets
│ └── images
│ │ ├── del.png
│ │ ├── juxin.png
│ │ ├── radar.jpg
│ │ ├── ellipse.gif
│ │ ├── lingxin.png
│ │ ├── pie-nest.jpg
│ │ ├── radar2.jpg
│ │ ├── rhombus.gif
│ │ ├── rounded.gif
│ │ ├── tubiao.png
│ │ ├── area-basic.jpg
│ │ ├── area-stack.jpg
│ │ ├── bar-simple.jpg
│ │ ├── bar-stack.jpg
│ │ ├── line-stack.jpg
│ │ ├── radar-aqi.jpg
│ │ ├── line-marker.jpg
│ │ ├── line-simple.jpg
│ │ ├── line-smooth.jpg
│ │ ├── pie-doughnut.jpg
│ │ ├── radar-custom.jpg
│ │ ├── bar-tick-align.jpg
│ │ ├── bar-waterfall2.jpg
│ │ ├── bubble-gradient.jpg
│ │ ├── radar-multiple.jpg
│ │ ├── scatter-simple.jpg
│ │ └── bar-animation-delay.jpg
├── components
│ ├── mxGraph
│ │ ├── images
│ │ │ └── grid.gif
│ │ └── shape
│ │ │ └── index.js
│ ├── scrollTable
│ │ └── index.vue
│ ├── G2Template
│ │ ├── config.js
│ │ ├── data
│ │ │ ├── g2Bar.js
│ │ │ └── g2Line.js
│ │ ├── component
│ │ │ ├── g2Line.vue
│ │ │ └── g2Bar.vue
│ │ └── g2Template.vue
│ ├── virtualList
│ │ └── item.vue
│ ├── Hamburger
│ │ └── index.vue
│ ├── SvgIcon
│ │ └── index.vue
│ ├── rules
│ │ └── ruleWrapper.vue
│ └── Breadcrumb
│ │ └── index.vue
├── icons
│ ├── svg
│ │ ├── chart.svg
│ │ ├── size.svg
│ │ ├── link.svg
│ │ ├── guide.svg
│ │ ├── component.svg
│ │ ├── money.svg
│ │ ├── email.svg
│ │ ├── drag.svg
│ │ ├── documentation.svg
│ │ ├── fullscreen.svg
│ │ ├── user.svg
│ │ ├── lock.svg
│ │ ├── juxin.svg
│ │ ├── excel.svg
│ │ ├── example.svg
│ │ ├── star.svg
│ │ ├── pentagon.svg
│ │ ├── parallelogram.svg
│ │ ├── table.svg
│ │ ├── search.svg
│ │ ├── triangel.svg
│ │ ├── password.svg
│ │ ├── education.svg
│ │ ├── tab.svg
│ │ ├── daimond.svg
│ │ ├── lingxin.svg
│ │ ├── message.svg
│ │ ├── theme.svg
│ │ ├── rectangle.svg
│ │ ├── tubiao.svg
│ │ ├── peoples.svg
│ │ ├── edit.svg
│ │ ├── nested.svg
│ │ ├── juhe.svg
│ │ ├── tree-table.svg
│ │ ├── eye.svg
│ │ ├── clipboard.svg
│ │ ├── list.svg
│ │ ├── icon.svg
│ │ ├── international.svg
│ │ ├── wechat.svg
│ │ ├── skill.svg
│ │ ├── people.svg
│ │ ├── language.svg
│ │ ├── eye-open.svg
│ │ ├── 404.svg
│ │ ├── zip.svg
│ │ ├── circle.svg
│ │ ├── bug.svg
│ │ ├── pdf.svg
│ │ ├── exit-fullscreen.svg
│ │ ├── tree.svg
│ │ ├── shopping.svg
│ │ └── dashboard.svg
│ ├── index.js
│ └── svgo.yml
├── api
│ └── user.js
├── layout
│ ├── components
│ │ ├── index.js
│ │ ├── Sidebar
│ │ │ ├── Item.vue
│ │ │ ├── Link.vue
│ │ │ └── index.vue
│ │ ├── TagsView
│ │ │ └── ScrollPane.vue
│ │ └── AppMain.vue
│ └── index.vue
├── utils
│ ├── promise.js
│ ├── localStroage.js
│ └── validate.js
├── App.vue
├── store
│ ├── getters.js
│ ├── index.js
│ └── modules
│ │ ├── user.js
│ │ ├── settings.js
│ │ ├── permission.js
│ │ └── app.js
├── styles
│ ├── variables.scss
│ ├── element-variables.scss
│ ├── transition.scss
│ ├── element-ui.scss
│ ├── mixin.scss
│ └── btn.scss
├── settings.js
├── main.js
└── router
│ └── modules
│ ├── table.js
│ └── components.js
├── .env.production
├── .gitignore
├── .env.development
└── README.md
/.eslintignore:
--------------------------------------------------------------------------------
1 | build/*.js
2 | src/assets
3 | public
4 | dist
5 |
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/app'
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/public/favicon.ico
--------------------------------------------------------------------------------
/src/views/leetCode/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/views/mxgraph/components/TextStyle.vue:
--------------------------------------------------------------------------------
1 |
2 | Text
3 |
4 |
--------------------------------------------------------------------------------
/src/views/mxgraph/components/Arrange.vue:
--------------------------------------------------------------------------------
1 |
2 | Arrange
3 |
4 |
--------------------------------------------------------------------------------
/src/views/mxgraph/components/noInfo.vue:
--------------------------------------------------------------------------------
1 |
2 | noInfo
3 |
4 |
--------------------------------------------------------------------------------
/.env.production:
--------------------------------------------------------------------------------
1 | # just a flag
2 | ENV = 'production'
3 |
4 | # base api
5 | VUE_APP_BASE_API = '/prod-api'
6 |
7 |
--------------------------------------------------------------------------------
/src/assets/images/del.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/assets/images/del.png
--------------------------------------------------------------------------------
/src/assets/images/juxin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/assets/images/juxin.png
--------------------------------------------------------------------------------
/src/assets/images/radar.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/assets/images/radar.jpg
--------------------------------------------------------------------------------
/src/assets/images/ellipse.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/assets/images/ellipse.gif
--------------------------------------------------------------------------------
/src/assets/images/lingxin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/assets/images/lingxin.png
--------------------------------------------------------------------------------
/src/assets/images/pie-nest.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/assets/images/pie-nest.jpg
--------------------------------------------------------------------------------
/src/assets/images/radar2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/assets/images/radar2.jpg
--------------------------------------------------------------------------------
/src/assets/images/rhombus.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/assets/images/rhombus.gif
--------------------------------------------------------------------------------
/src/assets/images/rounded.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/assets/images/rounded.gif
--------------------------------------------------------------------------------
/src/assets/images/tubiao.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/assets/images/tubiao.png
--------------------------------------------------------------------------------
/src/assets/images/area-basic.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/assets/images/area-basic.jpg
--------------------------------------------------------------------------------
/src/assets/images/area-stack.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/assets/images/area-stack.jpg
--------------------------------------------------------------------------------
/src/assets/images/bar-simple.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/assets/images/bar-simple.jpg
--------------------------------------------------------------------------------
/src/assets/images/bar-stack.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/assets/images/bar-stack.jpg
--------------------------------------------------------------------------------
/src/assets/images/line-stack.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/assets/images/line-stack.jpg
--------------------------------------------------------------------------------
/src/assets/images/radar-aqi.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/assets/images/radar-aqi.jpg
--------------------------------------------------------------------------------
/src/assets/images/line-marker.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/assets/images/line-marker.jpg
--------------------------------------------------------------------------------
/src/assets/images/line-simple.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/assets/images/line-simple.jpg
--------------------------------------------------------------------------------
/src/assets/images/line-smooth.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/assets/images/line-smooth.jpg
--------------------------------------------------------------------------------
/src/assets/images/pie-doughnut.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/assets/images/pie-doughnut.jpg
--------------------------------------------------------------------------------
/src/assets/images/radar-custom.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/assets/images/radar-custom.jpg
--------------------------------------------------------------------------------
/src/assets/images/bar-tick-align.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/assets/images/bar-tick-align.jpg
--------------------------------------------------------------------------------
/src/assets/images/bar-waterfall2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/assets/images/bar-waterfall2.jpg
--------------------------------------------------------------------------------
/src/assets/images/bubble-gradient.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/assets/images/bubble-gradient.jpg
--------------------------------------------------------------------------------
/src/assets/images/radar-multiple.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/assets/images/radar-multiple.jpg
--------------------------------------------------------------------------------
/src/assets/images/scatter-simple.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/assets/images/scatter-simple.jpg
--------------------------------------------------------------------------------
/src/components/mxGraph/images/grid.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/components/mxGraph/images/grid.gif
--------------------------------------------------------------------------------
/src/views/friutGame/images/bigApple.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/views/friutGame/images/bigApple.png
--------------------------------------------------------------------------------
/src/views/friutGame/images/bigBanana.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/views/friutGame/images/bigBanana.png
--------------------------------------------------------------------------------
/src/views/friutGame/images/bigMelon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/views/friutGame/images/bigMelon.png
--------------------------------------------------------------------------------
/src/views/friutGame/images/bigOrange.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/views/friutGame/images/bigOrange.png
--------------------------------------------------------------------------------
/src/views/friutGame/images/bigPear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/views/friutGame/images/bigPear.png
--------------------------------------------------------------------------------
/src/views/friutGame/images/bigStar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/views/friutGame/images/bigStar.png
--------------------------------------------------------------------------------
/src/views/friutGame/images/smallPear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/views/friutGame/images/smallPear.png
--------------------------------------------------------------------------------
/src/views/friutGame/images/smallStar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/views/friutGame/images/smallStar.png
--------------------------------------------------------------------------------
/src/views/leetCode/dynamic/images/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/views/leetCode/dynamic/images/1.png
--------------------------------------------------------------------------------
/src/views/leetCode/dynamic/images/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/views/leetCode/dynamic/images/2.png
--------------------------------------------------------------------------------
/src/assets/images/bar-animation-delay.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/assets/images/bar-animation-delay.jpg
--------------------------------------------------------------------------------
/src/views/friutGame/images/smallApple.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/views/friutGame/images/smallApple.png
--------------------------------------------------------------------------------
/src/views/friutGame/images/smallBanana.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/views/friutGame/images/smallBanana.png
--------------------------------------------------------------------------------
/src/views/friutGame/images/smallMelon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/views/friutGame/images/smallMelon.png
--------------------------------------------------------------------------------
/src/views/friutGame/images/smallOrange.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/whenTheMorningDark/vue-kai-admin/HEAD/src/views/friutGame/images/smallOrange.png
--------------------------------------------------------------------------------
/src/views/scrollTable/index.vue:
--------------------------------------------------------------------------------
1 |
2 | scroll
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/src/components/scrollTable/index.vue:
--------------------------------------------------------------------------------
1 |
2 | scroll
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/src/components/G2Template/config.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable indent */
2 | // 用来处理样式的公用方法
3 | export default {
4 | methods: {
5 | setAxis() {
6 | console.log("12312");
7 | }
8 | }
9 | };
10 |
--------------------------------------------------------------------------------
/src/icons/svg/chart.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/views/draggbleLayout/components/test.vue:
--------------------------------------------------------------------------------
1 |
2 | test
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/src/views/draggbleLayout/components/test1.vue:
--------------------------------------------------------------------------------
1 |
2 | 第三个组件的内容
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/src/views/leetCode/BinaryTree/BinaryTree4.vue:
--------------------------------------------------------------------------------
1 |
2 | BinaryTree4
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/src/icons/svg/size.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/views/echarts/echartComponent/data/line/index.js:
--------------------------------------------------------------------------------
1 | import { fileToData } from "../utils/common";
2 | const componentsContext = require.context("./", true, /(vue|js)$/);
3 | export const lineChildren = fileToData(componentsContext);
4 |
--------------------------------------------------------------------------------
/src/views/echarts/echartComponent/data/pie/index.js:
--------------------------------------------------------------------------------
1 | import { fileToData } from "../utils/common";
2 | const componentsContext = require.context("./", true, /(vue|js)$/);
3 | export const pieChildren = fileToData(componentsContext);
4 |
--------------------------------------------------------------------------------
/src/views/echarts/echartComponent/data/scatter/index.js:
--------------------------------------------------------------------------------
1 | import { fileToData } from "../utils/common";
2 | const componentsContext = require.context("./", true, /(vue|js)$/);
3 | export const scatterChildren = fileToData(componentsContext);
4 |
--------------------------------------------------------------------------------
/src/views/echarts/rightTool/tabComponents/echartData.vue:
--------------------------------------------------------------------------------
1 |
2 | echartData
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/src/views/mxgraph/components/edgeStyle.vue:
--------------------------------------------------------------------------------
1 |
2 | edgeStyle
3 |
4 |
12 |
--------------------------------------------------------------------------------
/src/views/documentation/call.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable indent */
2 | /* eslint-disable require-jsdoc */
3 | function person() {
4 | // console.log("person");
5 | return this.name;
6 | }
7 | let obj = {
8 | name: "xxxwwww",
9 | };
10 | console.log(person.call(obj));
11 |
--------------------------------------------------------------------------------
/src/views/echarts/rightTool/echartLevelComponents/index.vue:
--------------------------------------------------------------------------------
1 |
2 | echartLevelComponents
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/src/views/form/CodeTypeDialog.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/src/views/leetCode/array/array8.vue:
--------------------------------------------------------------------------------
1 |
2 | https://leetcode-cn.com/problems/remove-duplicate-letters/solution/jsshi-xian-nei-cun-chao-guo-100su-du-chao-guo-82-b/
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/src/icons/svg/link.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/views/echarts/echartComponent/data/bar/index.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable require-jsdoc */
2 | /* eslint-disable indent */
3 | import { fileToData } from "../utils/common";
4 | const componentsContext = require.context("./", true, /(vue|js)$/);
5 | export const barChildren = fileToData(componentsContext);
6 |
--------------------------------------------------------------------------------
/src/views/mxgraph/components/index.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable eol-last */
2 | /* eslint-disable indent */
3 | export {
4 | default as Arrange
5 | }
6 | from './Arrange'
7 | export {
8 | default as Style
9 | }
10 | from './Style'
11 | export {
12 | default as TextStyle
13 | }
14 | from './TextStyle'
--------------------------------------------------------------------------------
/src/views/draggbleLayout/components/calendar.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
14 |
15 |
--------------------------------------------------------------------------------
/src/views/echarts/echartComponent/data/radar/index.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable require-jsdoc */
2 | /* eslint-disable indent */
3 | import { fileToData } from "../utils/common";
4 | const componentsContext = require.context("./", true, /(vue|js)$/);
5 | export const radarChildren = fileToData(componentsContext);
6 |
--------------------------------------------------------------------------------
/src/views/echarts/echartComponent/echartTemplate.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
11 |
12 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
5 | # local env files
6 | .env.local
7 | .env.*.local
8 |
9 | # Log files
10 | npm-debug.log*
11 | yarn-debug.log*
12 | yarn-error.log*
13 |
14 | # Editor directories and files
15 | .idea
16 | .vscode
17 | *.suo
18 | *.ntvs*
19 | *.njsproj
20 | *.sln
21 | *.sw?
22 |
--------------------------------------------------------------------------------
/src/api/user.js:
--------------------------------------------------------------------------------
1 | import request from "@/utils/service";
2 |
3 | /**
4 | * @description 登录接口
5 | * @param {Object} data 传入的参数
6 | * @returns {Promise} 返回promise化的request
7 | */
8 | export function login(data) {
9 | return request({
10 | url: "/api/user/login",
11 | method: "post",
12 | data
13 | });
14 | }
--------------------------------------------------------------------------------
/src/icons/svg/guide.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/component.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/money.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/index.js:
--------------------------------------------------------------------------------
1 | import Vue from "vue";
2 | import SvgIcon from "@/components/SvgIcon"; // svg component
3 |
4 | // register globally
5 | Vue.component("svg-icon", SvgIcon);
6 | const req = require.context("./svg", false, /\.svg$/);
7 | const requireAll = (requireContext) =>
8 | requireContext.keys().map(requireContext);
9 | requireAll(req);
10 |
--------------------------------------------------------------------------------
/src/icons/svg/email.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/layout/components/index.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable eol-last */
2 | /* eslint-disable indent */
3 | export {
4 | default as AppMain
5 | }
6 | from "./AppMain";
7 | export {
8 | default as Sidebar
9 | }
10 | from "./Sidebar";
11 | export {
12 | default as navBar
13 | }
14 | from "./navBar";
15 | export {
16 | default as TagsView
17 | }
18 | from "./TagsView";
--------------------------------------------------------------------------------
/src/icons/svg/drag.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svgo.yml:
--------------------------------------------------------------------------------
1 | # replace default config
2 |
3 | # multipass: true
4 | # full: true
5 |
6 | plugins:
7 |
8 | # - name
9 | #
10 | # or:
11 | # - name: false
12 | # - name: true
13 | #
14 | # or:
15 | # - name:
16 | # param1: 1
17 | # param2: 2
18 |
19 | - removeAttrs:
20 | attrs:
21 | - 'fill'
22 | - 'fill-rule'
23 |
--------------------------------------------------------------------------------
/src/views/SignCanvas/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
16 |
17 |
--------------------------------------------------------------------------------
/src/utils/promise.js:
--------------------------------------------------------------------------------
1 | /**
2 | *@description 用于ajax promise化
3 | *@param {Function} api 接口地址
4 | *@param {Object} params 传入的参数
5 | *@returns {Promise} Promise object
6 | */
7 | export const utilsPromise = (api, params = {}) => new Promise(resolve => {
8 | api(params).then(res => {
9 | if (res.code === 0) {
10 | resolve(res.data);
11 | }
12 | });
13 | });
--------------------------------------------------------------------------------
/src/views/dashboard/render.js:
--------------------------------------------------------------------------------
1 | export default {
2 | render (h) {
3 | const dataObject = {
4 | attrs: {},
5 | props: {},
6 | on: {},
7 | style: {
8 | color: "red",
9 | fontSize: 20
10 | }
11 | };
12 | console.log(this);
13 | return h("div", dataObject, [h("span", this.title)]);
14 | },
15 | props: ["title"]
16 | };
--------------------------------------------------------------------------------
/src/utils/localStroage.js:
--------------------------------------------------------------------------------
1 | export const TOKEN_KEY = "admin_token";
2 | export const USER_KEY = "admin_userinfo";
3 | const storage = window.localStorage;
4 | export const setStorage = (key, value) => {
5 | storage.setItem(key, value);
6 | };
7 | export const getStorage = (key, value) => storage.getItem(key, value);
8 | export const clearStorage = () => {
9 | storage.clear();
10 | };
--------------------------------------------------------------------------------
/src/components/virtualList/item.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{item.id}}
4 | {{item.value}}
5 |
6 |
7 |
8 |
9 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/src/views/echarts/rightTool/tabComponents/echartLevel.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
16 |
17 |
--------------------------------------------------------------------------------
/src/views/redirect/index.vue:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/documentation.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/fullscreen.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/user.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
19 |
20 |
26 |
--------------------------------------------------------------------------------
/src/icons/svg/lock.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/juxin.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/excel.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/example.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/components/G2Template/data/g2Bar.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable comma-dangle */
2 | /* eslint-disable indent */
3 | // 这是柱状图默认的数据
4 | import { randomStr } from "@/utils";
5 | export const g2BarData = [
6 | { genre: "Sports", sold: 275 },
7 | { genre: "Strategy", sold: 115 },
8 | { genre: "Action", sold: 120 },
9 | { genre: "Shooter", sold: 350 },
10 | { genre: "Other", sold: 150 },
11 | ];
12 | export const baseOptions = {
13 | container: "g2Bar" + randomStr(3),
14 | width: 400,
15 | height: 250,
16 | };
17 |
--------------------------------------------------------------------------------
/src/views/documentation/utils.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable eol-last */
2 | /* eslint-disable indent */
3 | // 获取数组对象的并集
4 | export const union = (sourceArr, targetArr) => {
5 | // sourceArr.concat()
6 | const arr = sourceArr.concat(targetArr);
7 | // console.log(arr)
8 | return arr.filter((item, index) => {
9 | const len = arr.length;
10 | while (++index < len) {
11 | if (item.id === arr[index].id) {
12 | return false;
13 | }
14 | }
15 | return true;
16 | });
17 | };
--------------------------------------------------------------------------------
/src/icons/svg/star.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/pentagon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/parallelogram.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/table.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.env.development:
--------------------------------------------------------------------------------
1 | # just a flag
2 | ENV = 'development'
3 |
4 | # base api
5 | VUE_APP_BASE_API = '/dev-api'
6 |
7 | # vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
8 | # to control whether the babel-plugin-dynamic-import-node plugin is enabled.
9 | # It only does one thing by converting all import() to require().
10 | # This configuration can significantly increase the speed of hot updates,
11 | # when you have a large number of pages.
12 | # Detail: https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/babel-preset-app/index.js
13 |
14 | VUE_CLI_BABEL_TRANSPILE_MODULES = true
15 |
--------------------------------------------------------------------------------
/src/icons/svg/search.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/views/echarts/rightTool/components/commonData/yData.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable indent */
2 | export const yData = {
3 | show: true,
4 | name: "",
5 | nameLocation: "middle",
6 | nameTextStyle: {
7 | color: "#333",
8 | fontSize: 14,
9 | fontStyle: "normal",
10 | fontWeight: "bolder",
11 | fontFamily: "Microsoft YaHei",
12 | },
13 | nameGap: 15,
14 | axisLabel: {
15 | formatter: "{value}",
16 | show: true,
17 | },
18 | };
19 | export const nameLocationOptions = [
20 | { label: "start", value: "start" },
21 | { label: "middle", value: "middle" },
22 | { label: "end", value: "end" },
23 | ];
24 |
--------------------------------------------------------------------------------
/src/icons/svg/triangel.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/store/getters.js:
--------------------------------------------------------------------------------
1 | const getters = {
2 | sidebar: (state) => state.app.sidebar,
3 | language: (state) => state.app.language,
4 | size: (state) => state.app.size,
5 | device: (state) => state.app.device,
6 | permission_routes: (state) => state.permission.routes,
7 | token: (state) => state.user.token,
8 | roles: (state) => state.user.userInfo.userName, // 当前用户名称
9 | visitedViews: (state) => state.tagsView.visitedViews,
10 | cachedViews: (state) => state.tagsView.cachedViews,
11 | currentTarget: (state) => state.echart.currentTarget
12 | };
13 | // eslint-disable-next-line eol-last
14 | export default getters;
--------------------------------------------------------------------------------
/src/icons/svg/password.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/layout/components/Sidebar/Item.vue:
--------------------------------------------------------------------------------
1 |
30 |
--------------------------------------------------------------------------------
/src/icons/svg/education.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/store/index.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable eol-last */
2 | import Vue from "vue";
3 | import Vuex from "vuex";
4 | import getters from "./getters";
5 | Vue.use(Vuex);
6 |
7 | const modulesFiles = require.context("./modules", true, /.js$/);
8 | const modules = modulesFiles.keys().reduce((modules, modulePath) => {
9 | // set './app.js' => 'app'
10 | const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, "$1");
11 | const value = modulesFiles(modulePath);
12 | modules[moduleName] = value["default"];
13 | return modules;
14 | }, {});
15 | const store = new Vuex.Store({
16 | modules,
17 | getters
18 | });
19 |
20 | export default store;
--------------------------------------------------------------------------------
/src/icons/svg/tab.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/daimond.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/lingxin.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/message.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/store/modules/user.js:
--------------------------------------------------------------------------------
1 | import {setStorage, getStorage, TOKEN_KEY, USER_KEY} from "@/utils/localStroage";
2 | const state = {
3 | userInfo: getStorage(USER_KEY) || {},
4 | token: getStorage(TOKEN_KEY) || "",
5 | };
6 |
7 | const actions = {
8 |
9 |
10 | };
11 | const mutations = {
12 | // 设置当前token
13 | SET_TOKEN(state, token) {
14 | state.token = token;
15 | setStorage(TOKEN_KEY, token);
16 | },
17 | // 设置用户信息
18 | SET_USER_INFO(state, userInfo) {
19 | state.userInfo = userInfo;
20 | setStorage(USER_KEY, userInfo);
21 | }
22 | };
23 |
24 |
25 | export default {
26 | namespaced: true,
27 | state,
28 | actions,
29 | mutations
30 | };
--------------------------------------------------------------------------------
/src/icons/svg/theme.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/layout/components/Sidebar/Link.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
33 |
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | <%= htmlWebpackPlugin.options.title %>
9 |
10 |
11 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/icons/svg/rectangle.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/tubiao.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/views/echarts/echartComponent/data/scatter/defaultScatter/defaultScatter.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable indent */
2 | export const defaultScatter = {
3 | type: "scatter",
4 | name: "基础散点图",
5 | images: require("@/assets/images/scatter-simple.jpg"),
6 | optionsData: {
7 | xAxis: {},
8 | yAxis: {},
9 | series: [
10 | {
11 | symbolSize: 20,
12 | data: [
13 | [10.0, 8.04],
14 | [8.0, 6.95],
15 | [13.0, 7.58],
16 | [9.0, 8.81],
17 | [11.0, 8.33],
18 | [14.0, 9.96],
19 | [6.0, 7.24],
20 | [4.0, 4.26],
21 | [12.0, 10.84],
22 | [7.0, 4.82],
23 | [5.0, 5.68],
24 | ],
25 | type: "scatter",
26 | },
27 | ],
28 | },
29 | };
30 |
--------------------------------------------------------------------------------
/src/icons/svg/peoples.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/views/echarts/rightTool/components/commonData/legendData.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable indent */
2 | export const legendData = {
3 | show: true,
4 | left: 0,
5 | top: 0,
6 | orient: "horizontal",
7 | padding: [5, 5, 5, 5],
8 | itemGap: 10,
9 | };
10 |
11 | export const leftDataOptopns = [
12 | { label: "left", value: "left" },
13 | { label: "center", value: "center" },
14 | { label: "right", value: "right" },
15 | ];
16 | export const topDataOptopns = [
17 | { label: "top", value: "top" },
18 | { label: "middle", value: "middle" },
19 | { label: "bottom", value: "bottom" },
20 | ];
21 | export const orientOptopns = [
22 | { label: "horizontal", value: "horizontal" },
23 | { label: "vertical", value: "vertical" },
24 | ];
25 |
--------------------------------------------------------------------------------
/src/views/leetCode/array/array2.vue:
--------------------------------------------------------------------------------
1 |
2 | array2
3 |
4 |
5 |
32 |
33 |
35 |
--------------------------------------------------------------------------------
/src/views/mxgraph/toolbar.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 保存(在控制台查看json数据)
5 |
6 |
15 |
16 |
17 |
18 |
28 |
29 |
--------------------------------------------------------------------------------
/src/views/echarts/rightTool/components/commonData/xData.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable indent */
2 | export const xData = {
3 | show: true,
4 | name: "",
5 | nameLocation: "middle",
6 | nameTextStyle: {
7 | color: "#333",
8 | fontSize: 14,
9 | fontStyle: "normal",
10 | fontWeight: "bolder",
11 | fontFamily: "Microsoft YaHei",
12 | },
13 | nameGap: 15,
14 | nameRotate: 0,
15 | axisLabel: {
16 | formatter: "{value}",
17 | show: true,
18 | rotate: 0,
19 | margin: 8,
20 | color: "#333",
21 | fontSize: 14,
22 | fontStyle: "normal",
23 | fontWeight: "bolder",
24 | fontFamily: "Microsoft YaHei",
25 | },
26 | };
27 | export const nameLocationOptions = [
28 | { label: "start", value: "start" },
29 | { label: "middle", value: "middle" },
30 | { label: "end", value: "end" },
31 | ];
32 |
--------------------------------------------------------------------------------
/src/components/G2Template/data/g2Line.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable comma-dangle */
2 | /* eslint-disable indent */
3 | // 这是折线图默认的数据
4 | import { randomStr } from "@/utils";
5 | export const g2LineData = [
6 | {
7 | year: "1991",
8 | value: 3,
9 | },
10 | {
11 | year: "1992",
12 | value: 4,
13 | },
14 | {
15 | year: "1993",
16 | value: 3.5,
17 | },
18 | {
19 | year: "1994",
20 | value: 5,
21 | },
22 | {
23 | year: "1995",
24 | value: 4.9,
25 | },
26 | {
27 | year: "1996",
28 | value: 6,
29 | },
30 | {
31 | year: "1997",
32 | value: 7,
33 | },
34 | {
35 | year: "1998",
36 | value: 9,
37 | },
38 | {
39 | year: "1999",
40 | value: 13,
41 | },
42 | ];
43 | export const baseOptions = {
44 | container: "g2Line" + randomStr(3),
45 | width: 400,
46 | height: 250,
47 | };
48 |
--------------------------------------------------------------------------------
/src/components/G2Template/component/g2Line.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
29 |
30 |
--------------------------------------------------------------------------------
/src/icons/svg/edit.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/nested.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/layout/components/TagsView/ScrollPane.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
23 |
24 |
--------------------------------------------------------------------------------
/src/components/G2Template/component/g2Bar.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
30 |
31 |
--------------------------------------------------------------------------------
/src/components/mxGraph/shape/index.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable require-jsdoc */
2 |
3 | import {
4 | mxUtils as MxUtils,
5 | mxCellRenderer as MxCellRenderer,
6 | mxEllipse as MxEllipse,
7 | } from "mxgraph/javascript/mxClient";
8 | // 自定义的图形 主要操作复杂的图形和自定义的图形
9 | function OrEllipseShape() {
10 | MxEllipse.call(this);
11 | }
12 | MxUtils.extend(OrEllipseShape, MxEllipse);
13 | OrEllipseShape.prototype.paintVertexShape = function(c, x, y, w, h) {
14 | MxEllipse.prototype.paintVertexShape.apply(this, arguments);
15 | c.setShadow(false);
16 | c.begin();
17 | c.moveTo(x, y + h / 2);
18 | c.lineTo(x + w, y + h / 2);
19 | c.end();
20 | c.stroke();
21 |
22 | c.begin();
23 | c.moveTo(x + w / 2, y);
24 | c.lineTo(x + w / 2, y + h);
25 | c.end();
26 | c.stroke();
27 | };
28 |
29 | MxCellRenderer.registerShape("orEllipse", OrEllipseShape);
--------------------------------------------------------------------------------
/src/views/echarts/echartComponent/data/line/defaultline/defaultline.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable indent */
2 | import { defaultTtileKeys } from "../../../../rightTool/components/commonData/commonData";
3 | import { legendData } from "../../../../rightTool/components/commonData/legendData";
4 | console.log(defaultTtileKeys);
5 | export const defaultline = {
6 | name: "默认折线图",
7 | type: "line",
8 | images: require("@/assets/images/line-simple.jpg"),
9 | optionsData: {
10 | title: JSON.parse(JSON.stringify(defaultTtileKeys)),
11 | legend: legendData,
12 | xAxis: {
13 | type: "category",
14 | data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
15 | },
16 | yAxis: {
17 | type: "value",
18 | },
19 | series: [
20 | {
21 | data: [820, 932, 901, 934, 1290, 1330, 1320],
22 | type: "line",
23 | },
24 | ],
25 | },
26 | };
27 |
--------------------------------------------------------------------------------
/src/icons/svg/juhe.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/views/echarts/echartComponent/data/line/lineSmooth/lineSmooth.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable indent */
2 | import { defaultTtileKeys } from "../../../../rightTool/components/commonData/commonData";
3 | import { cloneDeep } from "lodash";
4 | import { legendData } from "../../../../rightTool/components/commonData/legendData";
5 | export const lineSmooth = {
6 | name: "平滑折线图",
7 | type: "line",
8 | images: require("@/assets/images/line-smooth.jpg"),
9 | optionsData: {
10 | title: defaultTtileKeys,
11 | legend: cloneDeep(legendData),
12 | xAxis: {
13 | type: "category",
14 | data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
15 | },
16 | yAxis: {
17 | type: "value",
18 | },
19 | series: [
20 | {
21 | data: [820, 932, 901, 934, 1290, 1330, 1320],
22 | type: "line",
23 | smooth: true,
24 | },
25 | ],
26 | },
27 | };
28 |
--------------------------------------------------------------------------------
/src/views/echarts/rightTool/components/baseItem.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
{{label}}
4 |
5 |
6 |
7 |
8 |
9 |
10 |
25 |
26 |
42 |
--------------------------------------------------------------------------------
/src/store/modules/settings.js:
--------------------------------------------------------------------------------
1 | import variables from "@/styles/element-variables.scss";
2 | import defaultSettings from "@/settings";
3 |
4 | const {
5 | showSettings,
6 | tagsView,
7 | fixedHeader,
8 | sidebarLogo
9 | } = defaultSettings;
10 |
11 | const state = {
12 | theme: variables.theme,
13 | showSettings: showSettings,
14 | tagsView: tagsView,
15 | fixedHeader: fixedHeader,
16 | sidebarLogo: sidebarLogo
17 | };
18 |
19 | const mutations = {
20 | CHANGE_SETTING: (state, {
21 | key,
22 | value
23 | }) => {
24 | if (state.hasOwnProperty(key)) {
25 | state[key] = value;
26 | }
27 | }
28 | };
29 |
30 | const actions = {
31 | changeSetting({
32 | commit
33 | }, data) {
34 | commit("CHANGE_SETTING", data);
35 | }
36 | };
37 |
38 | export default {
39 | namespaced: true,
40 | state,
41 | mutations,
42 | actions
43 | };
44 |
--------------------------------------------------------------------------------
/src/views/echarts/echartComponent/data/line/areaBasicData/areaBasicData.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable indent */
2 | import { defaultTtileKeys } from "../../../../rightTool/components/commonData/commonData";
3 | import { legendData } from "../../../../rightTool/components/commonData/legendData";
4 | import { cloneDeep } from "lodash";
5 | export const areaBasicData = {
6 | name: "折线图",
7 | type: "line",
8 | images: require("@/assets/images/area-basic.jpg"),
9 | optionsData: {
10 | title: defaultTtileKeys,
11 | legend: cloneDeep(legendData),
12 | xAxis: {
13 | type: "category",
14 | boundaryGap: false,
15 | data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
16 | },
17 | yAxis: {
18 | type: "value",
19 | },
20 | series: [
21 | {
22 | data: [820, 932, 901, 934, 1290, 1330, 1320],
23 | type: "line",
24 | areaStyle: {},
25 | },
26 | ],
27 | },
28 | };
29 |
--------------------------------------------------------------------------------
/src/icons/svg/tree-table.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/views/echarts/rightTool/components/mixins/component.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable indent */
2 | import { mapGetters } from "vuex";
3 | import { clearValues } from "../../../utils/utils";
4 | export default {
5 | computed: {
6 | ...mapGetters(["currentTarget"]),
7 | cDisabled() {
8 | return !this.dataInfo.show;
9 | },
10 | cShowDisabled() {
11 | return !Object.keys(this.currentTarget).length > 0;
12 | },
13 | },
14 | methods: {
15 | // 输入框改变的类型和值
16 | changeFun(attr, type, value) {
17 | this.$emit("change", { attr, type, value });
18 | },
19 | setData(data) {
20 | if (!data || data === null || Object.keys(data).length === 0) {
21 | this.dataInfo = clearValues(this.dataInfo);
22 | } else {
23 | let targetKeys = Object.keys(this.dataInfo);
24 | targetKeys.forEach((v) => {
25 | this.$set(this.dataInfo, v, data[v]);
26 | });
27 | }
28 | },
29 | },
30 | };
31 |
--------------------------------------------------------------------------------
/src/views/form/components/generator/db.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable require-jsdoc */
2 | const DRAWING_ID = "idGlobal";
3 | const DRAWING_ITEMS = "drawingItems";
4 | const FORM_CONF = "formConf";
5 | export function getIdGlobal () {
6 | const str = localStorage.getItem(DRAWING_ID);
7 | if (str) {
8 | return parseInt(str, 10);
9 | }
10 | return 100;
11 | }
12 | export function saveIdGlobal (id) {
13 | localStorage.setItem(DRAWING_ID, `${id}`);
14 | }
15 | export function saveDrawingList (list) {
16 | localStorage.setItem(DRAWING_ITEMS, JSON.stringify(list));
17 | }
18 | export function getDrawingList () {
19 | const str = localStorage.getItem(DRAWING_ITEMS);
20 | if (str) {
21 | return JSON.parse(str);
22 | }
23 | return null;
24 | }
25 | export function getFormConf () {
26 | const str = localStorage.getItem(FORM_CONF);
27 | if (str) {
28 | return JSON.parse(str);
29 | }
30 | return null;
31 | }
--------------------------------------------------------------------------------
/src/views/mxgraph/components/Item.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
{{ label }}
4 |
5 |
6 |
7 |
8 |
9 |
20 |
44 |
--------------------------------------------------------------------------------
/src/views/echarts/rightTool/components/titleComponents/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
28 |
29 |
37 |
--------------------------------------------------------------------------------
/src/icons/svg/eye.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/views/form/components/generator/drawingDefalut.js:
--------------------------------------------------------------------------------
1 | export default [{
2 | __config__: {
3 | label: "单行文本",
4 | labelWidth: null,
5 | showLabel: true,
6 | changeTag: true,
7 | tag: "el-input",
8 | tagIcon: "input",
9 | defaultValue: "12322",
10 | required: true,
11 | layout: "colFormItem",
12 | span: 24,
13 | document: "https://element.eleme.cn/#/zh-CN/component/input",
14 | // 正则校验规则
15 | regList: [{
16 | pattern: "/^1(3|4|5|7|8|9)\\d{9}$/",
17 | message: "手机号格式错误"
18 | }]
19 | },
20 | // 组件的插槽属性
21 | __slot__: {
22 | prepend: "",
23 | append: ""
24 | },
25 | __vModel__: "mobile",
26 | placeholder: "请输入手机号",
27 | style: {
28 | width: "100%"
29 | },
30 | clearable: true,
31 | "prefix-icon": "el-icon-mobile",
32 | "suffix-icon": "",
33 | maxlength: 11,
34 | "show-word-limit": true,
35 | readonly: false,
36 | disabled: false
37 | }];
--------------------------------------------------------------------------------
/src/styles/variables.scss:
--------------------------------------------------------------------------------
1 | // base color
2 | $blue:#324157;
3 | $light-blue:#3A71A8;
4 | $red:#C03639;
5 | $pink: #E65D6E;
6 | $green: #30B08F;
7 | $tiffany: #4AB7BD;
8 | $yellow:#FEC171;
9 | $panGreen: #30B08F;
10 |
11 | // sidebar
12 | $menuText:#bfcbd9;
13 | $menuActiveText:#409EFF;
14 | $subMenuActiveText:#f4f4f5; // https://github.com/ElemeFE/element/issues/12951
15 |
16 | $menuBg:#304156;
17 | $menuHover:#263445;
18 |
19 | $subMenuBg:#1f2d3d;
20 | $subMenuHover:#001528;
21 |
22 | $sideBarWidth: 210px;
23 |
24 | // the :export directive is the magic sauce for webpack
25 | // https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
26 | :export {
27 | menuText: $menuText;
28 | menuActiveText: $menuActiveText;
29 | subMenuActiveText: $subMenuActiveText;
30 | menuBg: $menuBg;
31 | menuHover: $menuHover;
32 | subMenuBg: $subMenuBg;
33 | subMenuHover: $subMenuHover;
34 | sideBarWidth: $sideBarWidth;
35 | }
36 |
--------------------------------------------------------------------------------
/src/styles/element-variables.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * I think element-ui's default theme color is too light for long-term use.
3 | * So I modified the default color and you can modify it to your liking.
4 | **/
5 |
6 | /* theme color */
7 | $--color-primary: #1890ff;
8 | $--color-success: #13ce66;
9 | $--color-warning: #FFBA00;
10 | $--color-danger: #ff4949;
11 | // $--color-info: #1E1E1E;
12 |
13 | $--button-font-weight: 400;
14 |
15 | // $--color-text-regular: #1f2d3d;
16 |
17 | $--border-color-light: #dfe4ed;
18 | $--border-color-lighter: #e6ebf5;
19 |
20 | $--table-border:1px solid#dfe6ec;
21 |
22 | /* icon font path, required */
23 | $--font-path: '~element-ui/lib/theme-chalk/fonts';
24 |
25 | @import "~element-ui/packages/theme-chalk/src/index";
26 |
27 | // the :export directive is the magic sauce for webpack
28 | // https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
29 | :export {
30 | theme: $--color-primary;
31 | }
32 |
--------------------------------------------------------------------------------
/src/views/mxgraph/components/Style.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
37 |
38 |
--------------------------------------------------------------------------------
/src/icons/svg/clipboard.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/settings.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | title: 'Vue Element Admin',
3 |
4 | /**
5 | * @type {boolean} true | false
6 | * @description Whether show the settings right-panel
7 | */
8 | showSettings: true,
9 |
10 | /**
11 | * @type {boolean} true | false
12 | * @description Whether need tagsView
13 | */
14 | tagsView: true,
15 |
16 | /**
17 | * @type {boolean} true | false
18 | * @description Whether fix the header
19 | */
20 | fixedHeader: false,
21 |
22 | /**
23 | * @type {boolean} true | false
24 | * @description Whether show the logo in sidebar
25 | */
26 | sidebarLogo: false,
27 |
28 | /**
29 | * @type {string | array} 'production' | ['production', 'development']
30 | * @description Need show err logs component.
31 | * The default is only used in the production env
32 | * If you want to also use it in dev, you can pass ['production', 'development']
33 | */
34 | errorLog: 'production'
35 | }
36 |
--------------------------------------------------------------------------------
/src/views/virtualList/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
36 |
37 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable comma-dangle */
2 | /* eslint-disable indent */
3 | /* eslint-disable eol-last */
4 | import Vue from "vue";
5 | import App from "./App.vue";
6 | import "normalize.css/normalize.css"; // a modern alternative to CSS resets
7 | import Element from "element-ui";
8 | import "element-ui/lib/theme-chalk/index.css";
9 | import "./styles/element-variables.scss";
10 | import store from "./store";
11 | import "@/styles/index.scss"; // global css
12 | import "./icons"; // icon
13 | import "./permission";
14 | import router from "./router";
15 | import "vue-draggable-resizable-gorkys/dist/VueDraggableResizable.css";
16 | import vdr from "vue-draggable-resizable-gorkys";
17 | import contentmenu from "v-contextmenu";
18 | import "v-contextmenu/dist/index.css";
19 | Vue.use(contentmenu);
20 | Vue.component("vdr", vdr);
21 | Vue.config.productionTip = false;
22 | Vue.use(Element);
23 | new Vue({
24 | render: (h) => h(App),
25 | router,
26 | store,
27 | }).$mount("#app");
28 |
--------------------------------------------------------------------------------
/src/styles/transition.scss:
--------------------------------------------------------------------------------
1 | // global transition css
2 |
3 | /* fade */
4 |
5 | .fade-enter-active,
6 | .fade-leave-active {
7 | transition: opacity 0.28s;
8 | }
9 |
10 | .fade-enter,
11 | .fade-leave-active {
12 | opacity: 0;
13 | }
14 |
15 |
16 | /* fade-transform */
17 |
18 | .fade-transform-leave-active,
19 | .fade-transform-enter-active {
20 | transition: all .5s;
21 | }
22 |
23 | .fade-transform-enter {
24 | opacity: 0;
25 | transform: translateX(-30px);
26 | }
27 |
28 | .fade-transform-leave-to {
29 | opacity: 0;
30 | transform: translateX(30px);
31 | }
32 |
33 |
34 | /* breadcrumb transition */
35 |
36 | .breadcrumb-enter-active,
37 | .breadcrumb-leave-active {
38 | transition: all .5s;
39 | }
40 |
41 | .breadcrumb-enter,
42 | .breadcrumb-leave-active {
43 | opacity: 0;
44 | transform: translateX(20px);
45 | }
46 |
47 | .breadcrumb-move {
48 | transition: all .5s;
49 | }
50 |
51 | .breadcrumb-leave-active {
52 | position: absolute;
53 | }
--------------------------------------------------------------------------------
/src/views/documentation/c.vue:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
38 |
39 |
--------------------------------------------------------------------------------
/src/icons/svg/list.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/views/echarts/utils/utils.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable indent */
2 | import { cloneDeep, isPlainObject } from "lodash";
3 | let needBoolean = ["show"];
4 | let numberArr = [
5 | "fontSize",
6 | "paddingTop",
7 | "paddingRight",
8 | "paddingBottom",
9 | "paddingLeft",
10 | ];
11 | let ArrayArr = ["padding"];
12 | export const clearValues = (Obj) => {
13 | let targetObj = cloneDeep(Obj);
14 | for (let key in targetObj) {
15 | if (isPlainObject(targetObj[key])) {
16 | targetObj[key] = clearValues(targetObj[key]);
17 | } else {
18 | if (needBoolean.includes(key)) {
19 | targetObj[key] = false;
20 | } else {
21 | if (numberArr.includes(key)) {
22 | targetObj[key] = 12;
23 | } else if (ArrayArr.includes(key)) {
24 | // targetObj[key] =
25 | if (key === "padding") {
26 | targetObj[key] = [5, 5, 5, 5];
27 | } else {
28 | targetObj[key] = [];
29 | }
30 | } else {
31 | targetObj[key] = "";
32 | }
33 | }
34 | }
35 | }
36 | return targetObj;
37 | };
38 |
--------------------------------------------------------------------------------
/src/views/adaptiveTable/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
27 |
28 |
--------------------------------------------------------------------------------
/src/icons/svg/icon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/views/editTable/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
34 |
40 |
41 |
--------------------------------------------------------------------------------
/src/views/echarts/echartComponent/data/bar/defaultBar/defaultBar.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable indent */
2 | import { defaultTtileKeys } from "../../../../rightTool/components/commonData/commonData";
3 | import { legendData } from "../../../../rightTool/components/commonData/legendData";
4 | import { xData } from "../../../../rightTool/components/commonData/xData";
5 | // import { yData } from "../../../../rightTool/components/commonData/yData";
6 | import { cloneDeep } from "lodash";
7 | let currentXdata = {
8 | data: ["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"],
9 | };
10 | export const defaultBar = {
11 | name: "基础柱状图",
12 | type: "bar",
13 | images: require("@/assets/images/bar-simple.jpg"),
14 | optionsData: {
15 | title: JSON.parse(JSON.stringify(defaultTtileKeys)),
16 | legend: legendData,
17 | tooltip: {},
18 | xAxis: Object.assign({}, cloneDeep(xData), currentXdata),
19 | yAxis: Object.assign({}, cloneDeep(xData), {}),
20 | series: [
21 | {
22 | name: "销量",
23 | type: "bar",
24 | data: [5, 20, 36, 10, 10, 20],
25 | },
26 | ],
27 | },
28 | };
29 |
--------------------------------------------------------------------------------
/src/views/friutGame/components/friutItem.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
![]()
4 |
X{{item.rate}}
5 |
6 |
7 |
8 |
19 |
20 |
48 |
49 |
--------------------------------------------------------------------------------
/src/views/echarts/rightTool/components/xComponents/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
13 |
37 |
38 |
--------------------------------------------------------------------------------
/src/views/echarts/rightTool/components/yComponents/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
13 |
37 |
38 |
--------------------------------------------------------------------------------
/src/views/leetCode/array/array5.vue:
--------------------------------------------------------------------------------
1 |
2 | 给定一个按照升序排列的整数数组nums,和一个目标值target找出它在数组中的开始位置和结束位置
3 |
4 |
5 |
41 |
42 |
--------------------------------------------------------------------------------
/src/icons/svg/international.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/views/leetCode/array/array1.vue:
--------------------------------------------------------------------------------
1 |
2 | array1
3 |
4 |
5 |
37 |
38 |
40 |
--------------------------------------------------------------------------------
/src/views/echarts/echartComponent/data/pie/defaultPie/defaultPie.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable indent */
2 | export const defaultPie = {
3 | type: "pie",
4 | name: "基础饼图",
5 | images: require("@/assets/images/pie-doughnut.jpg"),
6 | optionsData: {
7 | tooltip: {
8 | trigger: "item",
9 | formatter: "{a}
{b}: {c} ({d}%)",
10 | },
11 | legend: {
12 | orient: "vertical",
13 | left: 10,
14 | data: ["直接访问", "邮件营销", "联盟广告", "视频广告", "搜索引擎"],
15 | },
16 | series: [
17 | {
18 | name: "访问来源",
19 | type: "pie",
20 | radius: ["50%", "70%"],
21 | avoidLabelOverlap: false,
22 | label: {
23 | show: false,
24 | position: "center",
25 | },
26 | emphasis: {
27 | label: {
28 | show: true,
29 | fontSize: "30",
30 | fontWeight: "bold",
31 | },
32 | },
33 | labelLine: {
34 | show: false,
35 | },
36 | data: [
37 | { value: 335, name: "直接访问" },
38 | { value: 310, name: "邮件营销" },
39 | { value: 234, name: "联盟广告" },
40 | { value: 135, name: "视频广告" },
41 | { value: 1548, name: "搜索引擎" },
42 | ],
43 | },
44 | ],
45 | },
46 | };
47 |
--------------------------------------------------------------------------------
/src/icons/svg/wechat.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/skill.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/people.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/router/modules/table.js:
--------------------------------------------------------------------------------
1 | /** When your routing table is too long, you can split it into small modules **/
2 |
3 | import Layout from "@/layout";
4 |
5 | const tableRouter = {
6 | path: "/table",
7 | component: Layout,
8 | redirect: "/table/complex-table",
9 | name: "Table",
10 | meta: {
11 | title: "表格",
12 | icon: "table"
13 | },
14 | children: [
15 | {
16 | path: "dynamic-table",
17 | component: () => import("@/views/table/dynamic-table/index"),
18 | name: "DynamicTable",
19 | meta: { title: "dynamicTable" }
20 | },
21 | {
22 | path: "drag-table",
23 | component: () => import("@/views/table/drag-table"),
24 | name: "DragTable",
25 | meta: { title: "dragTable" }
26 | },
27 | {
28 | path: "inline-edit-table",
29 | component: () => import("@/views/table/inline-edit-table"),
30 | name: "InlineEditTable",
31 | meta: { title: "inlineEditTable" }
32 | },
33 | {
34 | path: "complex-table",
35 | component: () => import("@/views/table/complex-table"),
36 | name: "ComplexTable",
37 | meta: { title: "complexTable" }
38 | }
39 | ]
40 | };
41 | export default tableRouter;
42 |
--------------------------------------------------------------------------------
/src/views/echarts/echartComponent/data/utils/common.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable require-jsdoc */
2 | /* eslint-disable indent */
3 | // const componentsContext = require.context("./", true, /(vue|js)$/);
4 |
5 | export const fileToData = (componentsContext) => {
6 | let targetText = componentsContext
7 | .keys()
8 | .map((v) => changeStr(v))
9 | .filter((v) => v !== "index");
10 | let map = {};
11 | targetText.forEach((v) => {
12 | console.log(v);
13 | // 获取文件中的 default 模块
14 | const componentConfig = componentsContext(`./${v}/${v}.js`)[v];
15 | if (!map[v]) {
16 | map[v] = componentConfig;
17 | }
18 | });
19 | return Object.values(map);
20 | };
21 |
22 | function changeStr(str) {
23 | str = str.replace(/^\.\//, "");
24 | var rBegin = "(?=^s*\\b)";
25 | var rEnd = "(?=\\b\\s+$|$)";
26 | var rEndSplit = rEnd.replace("=", "!");
27 | var rPath = "((?:.split)*(?:\\w+\\.)*(?:.split)*(?:\\w+\\.)*[\\\\\\/])?".replace(
28 | /split/g,
29 | rEndSplit
30 | );
31 | var rName = "([^\\\\\\/]+?)";
32 | var rSuffix = "(?:\\.([^\\.\\s]+)\\b)?";
33 |
34 | var regContent = rBegin + rPath + rName + rSuffix + rEnd;
35 |
36 | var reg = new RegExp(regContent, "");
37 | var match = str.match(reg);
38 | return match[2];
39 | }
40 |
--------------------------------------------------------------------------------
/src/views/circle/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{percent}}%
5 |
6 | +
7 | -
8 |
9 | 80%
10 |
11 |
12 | 100%
13 |
14 |
15 |
16 |
17 |
50 |
51 |
--------------------------------------------------------------------------------
/src/views/leetCode/String/String1.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
给你一个混合了数字和字母的字符串 s,其中的字母均为小写英文字母。
4 |
请你将该字符串重新格式化,使得任意两个相邻字符的类型都不同。也就是说,字母后面应该跟着数字,而数字后面应该跟着字母。
5 |
请你返回 重新格式化后 的字符串;如果无法按要求重新格式化,则返回一个 空字符串 。
6 |
https://leetcode-cn.com/problems/reformat-the-string/
7 |
8 |
9 |
10 |
39 |
40 |
42 |
--------------------------------------------------------------------------------
/src/icons/svg/language.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/views/leetCode/dynamic/maxChildArray.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
![]()
5 |
6 |
7 |
8 |
9 |
43 |
44 |
--------------------------------------------------------------------------------
/src/views/leetCode/array/array6.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | 给你 n 个非负整数 a1,a2,...,an,每个数代表坐标中的一个点 (i, ai) 。在坐标内画 n 条垂直线,垂直线 i 的两个端点分别为 (i, ai) 和 (i, 0)。找出其中的两条线,使得它们与 x 轴共同构成的容器可以容纳最多的水。
4 | 说明:你不能倾斜容器,且 n 的值至少为 2。
5 | 来源:力扣(LeetCode)
6 | 链接:https://leetcode-cn.com/problems/container-with-most-water
7 | 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
8 |
9 | 输入:[1,8,6,2,5,4,8,3,7]
10 | 输出:49
11 |
12 |
13 |
14 |
15 |
48 |
49 |
--------------------------------------------------------------------------------
/src/icons/svg/eye-open.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/views/echarts/rightTool/components/commonData/commonData.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable indent */
2 | // import { clearValues } from "../../../utils/utils";
3 | export const defaultTtileKeys = {
4 | text: "默认标题",
5 | show: true,
6 | subtext: "默认二级标题",
7 | textStyle: {
8 | color: "#333",
9 | fontStyle: "normal",
10 | fontWeight: "bolder",
11 | fontFamily: "Microsoft YaHei",
12 | fontSize: 20,
13 | },
14 | subtextStyle: {
15 | color: "#333",
16 | fontStyle: "normal",
17 | fontWeight: "bolder",
18 | fontFamily: "Microsoft YaHei",
19 | fontSize: 20,
20 | },
21 | x: "left",
22 | y: "top",
23 | };
24 | export const fontStyleOptions = [
25 | { label: "normal", value: "normal" },
26 | { label: "italic", value: "italic" },
27 | { label: "oblique", value: "oblique" },
28 | ];
29 |
30 | export const fontFamilyOptions = [
31 | { label: "serif", value: "serif" },
32 | { label: "monospace", value: "monospace" },
33 | { label: "Arial", value: "Courier New" },
34 | { label: "Microsoft YaHei", value: "Microsoft YaHei" },
35 | ];
36 |
37 | export const xDirections = [
38 | { label: "水平居左", value: "left" },
39 | { label: "水平居中", value: "center" },
40 | { label: "水平居右", value: "right" },
41 | ];
42 | export const yDirections = [
43 | { label: "顶部", value: "top" },
44 | { label: "底部", value: "bottom" },
45 | ];
46 |
--------------------------------------------------------------------------------
/src/views/selectProvince/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 | 获取数据
11 |
12 |
13 |
14 |
51 |
52 |
--------------------------------------------------------------------------------
/src/components/Hamburger/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
34 |
35 |
47 |
--------------------------------------------------------------------------------
/src/views/echarts/echartComponent/data/radar/defaultRadar/defaultRadar.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable indent */
2 | export const defaultRadar = {
3 | name: "基础雷达图",
4 | type: "radar",
5 | images: require("@/assets/images/radar.jpg"),
6 | optionsData: {
7 | title: {
8 | text: "基础雷达图",
9 | },
10 | tooltip: {},
11 | legend: {
12 | data: ["预算分配(Allocated Budget)", "实际开销(Actual Spending)"],
13 | },
14 | radar: {
15 | // shape: 'circle',
16 | name: {
17 | textStyle: {
18 | color: "#fff",
19 | backgroundColor: "#999",
20 | borderRadius: 3,
21 | padding: [3, 5],
22 | },
23 | },
24 | indicator: [
25 | { name: "销售(sales)", max: 6500 },
26 | { name: "管理(Administration)", max: 16000 },
27 | { name: "信息技术(Information Techology)", max: 30000 },
28 | { name: "客服(Customer Support)", max: 38000 },
29 | { name: "研发(Development)", max: 52000 },
30 | { name: "市场(Marketing)", max: 25000 },
31 | ],
32 | },
33 | series: [
34 | {
35 | name: "预算 vs 开销(Budget vs spending)",
36 | type: "radar",
37 | // areaStyle: {normal: {}},
38 | data: [
39 | {
40 | value: [4300, 10000, 28000, 35000, 50000, 19000],
41 | name: "预算分配(Allocated Budget)",
42 | },
43 | {
44 | value: [5000, 14000, 28000, 31000, 42000, 21000],
45 | name: "实际开销(Actual Spending)",
46 | },
47 | ],
48 | },
49 | ],
50 | },
51 | };
52 |
--------------------------------------------------------------------------------
/src/icons/svg/404.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/views/echarts/echartComponent/data/bar/barTickAlign/barTickAlign.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable indent */
2 | import { defaultTtileKeys } from "../../../../rightTool/components/commonData/commonData";
3 | import { legendData } from "../../../../rightTool/components/commonData/legendData";
4 | import { xData } from "../../../../rightTool/components/commonData/xData";
5 | import { cloneDeep } from "lodash";
6 | let currentXdata = {
7 | type: "category",
8 | data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
9 | axisTick: {
10 | alignWithLabel: true,
11 | },
12 | };
13 | export const barTickAlign = {
14 | name: "坐标轴刻度与标签对齐",
15 | type: "bar",
16 | images: require("@/assets/images/bar-tick-align.jpg"),
17 | optionsData: {
18 | title: JSON.parse(JSON.stringify(defaultTtileKeys)),
19 | color: ["#3398DB"],
20 | legend: legendData,
21 | tooltip: {
22 | trigger: "axis",
23 | axisPointer: {
24 | // 坐标轴指示器,坐标轴触发有效
25 | type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
26 | },
27 | },
28 | grid: {
29 | left: "3%",
30 | right: "4%",
31 | bottom: "3%",
32 | containLabel: true,
33 | },
34 | xAxis: Object.assign({}, cloneDeep(xData), currentXdata),
35 | yAxis: [
36 | {
37 | type: "value",
38 | },
39 | ],
40 | series: [
41 | {
42 | name: "直接访问",
43 | type: "bar",
44 | barWidth: "60%",
45 | data: [10, 52, 200, 334, 390, 330, 220],
46 | },
47 | ],
48 | },
49 | };
50 |
--------------------------------------------------------------------------------
/src/icons/svg/zip.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/views/leetCode/BinaryTree/BinaryTree2.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | 打乱一个没有重复的数组
4 |
5 | // 以数字集合 1, 2 和 3 初始化数组。
6 | int[] nums = {1,2,3}; 45 Solution solution = new Solution(nums)
7 | // 打乱数组 [1,2,3] 并返回结果。任何 [1,2,3]的排列返回的概率应该相同。
8 | solution.shuffle(); 1011
9 | // 重设数组到它的初始状态[1,2,3]
10 | solution.reset();
11 | // 随机返回数组[1,2,3]打乱后的结果。
12 | solution.shuffle();
13 |
14 |
15 |
16 |
17 |
48 |
49 |
--------------------------------------------------------------------------------
/src/icons/svg/circle.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## 简介
2 |
3 | 该项目主要是我个人在工作中所编写的一些组件或者是有一些有意思的组件我都会一一记录下来
4 |
5 | ## 组件
6 |
7 |
8 |
9 | [虚拟列表](http://whenthemorningdark.gitee.io/vue-kafei-admin/#/components/virtualList)
10 |
11 |
12 |
13 |
14 |
15 | [下拉选择树](http://whenthemorningdark.gitee.io/vue-kafei-admin/#/components/treeSelect)
16 |
17 |
18 |
19 |
20 |
21 | [mxgraph 流程图](http://whenthemorningdark.gitee.io/vue-kafei-admin/#/dataView/index)
22 |
23 |
24 |
25 |
26 |
27 | [拖拽布局](http://whenthemorningdark.gitee.io/vue-kafei-admin/#/dataView/draggbleLayout)
28 |
29 |
30 |
31 |
32 |
33 | [echarts 可视化布局](http://whenthemorningdark.gitee.io/vue-kafei-admin/#/dataView/echarts)
34 |
35 |
36 |
37 |
38 |
39 | [表单可视化](http://whenthemorningdark.gitee.io/vue-kafei-admin/#/dataView/form)
40 |
41 |
42 |
43 |
44 |
45 | [甘特图](http://whenthemorningdark.gitee.io/vue-kafei-admin/#/dataView/gantt)
46 |
47 |
48 |
49 |
50 |
51 | [圆形进度条](http://whenthemorningdark.gitee.io/vue-kafei-admin/#/dataView/circle)
52 |
53 |
54 |
55 |
56 | [省市区联动](https://github.com/whenTheMorningDark/vue-kai-admin/blob/master/src/components/selectProvince/index.vue)
57 |
58 |
59 |
60 | ## lodash 源码分析
61 |
62 |
63 |
64 |
数组方法分析
65 |
66 | [chunk](https://github.com/whenTheMorningDark/vue-kai-admin/blob/master/src/views/loadsh/array/chunk.md)
67 |
68 |
69 |
70 | [compactAndConct](https://github.com/whenTheMorningDark/vue-kai-admin/blob/master/src/views/loadsh/array/compactAndConct.md)
71 |
72 |
--------------------------------------------------------------------------------
/src/styles/element-ui.scss:
--------------------------------------------------------------------------------
1 | // cover some element-ui styles
2 |
3 | .el-breadcrumb__inner,
4 | .el-breadcrumb__inner a {
5 | font-weight: 400 !important;
6 | }
7 |
8 | .el-upload {
9 | input[type="file"] {
10 | display: none !important;
11 | }
12 | }
13 |
14 | .el-upload__input {
15 | display: none;
16 | }
17 |
18 | .cell {
19 | .el-tag {
20 | margin-right: 0px;
21 | }
22 | }
23 |
24 | .small-padding {
25 | .cell {
26 | padding-left: 5px;
27 | padding-right: 5px;
28 | }
29 | }
30 |
31 | .fixed-width {
32 | .el-button--mini {
33 | padding: 7px 10px;
34 | width: 60px;
35 | }
36 | }
37 |
38 | .status-col {
39 | .cell {
40 | padding: 0 10px;
41 | text-align: center;
42 |
43 | .el-tag {
44 | margin-right: 0px;
45 | }
46 | }
47 | }
48 |
49 | // to fixed https://github.com/ElemeFE/element/issues/2461
50 | .el-dialog {
51 | transform: none;
52 | left: 0;
53 | position: relative;
54 | margin: 0 auto;
55 | }
56 |
57 | // refine element ui upload
58 | .upload-container {
59 | .el-upload {
60 | width: 100%;
61 |
62 | .el-upload-dragger {
63 | width: 100%;
64 | height: 200px;
65 | }
66 | }
67 | }
68 |
69 | // dropdown
70 | .el-dropdown-menu {
71 | a {
72 | display: block
73 | }
74 | }
75 |
76 | // fix date-picker ui bug in filter-item
77 | .el-range-editor.el-input__inner {
78 | display: inline-flex !important;
79 | }
80 |
81 | // to fix el-date-picker css style
82 | .el-range-separator {
83 | box-sizing: content-box;
84 | }
85 |
--------------------------------------------------------------------------------
/src/views/echarts/rightTool/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 |
45 |
46 |
56 |
--------------------------------------------------------------------------------
/src/icons/svg/bug.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/components/SvgIcon/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
8 |
11 |
12 |
13 |
51 |
52 |
67 |
--------------------------------------------------------------------------------
/src/views/echarts/rightTool/components/rightHeader.vue:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 |
45 |
46 |
72 |
73 |
--------------------------------------------------------------------------------
/src/components/rules/ruleWrapper.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
13 |
14 |
15 |
16 |
58 |
59 |
--------------------------------------------------------------------------------
/src/layout/components/AppMain.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
29 |
57 |
58 |
66 |
--------------------------------------------------------------------------------
/src/router/modules/components.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable indent */
2 | /** When your routing table is too long, you can split it into small modules **/
3 |
4 | import Layout from "@/layout";
5 |
6 | const componentsRouter = {
7 | path: "/components",
8 | component: Layout,
9 | redirect: "noRedirect",
10 | name: "组件合集",
11 | meta: {
12 | title: "components",
13 | icon: "component",
14 | },
15 | children: [
16 | {
17 | path: "treeSelect",
18 | component: () => import("@/views/treeSelect"),
19 | name: "treeSelect",
20 | meta: {
21 | title: "下拉选择树",
22 | },
23 | },
24 | {
25 | path: "sku",
26 | component: () => import("@/views/sku/index.vue"),
27 | name: "sku商品列表",
28 | meta: {
29 | title: "sku商品列表",
30 | },
31 | },
32 | {
33 | path: "nestMenu",
34 | component: () => import("@/views/nestMenu/index.vue"),
35 | name: "递归组件",
36 | meta: {
37 | title: "递归组件",
38 | },
39 | },
40 | {
41 | path: "virtualList",
42 | component: () => import("@/views/virtualList/index.vue"),
43 | name: "virtualList",
44 | meta: {
45 | title: "虚拟列表",
46 | },
47 | },
48 | {
49 | path: "signCanvas",
50 | component: () => import("@/views/SignCanvas/index.vue"),
51 | name: "SignCanvas",
52 | meta: {
53 | title: "签名组件",
54 | },
55 | },
56 | {
57 | path: "selectProvince",
58 | component: () => import("@/views/selectProvince/index.vue"),
59 | name: "selectProvince",
60 | meta: {
61 | title: "省市联动下拉组件",
62 | },
63 | },
64 |
65 | ],
66 | };
67 |
68 | export default componentsRouter;
69 |
--------------------------------------------------------------------------------
/src/styles/mixin.scss:
--------------------------------------------------------------------------------
1 | @mixin clearfix {
2 | &:after {
3 | content: "";
4 | display: table;
5 | clear: both;
6 | }
7 | }
8 |
9 | @mixin scrollBar {
10 | &::-webkit-scrollbar-track-piece {
11 | background: #d3dce6;
12 | }
13 |
14 | &::-webkit-scrollbar {
15 | width: 6px;
16 | }
17 |
18 | &::-webkit-scrollbar-thumb {
19 | background: #99a9bf;
20 | border-radius: 20px;
21 | }
22 | }
23 |
24 | @mixin relative {
25 | position: relative;
26 | width: 100%;
27 | height: 100%;
28 | }
29 |
30 | @mixin pct($pct) {
31 | width: #{$pct};
32 | position: relative;
33 | margin: 0 auto;
34 | }
35 |
36 | @mixin triangle($width, $height, $color, $direction) {
37 | $width: $width/2;
38 | $color-border-style: $height solid $color;
39 | $transparent-border-style: $width solid transparent;
40 | height: 0;
41 | width: 0;
42 |
43 | @if $direction==up {
44 | border-bottom: $color-border-style;
45 | border-left: $transparent-border-style;
46 | border-right: $transparent-border-style;
47 | }
48 |
49 | @else if $direction==right {
50 | border-left: $color-border-style;
51 | border-top: $transparent-border-style;
52 | border-bottom: $transparent-border-style;
53 | }
54 |
55 | @else if $direction==down {
56 | border-top: $color-border-style;
57 | border-left: $transparent-border-style;
58 | border-right: $transparent-border-style;
59 | }
60 |
61 | @else if $direction==left {
62 | border-right: $color-border-style;
63 | border-top: $transparent-border-style;
64 | border-bottom: $transparent-border-style;
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/src/views/leetCode/array/array7.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | 请注意,返回的规范路径必须始终以斜杠 / 开头,并且两个目录名之间必须只有一个斜杠 /。最后一个目录名(如果存在)不能以 / 结尾。此外,规范路径必须是表示绝对路径的最短字符串。
4 | 来源:力扣(LeetCode)
5 | 链接:https://leetcode-cn.com/problems/simplify-path
6 | 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
7 |
8 | 输入:"/home/"
9 | 输出:"/home"
10 | 解释:注意,最后一个目录名后面没有斜杠。
11 |
12 |
13 | 输入:"/../"
14 | 输出:"/"
15 | 解释:从根目录向上一级是不可行的,因为根是你可以到达的最高级。
16 |
17 |
18 | 输入:"/home//foo/"
19 | 输出:"/home/foo"
20 | 解释:在规范路径中,多个连续斜杠需要用一个斜杠替换。
21 |
22 |
23 | 输入:"/a/./b/../../c/"
24 | 输出:"/c"
25 |
26 |
27 | 输入:"/a/../../b/../c//.//"
28 | 输出:"/c"
29 |
30 |
31 | 输入:"/a//b////c/d//././/.."
32 | 输出:"/a/b/c"
33 |
34 |
35 |
36 |
37 |
68 |
69 |
--------------------------------------------------------------------------------
/src/views/leetCode/String/String3.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 给出由小写字母组成的字符串 S,重复项删除操作会选择两个相邻且相同的字母,并删除它们。
5 | 在 S 上反复执行重复项删除操作,直到无法继续删除。
6 | 在完成所有重复项删除操作后返回最终的字符串。答案保证唯一。
7 | 来源:力扣(LeetCode)
8 | 链接:https://leetcode-cn.com/problems/remove-all-adjacent-duplicates-in-string
9 | 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
10 |
11 |
12 |
13 |
14 |
57 |
58 |
60 |
--------------------------------------------------------------------------------
/src/icons/svg/pdf.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/views/mxgraph/tabs.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 | {{ item.text }}
10 |
11 |
17 |
18 |
19 |
61 |
80 |
--------------------------------------------------------------------------------
/src/views/echarts/rightTool/components/titleComponents/subTitle.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
副标题
4 |
5 |
6 |
12 |
13 |
14 |
15 |
16 |
24 |
25 |
26 |
27 |
28 |
29 |
54 |
55 |
--------------------------------------------------------------------------------
/src/store/modules/permission.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable eol-last */
2 | /* eslint-disable quotes */
3 | /* eslint-disable semi */
4 | // 这个是获取路由的数据的方法
5 | import {
6 | constantRoutes,
7 | asyncRoutes
8 | } from "@/router"
9 |
10 | function hasPermission(roles, route) {
11 | if (route.meta && route.meta.roles) {
12 | return roles.some(role => route.meta.roles.includes(role))
13 | } else {
14 | return true
15 | }
16 | }
17 |
18 | /**
19 | * Filter asynchronous routing tables by recursion
20 | * @param routes asyncRoutes
21 | * @param roles
22 | */
23 | export function filterAsyncRoutes(routes, roles) {
24 | const res = []
25 |
26 | routes.forEach(route => {
27 | const tmp = {
28 | ...route
29 | }
30 | if (hasPermission(roles, tmp)) {
31 | if (tmp.children) {
32 | tmp.children = filterAsyncRoutes(tmp.children, roles)
33 | }
34 | res.push(tmp)
35 | }
36 | })
37 |
38 | return res
39 | }
40 |
41 | const state = {
42 | routes: [],
43 | addRoutes: []
44 | }
45 | const mutations = {
46 | SET_ROUTES: (state, routes) => {
47 | state.addRoutes = routes
48 | state.routes = constantRoutes.concat(routes)
49 | }
50 | }
51 | const actions = {
52 | generateRoutes({
53 | commit
54 | }, roles) {
55 | return new Promise(resolve => {
56 | let accessedRoutes
57 | if (roles.includes("admin")) {
58 | accessedRoutes = asyncRoutes || []
59 | } else {
60 | accessedRoutes = filterAsyncRoutes(asyncRoutes, roles)
61 | }
62 | commit('SET_ROUTES', accessedRoutes)
63 | resolve(accessedRoutes)
64 | })
65 | }
66 | }
67 | export default {
68 | namespaced: true,
69 | state,
70 | mutations,
71 | actions
72 | }
--------------------------------------------------------------------------------
/src/views/echarts/echartComponent/data/radar/radar2/radar2.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable indent */
2 | export const radar2 = {
3 | name: "浏览器占比变化",
4 | type: "radar",
5 | images: require("@/assets/images/radar2.jpg"),
6 | optionsData: {
7 | title: {
8 | text: "浏览器占比变化",
9 | subtext: "纯属虚构",
10 | top: 10,
11 | left: 10,
12 | },
13 | tooltip: {
14 | trigger: "item",
15 | backgroundColor: "rgba(0,0,250,0.2)",
16 | },
17 | legend: {
18 | type: "scroll",
19 | bottom: 10,
20 | data: (function() {
21 | var list = [];
22 | for (var i = 1; i <= 28; i++) {
23 | list.push(i + 2000 + "");
24 | }
25 | return list;
26 | })(),
27 | },
28 | visualMap: {
29 | top: "middle",
30 | right: 10,
31 | color: ["red", "yellow"],
32 | calculable: true,
33 | },
34 | radar: {
35 | indicator: [
36 | { text: "IE8-", max: 400 },
37 | { text: "IE9+", max: 400 },
38 | { text: "Safari", max: 400 },
39 | { text: "Firefox", max: 400 },
40 | { text: "Chrome", max: 400 },
41 | ],
42 | },
43 | series: (function() {
44 | var series = [];
45 | for (var i = 1; i <= 28; i++) {
46 | series.push({
47 | name: "浏览器(数据纯属虚构)",
48 | type: "radar",
49 | symbol: "none",
50 | lineStyle: {
51 | width: 1,
52 | },
53 | emphasis: {
54 | areaStyle: {
55 | color: "rgba(0,250,0,0.3)",
56 | },
57 | },
58 | data: [
59 | {
60 | value: [
61 | (40 - i) * 10,
62 | (38 - i) * 4 + 60,
63 | i * 5 + 10,
64 | i * 9,
65 | (i * i) / 2,
66 | ],
67 | name: i + 2000 + "",
68 | },
69 | ],
70 | });
71 | }
72 | return series;
73 | })(),
74 | },
75 | };
76 |
--------------------------------------------------------------------------------
/src/views/leetCode/String/String2.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
给定一个字符串,逐个翻转字符串中的每个单词。
示例 1:
4 | 输入: "the sky is blue"
5 | 输出: "blue is sky the"
6 | 示例 2:
7 | 输入: " hello world! "
8 | 输出: "world! hello"
9 | 解释: 输入字符串可以在前面或者后面包含多余的空格,但是反转后的字符不能包括。
10 | 示例 3:
11 | 输入: "a good example"
12 | 输出: "example good a"
13 | 解释: 如果两个单词间有多余的空格,将反转后单词间的空格减少到只含一个。
14 | 说明:
15 | 无空格字符构成一个单词。
16 | 输入字符串可以在前面或者后面包含多余的空格,但是反转后的字符不能包括。
17 | 如果两个单词间有多余的空格,将反转后单词间的空格减少到只含一个。
18 | 来源:力扣(LeetCode)
19 | 链接:https://leetcode-cn.com/problems/reverse-words-in-a-string
20 | 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
21 |
22 |
23 |
69 |
--------------------------------------------------------------------------------
/src/views/leetCode/dynamic/bagQuestion.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
![]()
5 |
6 |
7 |
描述:
8 |
给你一个可装载重量为 W 的背包和 N 个物品,每个物品有重量和价值两个属性。其中第 i 个物品的重量为 wt[i],价值为 val[i],现在让你用这个背包装物品,最多能装的价值是多少?
9 |
10 |
11 |
12 |
13 |
55 |
56 |
--------------------------------------------------------------------------------
/src/layout/components/Sidebar/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
19 |
25 |
26 |
27 |
28 |
29 |
64 |
--------------------------------------------------------------------------------
/src/views/echarts/utils/event.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable indent */
2 | import { mapGetters } from "vuex";
3 | export default {
4 | data() {
5 | return {
6 | steps: 5,
7 | };
8 | },
9 | computed: {
10 | ...mapGetters(["currentTarget"]),
11 | },
12 | methods: {
13 | move(direction) {
14 | let targetKeys = [40, 37, 39, 38];
15 | if (
16 | !targetKeys.includes(direction) ||
17 | this.currentTarget === null ||
18 | Object.keys(this.currentTarget).length === 0
19 | ) {
20 | return;
21 | }
22 | let map = {
23 | 40: this.downFun,
24 | 37: this.leftFun,
25 | 39: this.rightFun,
26 | 38: this.upFun,
27 | };
28 | map[direction]();
29 | },
30 | // 向下的方法
31 | downFun() {
32 | let y = this.currentTarget.y + this.steps;
33 | this.$store.commit("echart/changeCurrentTagetAttr", {
34 | key: "y",
35 | value: y,
36 | });
37 | },
38 | // 向上的方法
39 | upFun() {
40 | let y = this.currentTarget.y - this.steps;
41 | this.$store.commit("echart/changeCurrentTagetAttr", {
42 | key: "y",
43 | value: y,
44 | });
45 | },
46 | // 向左的方法
47 | leftFun() {
48 | let x = this.currentTarget.x - this.steps;
49 | this.$set(this.currentTarget, "x", x);
50 | this.$store.commit("echart/changeCurrentTagetAttr", {
51 | key: "x",
52 | value: x,
53 | });
54 | },
55 | // 向右的方法
56 | rightFun() {
57 | let x = this.currentTarget.x + this.steps;
58 | this.$store.commit("echart/changeCurrentTagetAttr", {
59 | key: "x",
60 | value: x,
61 | });
62 | },
63 | },
64 | mounted() {
65 | window.addEventListener("keydown", (e) => this.move(e.keyCode));
66 | },
67 | destory() {
68 | window.removeEventListener("keydown", (e) => this.move(e.keyCode));
69 | },
70 | };
71 |
--------------------------------------------------------------------------------
/src/views/dashboard/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
57 |
--------------------------------------------------------------------------------
/src/icons/svg/exit-fullscreen.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/icons/svg/tree.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/views/loadsh/index.vue:
--------------------------------------------------------------------------------
1 |
2 | lodash
3 |
4 |
5 |
68 |
69 |
--------------------------------------------------------------------------------
/src/views/echarts/echartComponent/data/line/lineStack/lineStack.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable indent */
2 | import { defaultTtileKeys } from "../../../../rightTool/components/commonData/commonData";
3 | import { cloneDeep } from "lodash";
4 | import { legendData } from "../../../../rightTool/components/commonData/legendData";
5 | let currentLegendData = {
6 | data: ["邮件营销", "联盟广告", "视频广告", "直接访问", "搜索引擎"],
7 | };
8 | export const lineStack = {
9 | name: "多条折线图",
10 | type: "line",
11 | images: require("@/assets/images/line-stack.jpg"),
12 | optionsData: {
13 | title: defaultTtileKeys,
14 | tooltip: {
15 | trigger: "axis",
16 | },
17 | legend: Object.assign({}, cloneDeep(legendData), currentLegendData),
18 | grid: {
19 | left: "3%",
20 | right: "4%",
21 | bottom: "3%",
22 | containLabel: true,
23 | },
24 | toolbox: {
25 | feature: {
26 | saveAsImage: {},
27 | },
28 | },
29 | xAxis: {
30 | type: "category",
31 | boundaryGap: false,
32 | data: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"],
33 | },
34 | yAxis: {
35 | type: "value",
36 | },
37 | series: [
38 | {
39 | name: "邮件营销",
40 | type: "line",
41 | stack: "总量",
42 | data: [120, 132, 101, 134, 90, 230, 210],
43 | },
44 | {
45 | name: "联盟广告",
46 | type: "line",
47 | stack: "总量",
48 | data: [220, 182, 191, 234, 290, 330, 310],
49 | },
50 | {
51 | name: "视频广告",
52 | type: "line",
53 | stack: "总量",
54 | data: [150, 232, 201, 154, 190, 330, 410],
55 | },
56 | {
57 | name: "直接访问",
58 | type: "line",
59 | stack: "总量",
60 | data: [320, 332, 301, 334, 390, 330, 320],
61 | },
62 | {
63 | name: "搜索引擎",
64 | type: "line",
65 | stack: "总量",
66 | data: [820, 932, 901, 934, 1290, 1330, 1320],
67 | },
68 | ],
69 | },
70 | };
71 |
--------------------------------------------------------------------------------
/src/store/modules/app.js:
--------------------------------------------------------------------------------
1 | import Cookies from "js-cookie";
2 |
3 |
4 | const state = {
5 | sidebar: {
6 | opened: Cookies.get("sidebarStatus") ? !!+Cookies.get("sidebarStatus") : true,
7 | withoutAnimation: false
8 | },
9 | device: "desktop",
10 | size: Cookies.get("size") || "medium"
11 | };
12 |
13 | const mutations = {
14 | TOGGLE_SIDEBAR: state => {
15 | state.sidebar.opened = !state.sidebar.opened;
16 | state.sidebar.withoutAnimation = false;
17 | if (state.sidebar.opened) {
18 | Cookies.set("sidebarStatus", 1);
19 | } else {
20 | Cookies.set("sidebarStatus", 0);
21 | }
22 | },
23 | CLOSE_SIDEBAR: (state, withoutAnimation) => {
24 | Cookies.set("sidebarStatus", 0);
25 | state.sidebar.opened = false;
26 | state.sidebar.withoutAnimation = withoutAnimation;
27 | },
28 | TOGGLE_DEVICE: (state, device) => {
29 | state.device = device;
30 | },
31 | SET_LANGUAGE: (state, language) => {
32 | state.language = language;
33 | Cookies.set("language", language);
34 | },
35 | SET_SIZE: (state, size) => {
36 | state.size = size;
37 | Cookies.set("size", size);
38 | }
39 | };
40 |
41 | const actions = {
42 | toggleSideBar({
43 | commit
44 | }) {
45 | commit("TOGGLE_SIDEBAR");
46 | },
47 | closeSideBar({
48 | commit
49 | }, {
50 | withoutAnimation
51 | }) {
52 | commit("CLOSE_SIDEBAR", withoutAnimation);
53 | },
54 | toggleDevice({
55 | commit
56 | }, device) {
57 | commit("TOGGLE_DEVICE", device);
58 | },
59 | setLanguage({
60 | commit
61 | }, language) {
62 | commit("SET_LANGUAGE", language);
63 | },
64 | setSize({
65 | commit
66 | }, size) {
67 | commit("SET_SIZE", size);
68 | }
69 | };
70 |
71 | export default {
72 | namespaced: true,
73 | state,
74 | mutations,
75 | actions
76 | };
--------------------------------------------------------------------------------
/src/layout/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
40 |
83 |
--------------------------------------------------------------------------------
/src/views/leetCode/BinaryTree/BinaryTree1.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
最小栈
4 |
设计一个支持push,pop,top操作,并能在常数时间内检索到最小元素的栈
5 |
push(x) -- 将元素 x 推入栈中。
6 |
pop() -- 删除栈顶的元素。
7 |
top() -- 获取栈顶元素。
8 |
getMin() -- 检索栈中的最小元素。
9 |
1 MinStack minStack = new MinStack();
10 |
2 minStack.push(-2);
11 |
3 minStack.push(0); 4 minStack.push(-3);
12 |
5 minStack.getMin(); --> 返回 -3.
13 |
6 minStack.pop();
14 |
7 minStack.top(); --> 返回 0.
15 |
8 minStack.getMin(); --> 返回 -2.
16 |
17 |
18 |
19 |
62 |
63 |
--------------------------------------------------------------------------------
/src/views/mxgraph/rightSetting.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
61 |
72 |
--------------------------------------------------------------------------------
/src/styles/btn.scss:
--------------------------------------------------------------------------------
1 | @import './variables.scss';
2 |
3 | @mixin colorBtn($color) {
4 | background: $color;
5 |
6 | &:hover {
7 | color: $color;
8 |
9 | &:before,
10 | &:after {
11 | background: $color;
12 | }
13 | }
14 | }
15 |
16 | .blue-btn {
17 | @include colorBtn($blue)
18 | }
19 |
20 | .light-blue-btn {
21 | @include colorBtn($light-blue)
22 | }
23 |
24 | .red-btn {
25 | @include colorBtn($red)
26 | }
27 |
28 | .pink-btn {
29 | @include colorBtn($pink)
30 | }
31 |
32 | .green-btn {
33 | @include colorBtn($green)
34 | }
35 |
36 | .tiffany-btn {
37 | @include colorBtn($tiffany)
38 | }
39 |
40 | .yellow-btn {
41 | @include colorBtn($yellow)
42 | }
43 |
44 | .pan-btn {
45 | font-size: 14px;
46 | color: #fff;
47 | padding: 14px 36px;
48 | border-radius: 8px;
49 | border: none;
50 | outline: none;
51 | transition: 600ms ease all;
52 | position: relative;
53 | display: inline-block;
54 |
55 | &:hover {
56 | background: #fff;
57 |
58 | &:before,
59 | &:after {
60 | width: 100%;
61 | transition: 600ms ease all;
62 | }
63 | }
64 |
65 | &:before,
66 | &:after {
67 | content: '';
68 | position: absolute;
69 | top: 0;
70 | right: 0;
71 | height: 2px;
72 | width: 0;
73 | transition: 400ms ease all;
74 | }
75 |
76 | &::after {
77 | right: inherit;
78 | top: inherit;
79 | left: 0;
80 | bottom: 0;
81 | }
82 | }
83 |
84 | .custom-button {
85 | display: inline-block;
86 | line-height: 1;
87 | white-space: nowrap;
88 | cursor: pointer;
89 | background: #fff;
90 | color: #fff;
91 | -webkit-appearance: none;
92 | text-align: center;
93 | box-sizing: border-box;
94 | outline: 0;
95 | margin: 0;
96 | padding: 10px 15px;
97 | font-size: 14px;
98 | border-radius: 4px;
99 | }
100 |
--------------------------------------------------------------------------------
/src/views/echarts/echartComponent/data/bar/barAnimationDelay/barAnimationDelay.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable indent */
2 | import { defaultTtileKeys } from "../../../../rightTool/components/commonData/commonData";
3 | import { cloneDeep } from "lodash";
4 | import { legendData } from "../../../../rightTool/components/commonData/legendData";
5 | import { xData } from "../../../../rightTool/components/commonData/xData";
6 | let currentLegendData = {
7 | data: ["bar", "bar2"],
8 | };
9 | var xAxisData = [];
10 | var data1 = [];
11 | var data2 = [];
12 | for (var i = 0; i < 100; i++) {
13 | xAxisData.push("类目" + i);
14 | data1.push((Math.sin(i / 5) * (i / 5 - 10) + i / 6) * 5);
15 | data2.push((Math.cos(i / 5) * (i / 5 - 10) + i / 6) * 5);
16 | }
17 | let currentXdata = {
18 | data: xAxisData,
19 | splitLine: {
20 | show: false,
21 | },
22 | };
23 | export const barAnimationDelay = {
24 | name: "柱状图动画延迟",
25 | type: "bar",
26 | images: require("@/assets/images/bar-animation-delay.jpg"),
27 | optionsData: {
28 | title: JSON.parse(JSON.stringify(defaultTtileKeys)),
29 | legend: Object.assign({}, cloneDeep(legendData), currentLegendData),
30 | toolbox: {
31 | // y: 'bottom',
32 | feature: {
33 | magicType: {
34 | type: ["stack", "tiled"],
35 | },
36 | dataView: {},
37 | saveAsImage: {
38 | pixelRatio: 2,
39 | },
40 | },
41 | },
42 | tooltip: {},
43 | xAxis: Object.assign({}, cloneDeep(xData), currentXdata),
44 | yAxis: {},
45 | series: [
46 | {
47 | name: "bar",
48 | type: "bar",
49 | data: data1,
50 | animationDelay: function(idx) {
51 | return idx * 10;
52 | },
53 | },
54 | {
55 | name: "bar2",
56 | type: "bar",
57 | data: data2,
58 | animationDelay: function(idx) {
59 | return idx * 10 + 100;
60 | },
61 | },
62 | ],
63 | animationEasing: "elasticOut",
64 | animationDelayUpdate: function(idx) {
65 | return idx * 5;
66 | },
67 | },
68 | };
69 |
--------------------------------------------------------------------------------
/src/views/friutGame/components/areaForm.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | 立即购买
9 | 重置
10 |
11 |
12 |
13 |
14 |
15 |
56 |
57 |
62 |
63 |
--------------------------------------------------------------------------------
/src/components/Breadcrumb/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
15 | {{ item.meta.title }}
16 |
17 |
21 | {{ item.meta.title }}
22 |
23 |
24 |
25 |
26 |
27 |
65 |
78 |
--------------------------------------------------------------------------------
/src/views/echarts/rightTool/components/settingDialog/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
13 |
14 |
15 |
16 |
73 |
74 |
87 |
--------------------------------------------------------------------------------
/src/views/leetCode/array/array3.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | 给你一个数组 orders,表示客户在餐厅中完成的订单,确切地说, orders[i]=[customerNamei,tableNumberi,foodItemi] ,其中 customerNamei 是客户的姓名,tableNumberi 是客户所在餐桌的桌号,而 foodItemi 是客户点的餐品名称。
4 | 请你返回该餐厅的 点菜展示表 。在这张表中,表中第一行为标题,其第一列为餐桌桌号 “Table” ,后面每一列都是按字母顺序排列的餐品名称。接下来每一行中的项则表示每张餐桌订购的相应餐品数量,第一列应当填对应的桌号,后面依次填写下单的餐品数量。
5 | 注意:客户姓名不是点菜展示表的一部分。此外,表中的数据行应该按餐桌桌号升序排列。
6 | 来源:力扣(LeetCode)
7 | 链接:https://leetcode-cn.com/problems/display-table-of-food-orders-in-a-restaurant
8 |
9 |
10 |
11 |
61 |
62 |
64 |
--------------------------------------------------------------------------------
/src/views/documentation/index.vue:
--------------------------------------------------------------------------------
1 |
2 | asd
3 |
4 |
80 |
--------------------------------------------------------------------------------
/src/views/leetCode/array/array4.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
编写一个函数来查找字符串数组中的最长公共前缀。
4 |
如果不存在公共前缀,返回空字符串 ""。
5 |
https://leetcode-cn.com/problems/longest-common-prefix/
6 |
输入: ["flower","flow","flight"]
7 |
输出: "fl"
8 |
输入: ["dog","racecar","car"]
9 |
输出: ""
10 |
解释: 输入不存在公共前缀。
11 |
思路:
12 |
数组里面两两分别匹配,找出最大子字符串(deep函数)
13 |
找到两两匹配的最大字符串后,利用splice塞进原有的数组里面,判断此时arr的长度是否大于等于,如果是则继续递归,如果不是则返回该字符串
14 |
15 |
16 |
17 |
76 |
77 |
--------------------------------------------------------------------------------
/src/components/G2Template/g2Template.vue:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
12 |
84 |
85 |
--------------------------------------------------------------------------------
/src/views/echarts/utils/history.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable indent */
2 | import { cloneDeep, isEqual } from "lodash";
3 | import { Message } from "element-ui";
4 | class History {
5 | state = []; // 历史状态
6 | index = 0; // 当前状态下标
7 | maxState = 20; // 最大保存状态个数 (防止爆栈)
8 | setState(state) {
9 | debounce(() => {
10 | console.log(this.checkRepeat(state));
11 | if (this.checkRepeat(state)) {
12 | // 判断是否是重复对象进来
13 | return;
14 | }
15 |
16 | // 限制长度
17 | if (this.state.length >= this.maxState) {
18 | this.state.shift();
19 | }
20 | // 如果this.state.length 与this.index不一致说明,当前指针发生了变化,所以将指针后面的都去掉
21 | if (this.index < this.state.length - 1) {
22 | this.state.splice(this.index + 1, this.state.length - 1);
23 | }
24 | this.state.push(cloneDeep(state));
25 | this.index = this.state.length - 1; // 方便下标的计算 都从0开始计算
26 | }, 200);
27 | }
28 |
29 | getState() {
30 | return this.state;
31 | }
32 |
33 | replaceState() {
34 | // 撤销
35 | if (this.index > 0) {
36 | this.index--;
37 | let state = cloneDeep(this.state[this.index]);
38 | return state;
39 | } else {
40 | // alert("已经无法再进行撤回");
41 | Message({
42 | message: "无法再撤销操作",
43 | type: "warning",
44 | });
45 | }
46 | }
47 |
48 | unReplaceState() {
49 | if (this.state.length - 1 > this.index) {
50 | // 反撤销
51 | this.index++;
52 | let state = cloneDeep(this.state[this.index]);
53 | return state;
54 | } else {
55 | Message({
56 | message: "无法再进行前进操作",
57 | type: "warning",
58 | });
59 | }
60 | }
61 |
62 | // 检验是否重复元素
63 | checkRepeat(snapshot) {
64 | const next = snapshot;
65 | let prev;
66 | if (this.index >= 0) {
67 | prev = this.state[this.index];
68 | } else {
69 | prev = {};
70 | }
71 | // if(isEqual(next,prev))
72 | return isEqual(next, prev);
73 | }
74 | }
75 | export default History;
76 | let timeout = null;
77 | /* eslint-disable valid-jsdoc */
78 | /**
79 | * 去抖函数封装体
80 | * @param {Fun} fn 执行函数
81 | * @param {Number} wait 触发时间
82 | */
83 | export function debounce(fn, wait) {
84 | if (timeout !== null) {
85 | clearTimeout(timeout);
86 | }
87 | timeout = setTimeout(fn, wait);
88 | }
89 |
--------------------------------------------------------------------------------
/src/views/echarts/echartComponent/data/pie/pieNest/pieNest.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable indent */
2 | export const pieNest = {
3 | type: "pie",
4 | name: "玫瑰饼图",
5 | images: require("@/assets/images/pie-nest.jpg"),
6 | optionsData: {
7 | tooltip: {
8 | trigger: "item",
9 | formatter: "{a}
{b}: {c} ({d}%)",
10 | },
11 | legend: {
12 | orient: "vertical",
13 | left: 10,
14 | data: [
15 | "直达",
16 | "营销广告",
17 | "搜索引擎",
18 | "邮件营销",
19 | "联盟广告",
20 | "视频广告",
21 | "百度",
22 | "谷歌",
23 | "必应",
24 | "其他",
25 | ],
26 | },
27 | series: [
28 | {
29 | name: "访问来源",
30 | type: "pie",
31 | selectedMode: "single",
32 | radius: [0, "30%"],
33 |
34 | label: {
35 | position: "inner",
36 | },
37 | labelLine: {
38 | show: false,
39 | },
40 | data: [
41 | { value: 335, name: "直达", selected: true },
42 | { value: 679, name: "营销广告" },
43 | { value: 1548, name: "搜索引擎" },
44 | ],
45 | },
46 | {
47 | name: "访问来源",
48 | type: "pie",
49 | radius: ["40%", "55%"],
50 | label: {
51 | formatter: "{a|{a}}{abg|}\n{hr|}\n {b|{b}:}{c} {per|{d}%} ",
52 | backgroundColor: "#eee",
53 | borderColor: "#aaa",
54 | borderWidth: 1,
55 | borderRadius: 4,
56 | rich: {
57 | a: {
58 | color: "#999",
59 | lineHeight: 22,
60 | align: "center",
61 | },
62 | hr: {
63 | borderColor: "#aaa",
64 | width: "100%",
65 | borderWidth: 0.5,
66 | height: 0,
67 | },
68 | b: {
69 | fontSize: 16,
70 | lineHeight: 33,
71 | },
72 | per: {
73 | color: "#eee",
74 | backgroundColor: "#334455",
75 | padding: [2, 4],
76 | borderRadius: 2,
77 | },
78 | },
79 | },
80 | data: [
81 | { value: 335, name: "直达" },
82 | { value: 310, name: "邮件营销" },
83 | { value: 234, name: "联盟广告" },
84 | { value: 135, name: "视频广告" },
85 | { value: 1048, name: "百度" },
86 | { value: 251, name: "谷歌" },
87 | { value: 147, name: "必应" },
88 | { value: 102, name: "其他" },
89 | ],
90 | },
91 | ],
92 | },
93 | };
94 |
--------------------------------------------------------------------------------
/src/icons/svg/shopping.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/views/echarts/echartComponent/data/line/areaStack/areaStack.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable indent */
2 | import { defaultTtileKeys } from "../../../../rightTool/components/commonData/commonData";
3 | import { cloneDeep } from "lodash";
4 | import { legendData } from "../../../../rightTool/components/commonData/legendData";
5 | let currentLegendData = {
6 | data: ["邮件营销", "联盟广告", "视频广告", "直接访问", "搜索引擎"],
7 | };
8 | export const areaStack = {
9 | name: "堆叠折线图",
10 | type: "line",
11 | images: require("@/assets/images/area-stack.jpg"),
12 | optionsData: {
13 | title: defaultTtileKeys,
14 | tooltip: {
15 | trigger: "axis",
16 | axisPointer: {
17 | type: "cross",
18 | label: {
19 | backgroundColor: "#6a7985",
20 | },
21 | },
22 | },
23 | legend: Object.assign({}, cloneDeep(legendData), currentLegendData),
24 | toolbox: {
25 | feature: {
26 | saveAsImage: {},
27 | },
28 | },
29 | grid: {
30 | left: "3%",
31 | right: "4%",
32 | bottom: "3%",
33 | containLabel: true,
34 | },
35 | xAxis: [
36 | {
37 | type: "category",
38 | boundaryGap: false,
39 | data: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"],
40 | },
41 | ],
42 | yAxis: [
43 | {
44 | type: "value",
45 | },
46 | ],
47 | series: [
48 | {
49 | name: "邮件营销",
50 | type: "line",
51 | stack: "总量",
52 | areaStyle: {},
53 | data: [120, 132, 101, 134, 90, 230, 210],
54 | },
55 | {
56 | name: "联盟广告",
57 | type: "line",
58 | stack: "总量",
59 | areaStyle: {},
60 | data: [220, 182, 191, 234, 290, 330, 310],
61 | },
62 | {
63 | name: "视频广告",
64 | type: "line",
65 | stack: "总量",
66 | areaStyle: {},
67 | data: [150, 232, 201, 154, 190, 330, 410],
68 | },
69 | {
70 | name: "直接访问",
71 | type: "line",
72 | stack: "总量",
73 | areaStyle: {},
74 | data: [320, 332, 301, 334, 390, 330, 320],
75 | },
76 | {
77 | name: "搜索引擎",
78 | type: "line",
79 | stack: "总量",
80 | label: {
81 | normal: {
82 | show: true,
83 | position: "top",
84 | },
85 | },
86 | areaStyle: {},
87 | data: [820, 932, 901, 934, 1290, 1330, 1320],
88 | },
89 | ],
90 | },
91 | };
92 |
--------------------------------------------------------------------------------
/src/views/echarts/echartComponent/data/line/lineMarker/lineMarker.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable indent */
2 | import { defaultTtileKeys } from "../../../../rightTool/components/commonData/commonData";
3 | import { cloneDeep } from "lodash";
4 | import { legendData } from "../../../../rightTool/components/commonData/legendData";
5 | let currentLegendData = {
6 | data: ["最高气温", "最低气温"],
7 | };
8 | export const lineMarker = {
9 | name: "平滑折线图",
10 | type: "line",
11 | images: require("@/assets/images/line-marker.jpg"),
12 | optionsData: {
13 | title: defaultTtileKeys,
14 | legend: Object.assign({}, cloneDeep(legendData), currentLegendData),
15 | tooltip: {
16 | trigger: "axis",
17 | },
18 | toolbox: {
19 | show: true,
20 | feature: {
21 | dataZoom: {
22 | yAxisIndex: "none",
23 | },
24 | dataView: { readOnly: false },
25 | magicType: { type: ["line", "bar"] },
26 | restore: {},
27 | saveAsImage: {},
28 | },
29 | },
30 | xAxis: {
31 | type: "category",
32 | boundaryGap: false,
33 | data: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"],
34 | },
35 | yAxis: {
36 | type: "value",
37 | axisLabel: {
38 | formatter: "{value} °C",
39 | },
40 | },
41 | series: [
42 | {
43 | name: "最高气温",
44 | type: "line",
45 | data: [11, 11, 15, 13, 12, 13, 10],
46 | markPoint: {
47 | data: [
48 | { type: "max", name: "最大值" },
49 | { type: "min", name: "最小值" },
50 | ],
51 | },
52 | markLine: {
53 | data: [{ type: "average", name: "平均值" }],
54 | },
55 | },
56 | {
57 | name: "最低气温",
58 | type: "line",
59 | data: [1, -2, 2, 5, 3, 2, 0],
60 | markPoint: {
61 | data: [{ name: "周最低", value: -2, xAxis: 1, yAxis: -1.5 }],
62 | },
63 | markLine: {
64 | data: [
65 | { type: "average", name: "平均值" },
66 | [
67 | {
68 | symbol: "none",
69 | x: "90%",
70 | yAxis: "max",
71 | },
72 | {
73 | symbol: "circle",
74 | label: {
75 | position: "start",
76 | formatter: "最大值",
77 | },
78 | type: "max",
79 | name: "最高点",
80 | },
81 | ],
82 | ],
83 | },
84 | },
85 | ],
86 | },
87 | };
88 |
--------------------------------------------------------------------------------
/src/views/treeSelect/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | 获取当前选择的数据
9 | 清空当前数据
10 |
11 |
12 |
13 |
14 |
15 |
91 |
92 |
--------------------------------------------------------------------------------
/src/icons/svg/dashboard.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/views/leetCode/BinaryTree/BinaryTree3.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
给定一个包含了一些 0 和 1 的非空二维数组 grid 。
4 |
一个 岛屿 是由一些相邻的 1 (代表土地) 构成的组合,这里的「相邻」要求两个 1 必须在水平或者竖直方向上相邻。你可以假设 grid 的四个边缘都被 0(代表水)包围着。
5 |
找到给定的二维数组中最大的岛屿面积。(如果没有岛屿,则返回面积为 0 。)
6 |
链接:https://leetcode-cn.com/problems/max-area-of-island
7 |
8 | [[0,0,1,0,0,0,0,1,0,0,0,0,0],
9 | [0,0,0,0,0,0,0,1,1,1,0,0,0],
10 | [0,1,1,0,1,0,0,0,0,0,0,0,0],
11 | [0,1,0,0,1,1,0,0,1,0,1,0,0],
12 | [0,1,0,0,1,1,0,0,1,1,1,0,0],
13 | [0,0,0,0,0,0,0,0,0,0,1,0,0],
14 | [0,0,0,0,0,0,0,1,1,1,0,0,0],
15 | [0,0,0,0,0,0,0,1,1,0,0,0,0]]
16 |
17 |
对于上面这个给定矩阵应返回 6。注意答案不应该是 11 ,因为岛屿只能包含水平或垂直的四个方向的 1 。
18 |
19 |
20 |
21 |
66 |
67 |
--------------------------------------------------------------------------------
/src/views/echarts/rightTool/components/baseAttr.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
18 |
19 |
20 |
21 |
22 |
23 |
58 |
59 |
79 |
80 |
--------------------------------------------------------------------------------
/src/utils/validate.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable valid-jsdoc */
2 | /**
3 | * Created by PanJiaChen on 16/11/18.
4 | */
5 |
6 | /**
7 | * @param {string} path
8 | * @returns {Boolean}
9 | */
10 | export function isExternal(path) {
11 | return /^(https?:|mailto:|tel:)/.test(path);
12 | }
13 |
14 | /**
15 | * @param {string} str
16 | * @returns {Boolean}
17 | */
18 | export function validUsername(str) {
19 | const validMap = ["admin", "editor"];
20 | return validMap.indexOf(str.trim()) >= 0;
21 | }
22 |
23 | /**
24 | * @param {string} url
25 | * @returns {Boolean}
26 | */
27 | export function validURL(url) {
28 | const reg = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/;
29 | return reg.test(url);
30 | }
31 |
32 | /**
33 | * @param {string} str
34 | * @returns {Boolean}
35 | */
36 | export function validLowerCase(str) {
37 | const reg = /^[a-z]+$/;
38 | return reg.test(str);
39 | }
40 |
41 | /**
42 | * @param {string} str
43 | * @returns {Boolean}
44 | */
45 | export function validUpperCase(str) {
46 | const reg = /^[A-Z]+$/;
47 | return reg.test(str);
48 | }
49 |
50 | /**
51 | * @param {string} str
52 | * @returns {Boolean}
53 | */
54 | export function validAlphabets(str) {
55 | const reg = /^[A-Za-z]+$/;
56 | return reg.test(str);
57 | }
58 |
59 | /**
60 | * @param {string} email
61 | * @returns {Boolean}
62 | */
63 | export function validEmail(email) {
64 | const reg = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
65 | return reg.test(email);
66 | }
67 |
68 | /**
69 | * @param {string} str
70 | * @returns {Boolean}
71 | */
72 | export function isString(str) {
73 | if (typeof str === "string" || str instanceof String) {
74 | return true;
75 | }
76 | return false;
77 | }
78 |
79 | /**
80 | * @param {Array} arg
81 | * @returns {Boolean}
82 | */
83 | export function isArray(arg) {
84 | if (typeof Array.isArray === "undefined") {
85 | return Object.prototype.toString.call(arg) === "[object Array]";
86 | }
87 | return Array.isArray(arg);
88 | }
89 |
--------------------------------------------------------------------------------