好久没更新了

This commit is contained in:
asd
2021-03-23 10:58:10 +08:00
parent eca64f86c0
commit 9bf8e8d020
123 changed files with 24337 additions and 214 deletions

23
vuenew/cli/demo2/.gitignore vendored Normal file
View 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?

View File

@@ -0,0 +1,24 @@
# demo2
## Project setup
```
yarn install
```
### Compiles and hot-reloads for development
```
yarn serve
```
### Compiles and minifies for production
```
yarn build
```
### Lints and fixes files
```
yarn lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

View File

@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}

View File

@@ -0,0 +1,45 @@
{
"name": "demo2",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^0.21.1",
"core-js": "^3.6.5",
"element-ui": "^2.15.1",
"vue": "^2.6.11",
"vue-router": "^3.5.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2",
"vue-template-compiler": "^2.6.11"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View 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>

BIN
vuenew/cli/demo2/src.zip Normal file

Binary file not shown.

View File

@@ -0,0 +1,53 @@
<template>
<div id="app">
<router-view></router-view>
</div>
</template>
<script>
export default {
name: "App",
data() {
return {
msg: "hello world",
sty: "color:gold",
like: true,
team:["Ruby","Weiss","Blake","Yang"],
q:"fff",
value1: '',
};
},
methods: {
change() {
if (this.like) {
this.like = false;
} else {
this.like = true;
}
// this.like=this.like?false:true
},
go(){
this.$router.push({path:"/qaq",query:{a:123}})
},
go2(){
this.$router.push({name:"qaq",params:{a:123}})
},
bossname(e){
console.log(e)
}
},
components: {
},
};
</script>
<style>
* {
margin: 0;
padding: 0;
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

@@ -0,0 +1,62 @@
<template>
<div>
<p>选择效果</p>
<el-checkbox v-model="checkAll" @change="selectall">全选</el-checkbox>
<div style="margin: 15px 0"></div>
<el-checkbox-group v-model="checkedlist" @change="selectone" >
<el-checkbox v-for="(i, j) in list" :label="i.pri" :key="j">{{
i.name
}}</el-checkbox>
</el-checkbox-group>
<p>总价{{ zong }}</p>
</div>
</template>
<script>
export default {
name: "qaq",
data() {
return {
checkAll: false,
checkedlist: [],
list: [
{ name: "aaa", pri: 30 },
{ name: "bbb", pri: 40 },
{ name: "ccc", pri: 50 },
],
zong: 0,
isIndeterminate: true,
};
},
methods: {
selectall(val) {
console.log(val);
// this.checkedlist = val ? this.list : [];
this.checkedlist = [];
this.zong = 0;
if (val) {
for (let i in this.list) {
this.checkedlist.push(this.list[i].pri);
this.zong = this.zong + this.list[i].pri;
}
console.log(this.checkedlist);
} else {
this.zong = 0;
}
},
selectone(e) {
// console.log(e)
this.zong=0
for(let i in e){
console.log(e[i])
this.zong=this.zong+e[i]
}
},
},
};
</script>
<style>
</style>

View File

@@ -0,0 +1,16 @@
import Vue from 'vue'
import App from './App.vue'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import VueRouter from 'vue-router'
import router from './router'
Vue.config.productionTip = false
Vue.use(ElementUI);
Vue.use(VueRouter)
new Vue({
router,
render: h => h(App),
}).$mount('#app')

View File

@@ -0,0 +1,18 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
import qaq from "../components/qaq"
import axios from 'axios';
Vue.use(VueRouter);
Vue.prototype.$axios = axios;
const routes = [
{ path: '/qaq', name:"qaq", component: qaq },
]
const router = new VueRouter({
routes
})
export default router;

8589
vuenew/cli/demo2/yarn.lock Normal file

File diff suppressed because it is too large Load Diff