├── VueStudy00-HelloWorld ├── static │ └── .gitkeep ├── .eslintignore ├── test │ ├── unit │ │ ├── setup.js │ │ ├── .eslintrc │ │ ├── specs │ │ │ └── HelloWorld.spec.js │ │ └── jest.conf.js │ └── e2e │ │ ├── specs │ │ └── test.js │ │ └── custom-assertions │ │ └── elementCount.js ├── config │ ├── prod.env.js │ ├── test.env.js │ └── dev.env.js ├── build │ ├── logo.png │ └── vue-loader.conf.js ├── src │ ├── assets │ │ └── logo.png │ ├── router │ │ └── index.js │ ├── main.js │ └── App.vue ├── .editorconfig ├── .postcssrc.js ├── .gitignore ├── index.html ├── .babelrc ├── .eslintrc.js └── README.md ├── VueStudy07-Vuex ├── vuex-demo │ ├── static │ │ └── .gitkeep │ ├── .eslintignore │ ├── test │ │ ├── unit │ │ │ ├── setup.js │ │ │ ├── .eslintrc │ │ │ ├── specs │ │ │ │ └── HelloWorld.spec.js │ │ │ └── jest.conf.js │ │ └── e2e │ │ │ ├── specs │ │ │ └── test.js │ │ │ └── custom-assertions │ │ │ └── elementCount.js │ ├── config │ │ ├── prod.env.js │ │ ├── test.env.js │ │ └── dev.env.js │ ├── build │ │ ├── logo.png │ │ └── vue-loader.conf.js │ ├── src │ │ ├── assets │ │ │ └── logo.png │ │ ├── router │ │ │ └── index.js │ │ ├── components │ │ │ └── HelloWorld.vue │ │ ├── main.js │ │ ├── store │ │ │ └── store.js │ │ └── App.vue │ ├── .editorconfig │ ├── .postcssrc.js │ ├── .gitignore │ ├── index.html │ ├── .babelrc │ ├── README.md │ └── .eslintrc.js └── README.md ├── VueStudy08-JWT ├── jwt-demo-old │ ├── static │ │ └── .gitkeep │ ├── .eslintignore │ ├── test │ │ ├── unit │ │ │ ├── setup.js │ │ │ ├── .eslintrc │ │ │ ├── specs │ │ │ │ └── HelloWorld.spec.js │ │ │ └── jest.conf.js │ │ └── e2e │ │ │ ├── specs │ │ │ └── test.js │ │ │ └── custom-assertions │ │ │ └── elementCount.js │ ├── config │ │ ├── prod.env.js │ │ ├── test.env.js │ │ └── dev.env.js │ ├── build │ │ ├── logo.png │ │ └── vue-loader.conf.js │ ├── src │ │ ├── assets │ │ │ └── logo.png │ │ ├── App.vue │ │ ├── router │ │ │ └── index.js │ │ └── components │ │ │ └── UserList.vue │ ├── .editorconfig │ ├── .postcssrc.js │ ├── .gitignore │ ├── index.html │ ├── .babelrc │ ├── .eslintrc.js │ └── util │ │ └── util.js ├── jwt-demo │ ├── static │ │ └── .gitkeep │ ├── .eslintignore │ ├── favicon.ico │ ├── build │ │ ├── logo.png │ │ └── vue-loader.conf.js │ ├── .travis.yml │ ├── src │ │ ├── assets │ │ │ └── 404_images │ │ │ │ ├── 404.png │ │ │ │ └── 404_cloud.png │ │ ├── views │ │ │ ├── nested │ │ │ │ ├── menu2 │ │ │ │ │ └── index.vue │ │ │ │ └── menu1 │ │ │ │ │ ├── menu1-3 │ │ │ │ │ └── index.vue │ │ │ │ │ ├── index.vue │ │ │ │ │ ├── menu1-2 │ │ │ │ │ ├── menu1-2-1 │ │ │ │ │ │ └── index.vue │ │ │ │ │ ├── menu1-2-2 │ │ │ │ │ │ └── index.vue │ │ │ │ │ └── index.vue │ │ │ │ │ └── menu1-1 │ │ │ │ │ └── index.vue │ │ │ ├── layout │ │ │ │ └── components │ │ │ │ │ ├── index.js │ │ │ │ │ ├── Sidebar │ │ │ │ │ ├── Item.vue │ │ │ │ │ └── Link.vue │ │ │ │ │ └── AppMain.vue │ │ │ └── dashboard │ │ │ │ └── index.vue │ │ ├── api │ │ │ ├── table.js │ │ │ └── login.js │ │ ├── icons │ │ │ ├── svg │ │ │ │ ├── link.svg │ │ │ │ ├── user.svg │ │ │ │ ├── example.svg │ │ │ │ ├── table.svg │ │ │ │ ├── password.svg │ │ │ │ ├── nested.svg │ │ │ │ └── eye.svg │ │ │ ├── index.js │ │ │ └── svgo.yml │ │ ├── store │ │ │ ├── getters.js │ │ │ └── index.js │ │ ├── utils │ │ │ ├── validate.js │ │ │ └── auth.js │ │ ├── App.vue │ │ ├── styles │ │ │ ├── mixin.scss │ │ │ ├── element-ui.scss │ │ │ ├── variables.scss │ │ │ └── transition.scss │ │ └── components │ │ │ └── SvgIcon │ │ │ └── index.vue │ ├── config │ │ ├── prod.env.js │ │ └── dev.env.js │ ├── .gitignore │ ├── .babelrc │ ├── .postcssrc.js │ ├── .editorconfig │ ├── index.html │ └── mock │ │ ├── utils.js │ │ ├── table.js │ │ └── index.js └── README.md ├── VueStudy06-Router ├── vue-router-01 │ ├── static │ │ └── .gitkeep │ ├── .eslintignore │ ├── test │ │ ├── unit │ │ │ ├── setup.js │ │ │ ├── .eslintrc │ │ │ ├── specs │ │ │ │ └── HelloWorld.spec.js │ │ │ └── jest.conf.js │ │ └── e2e │ │ │ ├── specs │ │ │ └── test.js │ │ │ └── custom-assertions │ │ │ └── elementCount.js │ ├── config │ │ ├── prod.env.js │ │ ├── test.env.js │ │ └── dev.env.js │ ├── build │ │ ├── logo.png │ │ └── vue-loader.conf.js │ ├── src │ │ ├── assets │ │ │ └── logo.png │ │ ├── components │ │ │ ├── Home.vue │ │ │ └── About.vue │ │ ├── router │ │ │ └── index.js │ │ ├── main.js │ │ └── App.vue │ ├── .editorconfig │ ├── .postcssrc.js │ ├── .gitignore │ ├── index.html │ ├── .babelrc │ ├── .eslintrc.js │ └── README.md ├── vue-router-02 │ ├── static │ │ └── .gitkeep │ ├── .eslintignore │ ├── test │ │ ├── unit │ │ │ ├── setup.js │ │ │ ├── .eslintrc │ │ │ ├── specs │ │ │ │ └── HelloWorld.spec.js │ │ │ └── jest.conf.js │ │ └── e2e │ │ │ ├── specs │ │ │ └── test.js │ │ │ └── custom-assertions │ │ │ └── elementCount.js │ ├── config │ │ ├── prod.env.js │ │ ├── test.env.js │ │ └── dev.env.js │ ├── build │ │ ├── logo.png │ │ └── vue-loader.conf.js │ ├── src │ │ ├── assets │ │ │ └── logo.png │ │ ├── components │ │ │ ├── About.vue │ │ │ ├── News.vue │ │ │ ├── Message.vue │ │ │ └── Home.vue │ │ ├── main.js │ │ ├── App.vue │ │ └── router │ │ │ └── index.js │ ├── .editorconfig │ ├── .postcssrc.js │ ├── .gitignore │ ├── index.html │ ├── .babelrc │ ├── .eslintrc.js │ └── README.md ├── vue-router-03 │ ├── static │ │ └── .gitkeep │ ├── .eslintignore │ ├── test │ │ ├── unit │ │ │ ├── setup.js │ │ │ ├── .eslintrc │ │ │ ├── specs │ │ │ │ └── HelloWorld.spec.js │ │ │ └── jest.conf.js │ │ └── e2e │ │ │ ├── specs │ │ │ └── test.js │ │ │ └── custom-assertions │ │ │ └── elementCount.js │ ├── config │ │ ├── prod.env.js │ │ ├── test.env.js │ │ └── dev.env.js │ ├── build │ │ ├── logo.png │ │ └── vue-loader.conf.js │ ├── src │ │ ├── assets │ │ │ └── logo.png │ │ ├── components │ │ │ ├── About.vue │ │ │ ├── Message.vue │ │ │ ├── NewsChild.vue │ │ │ ├── Home.vue │ │ │ └── News.vue │ │ ├── main.js │ │ └── App.vue │ ├── .editorconfig │ ├── .postcssrc.js │ ├── .gitignore │ ├── index.html │ ├── .babelrc │ └── .eslintrc.js ├── vue-router-04 │ ├── static │ │ └── .gitkeep │ ├── .eslintignore │ ├── test │ │ ├── unit │ │ │ ├── setup.js │ │ │ ├── .eslintrc │ │ │ ├── specs │ │ │ │ └── HelloWorld.spec.js │ │ │ └── jest.conf.js │ │ └── e2e │ │ │ ├── specs │ │ │ └── test.js │ │ │ └── custom-assertions │ │ │ └── elementCount.js │ ├── config │ │ ├── prod.env.js │ │ ├── test.env.js │ │ └── dev.env.js │ ├── build │ │ ├── logo.png │ │ └── vue-loader.conf.js │ ├── src │ │ ├── assets │ │ │ └── logo.png │ │ ├── components │ │ │ ├── About.vue │ │ │ ├── Message.vue │ │ │ ├── NewsChild.vue │ │ │ ├── Home.vue │ │ │ └── News.vue │ │ └── main.js │ ├── .editorconfig │ ├── .postcssrc.js │ ├── .gitignore │ ├── index.html │ ├── .babelrc │ ├── README.md │ └── .eslintrc.js ├── vue-router-05 │ ├── static │ │ └── .gitkeep │ ├── .eslintignore │ ├── test │ │ ├── unit │ │ │ ├── setup.js │ │ │ ├── .eslintrc │ │ │ ├── specs │ │ │ │ └── HelloWorld.spec.js │ │ │ └── jest.conf.js │ │ └── e2e │ │ │ ├── specs │ │ │ └── test.js │ │ │ └── custom-assertions │ │ │ └── elementCount.js │ ├── config │ │ ├── prod.env.js │ │ ├── test.env.js │ │ └── dev.env.js │ ├── build │ │ ├── logo.png │ │ └── vue-loader.conf.js │ ├── src │ │ ├── assets │ │ │ └── logo.png │ │ ├── components │ │ │ ├── Message.vue │ │ │ ├── NewsChild.vue │ │ │ ├── Home.vue │ │ │ └── News.vue │ │ └── main.js │ ├── .editorconfig │ ├── .postcssrc.js │ ├── .gitignore │ ├── index.html │ ├── .babelrc │ ├── .eslintrc.js │ └── README.md └── README.md ├── VueStudy09-Cheerio ├── cheerio-demo │ ├── static │ │ └── .gitkeep │ ├── .eslintignore │ ├── config │ │ ├── prod.env.js │ │ └── dev.env.js │ ├── build │ │ ├── logo.png │ │ └── vue-loader.conf.js │ ├── src │ │ ├── assets │ │ │ └── logo.png │ │ ├── App.vue │ │ └── main.js │ ├── .editorconfig │ ├── .gitignore │ ├── .babelrc │ ├── .postcssrc.js │ ├── index.html │ ├── README.md │ └── .eslintrc.js └── README.md ├── VueStudy05-OfficialTemplates ├── my-webpack-simple-demo │ ├── static │ │ └── .gitkeep │ ├── .eslintignore │ ├── test │ │ ├── unit │ │ │ ├── setup.js │ │ │ ├── .eslintrc │ │ │ ├── specs │ │ │ │ └── HelloWorld.spec.js │ │ │ └── jest.conf.js │ │ └── e2e │ │ │ ├── specs │ │ │ └── test.js │ │ │ └── custom-assertions │ │ │ └── elementCount.js │ ├── config │ │ ├── prod.env.js │ │ ├── test.env.js │ │ └── dev.env.js │ ├── build │ │ ├── logo.png │ │ └── vue-loader.conf.js │ ├── src │ │ ├── assets │ │ │ └── logo.png │ │ ├── components │ │ │ └── HelloWorld.vue │ │ └── main.js │ ├── .editorconfig │ ├── .postcssrc.js │ ├── .gitignore │ ├── index.html │ ├── .babelrc │ ├── util │ │ └── util.js │ ├── README.md │ └── .eslintrc.js ├── my-webpack-simple-ui-demo │ ├── static │ │ └── .gitkeep │ ├── .eslintignore │ ├── test │ │ ├── unit │ │ │ ├── setup.js │ │ │ ├── .eslintrc │ │ │ ├── specs │ │ │ │ └── HelloWorld.spec.js │ │ │ └── jest.conf.js │ │ └── e2e │ │ │ ├── specs │ │ │ └── test.js │ │ │ └── custom-assertions │ │ │ └── elementCount.js │ ├── config │ │ ├── prod.env.js │ │ ├── test.env.js │ │ └── dev.env.js │ ├── build │ │ ├── logo.png │ │ └── vue-loader.conf.js │ ├── src │ │ ├── assets │ │ │ └── logo.png │ │ ├── components │ │ │ └── HelloWorld.vue │ │ └── main.js │ ├── .editorconfig │ ├── .postcssrc.js │ ├── .gitignore │ ├── index.html │ ├── .babelrc │ ├── util │ │ └── util.js │ └── .eslintrc.js ├── my-webpack-ui-axios-demo │ ├── static │ │ └── .gitkeep │ ├── .eslintignore │ ├── test │ │ ├── unit │ │ │ ├── setup.js │ │ │ ├── .eslintrc │ │ │ ├── specs │ │ │ │ └── HelloWorld.spec.js │ │ │ └── jest.conf.js │ │ └── e2e │ │ │ ├── specs │ │ │ └── test.js │ │ │ └── custom-assertions │ │ │ └── elementCount.js │ ├── config │ │ ├── prod.env.js │ │ ├── test.env.js │ │ └── dev.env.js │ ├── build │ │ ├── logo.png │ │ └── vue-loader.conf.js │ ├── src │ │ ├── assets │ │ │ └── logo.png │ │ ├── components │ │ │ └── HelloWorld.vue │ │ └── main.js │ ├── .editorconfig │ ├── .postcssrc.js │ ├── .gitignore │ ├── index.html │ ├── .babelrc │ ├── util │ │ └── util.js │ └── .eslintrc.js └── my-webpack-ui-axios-oauth-demo │ ├── static │ └── .gitkeep │ ├── .eslintignore │ ├── test │ ├── unit │ │ ├── setup.js │ │ ├── .eslintrc │ │ ├── specs │ │ │ └── HelloWorld.spec.js │ │ └── jest.conf.js │ └── e2e │ │ ├── specs │ │ └── test.js │ │ └── custom-assertions │ │ └── elementCount.js │ ├── config │ ├── prod.env.js │ ├── test.env.js │ └── dev.env.js │ ├── build │ ├── logo.png │ └── vue-loader.conf.js │ ├── src │ └── assets │ │ └── logo.png │ ├── .editorconfig │ ├── .postcssrc.js │ ├── .gitignore │ ├── index.html │ ├── .babelrc │ ├── util │ └── util.js │ └── .eslintrc.js ├── .gitattributes ├── VueStudy03-Ajax └── SBAPI │ ├── .gitignore │ ├── src │ └── main │ │ ├── java │ │ └── com │ │ │ └── wang │ │ │ ├── service │ │ │ ├── IUserService.java │ │ │ └── impl │ │ │ │ └── UserServiceImpl.java │ │ │ ├── mapper │ │ │ └── UserMapper.java │ │ │ ├── Application.java │ │ │ └── config │ │ │ └── WebMvcConfig.java │ │ └── resources │ │ ├── sql │ │ └── MySQL.sql │ │ └── mapper │ │ └── UserMapper.xml │ └── README.md ├── VueStudy04-OAuth ├── SBAPIOAuth │ ├── .gitignore │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── wang │ │ │ ├── mapper │ │ │ └── UserMapper.java │ │ │ ├── Application.java │ │ │ ├── service │ │ │ └── IUserService.java │ │ │ ├── entity │ │ │ └── MyUserDetails.java │ │ │ └── config │ │ │ └── WebMvcConfig.java │ │ └── resources │ │ ├── sql │ │ └── MySQL.sql │ │ └── mapper │ │ └── UserMapper.xml └── README.md ├── VueStudy01-GettingStarted └── README.md └── VueStudy02-Components └── Part-1 └── component1-1-全局组件.html /VueStudy00-HelloWorld/static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /VueStudy07-Vuex/vuex-demo/static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo-old/static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-01/static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-02/static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-03/static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-04/static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-05/static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /VueStudy09-Cheerio/cheerio-demo/static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-demo/static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-ui-demo/static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-demo/static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.js linguist-language=Vue 2 | *.html linguist-language=Vue 3 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-oauth-demo/static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/.eslintignore: -------------------------------------------------------------------------------- 1 | build/*.js 2 | config/*.js 3 | src/assets 4 | -------------------------------------------------------------------------------- /VueStudy09-Cheerio/cheerio-demo/.eslintignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /config/ 3 | /dist/ 4 | /*.js 5 | -------------------------------------------------------------------------------- /VueStudy00-HelloWorld/.eslintignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /config/ 3 | /dist/ 4 | /*.js 5 | /test/unit/coverage/ 6 | -------------------------------------------------------------------------------- /VueStudy00-HelloWorld/test/unit/setup.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | Vue.config.productionTip = false 4 | -------------------------------------------------------------------------------- /VueStudy07-Vuex/vuex-demo/.eslintignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /config/ 3 | /dist/ 4 | /*.js 5 | /test/unit/coverage/ 6 | -------------------------------------------------------------------------------- /VueStudy07-Vuex/vuex-demo/test/unit/setup.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | Vue.config.productionTip = false 4 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo-old/.eslintignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /config/ 3 | /dist/ 4 | /*.js 5 | /test/unit/coverage/ 6 | -------------------------------------------------------------------------------- /VueStudy00-HelloWorld/config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"' 4 | } 5 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-01/.eslintignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /config/ 3 | /dist/ 4 | /*.js 5 | /test/unit/coverage/ 6 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-01/test/unit/setup.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | Vue.config.productionTip = false 4 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-02/.eslintignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /config/ 3 | /dist/ 4 | /*.js 5 | /test/unit/coverage/ 6 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-02/test/unit/setup.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | Vue.config.productionTip = false 4 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-03/.eslintignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /config/ 3 | /dist/ 4 | /*.js 5 | /test/unit/coverage/ 6 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-03/test/unit/setup.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | Vue.config.productionTip = false 4 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-04/.eslintignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /config/ 3 | /dist/ 4 | /*.js 5 | /test/unit/coverage/ 6 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-04/test/unit/setup.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | Vue.config.productionTip = false 4 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-05/.eslintignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /config/ 3 | /dist/ 4 | /*.js 5 | /test/unit/coverage/ 6 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-05/test/unit/setup.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | Vue.config.productionTip = false 4 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo-old/test/unit/setup.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | Vue.config.productionTip = false 4 | -------------------------------------------------------------------------------- /VueStudy00-HelloWorld/build/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolyw/VueStudy/HEAD/VueStudy00-HelloWorld/build/logo.png -------------------------------------------------------------------------------- /VueStudy07-Vuex/vuex-demo/config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"' 4 | } 5 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo-old/config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"' 4 | } 5 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolyw/VueStudy/HEAD/VueStudy08-JWT/jwt-demo/favicon.ico -------------------------------------------------------------------------------- /VueStudy00-HelloWorld/test/unit/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "jest": true 4 | }, 5 | "globals": { 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-01/config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"' 4 | } 5 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-02/config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"' 4 | } 5 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-03/config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"' 4 | } 5 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-04/config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"' 4 | } 5 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-05/config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"' 4 | } 5 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/build/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolyw/VueStudy/HEAD/VueStudy08-JWT/jwt-demo/build/logo.png -------------------------------------------------------------------------------- /VueStudy09-Cheerio/cheerio-demo/config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"' 4 | } 5 | -------------------------------------------------------------------------------- /VueStudy00-HelloWorld/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolyw/VueStudy/HEAD/VueStudy00-HelloWorld/src/assets/logo.png -------------------------------------------------------------------------------- /VueStudy07-Vuex/vuex-demo/build/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolyw/VueStudy/HEAD/VueStudy07-Vuex/vuex-demo/build/logo.png -------------------------------------------------------------------------------- /VueStudy07-Vuex/vuex-demo/test/unit/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "jest": true 4 | }, 5 | "globals": { 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo-old/test/unit/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "jest": true 4 | }, 5 | "globals": { 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-demo/.eslintignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /config/ 3 | /dist/ 4 | /*.js 5 | /test/unit/coverage/ 6 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-demo/test/unit/setup.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | Vue.config.productionTip = false 4 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-demo/.eslintignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /config/ 3 | /dist/ 4 | /*.js 5 | /test/unit/coverage/ 6 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-01/test/unit/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "jest": true 4 | }, 5 | "globals": { 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-02/test/unit/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "jest": true 4 | }, 5 | "globals": { 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-03/test/unit/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "jest": true 4 | }, 5 | "globals": { 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-04/test/unit/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "jest": true 4 | }, 5 | "globals": { 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-05/test/unit/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "jest": true 4 | }, 5 | "globals": { 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo-old/build/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolyw/VueStudy/HEAD/VueStudy08-JWT/jwt-demo-old/build/logo.png -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-ui-demo/.eslintignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /config/ 3 | /dist/ 4 | /*.js 5 | /test/unit/coverage/ 6 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-ui-demo/test/unit/setup.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | Vue.config.productionTip = false 4 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-demo/test/unit/setup.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | Vue.config.productionTip = false 4 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-01/build/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolyw/VueStudy/HEAD/VueStudy06-Router/vue-router-01/build/logo.png -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-02/build/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolyw/VueStudy/HEAD/VueStudy06-Router/vue-router-02/build/logo.png -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-03/build/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolyw/VueStudy/HEAD/VueStudy06-Router/vue-router-03/build/logo.png -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-04/build/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolyw/VueStudy/HEAD/VueStudy06-Router/vue-router-04/build/logo.png -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-05/build/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolyw/VueStudy/HEAD/VueStudy06-Router/vue-router-05/build/logo.png -------------------------------------------------------------------------------- /VueStudy07-Vuex/vuex-demo/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolyw/VueStudy/HEAD/VueStudy07-Vuex/vuex-demo/src/assets/logo.png -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: stable 3 | script: npm run test 4 | notifications: 5 | email: false 6 | -------------------------------------------------------------------------------- /VueStudy09-Cheerio/cheerio-demo/build/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolyw/VueStudy/HEAD/VueStudy09-Cheerio/cheerio-demo/build/logo.png -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-demo/config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"' 4 | } 5 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-oauth-demo/.eslintignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /config/ 3 | /dist/ 4 | /*.js 5 | /test/unit/coverage/ 6 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-oauth-demo/test/unit/setup.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | Vue.config.productionTip = false 4 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo-old/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolyw/VueStudy/HEAD/VueStudy08-JWT/jwt-demo-old/src/assets/logo.png -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-ui-demo/config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"' 4 | } 5 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-demo/config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"' 4 | } 5 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-01/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolyw/VueStudy/HEAD/VueStudy06-Router/vue-router-01/src/assets/logo.png -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-02/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolyw/VueStudy/HEAD/VueStudy06-Router/vue-router-02/src/assets/logo.png -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-03/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolyw/VueStudy/HEAD/VueStudy06-Router/vue-router-03/src/assets/logo.png -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-04/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolyw/VueStudy/HEAD/VueStudy06-Router/vue-router-04/src/assets/logo.png -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-05/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolyw/VueStudy/HEAD/VueStudy06-Router/vue-router-05/src/assets/logo.png -------------------------------------------------------------------------------- /VueStudy09-Cheerio/cheerio-demo/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolyw/VueStudy/HEAD/VueStudy09-Cheerio/cheerio-demo/src/assets/logo.png -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-demo/test/unit/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "jest": true 4 | }, 5 | "globals": { 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-oauth-demo/config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"' 4 | } 5 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/assets/404_images/404.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolyw/VueStudy/HEAD/VueStudy08-JWT/jwt-demo/src/assets/404_images/404.png -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-ui-demo/test/unit/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "jest": true 4 | }, 5 | "globals": { 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-demo/test/unit/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "jest": true 4 | }, 5 | "globals": { 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = { 4 | //You can set the vue-loader configuration by yourself. 5 | } 6 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"', 4 | BASE_API: '"http://localhost:8080"', 5 | } 6 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-oauth-demo/test/unit/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "jest": true 4 | }, 5 | "globals": { 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/assets/404_images/404_cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolyw/VueStudy/HEAD/VueStudy08-JWT/jwt-demo/src/assets/404_images/404_cloud.png -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-demo/build/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolyw/VueStudy/HEAD/VueStudy05-OfficialTemplates/my-webpack-simple-demo/build/logo.png -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-ui-demo/build/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolyw/VueStudy/HEAD/VueStudy05-OfficialTemplates/my-webpack-simple-ui-demo/build/logo.png -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-demo/build/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolyw/VueStudy/HEAD/VueStudy05-OfficialTemplates/my-webpack-ui-axios-demo/build/logo.png -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/views/nested/menu2/index.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-demo/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolyw/VueStudy/HEAD/VueStudy05-OfficialTemplates/my-webpack-simple-demo/src/assets/logo.png -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-ui-demo/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolyw/VueStudy/HEAD/VueStudy05-OfficialTemplates/my-webpack-simple-ui-demo/src/assets/logo.png -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-demo/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolyw/VueStudy/HEAD/VueStudy05-OfficialTemplates/my-webpack-ui-axios-demo/src/assets/logo.png -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-oauth-demo/build/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolyw/VueStudy/HEAD/VueStudy05-OfficialTemplates/my-webpack-ui-axios-oauth-demo/build/logo.png -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-oauth-demo/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dolyw/VueStudy/HEAD/VueStudy05-OfficialTemplates/my-webpack-ui-axios-oauth-demo/src/assets/logo.png -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/views/layout/components/index.js: -------------------------------------------------------------------------------- 1 | export { default as Navbar } from './Navbar' 2 | export { default as Sidebar } from './Sidebar' 3 | export { default as AppMain } from './AppMain' 4 | -------------------------------------------------------------------------------- /VueStudy00-HelloWorld/config/test.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const devEnv = require('./dev.env') 4 | 5 | module.exports = merge(devEnv, { 6 | NODE_ENV: '"testing"' 7 | }) 8 | -------------------------------------------------------------------------------- /VueStudy00-HelloWorld/config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"' 7 | }) 8 | -------------------------------------------------------------------------------- /VueStudy07-Vuex/vuex-demo/config/test.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const devEnv = require('./dev.env') 4 | 5 | module.exports = merge(devEnv, { 6 | NODE_ENV: '"testing"' 7 | }) 8 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo-old/config/test.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const devEnv = require('./dev.env') 4 | 5 | module.exports = merge(devEnv, { 6 | NODE_ENV: '"testing"' 7 | }) 8 | -------------------------------------------------------------------------------- /VueStudy00-HelloWorld/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-01/config/test.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const devEnv = require('./dev.env') 4 | 5 | module.exports = merge(devEnv, { 6 | NODE_ENV: '"testing"' 7 | }) 8 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-02/config/test.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const devEnv = require('./dev.env') 4 | 5 | module.exports = merge(devEnv, { 6 | NODE_ENV: '"testing"' 7 | }) 8 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-03/config/test.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const devEnv = require('./dev.env') 4 | 5 | module.exports = merge(devEnv, { 6 | NODE_ENV: '"testing"' 7 | }) 8 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-04/config/test.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const devEnv = require('./dev.env') 4 | 5 | module.exports = merge(devEnv, { 6 | NODE_ENV: '"testing"' 7 | }) 8 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-05/config/test.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const devEnv = require('./dev.env') 4 | 5 | module.exports = merge(devEnv, { 6 | NODE_ENV: '"testing"' 7 | }) 8 | -------------------------------------------------------------------------------- /VueStudy07-Vuex/vuex-demo/config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"' 7 | }) 8 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/views/nested/menu1/menu1-3/index.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-01/config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"' 7 | }) 8 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-02/config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"' 7 | }) 8 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-03/config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"' 7 | }) 8 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-04/config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"' 7 | }) 8 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-05/config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"' 7 | }) 8 | -------------------------------------------------------------------------------- /VueStudy07-Vuex/vuex-demo/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo-old/config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"' 7 | }) 8 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/views/nested/menu1/index.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /VueStudy09-Cheerio/cheerio-demo/config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"' 7 | }) 8 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-01/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-02/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-03/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-04/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-05/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo-old/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/views/nested/menu1/menu1-2/menu1-2-1/index.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/views/nested/menu1/menu1-2/menu1-2-2/index.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /VueStudy09-Cheerio/cheerio-demo/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/api/table.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | export function getList(params) { 4 | return request({ 5 | url: '/table/list', 6 | method: 'get', 7 | params 8 | }) 9 | } 10 | -------------------------------------------------------------------------------- /VueStudy03-Ajax/SBAPI/.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | ### Example user template template 3 | ### Example user template 4 | 5 | # IntelliJ project files 6 | .idea 7 | *.iml 8 | out 9 | gen 10 | target 11 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-demo/config/test.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const devEnv = require('./dev.env') 4 | 5 | module.exports = merge(devEnv, { 6 | NODE_ENV: '"testing"' 7 | }) 8 | -------------------------------------------------------------------------------- /VueStudy04-OAuth/SBAPIOAuth/.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | ### Example user template template 3 | ### Example user template 4 | 5 | # IntelliJ project files 6 | .idea 7 | *.iml 8 | out 9 | gen 10 | target 11 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-demo/config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"' 7 | }) 8 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-ui-demo/config/test.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const devEnv = require('./dev.env') 4 | 5 | module.exports = merge(devEnv, { 6 | NODE_ENV: '"testing"' 7 | }) 8 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-demo/config/test.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const devEnv = require('./dev.env') 4 | 5 | module.exports = merge(devEnv, { 6 | NODE_ENV: '"testing"' 7 | }) 8 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-demo/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-ui-demo/config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"' 7 | }) 8 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-demo/config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"' 7 | }) 8 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-oauth-demo/config/test.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const devEnv = require('./dev.env') 4 | 5 | module.exports = merge(devEnv, { 6 | NODE_ENV: '"testing"' 7 | }) 8 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/views/nested/menu1/menu1-1/index.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/views/nested/menu1/menu1-2/index.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-ui-demo/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-demo/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-oauth-demo/config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"' 7 | }) 8 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-oauth-demo/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /VueStudy09-Cheerio/cheerio-demo/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | /dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Editor directories and files 9 | .idea 10 | .vscode 11 | *.suo 12 | *.ntvs* 13 | *.njsproj 14 | *.sln 15 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | package-lock.json 8 | 9 | # Editor directories and files 10 | .idea 11 | .vscode 12 | *.suo 13 | *.ntvs* 14 | *.njsproj 15 | *.sln 16 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo-old/src/App.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 13 | 14 | 17 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins":["transform-vue-jsx", "transform-runtime"] 12 | } 13 | -------------------------------------------------------------------------------- /VueStudy00-HelloWorld/.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-import": {}, 6 | "postcss-url": {}, 7 | // to edit target browsers: use "browserslist" field in package.json 8 | "autoprefixer": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /VueStudy09-Cheerio/cheerio-demo/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-vue-jsx", "transform-runtime"] 12 | } 13 | -------------------------------------------------------------------------------- /VueStudy03-Ajax/SBAPI/src/main/java/com/wang/service/IUserService.java: -------------------------------------------------------------------------------- 1 | package com.wang.service; 2 | 3 | import com.wang.entity.User; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * 9 | * @author Wang926454 10 | * @date 2018/8/9 15:44 11 | */ 12 | public interface IUserService extends IBaseService{ 13 | } 14 | -------------------------------------------------------------------------------- /VueStudy07-Vuex/vuex-demo/.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-import": {}, 6 | "postcss-url": {}, 7 | // to edit target browsers: use "browserslist" field in package.json 8 | "autoprefixer": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo-old/.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-import": {}, 6 | "postcss-url": {}, 7 | // to edit target browsers: use "browserslist" field in package.json 8 | "autoprefixer": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-import": {}, 6 | "postcss-url": {}, 7 | // to edit target browsers: use "browserslist" field in package.json 8 | "autoprefixer": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"', 7 | BASE_API: '"http://localhost:8080"', 8 | // 是否开启代理, 重置后需重启vue-cli 9 | OPEN_PROXY: false 10 | }) 11 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/icons/svg/link.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /VueStudy03-Ajax/SBAPI/src/main/java/com/wang/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package com.wang.mapper; 2 | 3 | import com.wang.entity.User; 4 | import tk.mybatis.mapper.common.Mapper; 5 | 6 | /** 7 | * UserMapper 8 | * @author Wang926454 9 | * @date 2018/7/31 16:11 10 | */ 11 | public interface UserMapper extends Mapper { 12 | } -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-01/.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-import": {}, 6 | "postcss-url": {}, 7 | // to edit target browsers: use "browserslist" field in package.json 8 | "autoprefixer": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-02/.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-import": {}, 6 | "postcss-url": {}, 7 | // to edit target browsers: use "browserslist" field in package.json 8 | "autoprefixer": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-03/.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-import": {}, 6 | "postcss-url": {}, 7 | // to edit target browsers: use "browserslist" field in package.json 8 | "autoprefixer": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-04/.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-import": {}, 6 | "postcss-url": {}, 7 | // to edit target browsers: use "browserslist" field in package.json 8 | "autoprefixer": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-05/.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-import": {}, 6 | "postcss-url": {}, 7 | // to edit target browsers: use "browserslist" field in package.json 8 | "autoprefixer": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /VueStudy09-Cheerio/cheerio-demo/.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-import": {}, 6 | "postcss-url": {}, 7 | // to edit target browsers: use "browserslist" field in package.json 8 | "autoprefixer": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | end_of_line = lf 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | 12 | [*.md] 13 | insert_final_newline = false 14 | trim_trailing_whitespace = false 15 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/store/getters.js: -------------------------------------------------------------------------------- 1 | const getters = { 2 | sidebar: state => state.app.sidebar, 3 | device: state => state.app.device, 4 | token: state => state.user.token, 5 | avatar: state => state.user.avatar, 6 | name: state => state.user.name, 7 | roles: state => state.user.roles 8 | } 9 | export default getters 10 | -------------------------------------------------------------------------------- /VueStudy00-HelloWorld/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | /dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | /test/unit/coverage/ 8 | /test/e2e/reports/ 9 | selenium-debug.log 10 | 11 | package-lock.json 12 | 13 | # Editor directories and files 14 | .idea 15 | .vscode 16 | *.suo 17 | *.ntvs* 18 | *.njsproj 19 | *.sln 20 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-demo/.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-import": {}, 6 | "postcss-url": {}, 7 | // to edit target browsers: use "browserslist" field in package.json 8 | "autoprefixer": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/utils/validate.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by jiachenpan on 16/11/18. 3 | */ 4 | 5 | export function isvalidUsername(str) { 6 | const valid_map = ['admin', 'editor'] 7 | return valid_map.indexOf(str.trim()) >= 0 8 | } 9 | 10 | export function isExternal(path) { 11 | return /^(https?:|mailto:|tel:)/.test(path) 12 | } 13 | -------------------------------------------------------------------------------- /VueStudy00-HelloWorld/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | helloworld 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /VueStudy00-HelloWorld/src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Router from 'vue-router' 3 | import HelloWorld from '@/components/HelloWorld' 4 | 5 | Vue.use(Router) 6 | 7 | export default new Router({ 8 | routes: [ 9 | { 10 | path: '/', 11 | name: 'HelloWorld', 12 | component: HelloWorld 13 | } 14 | ] 15 | }) 16 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-ui-demo/.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-import": {}, 6 | "postcss-url": {}, 7 | // to edit target browsers: use "browserslist" field in package.json 8 | "autoprefixer": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-demo/.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-import": {}, 6 | "postcss-url": {}, 7 | // to edit target browsers: use "browserslist" field in package.json 8 | "autoprefixer": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /VueStudy07-Vuex/vuex-demo/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | /dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | /test/unit/coverage/ 8 | /test/e2e/reports/ 9 | selenium-debug.log 10 | 11 | package-lock.json 12 | 13 | # Editor directories and files 14 | .idea 15 | .vscode 16 | *.suo 17 | *.ntvs* 18 | *.njsproj 19 | *.sln 20 | -------------------------------------------------------------------------------- /VueStudy07-Vuex/vuex-demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | vuex-demo 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo-old/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | /dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | /test/unit/coverage/ 8 | /test/e2e/reports/ 9 | selenium-debug.log 10 | 11 | package-lock.json 12 | 13 | # Editor directories and files 14 | .idea 15 | .vscode 16 | *.suo 17 | *.ntvs* 18 | *.njsproj 19 | *.sln 20 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-oauth-demo/.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-import": {}, 6 | "postcss-url": {}, 7 | // to edit target browsers: use "browserslist" field in package.json 8 | "autoprefixer": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-01/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | /dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | /test/unit/coverage/ 8 | /test/e2e/reports/ 9 | selenium-debug.log 10 | 11 | package-lock.json 12 | 13 | # Editor directories and files 14 | .idea 15 | .vscode 16 | *.suo 17 | *.ntvs* 18 | *.njsproj 19 | *.sln 20 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-02/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | /dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | /test/unit/coverage/ 8 | /test/e2e/reports/ 9 | selenium-debug.log 10 | 11 | package-lock.json 12 | 13 | # Editor directories and files 14 | .idea 15 | .vscode 16 | *.suo 17 | *.ntvs* 18 | *.njsproj 19 | *.sln 20 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-03/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | /dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | /test/unit/coverage/ 8 | /test/e2e/reports/ 9 | selenium-debug.log 10 | 11 | package-lock.json 12 | 13 | # Editor directories and files 14 | .idea 15 | .vscode 16 | *.suo 17 | *.ntvs* 18 | *.njsproj 19 | *.sln 20 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-04/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | /dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | /test/unit/coverage/ 8 | /test/e2e/reports/ 9 | selenium-debug.log 10 | 11 | package-lock.json 12 | 13 | # Editor directories and files 14 | .idea 15 | .vscode 16 | *.suo 17 | *.ntvs* 18 | *.njsproj 19 | *.sln 20 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-05/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | /dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | /test/unit/coverage/ 8 | /test/e2e/reports/ 9 | selenium-debug.log 10 | 11 | package-lock.json 12 | 13 | # Editor directories and files 14 | .idea 15 | .vscode 16 | *.suo 17 | *.ntvs* 18 | *.njsproj 19 | *.sln 20 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo-old/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | jwt-demo 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/App.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 22 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/icons/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import SvgIcon from '@/components/SvgIcon' // svg组件 3 | 4 | // register globally 5 | Vue.component('svg-icon', SvgIcon) 6 | 7 | const requireAll = requireContext => requireContext.keys().map(requireContext) 8 | const req = require.context('./svg', false, /\.svg$/) 9 | requireAll(req) 10 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-01/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | vue-router-01 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-02/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | vue-router-02 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-03/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | vue-router-03 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-04/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | vue-router-04 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-05/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | vue-router-05 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | vue-admin-template 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /VueStudy09-Cheerio/cheerio-demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | cheerio-demo 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/mock/utils.js: -------------------------------------------------------------------------------- 1 | export function param2Obj(url) { 2 | const search = url.split('?')[1] 3 | if (!search) { 4 | return {} 5 | } 6 | return JSON.parse( 7 | '{"' + 8 | decodeURIComponent(search) 9 | .replace(/"/g, '\\"') 10 | .replace(/&/g, '","') 11 | .replace(/=/g, '":"') + 12 | '"}' 13 | ) 14 | } 15 | -------------------------------------------------------------------------------- /VueStudy04-OAuth/SBAPIOAuth/src/main/java/com/wang/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package com.wang.mapper; 2 | 3 | import com.wang.entity.User; 4 | import tk.mybatis.mapper.common.Mapper; 5 | 6 | /** 7 | * UserMapper 8 | * @author Wang926454 9 | * @date 2018/7/31 16:11 10 | */ 11 | @org.apache.ibatis.annotations.Mapper 12 | public interface UserMapper extends Mapper { 13 | } -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-demo/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | /dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | /test/unit/coverage/ 8 | /test/e2e/reports/ 9 | selenium-debug.log 10 | 11 | package-lock.json 12 | 13 | # Editor directories and files 14 | .idea 15 | .vscode 16 | *.suo 17 | *.ntvs* 18 | *.njsproj 19 | *.sln 20 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-ui-demo/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | /dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | /test/unit/coverage/ 8 | /test/e2e/reports/ 9 | selenium-debug.log 10 | 11 | package-lock.json 12 | 13 | # Editor directories and files 14 | .idea 15 | .vscode 16 | *.suo 17 | *.ntvs* 18 | *.njsproj 19 | *.sln 20 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-demo/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | /dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | /test/unit/coverage/ 8 | /test/e2e/reports/ 9 | selenium-debug.log 10 | 11 | package-lock.json 12 | 13 | # Editor directories and files 14 | .idea 15 | .vscode 16 | *.suo 17 | *.ntvs* 18 | *.njsproj 19 | *.sln 20 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | import app from './modules/app' 4 | import user from './modules/user' 5 | import getters from './getters' 6 | 7 | Vue.use(Vuex) 8 | 9 | const store = new Vuex.Store({ 10 | modules: { 11 | app, 12 | user 13 | }, 14 | getters 15 | }) 16 | 17 | export default store 18 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-oauth-demo/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | /dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | /test/unit/coverage/ 8 | /test/e2e/reports/ 9 | selenium-debug.log 10 | 11 | package-lock.json 12 | 13 | # Editor directories and files 14 | .idea 15 | .vscode 16 | *.suo 17 | *.ntvs* 18 | *.njsproj 19 | *.sln 20 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/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 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/utils/auth.js: -------------------------------------------------------------------------------- 1 | import Cookies from 'js-cookie' 2 | 3 | const TokenKey = 'vue_admin_template_token' 4 | 5 | export function getToken() { 6 | return Cookies.get(TokenKey) 7 | } 8 | 9 | export function setToken(token) { 10 | return Cookies.set(TokenKey, token) 11 | } 12 | 13 | export function removeToken() { 14 | return Cookies.remove(TokenKey) 15 | } 16 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | my-webpack-simple-demo 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-ui-demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | my-webpack-simple-ui-demo 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | my-webpack-ui-axios-demo 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-oauth-demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | my-webpack-ui-axios-oauth-demo 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-01/src/components/Home.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ msg }} 4 | 5 | 6 | 7 | 17 | 18 | 19 | 21 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-01/src/components/About.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ msg }} 4 | 5 | 6 | 7 | 17 | 18 | 19 | 21 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-02/src/components/About.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ msg }} 4 | 5 | 6 | 7 | 17 | 18 | 19 | 21 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-02/src/components/News.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ msg }} 4 | 5 | 6 | 7 | 17 | 18 | 19 | 21 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-03/src/components/About.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ msg }} 4 | 5 | 6 | 7 | 17 | 18 | 19 | 21 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-04/src/components/About.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ msg }} 4 | 5 | 6 | 7 | 17 | 18 | 19 | 21 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-02/src/components/Message.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ msg }} 4 | 5 | 6 | 7 | 17 | 18 | 19 | 21 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-03/src/components/Message.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ msg }} 4 | 5 | 6 | 7 | 17 | 18 | 19 | 21 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-04/src/components/Message.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ msg }} 4 | 5 | 6 | 7 | 17 | 18 | 19 | 21 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-05/src/components/Message.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ msg }} 4 | 5 | 6 | 7 | 17 | 18 | 19 | 21 | -------------------------------------------------------------------------------- /VueStudy00-HelloWorld/test/unit/specs/HelloWorld.spec.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import HelloWorld from '@/components/HelloWorld' 3 | 4 | describe('HelloWorld.vue', () => { 5 | it('should render correct contents', () => { 6 | const Constructor = Vue.extend(HelloWorld) 7 | const vm = new Constructor().$mount() 8 | expect(vm.$el.querySelector('.hello h1').textContent) 9 | .toEqual('Welcome to Your Vue.js App') 10 | }) 11 | }) 12 | -------------------------------------------------------------------------------- /VueStudy00-HelloWorld/src/main.js: -------------------------------------------------------------------------------- 1 | // The Vue build version to load with the `import` command 2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias. 3 | import Vue from 'vue' 4 | import App from './App' 5 | import router from './router' 6 | 7 | Vue.config.productionTip = false 8 | 9 | /* eslint-disable no-new */ 10 | new Vue({ 11 | el: '#app', 12 | router, 13 | components: { App }, 14 | template: '' 15 | }) 16 | -------------------------------------------------------------------------------- /VueStudy07-Vuex/vuex-demo/test/unit/specs/HelloWorld.spec.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import HelloWorld from '@/components/HelloWorld' 3 | 4 | describe('HelloWorld.vue', () => { 5 | it('should render correct contents', () => { 6 | const Constructor = Vue.extend(HelloWorld) 7 | const vm = new Constructor().$mount() 8 | expect(vm.$el.querySelector('.hello h1').textContent) 9 | .toEqual('Welcome to Your Vue.js App') 10 | }) 11 | }) 12 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo-old/test/unit/specs/HelloWorld.spec.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import HelloWorld from '@/components/HelloWorld' 3 | 4 | describe('HelloWorld.vue', () => { 5 | it('should render correct contents', () => { 6 | const Constructor = Vue.extend(HelloWorld) 7 | const vm = new Constructor().$mount() 8 | expect(vm.$el.querySelector('.hello h1').textContent) 9 | .toEqual('Welcome to Your Vue.js App') 10 | }) 11 | }) 12 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-01/test/unit/specs/HelloWorld.spec.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import HelloWorld from '@/components/HelloWorld' 3 | 4 | describe('HelloWorld.vue', () => { 5 | it('should render correct contents', () => { 6 | const Constructor = Vue.extend(HelloWorld) 7 | const vm = new Constructor().$mount() 8 | expect(vm.$el.querySelector('.hello h1').textContent) 9 | .toEqual('Welcome to Your Vue.js App') 10 | }) 11 | }) 12 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-02/test/unit/specs/HelloWorld.spec.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import HelloWorld from '@/components/HelloWorld' 3 | 4 | describe('HelloWorld.vue', () => { 5 | it('should render correct contents', () => { 6 | const Constructor = Vue.extend(HelloWorld) 7 | const vm = new Constructor().$mount() 8 | expect(vm.$el.querySelector('.hello h1').textContent) 9 | .toEqual('Welcome to Your Vue.js App') 10 | }) 11 | }) 12 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-03/test/unit/specs/HelloWorld.spec.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import HelloWorld from '@/components/HelloWorld' 3 | 4 | describe('HelloWorld.vue', () => { 5 | it('should render correct contents', () => { 6 | const Constructor = Vue.extend(HelloWorld) 7 | const vm = new Constructor().$mount() 8 | expect(vm.$el.querySelector('.hello h1').textContent) 9 | .toEqual('Welcome to Your Vue.js App') 10 | }) 11 | }) 12 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-04/test/unit/specs/HelloWorld.spec.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import HelloWorld from '@/components/HelloWorld' 3 | 4 | describe('HelloWorld.vue', () => { 5 | it('should render correct contents', () => { 6 | const Constructor = Vue.extend(HelloWorld) 7 | const vm = new Constructor().$mount() 8 | expect(vm.$el.querySelector('.hello h1').textContent) 9 | .toEqual('Welcome to Your Vue.js App') 10 | }) 11 | }) 12 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-05/test/unit/specs/HelloWorld.spec.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import HelloWorld from '@/components/HelloWorld' 3 | 4 | describe('HelloWorld.vue', () => { 5 | it('should render correct contents', () => { 6 | const Constructor = Vue.extend(HelloWorld) 7 | const vm = new Constructor().$mount() 8 | expect(vm.$el.querySelector('.hello h1').textContent) 9 | .toEqual('Welcome to Your Vue.js App') 10 | }) 11 | }) 12 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/icons/svg/user.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-demo/test/unit/specs/HelloWorld.spec.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import HelloWorld from '@/components/HelloWorld' 3 | 4 | describe('HelloWorld.vue', () => { 5 | it('should render correct contents', () => { 6 | const Constructor = Vue.extend(HelloWorld) 7 | const vm = new Constructor().$mount() 8 | expect(vm.$el.querySelector('.hello h1').textContent) 9 | .toEqual('Welcome to Your Vue.js App') 10 | }) 11 | }) 12 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-demo/test/unit/specs/HelloWorld.spec.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import HelloWorld from '@/components/HelloWorld' 3 | 4 | describe('HelloWorld.vue', () => { 5 | it('should render correct contents', () => { 6 | const Constructor = Vue.extend(HelloWorld) 7 | const vm = new Constructor().$mount() 8 | expect(vm.$el.querySelector('.hello h1').textContent) 9 | .toEqual('Welcome to Your Vue.js App') 10 | }) 11 | }) 12 | -------------------------------------------------------------------------------- /VueStudy03-Ajax/SBAPI/src/main/resources/sql/MySQL.sql: -------------------------------------------------------------------------------- 1 | create database sbapi; 2 | 3 | use sbapi; 4 | 5 | /*用户表*/ 6 | create table user ( 7 | id int primary key auto_increment COMMENT "ID", 8 | account varchar(20) COMMENT "帐号", 9 | password varchar(20) COMMENT "密码", 10 | username varchar(20) COMMENT "昵称", 11 | regtime datetime not null COMMENT "注册时间" 12 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT "用户表"; 13 | 14 | insert into user values(null,"admin","admin","admin",now()); 15 | 16 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-ui-demo/test/unit/specs/HelloWorld.spec.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import HelloWorld from '@/components/HelloWorld' 3 | 4 | describe('HelloWorld.vue', () => { 5 | it('should render correct contents', () => { 6 | const Constructor = Vue.extend(HelloWorld) 7 | const vm = new Constructor().$mount() 8 | expect(vm.$el.querySelector('.hello h1').textContent) 9 | .toEqual('Welcome to Your Vue.js App') 10 | }) 11 | }) 12 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-03/src/components/NewsChild.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | News{{ this.$route.params.newsId }}{{ this.$route.query.newsId }} 4 | 5 | 6 | 7 | 17 | 18 | 19 | 21 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-04/src/components/NewsChild.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | News{{ this.$route.params.newsId }}{{ this.$route.query.newsId }} 4 | 5 | 6 | 7 | 17 | 18 | 19 | 21 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-05/src/components/NewsChild.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | News{{ this.$route.params.newsId }}{{ this.$route.query.newsId }} 4 | 5 | 6 | 7 | 17 | 18 | 19 | 21 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-oauth-demo/test/unit/specs/HelloWorld.spec.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import HelloWorld from '@/components/HelloWorld' 3 | 4 | describe('HelloWorld.vue', () => { 5 | it('should render correct contents', () => { 6 | const Constructor = Vue.extend(HelloWorld) 7 | const vm = new Constructor().$mount() 8 | expect(vm.$el.querySelector('.hello h1').textContent) 9 | .toEqual('Welcome to Your Vue.js App') 10 | }) 11 | }) 12 | -------------------------------------------------------------------------------- /VueStudy04-OAuth/SBAPIOAuth/src/main/resources/sql/MySQL.sql: -------------------------------------------------------------------------------- 1 | create database sbapi; 2 | 3 | use sbapi; 4 | 5 | /*用户表*/ 6 | create table user ( 7 | id int primary key auto_increment COMMENT "ID", 8 | account varchar(20) COMMENT "帐号", 9 | password varchar(20) COMMENT "密码", 10 | username varchar(20) COMMENT "昵称", 11 | regtime datetime not null COMMENT "注册时间" 12 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT "用户表"; 13 | 14 | insert into user values(null,"admin","admin","admin",now()); 15 | 16 | -------------------------------------------------------------------------------- /VueStudy00-HelloWorld/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-vue-jsx", "transform-runtime"], 12 | "env": { 13 | "test": { 14 | "presets": ["env", "stage-2"], 15 | "plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /VueStudy00-HelloWorld/src/App.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 13 | 14 | 24 | -------------------------------------------------------------------------------- /VueStudy07-Vuex/vuex-demo/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-vue-jsx", "transform-runtime"], 12 | "env": { 13 | "test": { 14 | "presets": ["env", "stage-2"], 15 | "plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /VueStudy07-Vuex/vuex-demo/src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Router from 'vue-router' 3 | import HelloWorld from '@/components/HelloWorld.vue' 4 | import Vuex from '@/components/Vuex.vue' 5 | 6 | Vue.use(Router) 7 | 8 | export default new Router({ 9 | routes: [ 10 | { 11 | path: '/hello', 12 | name: 'HelloWorld', 13 | component: HelloWorld 14 | }, 15 | { 16 | path: '/vuex', 17 | name: 'Vuex', 18 | component: Vuex 19 | } 20 | ] 21 | }) 22 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-demo/src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ msg }} 4 | 5 | 6 | 7 | 17 | 18 | 19 | 24 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-01/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-vue-jsx", "transform-runtime"], 12 | "env": { 13 | "test": { 14 | "presets": ["env", "stage-2"], 15 | "plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-02/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-vue-jsx", "transform-runtime"], 12 | "env": { 13 | "test": { 14 | "presets": ["env", "stage-2"], 15 | "plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-03/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-vue-jsx", "transform-runtime"], 12 | "env": { 13 | "test": { 14 | "presets": ["env", "stage-2"], 15 | "plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-04/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-vue-jsx", "transform-runtime"], 12 | "env": { 13 | "test": { 14 | "presets": ["env", "stage-2"], 15 | "plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-05/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-vue-jsx", "transform-runtime"], 12 | "env": { 13 | "test": { 14 | "presets": ["env", "stage-2"], 15 | "plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo-old/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-vue-jsx", "transform-runtime"], 12 | "env": { 13 | "test": { 14 | "presets": ["env", "stage-2"], 15 | "plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-demo/src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ msg }} 4 | 5 | 6 | 7 | 17 | 18 | 19 | 24 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-ui-demo/src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ msg }} 4 | 5 | 6 | 7 | 17 | 18 | 19 | 24 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/mock/table.js: -------------------------------------------------------------------------------- 1 | import Mock from 'mockjs' 2 | 3 | export default { 4 | list: () => { 5 | const items = Mock.mock({ 6 | 'items|30': [{ 7 | id: '@id', 8 | title: '@sentence(10, 20)', 9 | 'status|1': ['published', 'draft', 'deleted'], 10 | author: 'name', 11 | display_time: '@datetime', 12 | pageviews: '@integer(300, 5000)' 13 | }] 14 | }) 15 | return { 16 | code: 20000, 17 | data: items 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-01/src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Router from 'vue-router' 3 | import Home from '@/components/Home' 4 | import About from '@/components/About' 5 | 6 | Vue.use(Router) 7 | 8 | export default new Router({ 9 | routes: [ 10 | /* {path: '/', redirect: '/home'}, */ 11 | { 12 | path: '/home', 13 | name: 'Home', 14 | component: Home 15 | }, { 16 | path: '/about', 17 | name: 'About', 18 | component: About 19 | } 20 | ] 21 | }) 22 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/icons/svg/example.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-demo/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-vue-jsx", "transform-runtime"], 12 | "env": { 13 | "test": { 14 | "presets": ["env", "stage-2"], 15 | "plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-ui-demo/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-vue-jsx", "transform-runtime"], 12 | "env": { 13 | "test": { 14 | "presets": ["env", "stage-2"], 15 | "plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-demo/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-vue-jsx", "transform-runtime"], 12 | "env": { 13 | "test": { 14 | "presets": ["env", "stage-2"], 15 | "plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-oauth-demo/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-vue-jsx", "transform-runtime"], 12 | "env": { 13 | "test": { 14 | "presets": ["env", "stage-2"], 15 | "plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/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 | -------------------------------------------------------------------------------- /VueStudy09-Cheerio/cheerio-demo/src/App.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 17 | 18 | 27 | -------------------------------------------------------------------------------- /VueStudy06-Router/README.md: -------------------------------------------------------------------------------- 1 | # VueStudy06-Router 2 | 3 | > Vue-Router学习 4 | 5 | #### 项目介绍 6 | 7 | 1. 感谢keepfool的Vue.js——vue-router 60分钟快速入门:[http://www.cnblogs.com/keepfool/p/5690366.html](http://www.cnblogs.com/keepfool/p/5690366.html) 8 | 2. 感谢Vue的Vue-Router官方文档:[https://router.vuejs.org/zh/guide/#html](https://router.vuejs.org/zh/guide/#html) 9 | 10 | #### 软件架构 11 | 12 | 1. xxxx 13 | 14 | #### 安装教程 15 | 16 | 1. xxxx 17 | 18 | #### 使用说明 19 | 20 | 1. xxxx 21 | 22 | #### 参与贡献 23 | 24 | 1. Fork 本项目 25 | 2. 新建 Feat_xxx 分支 26 | 3. 提交代码 27 | 4. 新建 Pull Request 28 | -------------------------------------------------------------------------------- /VueStudy03-Ajax/SBAPI/src/main/java/com/wang/service/impl/UserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.wang.service.impl; 2 | 3 | import com.wang.entity.User; 4 | import com.wang.mapper.UserMapper; 5 | import com.wang.service.IUserService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | import java.util.List; 10 | 11 | /** 12 | * 13 | * @author Wang926454 14 | * @date 2018/8/9 15:45 15 | */ 16 | @Service 17 | public class UserServiceImpl extends BaseServiceImpl implements IUserService { 18 | } 19 | -------------------------------------------------------------------------------- /VueStudy03-Ajax/SBAPI/src/main/java/com/wang/Application.java: -------------------------------------------------------------------------------- 1 | package com.wang; 2 | 3 | import org.mybatis.spring.annotation.MapperScan; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | 7 | /** 8 | * 9 | * @author Wang926454 10 | * @date 2018/8/9 15:42 11 | */ 12 | @SpringBootApplication 13 | @tk.mybatis.spring.annotation.MapperScan("com.wang.mapper") 14 | public class Application { 15 | public static void main(String[] args) { 16 | SpringApplication.run(Application.class, args); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /VueStudy09-Cheerio/cheerio-demo/README.md: -------------------------------------------------------------------------------- 1 | # cheerio-demo 2 | 3 | > A Vue.js project 4 | 5 | ## Build Setup 6 | 7 | ``` bash 8 | # install dependencies 9 | npm install 10 | 11 | # serve with hot reload at localhost:8080 12 | npm run dev 13 | 14 | # build for production with minification 15 | npm run build 16 | 17 | # build for production and view the bundle analyzer report 18 | npm run build --report 19 | ``` 20 | 21 | For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). 22 | -------------------------------------------------------------------------------- /VueStudy04-OAuth/SBAPIOAuth/src/main/java/com/wang/Application.java: -------------------------------------------------------------------------------- 1 | package com.wang; 2 | 3 | import org.mybatis.spring.annotation.MapperScan; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | 7 | /** 8 | * 9 | * @author Wang926454 10 | * @date 2018/8/9 15:42 11 | */ 12 | @SpringBootApplication 13 | @tk.mybatis.spring.annotation.MapperScan("com.wang.mapper") 14 | public class Application { 15 | public static void main(String[] args) { 16 | SpringApplication.run(Application.class, args); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-01/src/main.js: -------------------------------------------------------------------------------- 1 | // The Vue build version to load with the `import` command 2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias. 3 | import Vue from 'vue' 4 | import App from './App' 5 | import router from './router' 6 | import ElementUI from 'element-ui' 7 | import 'element-ui/lib/theme-chalk/index.css' 8 | 9 | Vue.config.productionTip = false 10 | 11 | Vue.use(ElementUI) 12 | 13 | /* eslint-disable no-new */ 14 | new Vue({ 15 | el: '#app', 16 | router, 17 | components: { App }, 18 | template: '', 19 | render: h => h(App) 20 | }) 21 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-02/src/main.js: -------------------------------------------------------------------------------- 1 | // The Vue build version to load with the `import` command 2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias. 3 | import Vue from 'vue' 4 | import App from './App' 5 | import router from './router' 6 | import ElementUI from 'element-ui' 7 | import 'element-ui/lib/theme-chalk/index.css' 8 | 9 | Vue.config.productionTip = false 10 | 11 | Vue.use(ElementUI) 12 | 13 | /* eslint-disable no-new */ 14 | new Vue({ 15 | el: '#app', 16 | router, 17 | components: { App }, 18 | template: '', 19 | render: h => h(App) 20 | }) 21 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-03/src/main.js: -------------------------------------------------------------------------------- 1 | // The Vue build version to load with the `import` command 2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias. 3 | import Vue from 'vue' 4 | import App from './App' 5 | import router from './router' 6 | import ElementUI from 'element-ui' 7 | import 'element-ui/lib/theme-chalk/index.css' 8 | 9 | Vue.config.productionTip = false 10 | 11 | Vue.use(ElementUI) 12 | 13 | /* eslint-disable no-new */ 14 | new Vue({ 15 | el: '#app', 16 | router, 17 | components: { App }, 18 | template: '', 19 | render: h => h(App) 20 | }) 21 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-04/src/main.js: -------------------------------------------------------------------------------- 1 | // The Vue build version to load with the `import` command 2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias. 3 | import Vue from 'vue' 4 | import App from './App' 5 | import router from './router' 6 | import ElementUI from 'element-ui' 7 | import 'element-ui/lib/theme-chalk/index.css' 8 | 9 | Vue.config.productionTip = false 10 | 11 | Vue.use(ElementUI) 12 | 13 | /* eslint-disable no-new */ 14 | new Vue({ 15 | el: '#app', 16 | router, 17 | components: { App }, 18 | template: '', 19 | render: h => h(App) 20 | }) 21 | -------------------------------------------------------------------------------- /VueStudy09-Cheerio/README.md: -------------------------------------------------------------------------------- 1 | # VueStudy09-Cheerio 2 | 3 | > Cheerio学习 4 | 5 | #### 项目介绍 6 | 7 | 1. 感谢Cheerio的Cheerio文档使用:[https://github.com/cheeriojs/cheerio](https://github.com/cheeriojs/cheerio) 8 | 2. 感谢Postbird的nodejs下基于axios、cheerio爬取cnode社区首页帖子内容:[http://www.ptbird.cn/nodejs-axios-cheerio-get-cnode-first-page.html](http://www.ptbird.cn/nodejs-axios-cheerio-get-cnode-first-page.html) 9 | 10 | #### 软件架构 11 | 12 | 1. xxxx 13 | 14 | #### 安装教程 15 | 16 | 1. xxxx 17 | 18 | #### 使用说明 19 | 20 | 1. xxxx 21 | 22 | #### 参与贡献 23 | 24 | 1. Fork 本项目 25 | 2. 新建 Feat_xxx 分支 26 | 3. 提交代码 27 | 4. 新建 Pull Request 28 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/icons/svg/table.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/styles/element-ui.scss: -------------------------------------------------------------------------------- 1 | //to reset element-ui default css 2 | .el-upload { 3 | input[type="file"] { 4 | display: none !important; 5 | } 6 | } 7 | 8 | .el-upload__input { 9 | display: none; 10 | } 11 | 12 | //暂时性解决diolag 问题 https://github.com/ElemeFE/element/issues/2461 13 | /* .el-dialog { 14 | transform: none; 15 | left: 0; 16 | position: relative; 17 | margin: 0 auto; 18 | } */ 19 | 20 | //element ui upload 21 | .upload-container { 22 | .el-upload { 23 | width: 100%; 24 | 25 | .el-upload-dragger { 26 | width: 100%; 27 | height: 200px; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /VueStudy03-Ajax/SBAPI/README.md: -------------------------------------------------------------------------------- 1 | # SBAPI 2 | 3 | #### 项目介绍 4 | 5 | 1. SpringBoot整合Mybatis + 分页插件PageHelper + 通用Mapper插件 + Maven集成Mybatis Geneator示例 6 | 2. RESTful API 7 | 8 | #### 软件架构 9 | 10 | 1. SpringBoot + FreeMarker + Mybatis + PageHelper + 通用Mapper 11 | 12 | #### 安装教程 13 | 14 | 1. 解压后执行src\main\resources\sql\MySQL.sql脚本创建数据库和表 15 | 2. 在pom.xml这一级目录(即项目根目录下)的命令行窗口执行(前提是配置了mvn)(IDEA可以直接在Maven窗口Plugins中双击执行),创建Entity和Mapper后正常启动即可 16 | ``` 17 | mvn mybatis-generator:generate 18 | ``` 19 | 20 | #### 使用说明 21 | 22 | 1. SpringBoot整合系列 23 | 24 | #### 参与贡献 25 | 26 | 1. Fork 本项目 27 | 2. 新建 Feat_xxx 分支 28 | 3. 提交代码 29 | 4. 新建 Pull Request 30 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/icons/svg/password.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-demo/src/main.js: -------------------------------------------------------------------------------- 1 | // The Vue build version to load with the `import` command 2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias. 3 | import Vue from 'vue' 4 | import App from './App' 5 | // import router from './router' 6 | 7 | // 引入公共JS 8 | import util from '../util/util.js' 9 | Vue.prototype.util = util 10 | 11 | Vue.config.productionTip = false 12 | 13 | /* eslint-disable no-new */ 14 | new Vue({ 15 | el: '#app', 16 | // router, 17 | components: { App }, 18 | template: '', 19 | data: { 20 | // 组件使用事件中心进行通信 21 | eventHub: new Vue() 22 | } 23 | }) 24 | -------------------------------------------------------------------------------- /VueStudy04-OAuth/README.md: -------------------------------------------------------------------------------- 1 | # VueStudy04-OAuth 2 | 3 | > Vue-Resource OAuth学习 4 | 5 | #### 项目介绍 6 | 7 | 1. 感谢keepfool的Vue.js——使用$.ajax和vue-resource实现OAuth的注册、登录、注销和API调用:[http://www.cnblogs.com/keepfool/p/5665953.html](http://www.cnblogs.com/keepfool/p/5665953.html) 8 | 9 | ##### Vue1.0和Vue2.0遇到的不同 10 | 11 | 1. Vue-Resource和keepfool的Vue.js——vue-resource全攻略方法中的版本不同,详细看示例 12 | 13 | #### 软件架构 14 | 15 | 1. Vue2.0 + SpringBoot2.0 16 | 17 | #### 安装教程 18 | 19 | 1. 启动SBAPIOAuth项目8080端口 20 | 2. 打开Vue-Resource下的html访问即可 21 | 22 | #### 使用说明 23 | 24 | 1. xxxx 25 | 26 | #### 参与贡献 27 | 28 | 1. Fork 本项目 29 | 2. 新建 Feat_xxx 分支 30 | 3. 提交代码 31 | 4. 新建 Pull Request 32 | -------------------------------------------------------------------------------- /VueStudy07-Vuex/vuex-demo/src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 当前值:{{ count }} 4 | 增加 5 | 减少 6 | 7 | 8 | 9 | 27 | 28 | 29 | 32 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-demo/util/util.js: -------------------------------------------------------------------------------- 1 | // 建立公共方法,属性复制 2 | export default{ 3 | copyProperty: function (p, c) { 4 | c = c || {} 5 | for (var i in p) { 6 | // 属性i是否为p对象的自有属性 7 | if (p.hasOwnProperty(i)) { 8 | // 属性i是否为复杂类型 9 | if (typeof p[i] === 'object') { 10 | // 如果p[i]是数组,则创建一个新数组 11 | // 如果p[i]是普通对象,则创建一个新对象 12 | c[i] = Array.isArray(p[i]) ? [] : {} 13 | // 递归拷贝复杂类型的属性 14 | this.copyProperty(p[i], c[i]) 15 | } else { 16 | // 属性是基础类型时,直接拷贝 17 | c[i] = p[i] 18 | } 19 | } 20 | } 21 | return c 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-ui-demo/util/util.js: -------------------------------------------------------------------------------- 1 | // 建立公共方法,属性复制 2 | export default{ 3 | copyProperty: function (p, c) { 4 | c = c || {} 5 | for (var i in p) { 6 | // 属性i是否为p对象的自有属性 7 | if (p.hasOwnProperty(i)) { 8 | // 属性i是否为复杂类型 9 | if (typeof p[i] === 'object') { 10 | // 如果p[i]是数组,则创建一个新数组 11 | // 如果p[i]是普通对象,则创建一个新对象 12 | c[i] = Array.isArray(p[i]) ? [] : {} 13 | // 递归拷贝复杂类型的属性 14 | this.copyProperty(p[i], c[i]) 15 | } else { 16 | // 属性是基础类型时,直接拷贝 17 | c[i] = p[i] 18 | } 19 | } 20 | } 21 | return c 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-demo/util/util.js: -------------------------------------------------------------------------------- 1 | // 建立公共方法,属性复制 2 | export default{ 3 | copyProperty: function (p, c) { 4 | c = c || {} 5 | for (var i in p) { 6 | // 属性i是否为p对象的自有属性 7 | if (p.hasOwnProperty(i)) { 8 | // 属性i是否为复杂类型 9 | if (typeof p[i] === 'object') { 10 | // 如果p[i]是数组,则创建一个新数组 11 | // 如果p[i]是普通对象,则创建一个新对象 12 | c[i] = Array.isArray(p[i]) ? [] : {} 13 | // 递归拷贝复杂类型的属性 14 | this.copyProperty(p[i], c[i]) 15 | } else { 16 | // 属性是基础类型时,直接拷贝 17 | c[i] = p[i] 18 | } 19 | } 20 | } 21 | return c 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /VueStudy07-Vuex/vuex-demo/src/main.js: -------------------------------------------------------------------------------- 1 | // The Vue build version to load with the `import` command 2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias. 3 | import Vue from 'vue' 4 | import App from './App' 5 | import router from './router' 6 | 7 | import ElementUI from 'element-ui' 8 | import 'element-ui/lib/theme-chalk/index.css' 9 | 10 | import store from './store/store.js' 11 | 12 | Vue.config.productionTip = false 13 | 14 | Vue.use(ElementUI) 15 | 16 | /* eslint-disable no-new */ 17 | new Vue({ 18 | el: '#app', 19 | router, 20 | store, 21 | components: { App }, 22 | template: '', 23 | render: h => h(App) 24 | }) 25 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-oauth-demo/util/util.js: -------------------------------------------------------------------------------- 1 | // 建立公共方法,属性复制 2 | export default{ 3 | copyProperty: function (p, c) { 4 | c = c || {} 5 | for (var i in p) { 6 | // 属性i是否为p对象的自有属性 7 | if (p.hasOwnProperty(i)) { 8 | // 属性i是否为复杂类型 9 | if (typeof p[i] === 'object') { 10 | // 如果p[i]是数组,则创建一个新数组 11 | // 如果p[i]是普通对象,则创建一个新对象 12 | c[i] = Array.isArray(p[i]) ? [] : {} 13 | // 递归拷贝复杂类型的属性 14 | this.copyProperty(p[i], c[i]) 15 | } else { 16 | // 属性是基础类型时,直接拷贝 17 | c[i] = p[i] 18 | } 19 | } 20 | } 21 | return c 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /VueStudy09-Cheerio/cheerio-demo/src/main.js: -------------------------------------------------------------------------------- 1 | // The Vue build version to load with the `import` command 2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias. 3 | import Vue from 'vue' 4 | import VueResource from 'vue-resource' 5 | import App from './App' 6 | 7 | // 引入Axios 8 | import axios from 'axios' 9 | // 引入Cheerio 10 | import cheerio from 'cheerio' 11 | 12 | Vue.config.productionTip = false 13 | 14 | Vue.use(VueResource) 15 | 16 | Vue.prototype.$axios = axios 17 | 18 | Vue.prototype.$cheerio = cheerio 19 | 20 | /* eslint-disable no-new */ 21 | new Vue({ 22 | el: '#app', 23 | components: { App }, 24 | template: '' 25 | }) 26 | -------------------------------------------------------------------------------- /VueStudy00-HelloWorld/test/e2e/specs/test.js: -------------------------------------------------------------------------------- 1 | // For authoring Nightwatch tests, see 2 | // http://nightwatchjs.org/guide#usage 3 | 4 | module.exports = { 5 | 'default e2e tests': function (browser) { 6 | // automatically uses dev Server port from /config.index.js 7 | // default: http://localhost:8080 8 | // see nightwatch.conf.js 9 | const devServer = browser.globals.devServerURL 10 | 11 | browser 12 | .url(devServer) 13 | .waitForElementVisible('#app', 5000) 14 | .assert.elementPresent('.hello') 15 | .assert.containsText('h1', 'Welcome to Your Vue.js App') 16 | .assert.elementCount('img', 1) 17 | .end() 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /VueStudy07-Vuex/vuex-demo/test/e2e/specs/test.js: -------------------------------------------------------------------------------- 1 | // For authoring Nightwatch tests, see 2 | // http://nightwatchjs.org/guide#usage 3 | 4 | module.exports = { 5 | 'default e2e tests': function (browser) { 6 | // automatically uses dev Server port from /config.index.js 7 | // default: http://localhost:8080 8 | // see nightwatch.conf.js 9 | const devServer = browser.globals.devServerURL 10 | 11 | browser 12 | .url(devServer) 13 | .waitForElementVisible('#app', 5000) 14 | .assert.elementPresent('.hello') 15 | .assert.containsText('h1', 'Welcome to Your Vue.js App') 16 | .assert.elementCount('img', 1) 17 | .end() 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo-old/test/e2e/specs/test.js: -------------------------------------------------------------------------------- 1 | // For authoring Nightwatch tests, see 2 | // http://nightwatchjs.org/guide#usage 3 | 4 | module.exports = { 5 | 'default e2e tests': function (browser) { 6 | // automatically uses dev Server port from /config.index.js 7 | // default: http://localhost:8080 8 | // see nightwatch.conf.js 9 | const devServer = browser.globals.devServerURL 10 | 11 | browser 12 | .url(devServer) 13 | .waitForElementVisible('#app', 5000) 14 | .assert.elementPresent('.hello') 15 | .assert.containsText('h1', 'Welcome to Your Vue.js App') 16 | .assert.elementCount('img', 1) 17 | .end() 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/styles/variables.scss: -------------------------------------------------------------------------------- 1 | //sidebar 2 | $menuText:#bfcbd9; 3 | $menuActiveText:#409EFF; 4 | $subMenuActiveText:#f4f4f5; //https://github.com/ElemeFE/element/issues/12951 5 | 6 | $menuBg:#304156; 7 | $menuHover:#263445; 8 | 9 | $subMenuBg:#1f2d3d; 10 | $subMenuHover:#001528; 11 | 12 | $sideBarWidth: 180px; 13 | 14 | // the :export directive is the magic sauce for webpack 15 | :export { 16 | menuText: $menuText; 17 | menuActiveText: $menuActiveText; 18 | subMenuActiveText: $subMenuActiveText; 19 | menuBg: $menuBg; 20 | menuHover: $menuHover; 21 | subMenuBg: $subMenuBg; 22 | subMenuHover: $subMenuHover; 23 | sideBarWidth: $sideBarWidth; 24 | } 25 | -------------------------------------------------------------------------------- /VueStudy00-HelloWorld/build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const config = require('../config') 4 | const isProduction = process.env.NODE_ENV === 'production' 5 | const sourceMapEnabled = isProduction 6 | ? config.build.productionSourceMap 7 | : config.dev.cssSourceMap 8 | 9 | module.exports = { 10 | loaders: utils.cssLoaders({ 11 | sourceMap: sourceMapEnabled, 12 | extract: isProduction 13 | }), 14 | cssSourceMap: sourceMapEnabled, 15 | cacheBusting: config.dev.cacheBusting, 16 | transformToRequire: { 17 | video: ['src', 'poster'], 18 | source: 'src', 19 | img: 'src', 20 | image: 'xlink:href' 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-01/test/e2e/specs/test.js: -------------------------------------------------------------------------------- 1 | // For authoring Nightwatch tests, see 2 | // http://nightwatchjs.org/guide#usage 3 | 4 | module.exports = { 5 | 'default e2e tests': function (browser) { 6 | // automatically uses dev Server port from /config.index.js 7 | // default: http://localhost:8080 8 | // see nightwatch.conf.js 9 | const devServer = browser.globals.devServerURL 10 | 11 | browser 12 | .url(devServer) 13 | .waitForElementVisible('#app', 5000) 14 | .assert.elementPresent('.hello') 15 | .assert.containsText('h1', 'Welcome to Your Vue.js App') 16 | .assert.elementCount('img', 1) 17 | .end() 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-02/test/e2e/specs/test.js: -------------------------------------------------------------------------------- 1 | // For authoring Nightwatch tests, see 2 | // http://nightwatchjs.org/guide#usage 3 | 4 | module.exports = { 5 | 'default e2e tests': function (browser) { 6 | // automatically uses dev Server port from /config.index.js 7 | // default: http://localhost:8080 8 | // see nightwatch.conf.js 9 | const devServer = browser.globals.devServerURL 10 | 11 | browser 12 | .url(devServer) 13 | .waitForElementVisible('#app', 5000) 14 | .assert.elementPresent('.hello') 15 | .assert.containsText('h1', 'Welcome to Your Vue.js App') 16 | .assert.elementCount('img', 1) 17 | .end() 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-03/test/e2e/specs/test.js: -------------------------------------------------------------------------------- 1 | // For authoring Nightwatch tests, see 2 | // http://nightwatchjs.org/guide#usage 3 | 4 | module.exports = { 5 | 'default e2e tests': function (browser) { 6 | // automatically uses dev Server port from /config.index.js 7 | // default: http://localhost:8080 8 | // see nightwatch.conf.js 9 | const devServer = browser.globals.devServerURL 10 | 11 | browser 12 | .url(devServer) 13 | .waitForElementVisible('#app', 5000) 14 | .assert.elementPresent('.hello') 15 | .assert.containsText('h1', 'Welcome to Your Vue.js App') 16 | .assert.elementCount('img', 1) 17 | .end() 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-04/test/e2e/specs/test.js: -------------------------------------------------------------------------------- 1 | // For authoring Nightwatch tests, see 2 | // http://nightwatchjs.org/guide#usage 3 | 4 | module.exports = { 5 | 'default e2e tests': function (browser) { 6 | // automatically uses dev Server port from /config.index.js 7 | // default: http://localhost:8080 8 | // see nightwatch.conf.js 9 | const devServer = browser.globals.devServerURL 10 | 11 | browser 12 | .url(devServer) 13 | .waitForElementVisible('#app', 5000) 14 | .assert.elementPresent('.hello') 15 | .assert.containsText('h1', 'Welcome to Your Vue.js App') 16 | .assert.elementCount('img', 1) 17 | .end() 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-05/test/e2e/specs/test.js: -------------------------------------------------------------------------------- 1 | // For authoring Nightwatch tests, see 2 | // http://nightwatchjs.org/guide#usage 3 | 4 | module.exports = { 5 | 'default e2e tests': function (browser) { 6 | // automatically uses dev Server port from /config.index.js 7 | // default: http://localhost:8080 8 | // see nightwatch.conf.js 9 | const devServer = browser.globals.devServerURL 10 | 11 | browser 12 | .url(devServer) 13 | .waitForElementVisible('#app', 5000) 14 | .assert.elementPresent('.hello') 15 | .assert.containsText('h1', 'Welcome to Your Vue.js App') 16 | .assert.elementCount('img', 1) 17 | .end() 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /VueStudy07-Vuex/vuex-demo/build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const config = require('../config') 4 | const isProduction = process.env.NODE_ENV === 'production' 5 | const sourceMapEnabled = isProduction 6 | ? config.build.productionSourceMap 7 | : config.dev.cssSourceMap 8 | 9 | module.exports = { 10 | loaders: utils.cssLoaders({ 11 | sourceMap: sourceMapEnabled, 12 | extract: isProduction 13 | }), 14 | cssSourceMap: sourceMapEnabled, 15 | cacheBusting: config.dev.cacheBusting, 16 | transformToRequire: { 17 | video: ['src', 'poster'], 18 | source: 'src', 19 | img: 'src', 20 | image: 'xlink:href' 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo-old/build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const config = require('../config') 4 | const isProduction = process.env.NODE_ENV === 'production' 5 | const sourceMapEnabled = isProduction 6 | ? config.build.productionSourceMap 7 | : config.dev.cssSourceMap 8 | 9 | module.exports = { 10 | loaders: utils.cssLoaders({ 11 | sourceMap: sourceMapEnabled, 12 | extract: isProduction 13 | }), 14 | cssSourceMap: sourceMapEnabled, 15 | cacheBusting: config.dev.cacheBusting, 16 | transformToRequire: { 17 | video: ['src', 'poster'], 18 | source: 'src', 19 | img: 'src', 20 | image: 'xlink:href' 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/views/layout/components/Sidebar/Item.vue: -------------------------------------------------------------------------------- 1 | 31 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-01/build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const config = require('../config') 4 | const isProduction = process.env.NODE_ENV === 'production' 5 | const sourceMapEnabled = isProduction 6 | ? config.build.productionSourceMap 7 | : config.dev.cssSourceMap 8 | 9 | module.exports = { 10 | loaders: utils.cssLoaders({ 11 | sourceMap: sourceMapEnabled, 12 | extract: isProduction 13 | }), 14 | cssSourceMap: sourceMapEnabled, 15 | cacheBusting: config.dev.cacheBusting, 16 | transformToRequire: { 17 | video: ['src', 'poster'], 18 | source: 'src', 19 | img: 'src', 20 | image: 'xlink:href' 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-02/build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const config = require('../config') 4 | const isProduction = process.env.NODE_ENV === 'production' 5 | const sourceMapEnabled = isProduction 6 | ? config.build.productionSourceMap 7 | : config.dev.cssSourceMap 8 | 9 | module.exports = { 10 | loaders: utils.cssLoaders({ 11 | sourceMap: sourceMapEnabled, 12 | extract: isProduction 13 | }), 14 | cssSourceMap: sourceMapEnabled, 15 | cacheBusting: config.dev.cacheBusting, 16 | transformToRequire: { 17 | video: ['src', 'poster'], 18 | source: 'src', 19 | img: 'src', 20 | image: 'xlink:href' 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-03/build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const config = require('../config') 4 | const isProduction = process.env.NODE_ENV === 'production' 5 | const sourceMapEnabled = isProduction 6 | ? config.build.productionSourceMap 7 | : config.dev.cssSourceMap 8 | 9 | module.exports = { 10 | loaders: utils.cssLoaders({ 11 | sourceMap: sourceMapEnabled, 12 | extract: isProduction 13 | }), 14 | cssSourceMap: sourceMapEnabled, 15 | cacheBusting: config.dev.cacheBusting, 16 | transformToRequire: { 17 | video: ['src', 'poster'], 18 | source: 'src', 19 | img: 'src', 20 | image: 'xlink:href' 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-04/build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const config = require('../config') 4 | const isProduction = process.env.NODE_ENV === 'production' 5 | const sourceMapEnabled = isProduction 6 | ? config.build.productionSourceMap 7 | : config.dev.cssSourceMap 8 | 9 | module.exports = { 10 | loaders: utils.cssLoaders({ 11 | sourceMap: sourceMapEnabled, 12 | extract: isProduction 13 | }), 14 | cssSourceMap: sourceMapEnabled, 15 | cacheBusting: config.dev.cacheBusting, 16 | transformToRequire: { 17 | video: ['src', 'poster'], 18 | source: 'src', 19 | img: 'src', 20 | image: 'xlink:href' 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-05/build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const config = require('../config') 4 | const isProduction = process.env.NODE_ENV === 'production' 5 | const sourceMapEnabled = isProduction 6 | ? config.build.productionSourceMap 7 | : config.dev.cssSourceMap 8 | 9 | module.exports = { 10 | loaders: utils.cssLoaders({ 11 | sourceMap: sourceMapEnabled, 12 | extract: isProduction 13 | }), 14 | cssSourceMap: sourceMapEnabled, 15 | cacheBusting: config.dev.cacheBusting, 16 | transformToRequire: { 17 | video: ['src', 'poster'], 18 | source: 'src', 19 | img: 'src', 20 | image: 'xlink:href' 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /VueStudy09-Cheerio/cheerio-demo/build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const config = require('../config') 4 | const isProduction = process.env.NODE_ENV === 'production' 5 | const sourceMapEnabled = isProduction 6 | ? config.build.productionSourceMap 7 | : config.dev.cssSourceMap 8 | 9 | module.exports = { 10 | loaders: utils.cssLoaders({ 11 | sourceMap: sourceMapEnabled, 12 | extract: isProduction 13 | }), 14 | cssSourceMap: sourceMapEnabled, 15 | cacheBusting: config.dev.cacheBusting, 16 | transformToRequire: { 17 | video: ['src', 'poster'], 18 | source: 'src', 19 | img: 'src', 20 | image: 'xlink:href' 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-demo/test/e2e/specs/test.js: -------------------------------------------------------------------------------- 1 | // For authoring Nightwatch tests, see 2 | // http://nightwatchjs.org/guide#usage 3 | 4 | module.exports = { 5 | 'default e2e tests': function (browser) { 6 | // automatically uses dev Server port from /config.index.js 7 | // default: http://localhost:8080 8 | // see nightwatch.conf.js 9 | const devServer = browser.globals.devServerURL 10 | 11 | browser 12 | .url(devServer) 13 | .waitForElementVisible('#app', 5000) 14 | .assert.elementPresent('.hello') 15 | .assert.containsText('h1', 'Welcome to Your Vue.js App') 16 | .assert.elementCount('img', 1) 17 | .end() 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-demo/test/e2e/specs/test.js: -------------------------------------------------------------------------------- 1 | // For authoring Nightwatch tests, see 2 | // http://nightwatchjs.org/guide#usage 3 | 4 | module.exports = { 5 | 'default e2e tests': function (browser) { 6 | // automatically uses dev Server port from /config.index.js 7 | // default: http://localhost:8080 8 | // see nightwatch.conf.js 9 | const devServer = browser.globals.devServerURL 10 | 11 | browser 12 | .url(devServer) 13 | .waitForElementVisible('#app', 5000) 14 | .assert.elementPresent('.hello') 15 | .assert.containsText('h1', 'Welcome to Your Vue.js App') 16 | .assert.elementCount('img', 1) 17 | .end() 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-ui-demo/test/e2e/specs/test.js: -------------------------------------------------------------------------------- 1 | // For authoring Nightwatch tests, see 2 | // http://nightwatchjs.org/guide#usage 3 | 4 | module.exports = { 5 | 'default e2e tests': function (browser) { 6 | // automatically uses dev Server port from /config.index.js 7 | // default: http://localhost:8080 8 | // see nightwatch.conf.js 9 | const devServer = browser.globals.devServerURL 10 | 11 | browser 12 | .url(devServer) 13 | .waitForElementVisible('#app', 5000) 14 | .assert.elementPresent('.hello') 15 | .assert.containsText('h1', 'Welcome to Your Vue.js App') 16 | .assert.elementCount('img', 1) 17 | .end() 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /VueStudy07-Vuex/vuex-demo/README.md: -------------------------------------------------------------------------------- 1 | # vuex-demo 2 | 3 | > A Vue.js project 4 | 5 | ## Build Setup 6 | 7 | ``` bash 8 | # install dependencies 9 | npm install 10 | 11 | # serve with hot reload at localhost:8080 12 | npm run dev 13 | 14 | # build for production with minification 15 | npm run build 16 | 17 | # build for production and view the bundle analyzer report 18 | npm run build --report 19 | 20 | # run unit tests 21 | npm run unit 22 | 23 | # run e2e tests 24 | npm run e2e 25 | 26 | # run all tests 27 | npm test 28 | ``` 29 | 30 | For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). 31 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-demo/build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const config = require('../config') 4 | const isProduction = process.env.NODE_ENV === 'production' 5 | const sourceMapEnabled = isProduction 6 | ? config.build.productionSourceMap 7 | : config.dev.cssSourceMap 8 | 9 | module.exports = { 10 | loaders: utils.cssLoaders({ 11 | sourceMap: sourceMapEnabled, 12 | extract: isProduction 13 | }), 14 | cssSourceMap: sourceMapEnabled, 15 | cacheBusting: config.dev.cacheBusting, 16 | transformToRequire: { 17 | video: ['src', 'poster'], 18 | source: 'src', 19 | img: 'src', 20 | image: 'xlink:href' 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-ui-demo/build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const config = require('../config') 4 | const isProduction = process.env.NODE_ENV === 'production' 5 | const sourceMapEnabled = isProduction 6 | ? config.build.productionSourceMap 7 | : config.dev.cssSourceMap 8 | 9 | module.exports = { 10 | loaders: utils.cssLoaders({ 11 | sourceMap: sourceMapEnabled, 12 | extract: isProduction 13 | }), 14 | cssSourceMap: sourceMapEnabled, 15 | cacheBusting: config.dev.cacheBusting, 16 | transformToRequire: { 17 | video: ['src', 'poster'], 18 | source: 'src', 19 | img: 'src', 20 | image: 'xlink:href' 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-demo/build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const config = require('../config') 4 | const isProduction = process.env.NODE_ENV === 'production' 5 | const sourceMapEnabled = isProduction 6 | ? config.build.productionSourceMap 7 | : config.dev.cssSourceMap 8 | 9 | module.exports = { 10 | loaders: utils.cssLoaders({ 11 | sourceMap: sourceMapEnabled, 12 | extract: isProduction 13 | }), 14 | cssSourceMap: sourceMapEnabled, 15 | cacheBusting: config.dev.cacheBusting, 16 | transformToRequire: { 17 | video: ['src', 'poster'], 18 | source: 'src', 19 | img: 'src', 20 | image: 'xlink:href' 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-oauth-demo/test/e2e/specs/test.js: -------------------------------------------------------------------------------- 1 | // For authoring Nightwatch tests, see 2 | // http://nightwatchjs.org/guide#usage 3 | 4 | module.exports = { 5 | 'default e2e tests': function (browser) { 6 | // automatically uses dev Server port from /config.index.js 7 | // default: http://localhost:8080 8 | // see nightwatch.conf.js 9 | const devServer = browser.globals.devServerURL 10 | 11 | browser 12 | .url(devServer) 13 | .waitForElementVisible('#app', 5000) 14 | .assert.elementPresent('.hello') 15 | .assert.containsText('h1', 'Welcome to Your Vue.js App') 16 | .assert.elementCount('img', 1) 17 | .end() 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-oauth-demo/build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const config = require('../config') 4 | const isProduction = process.env.NODE_ENV === 'production' 5 | const sourceMapEnabled = isProduction 6 | ? config.build.productionSourceMap 7 | : config.dev.cssSourceMap 8 | 9 | module.exports = { 10 | loaders: utils.cssLoaders({ 11 | sourceMap: sourceMapEnabled, 12 | extract: isProduction 13 | }), 14 | cssSourceMap: sourceMapEnabled, 15 | cacheBusting: config.dev.cacheBusting, 16 | transformToRequire: { 17 | video: ['src', 'poster'], 18 | source: 'src', 19 | img: 'src', 20 | image: 'xlink:href' 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /VueStudy07-Vuex/vuex-demo/src/store/store.js: -------------------------------------------------------------------------------- 1 | // 配置 store 2 | import Vue from 'vue' 3 | import Vuex from 'vuex' 4 | 5 | // 通过 Vue.use() 安装 Vuex 6 | Vue.use(Vuex) 7 | 8 | const store = new Vuex.Store({ 9 | state: { 10 | count: 0 11 | }, 12 | mutations: { 13 | increment (state) { 14 | state.count++ 15 | }, 16 | reduced (state) { 17 | state.count-- 18 | } 19 | }, 20 | actions: { 21 | incrementAsync ({ commit }) { 22 | setTimeout(() => { 23 | commit('increment') 24 | }, 1000) 25 | }, 26 | reducedAsync ({ commit }) { 27 | setTimeout(() => { 28 | commit('reduced') 29 | }, 1000) 30 | } 31 | } 32 | }) 33 | 34 | export default store 35 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/api/login.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | const baseURL = process.env.BASE_API 4 | 5 | /** 6 | * 登录 7 | * @param {*} data 8 | */ 9 | export function login(data) { 10 | return request({ 11 | url: baseURL + '/user/login', 12 | method: 'post', 13 | data 14 | }) 15 | } 16 | 17 | /** 18 | * 获取用户信息 19 | * @param {*} token 20 | */ 21 | export function getInfo(token) { 22 | return request({ 23 | url: baseURL + '/user/article', 24 | method: 'get'/* , 25 | params: { token } */ 26 | }) 27 | } 28 | 29 | /** 30 | * 退出 31 | */ 32 | export function logout() { 33 | return request({ 34 | url: baseURL + '/user/article', 35 | method: 'get' 36 | }) 37 | } 38 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-demo/README.md: -------------------------------------------------------------------------------- 1 | # my-webpack-simple-demo 2 | 3 | > A Vue.js project 4 | 5 | ## Build Setup 6 | 7 | ``` bash 8 | # install dependencies 9 | npm install 10 | 11 | # serve with hot reload at localhost:8080 12 | npm run dev 13 | 14 | # build for production with minification 15 | npm run build 16 | 17 | # build for production and view the bundle analyzer report 18 | npm run build --report 19 | 20 | # run unit tests 21 | npm run unit 22 | 23 | # run e2e tests 24 | npm run e2e 25 | 26 | # run all tests 27 | npm test 28 | ``` 29 | 30 | For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). 31 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/views/layout/components/AppMain.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 21 | 22 | 30 | -------------------------------------------------------------------------------- /VueStudy03-Ajax/SBAPI/src/main/resources/mapper/UserMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/views/dashboard/index.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 主页 4 | 6 | 7 | 8 | 9 | 22 | 23 | 34 | -------------------------------------------------------------------------------- /VueStudy01-GettingStarted/README.md: -------------------------------------------------------------------------------- 1 | # VueStudy01-GettingStarted 2 | 3 | > Vue.js入门指令学习 4 | 5 | #### 项目介绍 6 | 7 | 1. 主要参考官方Vue.js文档:[https://cn.vuejs.org/v2/guide/#起步](https://cn.vuejs.org/v2/guide/#起步) 8 | 2. 感谢keepfool的Vue.js——60分钟快速入门:[http://www.cnblogs.com/keepfool/p/5619070.html](http://www.cnblogs.com/keepfool/p/5619070.html) 9 | 3. 不要使用关键字delete作为方法名:[https://blog.csdn.net/xiong451823652/article/details/80550317](https://blog.csdn.net/xiong451823652/article/details/80550317) 10 | 11 | ##### Vue1.0和Vue2.0遇到的不同 12 | 13 | 1. v-for的index取值发生了改变,直接使用index即可 14 | 15 | #### 软件架构 16 | 17 | 1. xxxx 18 | 19 | #### 安装教程 20 | 21 | 1. xxxx 22 | 23 | #### 使用说明 24 | 25 | 1. xxxx 26 | 27 | #### 参与贡献 28 | 29 | 1. Fork 本项目 30 | 2. 新建 Feat_xxx 分支 31 | 3. 提交代码 32 | 4. 新建 Pull Request 33 | -------------------------------------------------------------------------------- /VueStudy04-OAuth/SBAPIOAuth/src/main/resources/mapper/UserMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /VueStudy08-JWT/README.md: -------------------------------------------------------------------------------- 1 | # jwt-demo 2 | 3 | > A Vue.js project 4 | 5 | * jwt-demo-old 旧的Jwt前端Demo(不太熟悉Vue时写的代码比较乱) 6 | * jwt-demo 新写的Jwt前端Demo 7 | 8 | ## Build Setup 9 | 10 | ``` bash 11 | # install dependencies 12 | npm install 13 | 14 | # serve with hot reload at localhost:8080 15 | npm run dev 16 | 17 | # build for production with minification 18 | npm run build 19 | 20 | # build for production and view the bundle analyzer report 21 | npm run build --report 22 | 23 | # run unit tests 24 | npm run unit 25 | 26 | # run e2e tests 27 | npm run e2e 28 | 29 | # run all tests 30 | npm test 31 | ``` 32 | 33 | For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). 34 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/views/layout/components/Sidebar/Link.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 37 | -------------------------------------------------------------------------------- /VueStudy04-OAuth/SBAPIOAuth/src/main/java/com/wang/service/IUserService.java: -------------------------------------------------------------------------------- 1 | package com.wang.service; 2 | 3 | import com.wang.entity.User; 4 | import org.springframework.security.core.userdetails.UserDetails; 5 | import org.springframework.security.core.userdetails.UsernameNotFoundException; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * 11 | * @author Wang926454 12 | * @date 2018/8/9 15:44 13 | */ 14 | public interface IUserService extends IBaseService{ 15 | 16 | /** 17 | * 重写的UserDetails方法 18 | * @param s 19 | * @return org.springframework.security.core.userdetails.UserDetails 20 | * @author Wang926454 21 | * @date 2018/8/15 9:09 22 | */ 23 | @Override 24 | UserDetails loadUserByUsername(String s) throws UsernameNotFoundException; 25 | } 26 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-01/src/App.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Home 7 | About 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 23 | 24 | 35 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo-old/src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Router from 'vue-router' 3 | import Index from '@/components/Index.vue' 4 | import UserList from '@/components/UserList.vue' 5 | import UserOnline from '@/components/UserOnline.vue' 6 | 7 | Vue.use(Router) 8 | 9 | export default new Router({ 10 | routes: [ 11 | {path: '/', redirect: '/index/userList'}, 12 | { 13 | path: '/index', 14 | name: 'index', 15 | component: Index, 16 | children: [ 17 | { 18 | path: 'userList', 19 | name: 'userList', 20 | component: UserList 21 | }, 22 | { 23 | path: 'userOnline', 24 | name: 'userOnline', 25 | component: UserOnline 26 | } 27 | ] 28 | } 29 | ] 30 | }) 31 | -------------------------------------------------------------------------------- /VueStudy03-Ajax/SBAPI/src/main/java/com/wang/config/WebMvcConfig.java: -------------------------------------------------------------------------------- 1 | package com.wang.config; 2 | 3 | import org.springframework.context.annotation.Configuration; 4 | import org.springframework.web.servlet.config.annotation.CorsRegistry; 5 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; 6 | 7 | /** 8 | * SpringBoot全局支持CORS(跨源请求)的配置 9 | * @author Wang926454 10 | * @date 2018/8/9 17:28 11 | */ 12 | @Configuration 13 | public class WebMvcConfig extends WebMvcConfigurerAdapter { 14 | @Override 15 | public void addCorsMappings(CorsRegistry registry) { 16 | registry.addMapping("/**").allowedOrigins("*") 17 | .allowedMethods("GET", "HEAD", "POST", "PUT", "DELETE", "OPTIONS") 18 | .allowCredentials(false).maxAge(3600); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /VueStudy04-OAuth/SBAPIOAuth/src/main/java/com/wang/entity/MyUserDetails.java: -------------------------------------------------------------------------------- 1 | package com.wang.entity; 2 | 3 | import org.springframework.security.core.userdetails.User; 4 | 5 | import java.util.Collections; 6 | 7 | /** 8 | * 自定义MyUserDetails 9 | * @author Wang926454 10 | * @date 2018/8/14 16:48 11 | */ 12 | public class MyUserDetails extends User { 13 | 14 | public MyUserDetails(com.wang.entity.User user) { 15 | super(user.getAccount(), user.getPassword(), true, true, true, true, Collections.EMPTY_SET); 16 | this.user = user; 17 | } 18 | 19 | private com.wang.entity.User user; 20 | 21 | public com.wang.entity.User getUser() { 22 | return user; 23 | } 24 | 25 | public void setUser(com.wang.entity.User user) { 26 | this.user = user; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-02/src/App.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Home 7 | About 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 23 | 24 | 35 | -------------------------------------------------------------------------------- /VueStudy07-Vuex/README.md: -------------------------------------------------------------------------------- 1 | # VueStudy07-Vuex 2 | 3 | > Vuex学习 4 | 5 | #### 项目介绍 6 | 7 | 1. 感谢Vue的Vuex官方文档:[https://vuex.vuejs.org/zh/installation.html](https://vuex.vuejs.org/zh/installation.html) 8 | 2. 感谢Yu丶的超nice的vuex教程:[https://blog.csdn.net/csdn_yudong/article/details/78479986](https://blog.csdn.net/csdn_yudong/article/details/78479986) 9 | 3. 感谢mjzhang1993的vuex使用详解:[https://blog.csdn.net/mjzhang1993/article/details/78321903](https://blog.csdn.net/mjzhang1993/article/details/78321903) 10 | 4. 感谢胡不归vac的Vuex基本使用的总结:[https://www.jianshu.com/p/aae7fee46c36](https://www.jianshu.com/p/aae7fee46c36) 11 | 12 | #### 软件架构 13 | 14 | 1. xxxx 15 | 16 | #### 安装教程 17 | 18 | 1. xxxx 19 | 20 | #### 使用说明 21 | 22 | 1. xxxx 23 | 24 | #### 参与贡献 25 | 26 | 1. Fork 本项目 27 | 2. 新建 Feat_xxx 分支 28 | 3. 提交代码 29 | 4. 新建 Pull Request 30 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-02/src/components/Home.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | News 7 | Message 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 28 | 29 | 30 | 32 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-ui-demo/src/main.js: -------------------------------------------------------------------------------- 1 | // The Vue build version to load with the `import` command 2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias. 3 | import Vue from 'vue' 4 | 5 | // 引入ElementUI 6 | import ElementUI from 'element-ui' 7 | import 'element-ui/lib/theme-chalk/index.css' 8 | 9 | import App from './App' 10 | // import router from './router' 11 | 12 | // 引入公共JS 13 | import util from '../util/util.js' 14 | 15 | Vue.use(ElementUI) 16 | 17 | Vue.prototype.util = util 18 | Vue.config.productionTip = false 19 | 20 | /* eslint-disable no-new */ 21 | new Vue({ 22 | el: '#app', 23 | // router, 24 | components: { App }, 25 | template: '', 26 | data: { 27 | // 组件使用事件中心进行通信 28 | eventHub: new Vue() 29 | }, 30 | render: h => h(App) 31 | }) 32 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-05/src/main.js: -------------------------------------------------------------------------------- 1 | // The Vue build version to load with the `import` command 2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias. 3 | import Vue from 'vue' 4 | import App from './App' 5 | import router from './router' 6 | import ElementUI from 'element-ui' 7 | import 'element-ui/lib/theme-chalk/index.css' 8 | 9 | Vue.config.productionTip = false 10 | 11 | Vue.use(ElementUI) 12 | 13 | /* eslint-disable no-new */ 14 | new Vue({ 15 | el: '#app', 16 | router, 17 | components: { App }, 18 | template: '', 19 | render: h => h(App) 20 | }) 21 | 22 | // 全局守卫 23 | /* router.beforeEach((to, from, next) => { 24 | // ... 25 | console.log('beforeEach') 26 | }) */ 27 | 28 | // 全局路由后置钩子 29 | router.afterEach((to, from) => { 30 | // ... 31 | console.log('afterEach') 32 | }) 33 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-03/src/components/Home.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | News 7 | Message 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 28 | 29 | 30 | 32 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-04/src/components/Home.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | News 7 | Message 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 28 | 29 | 30 | 32 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-05/src/components/Home.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | News 7 | Message 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 28 | 29 | 30 | 32 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/icons/svg/nested.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-04/README.md: -------------------------------------------------------------------------------- 1 | # vue-router-04 2 | 3 | > A Vue.js project 4 | 5 | #### 项目介绍 6 | 7 | 1. xxxx 8 | 9 | ##### Vue1.0和Vue2.0遇到的不同 10 | 11 | 1. 子路由subRoutes已经遗弃了,Vue2.0用的是children 12 | 13 | ## Build Setup 14 | 15 | ``` bash 16 | # install dependencies 17 | npm install 18 | 19 | # serve with hot reload at localhost:8080 20 | npm run dev 21 | 22 | # build for production with minification 23 | npm run build 24 | 25 | # build for production and view the bundle analyzer report 26 | npm run build --report 27 | 28 | # run unit tests 29 | npm run unit 30 | 31 | # run e2e tests 32 | npm run e2e 33 | 34 | # run all tests 35 | npm test 36 | ``` 37 | 38 | For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). 39 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-03/src/App.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Home 7 | About 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 23 | 24 | 38 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/mock/index.js: -------------------------------------------------------------------------------- 1 | import Mock from 'mockjs' 2 | import userAPI from './user' 3 | import tableAPI from './table' 4 | 5 | // Fix an issue with setting withCredentials = true, cross-domain request lost cookies 6 | // https://github.com/nuysoft/Mock/issues/300 7 | 8 | Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send 9 | Mock.XHR.prototype.send = function() { 10 | if (this.custom.xhr) { 11 | this.custom.xhr.withCredentials = this.withCredentials || false 12 | } 13 | this.proxy_send(...arguments) 14 | } 15 | 16 | // Mock.setup({ 17 | // timeout: '350-600' 18 | // }) 19 | 20 | // User 21 | Mock.mock(/\/user\/login/, 'post', userAPI.login) 22 | Mock.mock(/\/user\/info/, 'get', userAPI.getInfo) 23 | Mock.mock(/\/user\/logout/, 'post', userAPI.logout) 24 | 25 | // Table 26 | Mock.mock(/\/table\/list/, 'get', tableAPI.list) 27 | 28 | export default Mock 29 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo-old/src/components/UserList.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 新增 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 35 | -------------------------------------------------------------------------------- /VueStudy00-HelloWorld/test/unit/jest.conf.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | 3 | module.exports = { 4 | rootDir: path.resolve(__dirname, '../../'), 5 | moduleFileExtensions: [ 6 | 'js', 7 | 'json', 8 | 'vue' 9 | ], 10 | moduleNameMapper: { 11 | '^@/(.*)$': '/src/$1' 12 | }, 13 | transform: { 14 | '^.+\\.js$': '/node_modules/babel-jest', 15 | '.*\\.(vue)$': '/node_modules/vue-jest' 16 | }, 17 | testPathIgnorePatterns: [ 18 | '/test/e2e' 19 | ], 20 | snapshotSerializers: ['/node_modules/jest-serializer-vue'], 21 | setupFiles: ['/test/unit/setup'], 22 | mapCoverage: true, 23 | coverageDirectory: '/test/unit/coverage', 24 | collectCoverageFrom: [ 25 | 'src/**/*.{js,vue}', 26 | '!src/main.js', 27 | '!src/router/index.js', 28 | '!**/node_modules/**' 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /VueStudy07-Vuex/vuex-demo/src/App.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 路由名称:{{ this.$route.name }} 5 | 当前路径:{{ this.$route.path }} 6 | params参数:{{ this.$route.params }} 7 | query参数:{{ this.$route.query }} 8 | 9 | 10 | 11 | Hello 12 | Vuex 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 28 | 29 | 32 | -------------------------------------------------------------------------------- /VueStudy07-Vuex/vuex-demo/test/unit/jest.conf.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | 3 | module.exports = { 4 | rootDir: path.resolve(__dirname, '../../'), 5 | moduleFileExtensions: [ 6 | 'js', 7 | 'json', 8 | 'vue' 9 | ], 10 | moduleNameMapper: { 11 | '^@/(.*)$': '/src/$1' 12 | }, 13 | transform: { 14 | '^.+\\.js$': '/node_modules/babel-jest', 15 | '.*\\.(vue)$': '/node_modules/vue-jest' 16 | }, 17 | testPathIgnorePatterns: [ 18 | '/test/e2e' 19 | ], 20 | snapshotSerializers: ['/node_modules/jest-serializer-vue'], 21 | setupFiles: ['/test/unit/setup'], 22 | mapCoverage: true, 23 | coverageDirectory: '/test/unit/coverage', 24 | collectCoverageFrom: [ 25 | 'src/**/*.{js,vue}', 26 | '!src/main.js', 27 | '!src/router/index.js', 28 | '!**/node_modules/**' 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo-old/test/unit/jest.conf.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | 3 | module.exports = { 4 | rootDir: path.resolve(__dirname, '../../'), 5 | moduleFileExtensions: [ 6 | 'js', 7 | 'json', 8 | 'vue' 9 | ], 10 | moduleNameMapper: { 11 | '^@/(.*)$': '/src/$1' 12 | }, 13 | transform: { 14 | '^.+\\.js$': '/node_modules/babel-jest', 15 | '.*\\.(vue)$': '/node_modules/vue-jest' 16 | }, 17 | testPathIgnorePatterns: [ 18 | '/test/e2e' 19 | ], 20 | snapshotSerializers: ['/node_modules/jest-serializer-vue'], 21 | setupFiles: ['/test/unit/setup'], 22 | mapCoverage: true, 23 | coverageDirectory: '/test/unit/coverage', 24 | collectCoverageFrom: [ 25 | 'src/**/*.{js,vue}', 26 | '!src/main.js', 27 | '!src/router/index.js', 28 | '!**/node_modules/**' 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /VueStudy04-OAuth/SBAPIOAuth/src/main/java/com/wang/config/WebMvcConfig.java: -------------------------------------------------------------------------------- 1 | package com.wang.config; 2 | 3 | import org.springframework.context.annotation.Configuration; 4 | import org.springframework.web.servlet.config.annotation.CorsRegistry; 5 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; 6 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; 7 | 8 | /** 9 | * SpringBoot全局支持CORS(跨源请求)的配置 10 | * @author Wang926454 11 | * @date 2018/8/9 17:28 12 | */ 13 | @Configuration 14 | public class WebMvcConfig extends WebMvcConfigurerAdapter { 15 | @Override 16 | public void addCorsMappings(CorsRegistry registry) { 17 | registry.addMapping("/**").allowedOrigins("*") 18 | .allowedMethods("GET", "HEAD", "POST", "PUT", "DELETE", "OPTIONS") 19 | .allowCredentials(false).maxAge(3600); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-01/test/unit/jest.conf.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | 3 | module.exports = { 4 | rootDir: path.resolve(__dirname, '../../'), 5 | moduleFileExtensions: [ 6 | 'js', 7 | 'json', 8 | 'vue' 9 | ], 10 | moduleNameMapper: { 11 | '^@/(.*)$': '/src/$1' 12 | }, 13 | transform: { 14 | '^.+\\.js$': '/node_modules/babel-jest', 15 | '.*\\.(vue)$': '/node_modules/vue-jest' 16 | }, 17 | testPathIgnorePatterns: [ 18 | '/test/e2e' 19 | ], 20 | snapshotSerializers: ['/node_modules/jest-serializer-vue'], 21 | setupFiles: ['/test/unit/setup'], 22 | mapCoverage: true, 23 | coverageDirectory: '/test/unit/coverage', 24 | collectCoverageFrom: [ 25 | 'src/**/*.{js,vue}', 26 | '!src/main.js', 27 | '!src/router/index.js', 28 | '!**/node_modules/**' 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-02/test/unit/jest.conf.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | 3 | module.exports = { 4 | rootDir: path.resolve(__dirname, '../../'), 5 | moduleFileExtensions: [ 6 | 'js', 7 | 'json', 8 | 'vue' 9 | ], 10 | moduleNameMapper: { 11 | '^@/(.*)$': '/src/$1' 12 | }, 13 | transform: { 14 | '^.+\\.js$': '/node_modules/babel-jest', 15 | '.*\\.(vue)$': '/node_modules/vue-jest' 16 | }, 17 | testPathIgnorePatterns: [ 18 | '/test/e2e' 19 | ], 20 | snapshotSerializers: ['/node_modules/jest-serializer-vue'], 21 | setupFiles: ['/test/unit/setup'], 22 | mapCoverage: true, 23 | coverageDirectory: '/test/unit/coverage', 24 | collectCoverageFrom: [ 25 | 'src/**/*.{js,vue}', 26 | '!src/main.js', 27 | '!src/router/index.js', 28 | '!**/node_modules/**' 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-03/test/unit/jest.conf.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | 3 | module.exports = { 4 | rootDir: path.resolve(__dirname, '../../'), 5 | moduleFileExtensions: [ 6 | 'js', 7 | 'json', 8 | 'vue' 9 | ], 10 | moduleNameMapper: { 11 | '^@/(.*)$': '/src/$1' 12 | }, 13 | transform: { 14 | '^.+\\.js$': '/node_modules/babel-jest', 15 | '.*\\.(vue)$': '/node_modules/vue-jest' 16 | }, 17 | testPathIgnorePatterns: [ 18 | '/test/e2e' 19 | ], 20 | snapshotSerializers: ['/node_modules/jest-serializer-vue'], 21 | setupFiles: ['/test/unit/setup'], 22 | mapCoverage: true, 23 | coverageDirectory: '/test/unit/coverage', 24 | collectCoverageFrom: [ 25 | 'src/**/*.{js,vue}', 26 | '!src/main.js', 27 | '!src/router/index.js', 28 | '!**/node_modules/**' 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-04/test/unit/jest.conf.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | 3 | module.exports = { 4 | rootDir: path.resolve(__dirname, '../../'), 5 | moduleFileExtensions: [ 6 | 'js', 7 | 'json', 8 | 'vue' 9 | ], 10 | moduleNameMapper: { 11 | '^@/(.*)$': '/src/$1' 12 | }, 13 | transform: { 14 | '^.+\\.js$': '/node_modules/babel-jest', 15 | '.*\\.(vue)$': '/node_modules/vue-jest' 16 | }, 17 | testPathIgnorePatterns: [ 18 | '/test/e2e' 19 | ], 20 | snapshotSerializers: ['/node_modules/jest-serializer-vue'], 21 | setupFiles: ['/test/unit/setup'], 22 | mapCoverage: true, 23 | coverageDirectory: '/test/unit/coverage', 24 | collectCoverageFrom: [ 25 | 'src/**/*.{js,vue}', 26 | '!src/main.js', 27 | '!src/router/index.js', 28 | '!**/node_modules/**' 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-05/test/unit/jest.conf.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | 3 | module.exports = { 4 | rootDir: path.resolve(__dirname, '../../'), 5 | moduleFileExtensions: [ 6 | 'js', 7 | 'json', 8 | 'vue' 9 | ], 10 | moduleNameMapper: { 11 | '^@/(.*)$': '/src/$1' 12 | }, 13 | transform: { 14 | '^.+\\.js$': '/node_modules/babel-jest', 15 | '.*\\.(vue)$': '/node_modules/vue-jest' 16 | }, 17 | testPathIgnorePatterns: [ 18 | '/test/e2e' 19 | ], 20 | snapshotSerializers: ['/node_modules/jest-serializer-vue'], 21 | setupFiles: ['/test/unit/setup'], 22 | mapCoverage: true, 23 | coverageDirectory: '/test/unit/coverage', 24 | collectCoverageFrom: [ 25 | 'src/**/*.{js,vue}', 26 | '!src/main.js', 27 | '!src/router/index.js', 28 | '!**/node_modules/**' 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-02/src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Router from 'vue-router' 3 | import Home from '@/components/Home.vue' 4 | import About from '@/components/About.vue' 5 | import News from '@/components/News.vue' 6 | import Message from '@/components/Message.vue' 7 | 8 | Vue.use(Router) 9 | 10 | export default new Router({ 11 | routes: [ 12 | /* {path: '/', redirect: '/home'}, */ 13 | { 14 | path: '/home', 15 | name: 'Home', 16 | component: Home, 17 | children: [ 18 | { 19 | path: 'news', 20 | name: 'News', 21 | component: News 22 | }, 23 | { 24 | path: 'message', 25 | name: 'Message', 26 | component: Message 27 | } 28 | ] 29 | }, { 30 | path: '/about', 31 | name: 'About', 32 | component: About 33 | } 34 | ] 35 | }) 36 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-demo/test/unit/jest.conf.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | 3 | module.exports = { 4 | rootDir: path.resolve(__dirname, '../../'), 5 | moduleFileExtensions: [ 6 | 'js', 7 | 'json', 8 | 'vue' 9 | ], 10 | moduleNameMapper: { 11 | '^@/(.*)$': '/src/$1' 12 | }, 13 | transform: { 14 | '^.+\\.js$': '/node_modules/babel-jest', 15 | '.*\\.(vue)$': '/node_modules/vue-jest' 16 | }, 17 | testPathIgnorePatterns: [ 18 | '/test/e2e' 19 | ], 20 | snapshotSerializers: ['/node_modules/jest-serializer-vue'], 21 | setupFiles: ['/test/unit/setup'], 22 | mapCoverage: true, 23 | coverageDirectory: '/test/unit/coverage', 24 | collectCoverageFrom: [ 25 | 'src/**/*.{js,vue}', 26 | '!src/main.js', 27 | '!src/router/index.js', 28 | '!**/node_modules/**' 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-ui-demo/test/unit/jest.conf.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | 3 | module.exports = { 4 | rootDir: path.resolve(__dirname, '../../'), 5 | moduleFileExtensions: [ 6 | 'js', 7 | 'json', 8 | 'vue' 9 | ], 10 | moduleNameMapper: { 11 | '^@/(.*)$': '/src/$1' 12 | }, 13 | transform: { 14 | '^.+\\.js$': '/node_modules/babel-jest', 15 | '.*\\.(vue)$': '/node_modules/vue-jest' 16 | }, 17 | testPathIgnorePatterns: [ 18 | '/test/e2e' 19 | ], 20 | snapshotSerializers: ['/node_modules/jest-serializer-vue'], 21 | setupFiles: ['/test/unit/setup'], 22 | mapCoverage: true, 23 | coverageDirectory: '/test/unit/coverage', 24 | collectCoverageFrom: [ 25 | 'src/**/*.{js,vue}', 26 | '!src/main.js', 27 | '!src/router/index.js', 28 | '!**/node_modules/**' 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-demo/src/main.js: -------------------------------------------------------------------------------- 1 | // The Vue build version to load with the `import` command 2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias. 3 | import Vue from 'vue' 4 | 5 | // 引入ElementUI 6 | import ElementUI from 'element-ui' 7 | import 'element-ui/lib/theme-chalk/index.css' 8 | 9 | import App from './App' 10 | // import router from './router' 11 | 12 | // 引入公共JS 13 | import util from '../util/util.js' 14 | 15 | // 引入Axios 16 | import axios from 'axios' 17 | 18 | Vue.use(ElementUI) 19 | 20 | Vue.prototype.util = util 21 | Vue.config.productionTip = false 22 | 23 | Vue.prototype.$axios = axios 24 | 25 | /* eslint-disable no-new */ 26 | new Vue({ 27 | el: '#app', 28 | // router, 29 | components: { App }, 30 | template: '', 31 | data: { 32 | // 组件使用事件中心进行通信 33 | eventHub: new Vue() 34 | }, 35 | render: h => h(App) 36 | }) 37 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-demo/test/unit/jest.conf.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | 3 | module.exports = { 4 | rootDir: path.resolve(__dirname, '../../'), 5 | moduleFileExtensions: [ 6 | 'js', 7 | 'json', 8 | 'vue' 9 | ], 10 | moduleNameMapper: { 11 | '^@/(.*)$': '/src/$1' 12 | }, 13 | transform: { 14 | '^.+\\.js$': '/node_modules/babel-jest', 15 | '.*\\.(vue)$': '/node_modules/vue-jest' 16 | }, 17 | testPathIgnorePatterns: [ 18 | '/test/e2e' 19 | ], 20 | snapshotSerializers: ['/node_modules/jest-serializer-vue'], 21 | setupFiles: ['/test/unit/setup'], 22 | mapCoverage: true, 23 | coverageDirectory: '/test/unit/coverage', 24 | collectCoverageFrom: [ 25 | 'src/**/*.{js,vue}', 26 | '!src/main.js', 27 | '!src/router/index.js', 28 | '!**/node_modules/**' 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-oauth-demo/test/unit/jest.conf.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | 3 | module.exports = { 4 | rootDir: path.resolve(__dirname, '../../'), 5 | moduleFileExtensions: [ 6 | 'js', 7 | 'json', 8 | 'vue' 9 | ], 10 | moduleNameMapper: { 11 | '^@/(.*)$': '/src/$1' 12 | }, 13 | transform: { 14 | '^.+\\.js$': '/node_modules/babel-jest', 15 | '.*\\.(vue)$': '/node_modules/vue-jest' 16 | }, 17 | testPathIgnorePatterns: [ 18 | '/test/e2e' 19 | ], 20 | snapshotSerializers: ['/node_modules/jest-serializer-vue'], 21 | setupFiles: ['/test/unit/setup'], 22 | mapCoverage: true, 23 | coverageDirectory: '/test/unit/coverage', 24 | collectCoverageFrom: [ 25 | 'src/**/*.{js,vue}', 26 | '!src/main.js', 27 | '!src/router/index.js', 28 | '!**/node_modules/**' 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/components/SvgIcon/index.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 34 | 35 | 44 | -------------------------------------------------------------------------------- /VueStudy00-HelloWorld/test/e2e/custom-assertions/elementCount.js: -------------------------------------------------------------------------------- 1 | // A custom Nightwatch assertion. 2 | // The assertion name is the filename. 3 | // Example usage: 4 | // 5 | // browser.assert.elementCount(selector, count) 6 | // 7 | // For more information on custom assertions see: 8 | // http://nightwatchjs.org/guide#writing-custom-assertions 9 | 10 | exports.assertion = function (selector, count) { 11 | this.message = 'Testing if element <' + selector + '> has count: ' + count 12 | this.expected = count 13 | this.pass = function (val) { 14 | return val === this.expected 15 | } 16 | this.value = function (res) { 17 | return res.value 18 | } 19 | this.command = function (cb) { 20 | var self = this 21 | return this.api.execute(function (selector) { 22 | return document.querySelectorAll(selector).length 23 | }, [selector], function (res) { 24 | cb.call(self, res) 25 | }) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /VueStudy00-HelloWorld/.eslintrc.js: -------------------------------------------------------------------------------- 1 | // https://eslint.org/docs/user-guide/configuring 2 | 3 | module.exports = { 4 | root: true, 5 | parserOptions: { 6 | parser: 'babel-eslint' 7 | }, 8 | env: { 9 | browser: true, 10 | }, 11 | extends: [ 12 | // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention 13 | // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. 14 | 'plugin:vue/essential', 15 | // https://github.com/standard/standard/blob/master/docs/RULES-en.md 16 | 'standard' 17 | ], 18 | // required to lint *.vue files 19 | plugins: [ 20 | 'vue' 21 | ], 22 | // add your custom rules here 23 | rules: { 24 | // allow async-await 25 | 'generator-star-spacing': 'off', 26 | // allow debugger during development 27 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /VueStudy07-Vuex/vuex-demo/test/e2e/custom-assertions/elementCount.js: -------------------------------------------------------------------------------- 1 | // A custom Nightwatch assertion. 2 | // The assertion name is the filename. 3 | // Example usage: 4 | // 5 | // browser.assert.elementCount(selector, count) 6 | // 7 | // For more information on custom assertions see: 8 | // http://nightwatchjs.org/guide#writing-custom-assertions 9 | 10 | exports.assertion = function (selector, count) { 11 | this.message = 'Testing if element <' + selector + '> has count: ' + count 12 | this.expected = count 13 | this.pass = function (val) { 14 | return val === this.expected 15 | } 16 | this.value = function (res) { 17 | return res.value 18 | } 19 | this.command = function (cb) { 20 | var self = this 21 | return this.api.execute(function (selector) { 22 | return document.querySelectorAll(selector).length 23 | }, [selector], function (res) { 24 | cb.call(self, res) 25 | }) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo-old/test/e2e/custom-assertions/elementCount.js: -------------------------------------------------------------------------------- 1 | // A custom Nightwatch assertion. 2 | // The assertion name is the filename. 3 | // Example usage: 4 | // 5 | // browser.assert.elementCount(selector, count) 6 | // 7 | // For more information on custom assertions see: 8 | // http://nightwatchjs.org/guide#writing-custom-assertions 9 | 10 | exports.assertion = function (selector, count) { 11 | this.message = 'Testing if element <' + selector + '> has count: ' + count 12 | this.expected = count 13 | this.pass = function (val) { 14 | return val === this.expected 15 | } 16 | this.value = function (res) { 17 | return res.value 18 | } 19 | this.command = function (cb) { 20 | var self = this 21 | return this.api.execute(function (selector) { 22 | return document.querySelectorAll(selector).length 23 | }, [selector], function (res) { 24 | cb.call(self, res) 25 | }) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-01/test/e2e/custom-assertions/elementCount.js: -------------------------------------------------------------------------------- 1 | // A custom Nightwatch assertion. 2 | // The assertion name is the filename. 3 | // Example usage: 4 | // 5 | // browser.assert.elementCount(selector, count) 6 | // 7 | // For more information on custom assertions see: 8 | // http://nightwatchjs.org/guide#writing-custom-assertions 9 | 10 | exports.assertion = function (selector, count) { 11 | this.message = 'Testing if element <' + selector + '> has count: ' + count 12 | this.expected = count 13 | this.pass = function (val) { 14 | return val === this.expected 15 | } 16 | this.value = function (res) { 17 | return res.value 18 | } 19 | this.command = function (cb) { 20 | var self = this 21 | return this.api.execute(function (selector) { 22 | return document.querySelectorAll(selector).length 23 | }, [selector], function (res) { 24 | cb.call(self, res) 25 | }) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-02/test/e2e/custom-assertions/elementCount.js: -------------------------------------------------------------------------------- 1 | // A custom Nightwatch assertion. 2 | // The assertion name is the filename. 3 | // Example usage: 4 | // 5 | // browser.assert.elementCount(selector, count) 6 | // 7 | // For more information on custom assertions see: 8 | // http://nightwatchjs.org/guide#writing-custom-assertions 9 | 10 | exports.assertion = function (selector, count) { 11 | this.message = 'Testing if element <' + selector + '> has count: ' + count 12 | this.expected = count 13 | this.pass = function (val) { 14 | return val === this.expected 15 | } 16 | this.value = function (res) { 17 | return res.value 18 | } 19 | this.command = function (cb) { 20 | var self = this 21 | return this.api.execute(function (selector) { 22 | return document.querySelectorAll(selector).length 23 | }, [selector], function (res) { 24 | cb.call(self, res) 25 | }) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-03/test/e2e/custom-assertions/elementCount.js: -------------------------------------------------------------------------------- 1 | // A custom Nightwatch assertion. 2 | // The assertion name is the filename. 3 | // Example usage: 4 | // 5 | // browser.assert.elementCount(selector, count) 6 | // 7 | // For more information on custom assertions see: 8 | // http://nightwatchjs.org/guide#writing-custom-assertions 9 | 10 | exports.assertion = function (selector, count) { 11 | this.message = 'Testing if element <' + selector + '> has count: ' + count 12 | this.expected = count 13 | this.pass = function (val) { 14 | return val === this.expected 15 | } 16 | this.value = function (res) { 17 | return res.value 18 | } 19 | this.command = function (cb) { 20 | var self = this 21 | return this.api.execute(function (selector) { 22 | return document.querySelectorAll(selector).length 23 | }, [selector], function (res) { 24 | cb.call(self, res) 25 | }) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-04/test/e2e/custom-assertions/elementCount.js: -------------------------------------------------------------------------------- 1 | // A custom Nightwatch assertion. 2 | // The assertion name is the filename. 3 | // Example usage: 4 | // 5 | // browser.assert.elementCount(selector, count) 6 | // 7 | // For more information on custom assertions see: 8 | // http://nightwatchjs.org/guide#writing-custom-assertions 9 | 10 | exports.assertion = function (selector, count) { 11 | this.message = 'Testing if element <' + selector + '> has count: ' + count 12 | this.expected = count 13 | this.pass = function (val) { 14 | return val === this.expected 15 | } 16 | this.value = function (res) { 17 | return res.value 18 | } 19 | this.command = function (cb) { 20 | var self = this 21 | return this.api.execute(function (selector) { 22 | return document.querySelectorAll(selector).length 23 | }, [selector], function (res) { 24 | cb.call(self, res) 25 | }) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-05/test/e2e/custom-assertions/elementCount.js: -------------------------------------------------------------------------------- 1 | // A custom Nightwatch assertion. 2 | // The assertion name is the filename. 3 | // Example usage: 4 | // 5 | // browser.assert.elementCount(selector, count) 6 | // 7 | // For more information on custom assertions see: 8 | // http://nightwatchjs.org/guide#writing-custom-assertions 9 | 10 | exports.assertion = function (selector, count) { 11 | this.message = 'Testing if element <' + selector + '> has count: ' + count 12 | this.expected = count 13 | this.pass = function (val) { 14 | return val === this.expected 15 | } 16 | this.value = function (res) { 17 | return res.value 18 | } 19 | this.command = function (cb) { 20 | var self = this 21 | return this.api.execute(function (selector) { 22 | return document.querySelectorAll(selector).length 23 | }, [selector], function (res) { 24 | cb.call(self, res) 25 | }) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /VueStudy07-Vuex/vuex-demo/.eslintrc.js: -------------------------------------------------------------------------------- 1 | // https://eslint.org/docs/user-guide/configuring 2 | 3 | module.exports = { 4 | root: true, 5 | parserOptions: { 6 | parser: 'babel-eslint' 7 | }, 8 | env: { 9 | browser: true, 10 | }, 11 | extends: [ 12 | // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention 13 | // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. 14 | 'plugin:vue/essential', 15 | // https://github.com/standard/standard/blob/master/docs/RULES-en.md 16 | 'standard' 17 | ], 18 | // required to lint *.vue files 19 | plugins: [ 20 | 'vue' 21 | ], 22 | // add your custom rules here 23 | rules: { 24 | // allow async-await 25 | 'generator-star-spacing': 'off', 26 | // allow debugger during development 27 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo-old/.eslintrc.js: -------------------------------------------------------------------------------- 1 | // https://eslint.org/docs/user-guide/configuring 2 | 3 | module.exports = { 4 | root: true, 5 | parserOptions: { 6 | parser: 'babel-eslint' 7 | }, 8 | env: { 9 | browser: true, 10 | }, 11 | extends: [ 12 | // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention 13 | // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. 14 | 'plugin:vue/essential', 15 | // https://github.com/standard/standard/blob/master/docs/RULES-en.md 16 | 'standard' 17 | ], 18 | // required to lint *.vue files 19 | plugins: [ 20 | 'vue' 21 | ], 22 | // add your custom rules here 23 | rules: { 24 | // allow async-await 25 | 'generator-star-spacing': 'off', 26 | // allow debugger during development 27 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-01/.eslintrc.js: -------------------------------------------------------------------------------- 1 | // https://eslint.org/docs/user-guide/configuring 2 | 3 | module.exports = { 4 | root: true, 5 | parserOptions: { 6 | parser: 'babel-eslint' 7 | }, 8 | env: { 9 | browser: true, 10 | }, 11 | extends: [ 12 | // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention 13 | // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. 14 | 'plugin:vue/essential', 15 | // https://github.com/standard/standard/blob/master/docs/RULES-en.md 16 | 'standard' 17 | ], 18 | // required to lint *.vue files 19 | plugins: [ 20 | 'vue' 21 | ], 22 | // add your custom rules here 23 | rules: { 24 | // allow async-await 25 | 'generator-star-spacing': 'off', 26 | // allow debugger during development 27 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-02/.eslintrc.js: -------------------------------------------------------------------------------- 1 | // https://eslint.org/docs/user-guide/configuring 2 | 3 | module.exports = { 4 | root: true, 5 | parserOptions: { 6 | parser: 'babel-eslint' 7 | }, 8 | env: { 9 | browser: true, 10 | }, 11 | extends: [ 12 | // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention 13 | // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. 14 | 'plugin:vue/essential', 15 | // https://github.com/standard/standard/blob/master/docs/RULES-en.md 16 | 'standard' 17 | ], 18 | // required to lint *.vue files 19 | plugins: [ 20 | 'vue' 21 | ], 22 | // add your custom rules here 23 | rules: { 24 | // allow async-await 25 | 'generator-star-spacing': 'off', 26 | // allow debugger during development 27 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-03/.eslintrc.js: -------------------------------------------------------------------------------- 1 | // https://eslint.org/docs/user-guide/configuring 2 | 3 | module.exports = { 4 | root: true, 5 | parserOptions: { 6 | parser: 'babel-eslint' 7 | }, 8 | env: { 9 | browser: true, 10 | }, 11 | extends: [ 12 | // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention 13 | // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. 14 | 'plugin:vue/essential', 15 | // https://github.com/standard/standard/blob/master/docs/RULES-en.md 16 | 'standard' 17 | ], 18 | // required to lint *.vue files 19 | plugins: [ 20 | 'vue' 21 | ], 22 | // add your custom rules here 23 | rules: { 24 | // allow async-await 25 | 'generator-star-spacing': 'off', 26 | // allow debugger during development 27 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-04/.eslintrc.js: -------------------------------------------------------------------------------- 1 | // https://eslint.org/docs/user-guide/configuring 2 | 3 | module.exports = { 4 | root: true, 5 | parserOptions: { 6 | parser: 'babel-eslint' 7 | }, 8 | env: { 9 | browser: true, 10 | }, 11 | extends: [ 12 | // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention 13 | // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. 14 | 'plugin:vue/essential', 15 | // https://github.com/standard/standard/blob/master/docs/RULES-en.md 16 | 'standard' 17 | ], 18 | // required to lint *.vue files 19 | plugins: [ 20 | 'vue' 21 | ], 22 | // add your custom rules here 23 | rules: { 24 | // allow async-await 25 | 'generator-star-spacing': 'off', 26 | // allow debugger during development 27 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-05/.eslintrc.js: -------------------------------------------------------------------------------- 1 | // https://eslint.org/docs/user-guide/configuring 2 | 3 | module.exports = { 4 | root: true, 5 | parserOptions: { 6 | parser: 'babel-eslint' 7 | }, 8 | env: { 9 | browser: true, 10 | }, 11 | extends: [ 12 | // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention 13 | // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. 14 | 'plugin:vue/essential', 15 | // https://github.com/standard/standard/blob/master/docs/RULES-en.md 16 | 'standard' 17 | ], 18 | // required to lint *.vue files 19 | plugins: [ 20 | 'vue' 21 | ], 22 | // add your custom rules here 23 | rules: { 24 | // allow async-await 25 | 'generator-star-spacing': 'off', 26 | // allow debugger during development 27 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/styles/transition.scss: -------------------------------------------------------------------------------- 1 | //globl transition css 2 | 3 | /*fade*/ 4 | .fade-enter-active, 5 | .fade-leave-active { 6 | transition: opacity 0.28s; 7 | } 8 | 9 | .fade-enter, 10 | .fade-leave-active { 11 | opacity: 0; 12 | } 13 | 14 | /*fade-transform*/ 15 | .fade-transform-leave-active, 16 | .fade-transform-enter-active { 17 | transition: all .5s; 18 | } 19 | 20 | .fade-transform-enter { 21 | opacity: 0; 22 | transform: translateX(-30px); 23 | } 24 | 25 | .fade-transform-leave-to { 26 | opacity: 0; 27 | transform: translateX(30px); 28 | } 29 | 30 | /*fade*/ 31 | .breadcrumb-enter-active, 32 | .breadcrumb-leave-active { 33 | transition: all .5s; 34 | } 35 | 36 | .breadcrumb-enter, 37 | .breadcrumb-leave-active { 38 | opacity: 0; 39 | transform: translateX(20px); 40 | } 41 | 42 | .breadcrumb-move { 43 | transition: all .5s; 44 | } 45 | 46 | .breadcrumb-leave-active { 47 | position: absolute; 48 | } 49 | -------------------------------------------------------------------------------- /VueStudy09-Cheerio/cheerio-demo/.eslintrc.js: -------------------------------------------------------------------------------- 1 | // https://eslint.org/docs/user-guide/configuring 2 | 3 | module.exports = { 4 | root: true, 5 | parserOptions: { 6 | parser: 'babel-eslint' 7 | }, 8 | env: { 9 | browser: true, 10 | }, 11 | extends: [ 12 | // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention 13 | // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. 14 | 'plugin:vue/essential', 15 | // https://github.com/standard/standard/blob/master/docs/RULES-en.md 16 | 'standard' 17 | ], 18 | // required to lint *.vue files 19 | plugins: [ 20 | 'vue' 21 | ], 22 | // add your custom rules here 23 | rules: { 24 | // allow async-await 25 | 'generator-star-spacing': 'off', 26 | // allow debugger during development 27 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo/src/icons/svg/eye.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-demo/test/e2e/custom-assertions/elementCount.js: -------------------------------------------------------------------------------- 1 | // A custom Nightwatch assertion. 2 | // The assertion name is the filename. 3 | // Example usage: 4 | // 5 | // browser.assert.elementCount(selector, count) 6 | // 7 | // For more information on custom assertions see: 8 | // http://nightwatchjs.org/guide#writing-custom-assertions 9 | 10 | exports.assertion = function (selector, count) { 11 | this.message = 'Testing if element <' + selector + '> has count: ' + count 12 | this.expected = count 13 | this.pass = function (val) { 14 | return val === this.expected 15 | } 16 | this.value = function (res) { 17 | return res.value 18 | } 19 | this.command = function (cb) { 20 | var self = this 21 | return this.api.execute(function (selector) { 22 | return document.querySelectorAll(selector).length 23 | }, [selector], function (res) { 24 | cb.call(self, res) 25 | }) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-ui-demo/test/e2e/custom-assertions/elementCount.js: -------------------------------------------------------------------------------- 1 | // A custom Nightwatch assertion. 2 | // The assertion name is the filename. 3 | // Example usage: 4 | // 5 | // browser.assert.elementCount(selector, count) 6 | // 7 | // For more information on custom assertions see: 8 | // http://nightwatchjs.org/guide#writing-custom-assertions 9 | 10 | exports.assertion = function (selector, count) { 11 | this.message = 'Testing if element <' + selector + '> has count: ' + count 12 | this.expected = count 13 | this.pass = function (val) { 14 | return val === this.expected 15 | } 16 | this.value = function (res) { 17 | return res.value 18 | } 19 | this.command = function (cb) { 20 | var self = this 21 | return this.api.execute(function (selector) { 22 | return document.querySelectorAll(selector).length 23 | }, [selector], function (res) { 24 | cb.call(self, res) 25 | }) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-demo/test/e2e/custom-assertions/elementCount.js: -------------------------------------------------------------------------------- 1 | // A custom Nightwatch assertion. 2 | // The assertion name is the filename. 3 | // Example usage: 4 | // 5 | // browser.assert.elementCount(selector, count) 6 | // 7 | // For more information on custom assertions see: 8 | // http://nightwatchjs.org/guide#writing-custom-assertions 9 | 10 | exports.assertion = function (selector, count) { 11 | this.message = 'Testing if element <' + selector + '> has count: ' + count 12 | this.expected = count 13 | this.pass = function (val) { 14 | return val === this.expected 15 | } 16 | this.value = function (res) { 17 | return res.value 18 | } 19 | this.command = function (cb) { 20 | var self = this 21 | return this.api.execute(function (selector) { 22 | return document.querySelectorAll(selector).length 23 | }, [selector], function (res) { 24 | cb.call(self, res) 25 | }) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-demo/.eslintrc.js: -------------------------------------------------------------------------------- 1 | // https://eslint.org/docs/user-guide/configuring 2 | 3 | module.exports = { 4 | root: true, 5 | parserOptions: { 6 | parser: 'babel-eslint' 7 | }, 8 | env: { 9 | browser: true, 10 | }, 11 | extends: [ 12 | // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention 13 | // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. 14 | 'plugin:vue/essential', 15 | // https://github.com/standard/standard/blob/master/docs/RULES-en.md 16 | 'standard' 17 | ], 18 | // required to lint *.vue files 19 | plugins: [ 20 | 'vue' 21 | ], 22 | // add your custom rules here 23 | rules: { 24 | // allow async-await 25 | 'generator-star-spacing': 'off', 26 | // allow debugger during development 27 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-demo/.eslintrc.js: -------------------------------------------------------------------------------- 1 | // https://eslint.org/docs/user-guide/configuring 2 | 3 | module.exports = { 4 | root: true, 5 | parserOptions: { 6 | parser: 'babel-eslint' 7 | }, 8 | env: { 9 | browser: true, 10 | }, 11 | extends: [ 12 | // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention 13 | // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. 14 | 'plugin:vue/essential', 15 | // https://github.com/standard/standard/blob/master/docs/RULES-en.md 16 | 'standard' 17 | ], 18 | // required to lint *.vue files 19 | plugins: [ 20 | 'vue' 21 | ], 22 | // add your custom rules here 23 | rules: { 24 | // allow async-await 25 | 'generator-star-spacing': 'off', 26 | // allow debugger during development 27 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-oauth-demo/test/e2e/custom-assertions/elementCount.js: -------------------------------------------------------------------------------- 1 | // A custom Nightwatch assertion. 2 | // The assertion name is the filename. 3 | // Example usage: 4 | // 5 | // browser.assert.elementCount(selector, count) 6 | // 7 | // For more information on custom assertions see: 8 | // http://nightwatchjs.org/guide#writing-custom-assertions 9 | 10 | exports.assertion = function (selector, count) { 11 | this.message = 'Testing if element <' + selector + '> has count: ' + count 12 | this.expected = count 13 | this.pass = function (val) { 14 | return val === this.expected 15 | } 16 | this.value = function (res) { 17 | return res.value 18 | } 19 | this.command = function (cb) { 20 | var self = this 21 | return this.api.execute(function (selector) { 22 | return document.querySelectorAll(selector).length 23 | }, [selector], function (res) { 24 | cb.call(self, res) 25 | }) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-simple-ui-demo/.eslintrc.js: -------------------------------------------------------------------------------- 1 | // https://eslint.org/docs/user-guide/configuring 2 | 3 | module.exports = { 4 | root: true, 5 | parserOptions: { 6 | parser: 'babel-eslint' 7 | }, 8 | env: { 9 | browser: true, 10 | }, 11 | extends: [ 12 | // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention 13 | // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. 14 | 'plugin:vue/essential', 15 | // https://github.com/standard/standard/blob/master/docs/RULES-en.md 16 | 'standard' 17 | ], 18 | // required to lint *.vue files 19 | plugins: [ 20 | 'vue' 21 | ], 22 | // add your custom rules here 23 | rules: { 24 | // allow async-await 25 | 'generator-star-spacing': 'off', 26 | // allow debugger during development 27 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /VueStudy05-OfficialTemplates/my-webpack-ui-axios-oauth-demo/.eslintrc.js: -------------------------------------------------------------------------------- 1 | // https://eslint.org/docs/user-guide/configuring 2 | 3 | module.exports = { 4 | root: true, 5 | parserOptions: { 6 | parser: 'babel-eslint' 7 | }, 8 | env: { 9 | browser: true, 10 | }, 11 | extends: [ 12 | // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention 13 | // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. 14 | 'plugin:vue/essential', 15 | // https://github.com/standard/standard/blob/master/docs/RULES-en.md 16 | 'standard' 17 | ], 18 | // required to lint *.vue files 19 | plugins: [ 20 | 'vue' 21 | ], 22 | // add your custom rules here 23 | rules: { 24 | // allow async-await 25 | 'generator-star-spacing': 'off', 26 | // allow debugger during development 27 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-02/README.md: -------------------------------------------------------------------------------- 1 | # vue-router-02 2 | 3 | > A Vue.js project 4 | 5 | #### 项目介绍 6 | 7 | 1. 感谢官网文档的嵌套路由:[https://router.vuejs.org/zh/guide/essentials/nested-routes.html](https://router.vuejs.org/zh/guide/essentials/nested-routes.html) 8 | 9 | ##### Vue1.0和Vue2.0遇到的不同 10 | 11 | 1. 子路由subRoutes已经遗弃了,Vue2.0用的是children 12 | 13 | ## Build Setup 14 | 15 | ``` bash 16 | # install dependencies 17 | npm install 18 | 19 | # serve with hot reload at localhost:8080 20 | npm run dev 21 | 22 | # build for production with minification 23 | npm run build 24 | 25 | # build for production and view the bundle analyzer report 26 | npm run build --report 27 | 28 | # run unit tests 29 | npm run unit 30 | 31 | # run e2e tests 32 | npm run e2e 33 | 34 | # run all tests 35 | npm test 36 | ``` 37 | 38 | For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). 39 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-05/README.md: -------------------------------------------------------------------------------- 1 | # vue-router-05 2 | 3 | > A Vue.js project 4 | 5 | #### 项目介绍 6 | 7 | 1. 感谢官网文档的导航守卫:[https://router.vuejs.org/zh/guide/advanced/navigation-guards.html](https://router.vuejs.org/zh/guide/advanced/navigation-guards.html) 8 | 9 | ##### Vue1.0和Vue2.0遇到的不同 10 | 11 | 1. 子路由subRoutes已经遗弃了,Vue2.0用的是children 12 | 13 | ## Build Setup 14 | 15 | ``` bash 16 | # install dependencies 17 | npm install 18 | 19 | # serve with hot reload at localhost:8080 20 | npm run dev 21 | 22 | # build for production with minification 23 | npm run build 24 | 25 | # build for production and view the bundle analyzer report 26 | npm run build --report 27 | 28 | # run unit tests 29 | npm run unit 30 | 31 | # run e2e tests 32 | npm run e2e 33 | 34 | # run all tests 35 | npm test 36 | ``` 37 | 38 | For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). 39 | -------------------------------------------------------------------------------- /VueStudy08-JWT/jwt-demo-old/util/util.js: -------------------------------------------------------------------------------- 1 | // 建立公共方法 2 | export default{ 3 | // 属性复制 4 | copyProperty: function (p, c) { 5 | c = c || {} 6 | for (var i in p) { 7 | // 属性i是否为p对象的自有属性 8 | if (p.hasOwnProperty(i)) { 9 | // 属性i是否为复杂类型 10 | if (typeof p[i] === 'object') { 11 | // 如果p[i]是数组,则创建一个新数组 12 | // 如果p[i]是普通对象,则创建一个新对象 13 | // c[i] = Array.isArray(p[i]) ? [] : {} 14 | c[i] = Array.isArray(p[i]) ? [] : p[i] != null ? {} : null 15 | // 递归拷贝复杂类型的属性 16 | this.copyProperty(p[i], c[i]) 17 | } else { 18 | // 属性是基础类型时,直接拷贝 19 | c[i] = p[i] 20 | } 21 | } 22 | } 23 | return c 24 | }, 25 | // 手机端返回true,PC端返回false 26 | isMobile: function () { 27 | return navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /VueStudy02-Components/Part-1/component1-1-全局组件.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 全局组件 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 34 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-01/README.md: -------------------------------------------------------------------------------- 1 | # vue-router-01 2 | 3 | > A Vue.js project 4 | 5 | #### 项目介绍 6 | 7 | 1. 感谢华洛的vue2 设置router-view默认路径:[https://blog.csdn.net/sdta25196/article/details/80268931](https://blog.csdn.net/sdta25196/article/details/80268931) 8 | 9 | ##### Vue1.0和Vue2.0遇到的不同 10 | 11 | 1. v-link指令已经遗弃了,Vue2.0用的是Go to Foo 12 | 13 | ## Build Setup 14 | 15 | ``` bash 16 | # install dependencies 17 | npm install 18 | 19 | # serve with hot reload at localhost:8080 20 | npm run dev 21 | 22 | # build for production with minification 23 | npm run build 24 | 25 | # build for production and view the bundle analyzer report 26 | npm run build --report 27 | 28 | # run unit tests 29 | npm run unit 30 | 31 | # run e2e tests 32 | npm run e2e 33 | 34 | # run all tests 35 | npm test 36 | ``` 37 | 38 | For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). 39 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-03/src/components/News.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | News01 6 | News02 7 | News03 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 28 | 29 | 30 | 32 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-04/src/components/News.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | News01 6 | News02 7 | News03 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 28 | 29 | 30 | 32 | -------------------------------------------------------------------------------- /VueStudy06-Router/vue-router-05/src/components/News.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | News01 6 | News02 7 | News03 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 28 | 29 | 30 | 32 | -------------------------------------------------------------------------------- /VueStudy00-HelloWorld/README.md: -------------------------------------------------------------------------------- 1 | # VueStudy00-HelloWorld 2 | 3 | > Vue.js入门构建运行打包 4 | 5 | #### 项目介绍 6 | 7 | 1. 菜鸟教程的Node.js安装:[http://www.runoob.com/nodejs/nodejs-install-setup.html](http://www.runoob.com/nodejs/nodejs-install-setup.html) 8 | 2. 菜鸟教程的Vue.js安装:[http://www.runoob.com/vue2/vue-install.html](http://www.runoob.com/vue2/vue-install.html) 9 | 3. 感谢Yin-X的vue-cli(vue脚手架)超详细教程:[https://blog.csdn.net/wulala_hei/article/details/80488674](https://blog.csdn.net/wulala_hei/article/details/80488674) 10 | 4. 构建项目出现的问题:[https://www.cnblogs.com/xiyuan2016/p/7866044.html](https://www.cnblogs.com/xiyuan2016/p/7866044.html) 11 | 5. 感谢sleepwalker_1992的npm install错误安装chromedriver失败的解决办法:[https://blog.csdn.net/sleepwalker_1992/article/details/81461117](https://blog.csdn.net/sleepwalker_1992/article/details/81461117) 12 | 13 | #### 软件架构 14 | 15 | 1. xxxx 16 | 17 | #### 安装教程 18 | 19 | 1. xxxx 20 | 21 | #### 使用说明 22 | 23 | 1. xxxx 24 | 25 | #### 参与贡献 26 | 27 | 1. Fork 本项目 28 | 2. 新建 Feat_xxx 分支 29 | 3. 提交代码 30 | 4. 新建 Pull Request 31 | --------------------------------------------------------------------------------
当前值:{{ count }}
路由名称:{{ this.$route.name }}
当前路径:{{ this.$route.path }}
params参数:{{ this.$route.params }}
query参数:{{ this.$route.query }}