Skip to content

Commit 20d23d2

Browse files
committed
adding starter repo
0 parents  commit 20d23d2

File tree

7 files changed

+12541
-0
lines changed

7 files changed

+12541
-0
lines changed

.gitignore

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
# Created by https://www.gitignore.io/api/vue
3+
# Edit at https://www.gitignore.io/?templates=vue
4+
5+
### Vue ###
6+
.DS_*
7+
*.log
8+
logs
9+
**/*.backup.*
10+
**/*.back.*
11+
12+
node_modules
13+
bower_components
14+
15+
*.sublime*
16+
17+
psd
18+
thumb
19+
sketch
20+
21+
## ignore the dist folder
22+
dist
23+
24+
## ignore the demo build
25+
demo-dist
26+
27+
# End of https://www.gitignore.io/api/vue

App.vue

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<template>
2+
<vn-view>
3+
<hero />
4+
<vn-view id="counter" :styleSheet="counterStyle">
5+
<vn-text>Counter: {{count}}</vn-text>
6+
<vn-button @clicked="inc">Inc</vn-button>
7+
</vn-view>
8+
</vn-view>
9+
</template>
10+
11+
<script>
12+
import Hero from './Hero.vue';
13+
import { ref } from 'vue-nodegui';
14+
15+
export default {
16+
components: { Hero },
17+
setup() {
18+
const count = ref(0);
19+
const inc = () => {
20+
count.value++;
21+
}
22+
23+
return {
24+
inc,
25+
count,
26+
counterStyle: `
27+
#counter {
28+
flex-direction: row;
29+
align-items: 'center';
30+
justify-content: 'center';
31+
}
32+
`
33+
}
34+
}
35+
}
36+
</script>

Hero.vue

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<template>
2+
<vn-view id="hero" :styleSheet="viewStyle">
3+
<vn-image id="img" src="https://docs.nodegui.org/img/logox200.png" />
4+
<vn-text id="heading">Vue nodegui</vn-text>
5+
<vn-text id="text">Powered by Vue3 🌈 and Qt 💚</vn-text>
6+
</vn-view>
7+
</template>
8+
9+
<script>
10+
export default {
11+
setup() {
12+
return {
13+
viewStyle: `
14+
#hero {
15+
background-color: white;
16+
padding: 20px;
17+
}
18+
19+
#heading {
20+
color: black;
21+
font-size: 24px;
22+
qproperty-alignment: AlignCenter;
23+
}
24+
25+
#text {
26+
color: black;
27+
font-size: 18px;
28+
qproperty-alignment: AlignCenter;
29+
}
30+
`
31+
}
32+
}
33+
}
34+
</script>

main.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { createApp } from 'vue-nodegui';
2+
import App from './App.vue';
3+
4+
createApp(App).mount();

0 commit comments

Comments
 (0)