Skip to content

Commit 2e24924

Browse files
committed
Cli in Vue
1 parent b36a7e9 commit 2e24924

31 files changed

+22087
-10
lines changed

Computed_Properties/App.vue

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<template>
2+
<div id="app">
3+
<button @click="status= !status">change status</button>
4+
{{ firstname }} {{ lastname }}
5+
<br>
6+
{{ getName() }}
7+
<br>
8+
{{ name }}
9+
<br>
10+
{{ status }}
11+
<ul>
12+
<li v-for="favlang in bestLangsForClover" :key="favlangs.title">{{ favlangs.title }}</li>
13+
</ul>
14+
</div>
15+
</template>
16+
17+
<script>
18+
export default{
19+
data: () => {
20+
return {
21+
firstname: "Nelan",
22+
lastname: "theclover",
23+
status: false,
24+
favlangs: [
25+
{ title: "Assembly", enjoys: false },
26+
{ title: "Pascal", enjoys: false },
27+
{ title: "Java", enjoys: true },
28+
{ title: "LLP", enjoys: false }
29+
]
30+
}
31+
},
32+
computed: {
33+
name(){
34+
console.log("computed");
35+
return this.firstname + " " + this.lastname;
36+
},
37+
bestLangsForClover(){
38+
return this.favlangs.filter(favlangs => favlangs.enjoys === false)
39+
}
40+
41+
42+
},
43+
methods:
44+
getName(){
45+
console.log("method");
46+
return this.firstname + " " + this.lastname;
47+
}
48+
}
49+
</script>
50+
51+
<style lang="scss">
52+
body{
53+
margin: 0;
54+
padding: 0;
55+
}
56+
</style>
57+

Proj_With_CSSComp/vuejsproj/.babelrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"presets": [
3+
["env", { "modules": false }],
4+
"stage-3"
5+
]
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.DS_Store
2+
node_modules/
3+
dist/
4+
npm-debug.log
5+
yarn-error.log
6+
7+
# Editor directories and files
8+
.idea
9+
*.suo
10+
*.ntvs*
11+
*.njsproj
12+
*.sln

Proj_With_CSSComp/vuejsproj/README.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# vuejsproj
2+
3+
> A Vue.js project
4+
5+
## Build Setup
6+
7+
``` bash
8+
# install dependencies
9+
npm install
10+
11+
# serve with hot reload at localhost:8080
12+
npm run dev
13+
14+
# build for production with minification
15+
npm run build
16+
```
17+
18+
For detailed explanation on how things work, consult the [docs for vue-loader](http://vuejs.github.io/vue-loader).
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>vuejsproj</title>
6+
</head>
7+
<body>
8+
<div id="app"></div>
9+
<script src="/dist/build.js"></script>
10+
</body>
11+
</html>

0 commit comments

Comments
 (0)