├── .browserslistrc ├── public ├── favicon.ico ├── src │ ├── main.js │ ├── components │ │ └── BaseModal.vue │ └── App.vue └── index.html ├── src ├── mixins │ ├── logger.js │ └── alert.js ├── main.js ├── components │ ├── AddUser.vue │ ├── DeleteUser.vue │ └── UserAlert.vue └── App.vue ├── babel.config.js ├── .gitignore ├── .eslintrc.js └── package.json /.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not dead 4 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neto112/Vue---course-complete/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /src/mixins/logger.js: -------------------------------------------------------------------------------- 1 | export default { 2 | mounted() { 3 | console.log('Mounted!'); 4 | } 5 | }; -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue'; 2 | 3 | import App from './App.vue'; 4 | import loggerMixin from './mixins/logger.js'; 5 | 6 | const app = createApp(App) 7 | 8 | app.mixin(loggerMixin); 9 | 10 | app.mount('#app'); 11 | -------------------------------------------------------------------------------- /public/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue'; 2 | 3 | import App from './App.vue'; 4 | import BaseModal from './components/BaseModal.vue'; 5 | 6 | const app = createApp(App); 7 | 8 | app.component('base-modal', BaseModal); 9 | 10 | app.mount('#app'); 11 | -------------------------------------------------------------------------------- /src/mixins/alert.js: -------------------------------------------------------------------------------- 1 | export default { 2 | data() { 3 | return { 4 | alertIsVisible: false 5 | }; 6 | }, 7 | methods: { 8 | showAlert() { 9 | this.alertIsVisible = true; 10 | }, 11 | hideAlert() { 12 | this.alertIsVisible = false; 13 | } 14 | } 15 | }; 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | pnpm-debug.log* 14 | 15 | # Editor directories and files 16 | .idea 17 | .vscode 18 | *.suo 19 | *.ntvs* 20 | *.njsproj 21 | *.sln 22 | *.sw? 23 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true 5 | }, 6 | 'extends': [ 7 | 'plugin:vue/vue3-essential', 8 | 'eslint:recommended' 9 | ], 10 | parserOptions: { 11 | parser: 'babel-eslint' 12 | }, 13 | rules: { 14 | 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 15 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off' 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/components/AddUser.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /src/components/DeleteUser.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-first-app", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "core-js": "^3.6.5", 12 | "firebase": "^9.15.0", 13 | "vue": "^3.0.0", 14 | "vue-router": "^4.1.6", 15 | "vuex": "^4.1.0" 16 | }, 17 | "devDependencies": { 18 | "@vue/cli-plugin-babel": "~4.5.0", 19 | "@vue/cli-plugin-eslint": "~4.5.0", 20 | "@vue/cli-service": "~4.5.0", 21 | "@vue/compiler-sfc": "^3.0.0-0", 22 | "babel-eslint": "^10.1.0", 23 | "eslint": "^6.7.2", 24 | "eslint-plugin-vue": "^7.0.0-0" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 18 |
19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /public/src/components/BaseModal.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 13 | 14 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 19 | 20 | -------------------------------------------------------------------------------- /src/components/UserAlert.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 27 | 28 | -------------------------------------------------------------------------------- /public/src/App.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 30 | 31 | --------------------------------------------------------------------------------