Compare commits
17 Commits
cc9a444199
...
main
Author | SHA1 | Date | |
---|---|---|---|
febdc6c1f5 | |||
7e0f78c80e | |||
78b1aa52f2 | |||
bd3a9dc825 | |||
20e4ca5f74 | |||
fe9ac2e09a | |||
c5e743706d | |||
8424ca7203 | |||
b87c382537 | |||
d5527cc3c7 | |||
82877012c9 | |||
af1205ffed | |||
9397c45b87 | |||
225189854c | |||
28b0a0ba00 | |||
ba6705a97b | |||
e5ad9e12cc |
32
css/app.css
Normal file
32
css/app.css
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* @Author: Kane
|
||||
* @Date: 2022-11-12 23:32:20
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-11-22 23:20:12
|
||||
* @FilePath: \vue学习\css\app.css
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
*/
|
||||
@import url("colors.css");
|
||||
|
||||
body {
|
||||
background-color: var(--backupground-color);
|
||||
}
|
||||
|
||||
#root,
|
||||
#app {
|
||||
padding: 50px;
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #fff;
|
||||
width: 25rem;
|
||||
margin: 0px auto;
|
||||
border-radius: 5px;
|
||||
padding: 50px;
|
||||
}
|
21
css/colors.css
Normal file
21
css/colors.css
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* @Author: Kane
|
||||
* @Date: 2022-11-12 23:22:59
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-11-16 15:26:04
|
||||
* @FilePath: \car_dealer\css\colors.css
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
*/
|
||||
|
||||
html {
|
||||
--backupground-color: #f4f5f7ff;
|
||||
--btn-color-blue: #307dbe;
|
||||
--btn-color-yellow: #f7b24d;
|
||||
--btn-color-green: #5bad60;
|
||||
--btn-color-red: #e56651;
|
||||
--btn-font-color: #fff;
|
||||
|
||||
--input-focus-color: #e56651;
|
||||
}
|
57
css/kane.css
Normal file
57
css/kane.css
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* @Author: Kane
|
||||
* @Date: 2022-10-12 08:49:14
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-11-12 23:34:06
|
||||
* @FilePath: \car_dealer\css\kane.css
|
||||
* @Description: vue学习用的样式表!
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
*/
|
||||
|
||||
html {
|
||||
--backupground-color: #f4f5f7ff;
|
||||
--btn-color-blue: #307dbe;
|
||||
--btn-color-yellow: #f7b24d;
|
||||
--btn-color-green: #5bad60;
|
||||
--btn-color-red: #e56651;
|
||||
--btn-font-color: #fff;
|
||||
}
|
||||
|
||||
#root,
|
||||
#app {
|
||||
padding: 50px;
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
hr {
|
||||
background-color: steelblue;
|
||||
border: none;
|
||||
height: 3px;
|
||||
/* width: 100% */
|
||||
}
|
||||
|
||||
/* .test {
|
||||
width : 110vw;
|
||||
height : 100vh;
|
||||
border : 1px solid red;
|
||||
overflow : auto;
|
||||
} */
|
||||
|
||||
input[type="text"] {
|
||||
border: none;
|
||||
outline: solid 2px #e56651;
|
||||
/* font-size: 2rem; */
|
||||
}
|
||||
|
||||
label {
|
||||
display: inline-block;
|
||||
font-size: 2rem;
|
||||
margin-top: 15px;
|
||||
}
|
379
css/normalize.css
vendored
Normal file
379
css/normalize.css
vendored
Normal file
@@ -0,0 +1,379 @@
|
||||
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
|
||||
|
||||
/* Document
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Correct the line height in all browsers.
|
||||
* 2. Prevent adjustments of font size after orientation changes in iOS.
|
||||
*/
|
||||
|
||||
html {
|
||||
line-height: 1.15;
|
||||
/* 1 */
|
||||
-webkit-text-size-adjust: 100%;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/* Sections
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the margin in all browsers.
|
||||
*/
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the `main` element consistently in IE.
|
||||
*/
|
||||
|
||||
main {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the font size and margin on `h1` elements within `section` and
|
||||
* `article` contexts in Chrome, Firefox, and Safari.
|
||||
*/
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
/* Grouping content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in Firefox.
|
||||
* 2. Show the overflow in Edge and IE.
|
||||
*/
|
||||
|
||||
hr {
|
||||
box-sizing: content-box;
|
||||
/* 1 */
|
||||
height: 0;
|
||||
/* 1 */
|
||||
overflow: visible;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
pre {
|
||||
font-family: monospace, monospace;
|
||||
/* 1 */
|
||||
font-size: 1em;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/* Text-level semantics
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the gray background on active links in IE 10.
|
||||
*/
|
||||
|
||||
a {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Remove the bottom border in Chrome 57-
|
||||
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
||||
*/
|
||||
|
||||
abbr[title] {
|
||||
border-bottom: none;
|
||||
/* 1 */
|
||||
text-decoration: underline;
|
||||
/* 2 */
|
||||
text-decoration: underline dotted;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font weight in Chrome, Edge, and Safari.
|
||||
*/
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: monospace, monospace;
|
||||
/* 1 */
|
||||
font-size: 1em;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font size in all browsers.
|
||||
*/
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent `sub` and `sup` elements from affecting the line height in
|
||||
* all browsers.
|
||||
*/
|
||||
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
/* Embedded content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the border on images inside links in IE 10.
|
||||
*/
|
||||
|
||||
img {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
/* Forms
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Change the font styles in all browsers.
|
||||
* 2. Remove the margin in Firefox and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {
|
||||
font-family: inherit;
|
||||
/* 1 */
|
||||
font-size: 100%;
|
||||
/* 1 */
|
||||
line-height: 1.15;
|
||||
/* 1 */
|
||||
margin: 0;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the overflow in IE.
|
||||
* 1. Show the overflow in Edge.
|
||||
*/
|
||||
|
||||
button,
|
||||
input {
|
||||
/* 1 */
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inheritance of text transform in Edge, Firefox, and IE.
|
||||
* 1. Remove the inheritance of text transform in Firefox.
|
||||
*/
|
||||
|
||||
button,
|
||||
select {
|
||||
/* 1 */
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the inability to style clickable types in iOS and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
[type="button"],
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner border and padding in Firefox.
|
||||
*/
|
||||
|
||||
button::-moz-focus-inner,
|
||||
[type="button"]::-moz-focus-inner,
|
||||
[type="reset"]::-moz-focus-inner,
|
||||
[type="submit"]::-moz-focus-inner {
|
||||
border-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore the focus styles unset by the previous rule.
|
||||
*/
|
||||
|
||||
button:-moz-focusring,
|
||||
[type="button"]:-moz-focusring,
|
||||
[type="reset"]:-moz-focusring,
|
||||
[type="submit"]:-moz-focusring {
|
||||
outline: 1px dotted ButtonText;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the padding in Firefox.
|
||||
*/
|
||||
|
||||
fieldset {
|
||||
padding: 0.35em 0.75em 0.625em;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the text wrapping in Edge and IE.
|
||||
* 2. Correct the color inheritance from `fieldset` elements in IE.
|
||||
* 3. Remove the padding so developers are not caught out when they zero out
|
||||
* `fieldset` elements in all browsers.
|
||||
*/
|
||||
|
||||
legend {
|
||||
box-sizing: border-box;
|
||||
/* 1 */
|
||||
color: inherit;
|
||||
/* 2 */
|
||||
display: table;
|
||||
/* 1 */
|
||||
max-width: 100%;
|
||||
/* 1 */
|
||||
padding: 0;
|
||||
/* 3 */
|
||||
white-space: normal;
|
||||
/* 1 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
||||
*/
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the default vertical scrollbar in IE 10+.
|
||||
*/
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in IE 10.
|
||||
* 2. Remove the padding in IE 10.
|
||||
*/
|
||||
|
||||
[type="checkbox"],
|
||||
[type="radio"] {
|
||||
box-sizing: border-box;
|
||||
/* 1 */
|
||||
padding: 0;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the cursor style of increment and decrement buttons in Chrome.
|
||||
*/
|
||||
|
||||
[type="number"]::-webkit-inner-spin-button,
|
||||
[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the odd appearance in Chrome and Safari.
|
||||
* 2. Correct the outline style in Safari.
|
||||
*/
|
||||
|
||||
[type="search"] {
|
||||
-webkit-appearance: textfield;
|
||||
/* 1 */
|
||||
outline-offset: -2px;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner padding in Chrome and Safari on macOS.
|
||||
*/
|
||||
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inability to style clickable types in iOS and Safari.
|
||||
* 2. Change font properties to `inherit` in Safari.
|
||||
*/
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
-webkit-appearance: button;
|
||||
/* 1 */
|
||||
font: inherit;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/* Interactive
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* Add the correct display in Edge, IE 10+, and Firefox.
|
||||
*/
|
||||
|
||||
details {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add the correct display in all browsers.
|
||||
*/
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
/* Misc
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 10+.
|
||||
*/
|
||||
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 10.
|
||||
*/
|
||||
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
20
css/root.css
Normal file
20
css/root.css
Normal file
@@ -0,0 +1,20 @@
|
||||
:root {
|
||||
font-size: 1em;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
.pointer {
|
||||
cursor: pointer;
|
||||
}
|
51
element-plus/入门/element-plus.html
Normal file
51
element-plus/入门/element-plus.html
Normal file
@@ -0,0 +1,51 @@
|
||||
<!--
|
||||
* @Author: Kane
|
||||
* @Date: 2022-11-22 23:11:46
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-11-23 00:01:56
|
||||
* @FilePath: \vue学习\element-plus\入门\element-plus.html
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Document</title>
|
||||
<link rel="stylesheet" href="../../css/root.css" />
|
||||
<link rel="stylesheet" href="../../css/normalize.css" />
|
||||
<link rel="stylesheet" href="../../css/app.css" />
|
||||
<link rel="stylesheet" href="//unpkg.com/element-plus/dist/index.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<div class="content">
|
||||
<el-tag>{{title}}</el-tag>
|
||||
<el-tag>{{count}}</el-tag>
|
||||
<el-button type="success" size="large">点击</el-button>
|
||||
<el-empty>没有了!</el-empty>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="//unpkg.com/vue@3"></script>
|
||||
<script src="//unpkg.com/element-plus"></script>
|
||||
<script>
|
||||
const app = {
|
||||
data() {
|
||||
return {
|
||||
title: "Element-Plus",
|
||||
count: 0,
|
||||
};
|
||||
},
|
||||
methods: {},
|
||||
};
|
||||
|
||||
const vm = Vue.createApp(app);
|
||||
|
||||
vm.use(ElementPlus);
|
||||
vm.mount("#app");
|
||||
</script>
|
||||
</html>
|
2659
js/axios/1.1.3/axios.js
Normal file
2659
js/axios/1.1.3/axios.js
Normal file
File diff suppressed because it is too large
Load Diff
646
js/axios/1.1.3/axios.js.map
Normal file
646
js/axios/1.1.3/axios.js.map
Normal file
File diff suppressed because one or more lines are too long
15929
js/vue/vue.global.js
Normal file
15929
js/vue/vue.global.js
Normal file
File diff suppressed because it is too large
Load Diff
8
vue.js学习.code-workspace
Normal file
8
vue.js学习.code-workspace
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": "."
|
||||
}
|
||||
],
|
||||
"settings": {}
|
||||
}
|
12014
vue/vue-all.js
Normal file
12014
vue/vue-all.js
Normal file
File diff suppressed because it is too large
Load Diff
12014
vue/vue.js
Normal file
12014
vue/vue.js
Normal file
File diff suppressed because it is too large
Load Diff
6
vue/vue.min.js
vendored
Normal file
6
vue/vue.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
23
入门/cli/hello-cli/.gitignore
vendored
Normal file
23
入门/cli/hello-cli/.gitignore
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
/dist
|
||||
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
24
入门/cli/hello-cli/README.md
Normal file
24
入门/cli/hello-cli/README.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# hello-cli
|
||||
|
||||
## Project setup
|
||||
```
|
||||
npm install
|
||||
```
|
||||
|
||||
### Compiles and hot-reloads for development
|
||||
```
|
||||
npm run serve
|
||||
```
|
||||
|
||||
### Compiles and minifies for production
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
### Lints and fixes files
|
||||
```
|
||||
npm run lint
|
||||
```
|
||||
|
||||
### Customize configuration
|
||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
5
入门/cli/hello-cli/babel.config.js
Normal file
5
入门/cli/hello-cli/babel.config.js
Normal file
@@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
]
|
||||
}
|
19
入门/cli/hello-cli/jsconfig.json
Normal file
19
入门/cli/hello-cli/jsconfig.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "esnext",
|
||||
"baseUrl": "./",
|
||||
"moduleResolution": "node",
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*"
|
||||
]
|
||||
},
|
||||
"lib": [
|
||||
"esnext",
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"scripthost"
|
||||
]
|
||||
}
|
||||
}
|
19666
入门/cli/hello-cli/package-lock.json
generated
Normal file
19666
入门/cli/hello-cli/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
47
入门/cli/hello-cli/package.json
Normal file
47
入门/cli/hello-cli/package.json
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"name": "hello-cli",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"core-js": "^3.8.3",
|
||||
"element-plus": "^2.2.25",
|
||||
"vue": "^3.2.13",
|
||||
"vue-axios": "^3.5.2",
|
||||
"vue-router": "^4.0.13",
|
||||
"vuex": "^4.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.16",
|
||||
"@babel/eslint-parser": "^7.12.16",
|
||||
"@vue/cli-plugin-babel": "~5.0.0",
|
||||
"@vue/cli-plugin-eslint": "~5.0.0",
|
||||
"@vue/cli-service": "~5.0.0",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-plugin-vue": "^8.0.3"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
"env": {
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"plugin:vue/vue3-essential",
|
||||
"eslint:recommended"
|
||||
],
|
||||
"parserOptions": {
|
||||
"parser": "@babel/eslint-parser"
|
||||
},
|
||||
"rules": {}
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions",
|
||||
"not dead",
|
||||
"not ie 11"
|
||||
]
|
||||
}
|
21
入门/cli/hello-cli/public/css/colors.css
Normal file
21
入门/cli/hello-cli/public/css/colors.css
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* @Author: Kane
|
||||
* @Date: 2022-11-12 23:22:59
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-11-16 15:26:04
|
||||
* @FilePath: \car_dealer\css\colors.css
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
*/
|
||||
|
||||
html {
|
||||
--backupground-color: #f4f5f7ff;
|
||||
--btn-color-blue: #307dbe;
|
||||
--btn-color-yellow: #f7b24d;
|
||||
--btn-color-green: #5bad60;
|
||||
--btn-color-red: #e56651;
|
||||
--btn-font-color: #fff;
|
||||
|
||||
--input-focus-color: #e56651;
|
||||
}
|
57
入门/cli/hello-cli/public/css/kane.css
Normal file
57
入门/cli/hello-cli/public/css/kane.css
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* @Author: Kane
|
||||
* @Date: 2022-10-12 08:49:14
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-11-12 23:34:06
|
||||
* @FilePath: \car_dealer\css\kane.css
|
||||
* @Description: vue学习用的样式表!
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
*/
|
||||
|
||||
html {
|
||||
--backupground-color: #f4f5f7ff;
|
||||
--btn-color-blue: #307dbe;
|
||||
--btn-color-yellow: #f7b24d;
|
||||
--btn-color-green: #5bad60;
|
||||
--btn-color-red: #e56651;
|
||||
--btn-font-color: #fff;
|
||||
}
|
||||
|
||||
#root,
|
||||
#app {
|
||||
padding: 50px;
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
hr {
|
||||
background-color: steelblue;
|
||||
border: none;
|
||||
height: 3px;
|
||||
/* width: 100% */
|
||||
}
|
||||
|
||||
/* .test {
|
||||
width : 110vw;
|
||||
height : 100vh;
|
||||
border : 1px solid red;
|
||||
overflow : auto;
|
||||
} */
|
||||
|
||||
input[type="text"] {
|
||||
border: none;
|
||||
outline: solid 2px #e56651;
|
||||
/* font-size: 2rem; */
|
||||
}
|
||||
|
||||
label {
|
||||
display: inline-block;
|
||||
font-size: 2rem;
|
||||
margin-top: 15px;
|
||||
}
|
379
入门/cli/hello-cli/public/css/normalize.css
vendored
Normal file
379
入门/cli/hello-cli/public/css/normalize.css
vendored
Normal file
@@ -0,0 +1,379 @@
|
||||
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
|
||||
|
||||
/* Document
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Correct the line height in all browsers.
|
||||
* 2. Prevent adjustments of font size after orientation changes in iOS.
|
||||
*/
|
||||
|
||||
html {
|
||||
line-height: 1.15;
|
||||
/* 1 */
|
||||
-webkit-text-size-adjust: 100%;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/* Sections
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the margin in all browsers.
|
||||
*/
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the `main` element consistently in IE.
|
||||
*/
|
||||
|
||||
main {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the font size and margin on `h1` elements within `section` and
|
||||
* `article` contexts in Chrome, Firefox, and Safari.
|
||||
*/
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
/* Grouping content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in Firefox.
|
||||
* 2. Show the overflow in Edge and IE.
|
||||
*/
|
||||
|
||||
hr {
|
||||
box-sizing: content-box;
|
||||
/* 1 */
|
||||
height: 0;
|
||||
/* 1 */
|
||||
overflow: visible;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
pre {
|
||||
font-family: monospace, monospace;
|
||||
/* 1 */
|
||||
font-size: 1em;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/* Text-level semantics
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the gray background on active links in IE 10.
|
||||
*/
|
||||
|
||||
a {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Remove the bottom border in Chrome 57-
|
||||
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
||||
*/
|
||||
|
||||
abbr[title] {
|
||||
border-bottom: none;
|
||||
/* 1 */
|
||||
text-decoration: underline;
|
||||
/* 2 */
|
||||
text-decoration: underline dotted;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font weight in Chrome, Edge, and Safari.
|
||||
*/
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: monospace, monospace;
|
||||
/* 1 */
|
||||
font-size: 1em;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font size in all browsers.
|
||||
*/
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent `sub` and `sup` elements from affecting the line height in
|
||||
* all browsers.
|
||||
*/
|
||||
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
/* Embedded content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the border on images inside links in IE 10.
|
||||
*/
|
||||
|
||||
img {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
/* Forms
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Change the font styles in all browsers.
|
||||
* 2. Remove the margin in Firefox and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {
|
||||
font-family: inherit;
|
||||
/* 1 */
|
||||
font-size: 100%;
|
||||
/* 1 */
|
||||
line-height: 1.15;
|
||||
/* 1 */
|
||||
margin: 0;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the overflow in IE.
|
||||
* 1. Show the overflow in Edge.
|
||||
*/
|
||||
|
||||
button,
|
||||
input {
|
||||
/* 1 */
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inheritance of text transform in Edge, Firefox, and IE.
|
||||
* 1. Remove the inheritance of text transform in Firefox.
|
||||
*/
|
||||
|
||||
button,
|
||||
select {
|
||||
/* 1 */
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the inability to style clickable types in iOS and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
[type="button"],
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner border and padding in Firefox.
|
||||
*/
|
||||
|
||||
button::-moz-focus-inner,
|
||||
[type="button"]::-moz-focus-inner,
|
||||
[type="reset"]::-moz-focus-inner,
|
||||
[type="submit"]::-moz-focus-inner {
|
||||
border-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore the focus styles unset by the previous rule.
|
||||
*/
|
||||
|
||||
button:-moz-focusring,
|
||||
[type="button"]:-moz-focusring,
|
||||
[type="reset"]:-moz-focusring,
|
||||
[type="submit"]:-moz-focusring {
|
||||
outline: 1px dotted ButtonText;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the padding in Firefox.
|
||||
*/
|
||||
|
||||
fieldset {
|
||||
padding: 0.35em 0.75em 0.625em;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the text wrapping in Edge and IE.
|
||||
* 2. Correct the color inheritance from `fieldset` elements in IE.
|
||||
* 3. Remove the padding so developers are not caught out when they zero out
|
||||
* `fieldset` elements in all browsers.
|
||||
*/
|
||||
|
||||
legend {
|
||||
box-sizing: border-box;
|
||||
/* 1 */
|
||||
color: inherit;
|
||||
/* 2 */
|
||||
display: table;
|
||||
/* 1 */
|
||||
max-width: 100%;
|
||||
/* 1 */
|
||||
padding: 0;
|
||||
/* 3 */
|
||||
white-space: normal;
|
||||
/* 1 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
||||
*/
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the default vertical scrollbar in IE 10+.
|
||||
*/
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in IE 10.
|
||||
* 2. Remove the padding in IE 10.
|
||||
*/
|
||||
|
||||
[type="checkbox"],
|
||||
[type="radio"] {
|
||||
box-sizing: border-box;
|
||||
/* 1 */
|
||||
padding: 0;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the cursor style of increment and decrement buttons in Chrome.
|
||||
*/
|
||||
|
||||
[type="number"]::-webkit-inner-spin-button,
|
||||
[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the odd appearance in Chrome and Safari.
|
||||
* 2. Correct the outline style in Safari.
|
||||
*/
|
||||
|
||||
[type="search"] {
|
||||
-webkit-appearance: textfield;
|
||||
/* 1 */
|
||||
outline-offset: -2px;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner padding in Chrome and Safari on macOS.
|
||||
*/
|
||||
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inability to style clickable types in iOS and Safari.
|
||||
* 2. Change font properties to `inherit` in Safari.
|
||||
*/
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
-webkit-appearance: button;
|
||||
/* 1 */
|
||||
font: inherit;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/* Interactive
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* Add the correct display in Edge, IE 10+, and Firefox.
|
||||
*/
|
||||
|
||||
details {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add the correct display in all browsers.
|
||||
*/
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
/* Misc
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 10+.
|
||||
*/
|
||||
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 10.
|
||||
*/
|
||||
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
32
入门/cli/hello-cli/public/css/page.css
Normal file
32
入门/cli/hello-cli/public/css/page.css
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* @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
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
*/
|
||||
@import url("colors.css");
|
||||
|
||||
body {
|
||||
background-color: #f4f5f7;
|
||||
}
|
||||
|
||||
#root,
|
||||
#app {
|
||||
padding: 50px;
|
||||
}
|
||||
|
||||
/* .content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #fff;
|
||||
width: 25rem;
|
||||
margin: 0px auto;
|
||||
border-radius: 5px;
|
||||
padding: 50px;
|
||||
} */
|
20
入门/cli/hello-cli/public/css/root.css
Normal file
20
入门/cli/hello-cli/public/css/root.css
Normal file
@@ -0,0 +1,20 @@
|
||||
:root {
|
||||
font-size: 1em;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
.pointer {
|
||||
cursor: pointer;
|
||||
}
|
BIN
入门/cli/hello-cli/public/favicon.ico
Normal file
BIN
入门/cli/hello-cli/public/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
40
入门/cli/hello-cli/public/index.html
Normal file
40
入门/cli/hello-cli/public/index.html
Normal file
@@ -0,0 +1,40 @@
|
||||
<!--
|
||||
* @Author: Kane
|
||||
* @Date: 2022-11-22 17:50:49
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-11-29 20:32:41
|
||||
* @FilePath: \hello-cli\public\index.html
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-cn">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<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" />
|
||||
</head>
|
||||
<style>
|
||||
.v-cloak {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong
|
||||
>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't
|
||||
work properly without JavaScript enabled. Please enable it to
|
||||
continue.</strong
|
||||
>
|
||||
</noscript>
|
||||
<div id="app" v-cloak></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
||||
|
65
入门/cli/hello-cli/src/App.vue
Normal file
65
入门/cli/hello-cli/src/App.vue
Normal file
@@ -0,0 +1,65 @@
|
||||
<!--
|
||||
* @Author: Kane
|
||||
* @Date: 2022-11-22 17:50:49
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-11-29 17:50:22
|
||||
* @FilePath: \hello-cli\src\App.vue
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
-->
|
||||
<template>
|
||||
<div class="content">
|
||||
<h1>学习vuex</h1>
|
||||
<div><App1></App1> <App2></App2></div>
|
||||
<el-button type="warning" @click="onClearCount">清零</el-button>
|
||||
</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");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
#app {
|
||||
background-color: #f4f5f7;
|
||||
}
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 40rem;
|
||||
margin: 0px auto;
|
||||
border-radius: 5px;
|
||||
padding: 50px;
|
||||
}
|
||||
|
||||
#app div {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
#app div > * + * {
|
||||
margin-left: 1rem;
|
||||
}
|
||||
|
||||
hr {
|
||||
width: 100%;
|
||||
border: 1px solid 1px;
|
||||
}
|
||||
</style>
|
15
入门/cli/hello-cli/src/assets/css/app.css
Normal file
15
入门/cli/hello-cli/src/assets/css/app.css
Normal file
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* @Author: Kane
|
||||
* @Date: 2022-11-12 23:32:20
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-11-29 13:21:49
|
||||
* @FilePath: \hello-cli\src\assets\css\app.css
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
*/
|
||||
@import url("colors.css");
|
||||
|
||||
body {
|
||||
background-color: #f4f5f7ff;
|
||||
}
|
21
入门/cli/hello-cli/src/assets/css/colors.css
Normal file
21
入门/cli/hello-cli/src/assets/css/colors.css
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* @Author: Kane
|
||||
* @Date: 2022-11-12 23:22:59
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-11-16 15:26:04
|
||||
* @FilePath: \car_dealer\css\colors.css
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
*/
|
||||
|
||||
html {
|
||||
--backupground-color: #f4f5f7ff;
|
||||
--btn-color-blue: #307dbe;
|
||||
--btn-color-yellow: #f7b24d;
|
||||
--btn-color-green: #5bad60;
|
||||
--btn-color-red: #e56651;
|
||||
--btn-font-color: #fff;
|
||||
|
||||
--input-focus-color: #e56651;
|
||||
}
|
57
入门/cli/hello-cli/src/assets/css/kane.css
Normal file
57
入门/cli/hello-cli/src/assets/css/kane.css
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* @Author: Kane
|
||||
* @Date: 2022-10-12 08:49:14
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-11-12 23:34:06
|
||||
* @FilePath: \car_dealer\css\kane.css
|
||||
* @Description: vue学习用的样式表!
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
*/
|
||||
|
||||
html {
|
||||
--backupground-color: #f4f5f7ff;
|
||||
--btn-color-blue: #307dbe;
|
||||
--btn-color-yellow: #f7b24d;
|
||||
--btn-color-green: #5bad60;
|
||||
--btn-color-red: #e56651;
|
||||
--btn-font-color: #fff;
|
||||
}
|
||||
|
||||
#root,
|
||||
#app {
|
||||
padding: 50px;
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
hr {
|
||||
background-color: steelblue;
|
||||
border: none;
|
||||
height: 3px;
|
||||
/* width: 100% */
|
||||
}
|
||||
|
||||
/* .test {
|
||||
width : 110vw;
|
||||
height : 100vh;
|
||||
border : 1px solid red;
|
||||
overflow : auto;
|
||||
} */
|
||||
|
||||
input[type="text"] {
|
||||
border: none;
|
||||
outline: solid 2px #e56651;
|
||||
/* font-size: 2rem; */
|
||||
}
|
||||
|
||||
label {
|
||||
display: inline-block;
|
||||
font-size: 2rem;
|
||||
margin-top: 15px;
|
||||
}
|
379
入门/cli/hello-cli/src/assets/css/normalize.css
vendored
Normal file
379
入门/cli/hello-cli/src/assets/css/normalize.css
vendored
Normal file
@@ -0,0 +1,379 @@
|
||||
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
|
||||
|
||||
/* Document
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Correct the line height in all browsers.
|
||||
* 2. Prevent adjustments of font size after orientation changes in iOS.
|
||||
*/
|
||||
|
||||
html {
|
||||
line-height: 1.15;
|
||||
/* 1 */
|
||||
-webkit-text-size-adjust: 100%;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/* Sections
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the margin in all browsers.
|
||||
*/
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the `main` element consistently in IE.
|
||||
*/
|
||||
|
||||
main {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the font size and margin on `h1` elements within `section` and
|
||||
* `article` contexts in Chrome, Firefox, and Safari.
|
||||
*/
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
/* Grouping content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in Firefox.
|
||||
* 2. Show the overflow in Edge and IE.
|
||||
*/
|
||||
|
||||
hr {
|
||||
box-sizing: content-box;
|
||||
/* 1 */
|
||||
height: 0;
|
||||
/* 1 */
|
||||
overflow: visible;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
pre {
|
||||
font-family: monospace, monospace;
|
||||
/* 1 */
|
||||
font-size: 1em;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/* Text-level semantics
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the gray background on active links in IE 10.
|
||||
*/
|
||||
|
||||
a {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Remove the bottom border in Chrome 57-
|
||||
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
||||
*/
|
||||
|
||||
abbr[title] {
|
||||
border-bottom: none;
|
||||
/* 1 */
|
||||
text-decoration: underline;
|
||||
/* 2 */
|
||||
text-decoration: underline dotted;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font weight in Chrome, Edge, and Safari.
|
||||
*/
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: monospace, monospace;
|
||||
/* 1 */
|
||||
font-size: 1em;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font size in all browsers.
|
||||
*/
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent `sub` and `sup` elements from affecting the line height in
|
||||
* all browsers.
|
||||
*/
|
||||
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
/* Embedded content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the border on images inside links in IE 10.
|
||||
*/
|
||||
|
||||
img {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
/* Forms
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Change the font styles in all browsers.
|
||||
* 2. Remove the margin in Firefox and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {
|
||||
font-family: inherit;
|
||||
/* 1 */
|
||||
font-size: 100%;
|
||||
/* 1 */
|
||||
line-height: 1.15;
|
||||
/* 1 */
|
||||
margin: 0;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the overflow in IE.
|
||||
* 1. Show the overflow in Edge.
|
||||
*/
|
||||
|
||||
button,
|
||||
input {
|
||||
/* 1 */
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inheritance of text transform in Edge, Firefox, and IE.
|
||||
* 1. Remove the inheritance of text transform in Firefox.
|
||||
*/
|
||||
|
||||
button,
|
||||
select {
|
||||
/* 1 */
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the inability to style clickable types in iOS and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
[type="button"],
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner border and padding in Firefox.
|
||||
*/
|
||||
|
||||
button::-moz-focus-inner,
|
||||
[type="button"]::-moz-focus-inner,
|
||||
[type="reset"]::-moz-focus-inner,
|
||||
[type="submit"]::-moz-focus-inner {
|
||||
border-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore the focus styles unset by the previous rule.
|
||||
*/
|
||||
|
||||
button:-moz-focusring,
|
||||
[type="button"]:-moz-focusring,
|
||||
[type="reset"]:-moz-focusring,
|
||||
[type="submit"]:-moz-focusring {
|
||||
outline: 1px dotted ButtonText;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the padding in Firefox.
|
||||
*/
|
||||
|
||||
fieldset {
|
||||
padding: 0.35em 0.75em 0.625em;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the text wrapping in Edge and IE.
|
||||
* 2. Correct the color inheritance from `fieldset` elements in IE.
|
||||
* 3. Remove the padding so developers are not caught out when they zero out
|
||||
* `fieldset` elements in all browsers.
|
||||
*/
|
||||
|
||||
legend {
|
||||
box-sizing: border-box;
|
||||
/* 1 */
|
||||
color: inherit;
|
||||
/* 2 */
|
||||
display: table;
|
||||
/* 1 */
|
||||
max-width: 100%;
|
||||
/* 1 */
|
||||
padding: 0;
|
||||
/* 3 */
|
||||
white-space: normal;
|
||||
/* 1 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
||||
*/
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the default vertical scrollbar in IE 10+.
|
||||
*/
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in IE 10.
|
||||
* 2. Remove the padding in IE 10.
|
||||
*/
|
||||
|
||||
[type="checkbox"],
|
||||
[type="radio"] {
|
||||
box-sizing: border-box;
|
||||
/* 1 */
|
||||
padding: 0;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the cursor style of increment and decrement buttons in Chrome.
|
||||
*/
|
||||
|
||||
[type="number"]::-webkit-inner-spin-button,
|
||||
[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the odd appearance in Chrome and Safari.
|
||||
* 2. Correct the outline style in Safari.
|
||||
*/
|
||||
|
||||
[type="search"] {
|
||||
-webkit-appearance: textfield;
|
||||
/* 1 */
|
||||
outline-offset: -2px;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner padding in Chrome and Safari on macOS.
|
||||
*/
|
||||
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inability to style clickable types in iOS and Safari.
|
||||
* 2. Change font properties to `inherit` in Safari.
|
||||
*/
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
-webkit-appearance: button;
|
||||
/* 1 */
|
||||
font: inherit;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/* Interactive
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* Add the correct display in Edge, IE 10+, and Firefox.
|
||||
*/
|
||||
|
||||
details {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add the correct display in all browsers.
|
||||
*/
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
/* Misc
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 10+.
|
||||
*/
|
||||
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 10.
|
||||
*/
|
||||
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
20
入门/cli/hello-cli/src/assets/css/root.css
Normal file
20
入门/cli/hello-cli/src/assets/css/root.css
Normal file
@@ -0,0 +1,20 @@
|
||||
:root {
|
||||
font-size: 1em;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
.pointer {
|
||||
cursor: pointer;
|
||||
}
|
BIN
入门/cli/hello-cli/src/assets/logo.png
Normal file
BIN
入门/cli/hello-cli/src/assets/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.7 KiB |
45
入门/cli/hello-cli/src/components/vuex/App1.vue
Normal file
45
入门/cli/hello-cli/src/components/vuex/App1.vue
Normal file
@@ -0,0 +1,45 @@
|
||||
<!--
|
||||
* @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>
|
49
入门/cli/hello-cli/src/components/vuex/App2.vue
Normal file
49
入门/cli/hello-cli/src/components/vuex/App2.vue
Normal file
@@ -0,0 +1,49 @@
|
||||
<!-- 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>
|
41
入门/cli/hello-cli/src/main.js
Normal file
41
入门/cli/hello-cli/src/main.js
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* @Author: Kane
|
||||
* @Date: 2022-11-22 17:50:49
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-11-29 16:14:35
|
||||
* @FilePath: \hello-cli\src\main.js
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
*/
|
||||
import { createApp } from 'vue';
|
||||
import { createStore } from "vuex";
|
||||
import App from './App.vue';
|
||||
import ElementPlus from "element-plus";
|
||||
import 'element-plus/dist/index.css';
|
||||
|
||||
const app = createApp(App);
|
||||
const vuex = createStore({
|
||||
state() {
|
||||
return {
|
||||
count: 0,
|
||||
};
|
||||
},
|
||||
mutations: {
|
||||
increment(state) {
|
||||
state.count++;
|
||||
},
|
||||
clearCount(state) {
|
||||
state.count = 0;
|
||||
}
|
||||
},
|
||||
getters: {
|
||||
countText(store) {
|
||||
return store.count + "次";
|
||||
},
|
||||
},
|
||||
});
|
||||
app.use(vuex);
|
||||
app.use(ElementPlus);
|
||||
app.mount('#app');
|
||||
|
4
入门/cli/hello-cli/vue.config.js
Normal file
4
入门/cli/hello-cli/vue.config.js
Normal file
@@ -0,0 +1,4 @@
|
||||
const { defineConfig } = require('@vue/cli-service')
|
||||
module.exports = defineConfig({
|
||||
transpileDependencies: true
|
||||
})
|
23
入门/cli/hello-elementplus/.gitignore
vendored
Normal file
23
入门/cli/hello-elementplus/.gitignore
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
/dist
|
||||
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
24
入门/cli/hello-elementplus/README.md
Normal file
24
入门/cli/hello-elementplus/README.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# hello-elementplus
|
||||
|
||||
## Project setup
|
||||
```
|
||||
npm install
|
||||
```
|
||||
|
||||
### Compiles and hot-reloads for development
|
||||
```
|
||||
npm run serve
|
||||
```
|
||||
|
||||
### Compiles and minifies for production
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
### Lints and fixes files
|
||||
```
|
||||
npm run lint
|
||||
```
|
||||
|
||||
### Customize configuration
|
||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
5
入门/cli/hello-elementplus/babel.config.js
Normal file
5
入门/cli/hello-elementplus/babel.config.js
Normal file
@@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
]
|
||||
}
|
19
入门/cli/hello-elementplus/jsconfig.json
Normal file
19
入门/cli/hello-elementplus/jsconfig.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "esnext",
|
||||
"baseUrl": "./",
|
||||
"moduleResolution": "node",
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*"
|
||||
]
|
||||
},
|
||||
"lib": [
|
||||
"esnext",
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"scripthost"
|
||||
]
|
||||
}
|
||||
}
|
19267
入门/cli/hello-elementplus/package-lock.json
generated
Normal file
19267
入门/cli/hello-elementplus/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
43
入门/cli/hello-elementplus/package.json
Normal file
43
入门/cli/hello-elementplus/package.json
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "hello-elementplus",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"core-js": "^3.8.3",
|
||||
"vue": "^3.2.13"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.16",
|
||||
"@babel/eslint-parser": "^7.12.16",
|
||||
"@vue/cli-plugin-babel": "~5.0.0",
|
||||
"@vue/cli-plugin-eslint": "~5.0.0",
|
||||
"@vue/cli-service": "~5.0.0",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-plugin-vue": "^8.0.3"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
"env": {
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"plugin:vue/vue3-essential",
|
||||
"eslint:recommended"
|
||||
],
|
||||
"parserOptions": {
|
||||
"parser": "@babel/eslint-parser"
|
||||
},
|
||||
"rules": {}
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions",
|
||||
"not dead",
|
||||
"not ie 11"
|
||||
]
|
||||
}
|
BIN
入门/cli/hello-elementplus/public/favicon.ico
Normal file
BIN
入门/cli/hello-elementplus/public/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
17
入门/cli/hello-elementplus/public/index.html
Normal file
17
入门/cli/hello-elementplus/public/index.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
26
入门/cli/hello-elementplus/src/App.vue
Normal file
26
入门/cli/hello-elementplus/src/App.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<img alt="Vue logo" src="./assets/logo.png">
|
||||
<HelloWorld msg="Welcome to Your Vue.js App"/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import HelloWorld from './components/HelloWorld.vue'
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
components: {
|
||||
HelloWorld
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
#app {
|
||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-align: center;
|
||||
color: #2c3e50;
|
||||
margin-top: 60px;
|
||||
}
|
||||
</style>
|
BIN
入门/cli/hello-elementplus/src/assets/logo.png
Normal file
BIN
入门/cli/hello-elementplus/src/assets/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.7 KiB |
58
入门/cli/hello-elementplus/src/components/HelloWorld.vue
Normal file
58
入门/cli/hello-elementplus/src/components/HelloWorld.vue
Normal file
@@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<div class="hello">
|
||||
<h1>{{ msg }}</h1>
|
||||
<p>
|
||||
For a guide and recipes on how to configure / customize this project,<br>
|
||||
check out the
|
||||
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
|
||||
</p>
|
||||
<h3>Installed CLI Plugins</h3>
|
||||
<ul>
|
||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
|
||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
|
||||
</ul>
|
||||
<h3>Essential Links</h3>
|
||||
<ul>
|
||||
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
|
||||
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
|
||||
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
|
||||
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
|
||||
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
|
||||
</ul>
|
||||
<h3>Ecosystem</h3>
|
||||
<ul>
|
||||
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
|
||||
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
|
||||
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
|
||||
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
|
||||
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'HelloWorld',
|
||||
props: {
|
||||
msg: String
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style scoped>
|
||||
h3 {
|
||||
margin: 40px 0 0;
|
||||
}
|
||||
ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
li {
|
||||
display: inline-block;
|
||||
margin: 0 10px;
|
||||
}
|
||||
a {
|
||||
color: #42b983;
|
||||
}
|
||||
</style>
|
4
入门/cli/hello-elementplus/src/main.js
Normal file
4
入门/cli/hello-elementplus/src/main.js
Normal file
@@ -0,0 +1,4 @@
|
||||
import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
|
||||
createApp(App).mount('#app')
|
4
入门/cli/hello-elementplus/vue.config.js
Normal file
4
入门/cli/hello-elementplus/vue.config.js
Normal file
@@ -0,0 +1,4 @@
|
||||
const { defineConfig } = require('@vue/cli-service')
|
||||
module.exports = defineConfig({
|
||||
transpileDependencies: true
|
||||
})
|
23
入门/cli/hello-router/.gitignore
vendored
Normal file
23
入门/cli/hello-router/.gitignore
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
/dist
|
||||
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
24
入门/cli/hello-router/README.md
Normal file
24
入门/cli/hello-router/README.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# hello-router
|
||||
|
||||
## Project setup
|
||||
```
|
||||
npm install
|
||||
```
|
||||
|
||||
### Compiles and hot-reloads for development
|
||||
```
|
||||
npm run serve
|
||||
```
|
||||
|
||||
### Compiles and minifies for production
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
### Lints and fixes files
|
||||
```
|
||||
npm run lint
|
||||
```
|
||||
|
||||
### Customize configuration
|
||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
5
入门/cli/hello-router/babel.config.js
Normal file
5
入门/cli/hello-router/babel.config.js
Normal file
@@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
]
|
||||
}
|
19
入门/cli/hello-router/jsconfig.json
Normal file
19
入门/cli/hello-router/jsconfig.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "esnext",
|
||||
"baseUrl": "./",
|
||||
"moduleResolution": "node",
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*"
|
||||
]
|
||||
},
|
||||
"lib": [
|
||||
"esnext",
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"scripthost"
|
||||
]
|
||||
}
|
||||
}
|
19631
入门/cli/hello-router/package-lock.json
generated
Normal file
19631
入门/cli/hello-router/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
45
入门/cli/hello-router/package.json
Normal file
45
入门/cli/hello-router/package.json
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"name": "hello-router",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"core-js": "^3.8.3",
|
||||
"element-plus": "^2.2.22",
|
||||
"vue": "^3.2.13",
|
||||
"vue-router": "^4.1.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.16",
|
||||
"@babel/eslint-parser": "^7.12.16",
|
||||
"@vue/cli-plugin-babel": "~5.0.0",
|
||||
"@vue/cli-plugin-eslint": "~5.0.0",
|
||||
"@vue/cli-service": "~5.0.0",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-plugin-vue": "^8.0.3"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
"env": {
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"plugin:vue/vue3-essential",
|
||||
"eslint:recommended"
|
||||
],
|
||||
"parserOptions": {
|
||||
"parser": "@babel/eslint-parser"
|
||||
},
|
||||
"rules": {}
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions",
|
||||
"not dead",
|
||||
"not ie 11"
|
||||
]
|
||||
}
|
BIN
入门/cli/hello-router/public/favicon.ico
Normal file
BIN
入门/cli/hello-router/public/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
17
入门/cli/hello-router/public/index.html
Normal file
17
入门/cli/hello-router/public/index.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
35
入门/cli/hello-router/src/App.vue
Normal file
35
入门/cli/hello-router/src/App.vue
Normal file
@@ -0,0 +1,35 @@
|
||||
<!--
|
||||
* @Author: Kane
|
||||
* @Date: 2022-11-24 01:13:55
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-11-25 16:35:46
|
||||
* @FilePath: \hello-router\src\App.vue
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
-->
|
||||
<template>
|
||||
<el-container>
|
||||
<el-header><Header></Header></el-header>
|
||||
<el-main><Main></Main></el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
import Header from "./components/页面组件/Header";
|
||||
import Main from "./components/页面组件/Main";
|
||||
|
||||
export default {
|
||||
name: "App",
|
||||
components: { Header, Main },
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
#app {
|
||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-align: center;
|
||||
color: #2c3e50;
|
||||
margin-top: 60px;
|
||||
}
|
||||
</style>
|
BIN
入门/cli/hello-router/src/assets/logo.png
Normal file
BIN
入门/cli/hello-router/src/assets/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.7 KiB |
58
入门/cli/hello-router/src/components/HelloWorld.vue
Normal file
58
入门/cli/hello-router/src/components/HelloWorld.vue
Normal file
@@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<div class="hello">
|
||||
<h1>{{ msg }}</h1>
|
||||
<p>
|
||||
For a guide and recipes on how to configure / customize this project,<br>
|
||||
check out the
|
||||
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
|
||||
</p>
|
||||
<h3>Installed CLI Plugins</h3>
|
||||
<ul>
|
||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
|
||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
|
||||
</ul>
|
||||
<h3>Essential Links</h3>
|
||||
<ul>
|
||||
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
|
||||
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
|
||||
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
|
||||
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
|
||||
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
|
||||
</ul>
|
||||
<h3>Ecosystem</h3>
|
||||
<ul>
|
||||
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
|
||||
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
|
||||
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
|
||||
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
|
||||
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'HelloWorld',
|
||||
props: {
|
||||
msg: String
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style scoped>
|
||||
h3 {
|
||||
margin: 40px 0 0;
|
||||
}
|
||||
ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
li {
|
||||
display: inline-block;
|
||||
margin: 0 10px;
|
||||
}
|
||||
a {
|
||||
color: #42b983;
|
||||
}
|
||||
</style>
|
25
入门/cli/hello-router/src/components/功能页面/demo-1.vue
Normal file
25
入门/cli/hello-router/src/components/功能页面/demo-1.vue
Normal file
@@ -0,0 +1,25 @@
|
||||
<!--
|
||||
* @Author: Kane
|
||||
* @Date: 2022-11-24 01:18:18
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-11-24 01:21:20
|
||||
* @FilePath: \hello-router\src\components\功能页面\demo-1.vue
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
-->
|
||||
<template>
|
||||
<h1>{{ title }}</h1>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "demo-1",
|
||||
data() {
|
||||
return {
|
||||
title: "测试router-1",
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
25
入门/cli/hello-router/src/components/功能页面/demo-2.vue
Normal file
25
入门/cli/hello-router/src/components/功能页面/demo-2.vue
Normal file
@@ -0,0 +1,25 @@
|
||||
<!--
|
||||
* @Author: Kane
|
||||
* @Date: 2022-11-24 01:20:58
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-11-24 01:22:30
|
||||
* @FilePath: \hello-router\src\components\功能页面\demo-2.vue
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
-->
|
||||
<template>
|
||||
<h1>{{ title }}</h1>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "demo-2",
|
||||
data() {
|
||||
return {
|
||||
title: "测试页面-2",
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
33
入门/cli/hello-router/src/components/功能页面/路由守卫.vue
Normal file
33
入门/cli/hello-router/src/components/功能页面/路由守卫.vue
Normal file
@@ -0,0 +1,33 @@
|
||||
<!--
|
||||
* @Author: Kane
|
||||
* @Date: 2022-11-24 09:42:35
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-11-24 09:58:11
|
||||
* @FilePath: \hello-router\src\components\功能页面\路由守卫.vue
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
-->
|
||||
<template>
|
||||
<h1>路由守卫</h1>
|
||||
<h1>{{ user.name }}</h1>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "route-guard",
|
||||
data() {
|
||||
return {
|
||||
user: {
|
||||
name: "",
|
||||
age: 20,
|
||||
},
|
||||
};
|
||||
},
|
||||
beforeRouteUpdate(to) {
|
||||
alert(to.params.username);
|
||||
this.user.name = to.params.username;
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
32
入门/cli/hello-router/src/components/页面组件/Header.vue
Normal file
32
入门/cli/hello-router/src/components/页面组件/Header.vue
Normal file
@@ -0,0 +1,32 @@
|
||||
<!--
|
||||
* @Author: Kane
|
||||
* @Date: 2022-11-25 15:29:48
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-11-25 15:36:18
|
||||
* @FilePath: \hello-router\src\components\页面组件\header.vue
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
-->
|
||||
<template>
|
||||
<div class="container">
|
||||
<h1>我来组成头部!</h1>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "header-part",
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100px;
|
||||
border: 1px solid red;
|
||||
}
|
||||
</style>
|
34
入门/cli/hello-router/src/components/页面组件/Main.vue
Normal file
34
入门/cli/hello-router/src/components/页面组件/Main.vue
Normal file
@@ -0,0 +1,34 @@
|
||||
<!--
|
||||
* @Author: Kane
|
||||
* @Date: 2022-11-25 15:29:55
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-11-25 15:37:49
|
||||
* @FilePath: \hello-router\src\components\页面组件\main.vue
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
-->
|
||||
<template>
|
||||
<div class="container">
|
||||
<h1>{{ title }}</h1>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "main-part",
|
||||
data() {
|
||||
return {
|
||||
title: "我来组成身体!",
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100px;
|
||||
border: 1px solid red;
|
||||
}
|
||||
</style>
|
26
入门/cli/hello-router/src/main.js
Normal file
26
入门/cli/hello-router/src/main.js
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* @Author: Kane
|
||||
* @Date: 2022-11-24 09:08:41
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-11-25 16:22:52
|
||||
* @FilePath: \hello-router\src\main.js
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
*/
|
||||
import { createApp } from "vue";
|
||||
// import { createRouter, createWebHashHistory } from "vue-router";
|
||||
|
||||
//引入组件
|
||||
import App from "./App.vue";
|
||||
// import { Header } from "./components/页面组件/Header.vue";
|
||||
// import { Main } from "./components/页面组件/Main.vue";
|
||||
// import { demo1 } from "./components/功能页面/demo-1.vue";
|
||||
// import { demo2 } from "./components/功能页面/demo-2.vue";
|
||||
|
||||
const app = createApp(App);
|
||||
// const routes = [
|
||||
// {path}
|
||||
// ];
|
||||
|
||||
app.mount("#app");
|
4
入门/cli/hello-router/vue.config.js
Normal file
4
入门/cli/hello-router/vue.config.js
Normal file
@@ -0,0 +1,4 @@
|
||||
const { defineConfig } = require('@vue/cli-service')
|
||||
module.exports = defineConfig({
|
||||
transpileDependencies: true
|
||||
})
|
43
入门/teleport/teleport.html
Normal file
43
入门/teleport/teleport.html
Normal file
@@ -0,0 +1,43 @@
|
||||
<!--
|
||||
* @Author: Kane
|
||||
* @Date: 2022-11-22 16:46:03
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-11-22 17:17:24
|
||||
* @FilePath: \vue-learning\入门\teleport\teleport.html
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Teleport学习</title>
|
||||
<link rel="stylesheet" href="../../css/root.css" />
|
||||
<link rel="stylesheet" href="../../css/normalize.css" />
|
||||
<link rel="stylesheet" href="../../css/app.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<div id="app">
|
||||
<h1>{{title}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="https://cdn.bootcdn.net/ajax/libs/vue/3.2.45/vue.global.js"></script>
|
||||
<script>
|
||||
const app = {
|
||||
data() {
|
||||
return {
|
||||
title: "",
|
||||
};
|
||||
},
|
||||
methods: {},
|
||||
};
|
||||
|
||||
const vm = Vue.createApp(app);
|
||||
vm.mount("#app");
|
||||
</script>
|
||||
</html>
|
18
入门/动画/css/main.css
Normal file
18
入门/动画/css/main.css
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* @Author: Kane
|
||||
* @Date: 2022-11-22 17:12:01
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-11-22 17:24:53
|
||||
* @FilePath: \vue-learning\入门\动画\css\main.css
|
||||
* @Description: 列表动画的css文件
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
*/
|
||||
.list-enter-active,
|
||||
.list-leave-active {
|
||||
transition: all 1s ease;
|
||||
}
|
||||
.list-enter-from,
|
||||
.list-leave-to {
|
||||
opacity: 0;
|
||||
}
|
62
入门/动画/列表动画.html
Normal file
62
入门/动画/列表动画.html
Normal file
@@ -0,0 +1,62 @@
|
||||
<!--
|
||||
* @Author: Kane
|
||||
* @Date: 2022-11-22 17:10:33
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-11-22 17:23:34
|
||||
* @FilePath: \vue-learning\入门\动画\列表动画.html
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>列表动画</title>
|
||||
<link rel="stylesheet" href="../../css/root.css" />
|
||||
<link rel="stylesheet" href="../../css/normalize.css" />
|
||||
<link rel="stylesheet" href="../../css/app.css" />
|
||||
<link rel="stylesheet" href="css/main.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<div class="content">
|
||||
<h1>{{title}}</h1>
|
||||
<button type="button" @click="addItem()">添加元素</button>
|
||||
<hr />
|
||||
<transition-group name="list">
|
||||
<div v-for="(item,key) in items" :key="key">
|
||||
姓名:{{item.name}} 年龄:{{item.age}}
|
||||
性别:{{item.gender}}
|
||||
</div>
|
||||
</transition-group>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="../../js/vue/vue.global.js"></script>
|
||||
<script>
|
||||
const app = {
|
||||
data() {
|
||||
return {
|
||||
title: "列表动画",
|
||||
items: [
|
||||
{ name: "1", age: 20, gender: "男" },
|
||||
{ name: "2", age: 20, gender: "男" },
|
||||
{ name: "3", age: 20, gender: "男" },
|
||||
{ name: "5", age: 20, gender: "男" },
|
||||
],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
addItem() {
|
||||
this.items.push({ name: "老王", age: 20, gender: "男" });
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const vm = Vue.createApp(app);
|
||||
vm.mount("#app");
|
||||
</script>
|
||||
</html>
|
50
列表渲染/列表渲染.html
Normal file
50
列表渲染/列表渲染.html
Normal file
@@ -0,0 +1,50 @@
|
||||
<!--
|
||||
* @Author: Kane
|
||||
* @Date: 2022-05-18 10:14:52
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-05-23 11:19:05
|
||||
* @FilePath: \vue.js学习\列表渲染\列表渲染.html
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Document</title>
|
||||
<link rel="stylesheet" href="../css/root.css" />
|
||||
<link rel="stylesheet" href="../css/kane.css" />
|
||||
<script src="../vue/vue.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root">
|
||||
{{title}}
|
||||
<br />
|
||||
<ul>
|
||||
<li v-for="person in personList" v-bind:key="person.id">
|
||||
姓名:{{person.name}}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
Vue.config.productionTip = false;
|
||||
|
||||
const vm = new Vue({
|
||||
el: "#root",
|
||||
data: {
|
||||
title: "学习vue!",
|
||||
personList: [
|
||||
{ id: "001", name: "张三", age: 18 },
|
||||
{ id: "002", name: "李四", age: 19 },
|
||||
{ id: "003", name: "王五", age: 20 },
|
||||
{ id: "004", name: "xxx", age: 21 },
|
||||
{ id: "005", name: "kkk", age: 22 },
|
||||
],
|
||||
},
|
||||
});
|
||||
</script>
|
||||
</html>
|
77
列表过滤/列表过滤.html
Normal file
77
列表过滤/列表过滤.html
Normal file
@@ -0,0 +1,77 @@
|
||||
<!--
|
||||
* @Author: Kane
|
||||
* @Date: 2022-05-24 21:47:36
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-05-25 11:01:43
|
||||
* @FilePath: \vue.js学习\列表过滤\列表过滤.html
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>列表过滤</title>
|
||||
<link rel="stylesheet" href="../css/root.css" />
|
||||
<link rel="stylesheet" href="../css/normalize.css" />
|
||||
<link rel="stylesheet" href="../css/kane.css" />
|
||||
<script src="../vue/vue.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<h1>学习列表过滤!</h1>
|
||||
<hr />
|
||||
<fieldset title="过滤">
|
||||
<legend> 过滤 </legend>
|
||||
<label for=""
|
||||
>姓名:<input type="text" v-model:value="nameFilter"
|
||||
/></label>
|
||||
<label
|
||||
>性别:
|
||||
<select name="" id="">
|
||||
<option value=""></option>
|
||||
<option value="男">男</option>
|
||||
<option value="女">女</option>
|
||||
</select>
|
||||
</label>
|
||||
</fieldset>
|
||||
<ul>
|
||||
<li v-for="person in filteredPersonList" v-bind:key="person.id">
|
||||
姓名:{{person.name}} - 性别:{{person.sex}} -
|
||||
年龄:{{person.age}}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
Vue.config.productionTip = false;
|
||||
|
||||
const vm = new Vue({
|
||||
el: "#app",
|
||||
data: {
|
||||
personsList: [
|
||||
{ id: "001", name: "马冬梅", sex: "女", age: 18 },
|
||||
{ id: "002", name: "周冬雨", sex: "女", age: 19 },
|
||||
{ id: "003", name: "周杰伦", sex: "男", age: 33 },
|
||||
{ id: "004", name: "温兆伦", sex: "男", age: 52 },
|
||||
],
|
||||
nameFilter: "",
|
||||
},
|
||||
methods: {
|
||||
filteName: function () {
|
||||
console.log("过滤名字");
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
filteredPersonList() {
|
||||
return this.personsList.filter((p) => {
|
||||
return p.name.indexOf(this.nameFilter) != -1;
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
</html>
|
Reference in New Issue
Block a user