Compare commits

...

3 Commits

Author SHA1 Message Date
Kane 19949865ab 保存进度! 2022-12-05 00:23:26 +08:00
Kane ca8b49448a 保存进度! 2022-12-02 23:11:28 +08:00
Kane Wang ace0699187 保存进度! 2022-12-02 20:16:03 +08:00
12 changed files with 257 additions and 153 deletions

1
node_modules/.package_versions.json generated vendored Normal file
View File

@ -0,0 +1 @@
{}

View File

@ -3473,6 +3473,12 @@
"resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-4.2.5.tgz",
"integrity": "sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg=="
},
"node_modules/asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
"peer": true
},
"node_modules/at-least-node": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/at-least-node/-/at-least-node-1.0.0.tgz",
@ -3505,6 +3511,17 @@
"postcss": "^8.1.0"
}
},
"node_modules/axios": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.2.0.tgz",
"integrity": "sha512-zT7wZyNYu3N5Bu0wuZ6QccIf93Qk1eV8LOewxgjOZFd2DenOs98cJ7+Y6703d0wkaXGY6/nZd4EweJaHz9uzQw==",
"peer": true,
"dependencies": {
"follow-redirects": "^1.15.0",
"form-data": "^4.0.0",
"proxy-from-env": "^1.1.0"
}
},
"node_modules/babel-loader": {
"version": "8.3.0",
"resolved": "https://registry.npmmirror.com/babel-loader/-/babel-loader-8.3.0.tgz",
@ -4090,6 +4107,18 @@
"integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==",
"dev": true
},
"node_modules/combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"peer": true,
"dependencies": {
"delayed-stream": "~1.0.0"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/commander": {
"version": "8.3.0",
"resolved": "https://registry.npmmirror.com/commander/-/commander-8.3.0.tgz",
@ -4774,6 +4803,15 @@
"node": ">= 0.4"
}
},
"node_modules/delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
"peer": true,
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/depd": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/depd/-/depd-2.0.0.tgz",
@ -4944,7 +4982,7 @@
},
"node_modules/element-plus": {
"version": "2.2.25",
"resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.2.25.tgz",
"resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.2.25.tgz",
"integrity": "sha512-HC8CWY31e6pPyBpgqI0QnWkBgs0vRzdYnEw3mpdM/NlKfp0PtNFX7NESQLomqoIulH5ftL09hjQmJNvZBQpthQ==",
"dependencies": {
"@ctrl/tinycolor": "^3.4.1",
@ -5936,7 +5974,6 @@
"version": "1.15.2",
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.2.tgz",
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
"dev": true,
"engines": {
"node": ">=4.0"
},
@ -5946,6 +5983,20 @@
}
}
},
"node_modules/form-data": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
"peer": true,
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/forwarded": {
"version": "0.2.0",
"resolved": "https://registry.npmmirror.com/forwarded/-/forwarded-0.2.0.tgz",
@ -7327,7 +7378,6 @@
"version": "1.52.0",
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
"dev": true,
"engines": {
"node": ">= 0.6"
}
@ -7336,7 +7386,6 @@
"version": "2.1.35",
"resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
"dev": true,
"dependencies": {
"mime-db": "1.52.0"
},
@ -8718,6 +8767,12 @@
"node": ">= 0.10"
}
},
"node_modules/proxy-from-env": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
"peer": true
},
"node_modules/pseudomap": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/pseudomap/-/pseudomap-1.0.2.tgz",
@ -10349,7 +10404,7 @@
},
"node_modules/vuex": {
"version": "4.0.2",
"resolved": "https://registry.npmmirror.com/vuex/-/vuex-4.0.2.tgz",
"resolved": "https://registry.npmjs.org/vuex/-/vuex-4.0.2.tgz",
"integrity": "sha512-M6r8uxELjZIK8kTKDGgZTYX/ahzblnzC4isU1tpmEuOIIKmV+TRdc+H4s8ds2NuZ7wpUTdGRzJRtoj+lI+pc0Q==",
"dependencies": {
"@vue/devtools-api": "^6.0.0-beta.11"
@ -13693,6 +13748,12 @@
"resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-4.2.5.tgz",
"integrity": "sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg=="
},
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
"peer": true
},
"at-least-node": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/at-least-node/-/at-least-node-1.0.0.tgz",
@ -13713,6 +13774,17 @@
"postcss-value-parser": "^4.2.0"
}
},
"axios": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.2.0.tgz",
"integrity": "sha512-zT7wZyNYu3N5Bu0wuZ6QccIf93Qk1eV8LOewxgjOZFd2DenOs98cJ7+Y6703d0wkaXGY6/nZd4EweJaHz9uzQw==",
"peer": true,
"requires": {
"follow-redirects": "^1.15.0",
"form-data": "^4.0.0",
"proxy-from-env": "^1.1.0"
}
},
"babel-loader": {
"version": "8.3.0",
"resolved": "https://registry.npmmirror.com/babel-loader/-/babel-loader-8.3.0.tgz",
@ -14199,6 +14271,15 @@
"integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==",
"dev": true
},
"combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"peer": true,
"requires": {
"delayed-stream": "~1.0.0"
}
},
"commander": {
"version": "8.3.0",
"resolved": "https://registry.npmmirror.com/commander/-/commander-8.3.0.tgz",
@ -14727,6 +14808,12 @@
"object-keys": "^1.1.1"
}
},
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
"peer": true
},
"depd": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/depd/-/depd-2.0.0.tgz",
@ -14872,7 +14959,7 @@
},
"element-plus": {
"version": "2.2.25",
"resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.2.25.tgz",
"resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.2.25.tgz",
"integrity": "sha512-HC8CWY31e6pPyBpgqI0QnWkBgs0vRzdYnEw3mpdM/NlKfp0PtNFX7NESQLomqoIulH5ftL09hjQmJNvZBQpthQ==",
"requires": {
"@ctrl/tinycolor": "^3.4.1",
@ -15668,8 +15755,18 @@
"follow-redirects": {
"version": "1.15.2",
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.2.tgz",
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
"dev": true
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA=="
},
"form-data": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
"peer": true,
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
}
},
"forwarded": {
"version": "0.2.0",
@ -16771,14 +16868,12 @@
"mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
"dev": true
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="
},
"mime-types": {
"version": "2.1.35",
"resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
"dev": true,
"requires": {
"mime-db": "1.52.0"
}
@ -17793,6 +17888,12 @@
}
}
},
"proxy-from-env": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
"peer": true
},
"pseudomap": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/pseudomap/-/pseudomap-1.0.2.tgz",
@ -19115,7 +19216,7 @@
},
"vuex": {
"version": "4.0.2",
"resolved": "https://registry.npmmirror.com/vuex/-/vuex-4.0.2.tgz",
"resolved": "https://registry.npmjs.org/vuex/-/vuex-4.0.2.tgz",
"integrity": "sha512-M6r8uxELjZIK8kTKDGgZTYX/ahzblnzC4isU1tpmEuOIIKmV+TRdc+H4s8ds2NuZ7wpUTdGRzJRtoj+lI+pc0Q==",
"requires": {
"@vue/devtools-api": "^6.0.0-beta.11"

View File

@ -2,21 +2,17 @@
* @Author: Kane
* @Date: 2022-11-12 23:32:20
* @LastEditors: Kane
* @LastEditTime: 2022-11-29 13:15:19
* @FilePath: \hello-cli\src\assets\css\app.css
* @LastEditTime: 2022-12-05 00:09:46
* @FilePath: \hello-cli\public\css\page.css
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
@import url("colors.css");
body {
background-color: #f4f5f7;
}
#root,
#app {
padding: 50px;
padding: 0px;
margin: 0px;
}
/* .content {

View File

@ -2,7 +2,7 @@
* @Author: Kane
* @Date: 2022-11-22 17:50:49
* @LastEditors: Kane
* @LastEditTime: 2022-11-29 20:32:41
* @LastEditTime: 2022-12-05 00:19:08
* @FilePath: \hello-cli\public\index.html
* @Description:
*
@ -16,25 +16,25 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<title><%= htmlWebpackPlugin.options.title %></title>
<link rel="stylesheet" href="<%= BASE_URL %>css/root.css" />
<link rel="stylesheet" href="<%= BASE_URL %>css/normalize.css" />
<link rel="stylesheet" href="<%= BASE_URL %>css/page.css" />
<!-- <link rel="stylesheet" href="<%= BASE_URL %>css/root.css" /> -->
<!-- <link rel="stylesheet" href="<%= BASE_URL %>css/normalize.css" /> -->
<!-- <link rel="stylesheet" href="<%= BASE_URL %>css/page.css" /> -->
</head>
<style>
.v-cloak {
display: none;
}
</style>
<body>
<noscript>
<strong
>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't
<strong>
We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't
work properly without JavaScript enabled. Please enable it to
continue.</strong
>
continue.
</strong>
</noscript>
<div id="app" v-cloak></div>
<!-- built files will be auto injected -->
</body>
</html>

View File

@ -2,7 +2,7 @@
* @Author: Kane
* @Date: 2022-11-22 17:50:49
* @LastEditors: Kane
* @LastEditTime: 2022-11-29 17:50:22
* @LastEditTime: 2022-12-05 00:21:20
* @FilePath: \hello-cli\src\App.vue
* @Description:
*
@ -10,52 +10,63 @@
-->
<template>
<div class="content">
<h1>学习vuex</h1>
<div><App1></App1> <App2></App2></div>
<el-button type="warning" @click="onClearCount">清零</el-button>
<div class="banner">
<span>标题</span>
</div>
<div class="container">
<div class="nav"></div>
<div class="view"></div>
</div>
</div>
<hr />
</template>
<script>
import App1 from "./components/vuex/App1.vue";
import App2 from "./components/vuex/App2.vue";
export default {
name: "App",
components: {
App1,
App2,
},
methods: {
onClearCount() {
this.$store.commit("clearCount");
},
},
components: {},
methods: {},
};
</script>
<style>
<style scoped>
@import url("assets/css/colors.css");
#app {
background-color: #f4f5f7;
}
.content {
background-color: #fff;
height: 100vh;
width: 100vw;
min-width: 1280px;
padding: 0px;
}
.banner {
height: 50px;
padding: 0px;
}
.container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 40rem;
margin: 0px auto;
border-radius: 5px;
padding: 50px;
/* border: 1px solid red; */
height: calc(100% - 50px);
padding: 0px;
}
#app div {
padding: 15px;
.nav {
flex: 0 0 200px;
background-color: bisque;
padding: 0px;
}
#app div > * + * {
margin-left: 1rem;
.view {
flex-grow: 1;
flex-shrink: 1;
overflow-y: auto;
overflow-x: auto;
background-color: antiquewhite;
/* min-width: 800px; */
}
hr {

View File

@ -0,0 +1,17 @@
/*
* @Author: Kane
* @Date: 2022-12-05 00:07:49
* @LastEditors: Kane
* @LastEditTime: 2022-12-05 00:16:31
* @FilePath: \hello-cli\src\css\global.css
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
html,
body,
#app {
padding: 0px;
margin: 0px;
overflow: hidden;
}

View File

@ -0,0 +1,25 @@
<!--
* @Author: Kane
* @Date: 2022-12-02 22:44:12
* @LastEditors: Kane
* @LastEditTime: 2022-12-02 22:47:10
* @FilePath: \hello-cli\src\components\banner.vue
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
-->
<template>
<h1><slot>AppBanner</slot></h1>
</template>
<script>
export default {
name: "AppBanner",
data() {
return {};
},
};
</script>
<style>
</style>

View File

@ -0,0 +1,25 @@
<!--
* @Author: Kane
* @Date: 2022-12-02 22:50:54
* @LastEditors: Kane
* @LastEditTime: 2022-12-02 22:56:40
* @FilePath: \hello-cli\src\components\AppNav.vue
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
-->
<template>
<div></div>
</template>
<script>
export default {
name: "AppNav",
data() {
return {};
},
};
</script>
<style>
</style>

View File

@ -1,45 +0,0 @@
<!--
* @Author: Kane
* @Date: 2022-11-29 11:36:29
* @LastEditors: Kane
* @LastEditTime: 2022-11-29 15:51:01
* @FilePath: \hello-cli\src\components\vuex\App1.vue
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
-->
<template>
<div class="container">
<h1>计数器一{{ storeCount }}</h1>
<el-button type="primary" v-on:click="addCount()">更新计数器</el-button>
</div>
</template>
<script>
import { mapState } from "vuex";
export default {
name: "App-1",
data() {
return {
count: 0,
};
},
methods: {
addCount() {
this.$store.commit("increment");
},
},
computed: mapState({
storeCount: "count",
}),
};
</script>
<style scoped>
.container {
text-align: center;
display: inline-block;
background-color: #fff;
border-radius: 5px;
}
</style>

View File

@ -1,49 +0,0 @@
<!-- eslint-disable no-unused-vars -->
<!--
* @Author: Kane
* @Date: 2022-11-29 13:10:21
* @LastEditors: Kane
* @LastEditTime: 2022-11-29 16:07:22
* @FilePath: \hello-cli\src\components\vuex\App2.vue
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
-->
<template>
<div class="container">
<h1>计数器二{{ this.$store.getters.countText }}</h1>
<el-button type="danger" v-on:click="addCount()">更新计数器</el-button>
</div>
</template>
<script>
//mapState
//import { mapState } from "vuex";
export default {
name: "App-2",
data() {
return {
count: 0,
};
},
methods: {
addCount() {
this.$store.commit("increment");
},
},
computed: {
storeCount() {
return this.$store.state.count;
},
},
};
</script>
<style scoped>
.container {
text-align: center;
display: inline-block;
background-color: #fff;
border-radius: 5px;
}
</style>

View File

@ -2,7 +2,7 @@
* @Author: Kane
* @Date: 2022-11-22 17:50:49
* @LastEditors: Kane
* @LastEditTime: 2022-11-29 16:14:35
* @LastEditTime: 2022-12-05 00:19:58
* @FilePath: \hello-cli\src\main.js
* @Description:
*
@ -12,8 +12,12 @@ import { createApp } from 'vue';
import { createStore } from "vuex";
import App from './App.vue';
import ElementPlus from "element-plus";
import "./assets/css/root.css";
import "./assets/css/normalize.css";
import "./assets/css/global.css";
import 'element-plus/dist/index.css';
const app = createApp(App);
const vuex = createStore({
state() {

View File

@ -0,0 +1,18 @@
/*
* @Author: Kane
* @Date: 2022-12-02 16:09:08
* @LastEditors: Kane
* @LastEditTime: 2022-12-02 16:21:00
* @FilePath: \hello-cli\src\router\index.js
* @Description: 设置路由
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
import { createRouter, createWebHashHistory } from "vue-router";
const routes = [{ path: "/", component: undefined }];
export default createRouter({
history: createWebHashHistory(),
routes: routes,
});