Skip to content

Commit 946dad7

Browse files
committed
fix: vue 2 template
1 parent f4810d8 commit 946dad7

File tree

8 files changed

+36
-43
lines changed

8 files changed

+36
-43
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;
4+
5+
ActionBar {
6+
background-color: #65adf1;
7+
color: white;
8+
}

packages/template-blank-vue-ts/app/app.scss

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
<template>
22
<Page>
33
<ActionBar>
4-
<Label text="Home"/>
4+
<Label text="Home" class="font-bold text-lg"/>
55
</ActionBar>
66

77
<GridLayout>
8-
<Label class="info">
9-
<FormattedString>
10-
<Span class="fas" text.decode="&#xf135; "/>
11-
<Span :text="message"/>
12-
</FormattedString>
13-
</Label>
8+
<Label class="text-xl align-middle text-center text-gray-500" :text="message" @tap="logMessage" />
149
</GridLayout>
1510
</Page>
1611
</template>
@@ -23,21 +18,18 @@
2318
message() {
2419
return "Blank {N}-Vue app";
2520
}
21+
},
22+
23+
methods: {
24+
logMessage() {
25+
console.log('You have tapped the message!')
26+
}
2627
}
2728
});
2829
</script>
2930

30-
<style scoped lang="scss">
31-
@import '@nativescript/theme/scss/variables/blue';
32-
33-
// Custom styles
34-
.fas {
35-
@include colorize($color: accent);
36-
}
37-
38-
.info {
31+
<style>
32+
/* .info {
3933
font-size: 20;
40-
horizontal-align: center;
41-
vertical-align: center;
42-
}
34+
} */
4335
</style>
-131 KB
Binary file not shown.
-39.1 KB
Binary file not shown.
-204 KB
Binary file not shown.

packages/template-blank-vue-ts/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@nativescript/template-blank-vue-ts",
33
"main": "app/app.ts",
44
"displayName": "Blank Vue Typescript",
5-
"version": "9.0.1",
5+
"version": "9.0.2",
66
"description": "Blank Typescript template for NativeScript apps using Vue.",
77
"author": "NativeScript Team <oss@nativescript.org>",
88
"license": "Apache-2.0",
@@ -25,6 +25,7 @@
2525
"!tools/assets",
2626
"types",
2727
".editorconfig",
28+
"tailwind.config.js",
2829
"tsconfig.json"
2930
],
3031
"keywords": [
@@ -42,14 +43,14 @@
4243
],
4344
"dependencies": {
4445
"@nativescript/core": "~9.0.0",
45-
"@nativescript/theme": "^3.1.0",
4646
"nativescript-vue": "~2.9.3"
4747
},
4848
"devDependencies": {
4949
"@nativescript/types": "~9.0.0",
5050
"@nativescript/webpack": "5.0.24",
51-
"@types/node": "~17.0.21",
51+
"@types/node": "^20.0.0",
5252
"nativescript-vue-template-compiler": "~2.9.3",
53+
"tailwindcss": "~3.4.0",
5354
"typescript": "~5.4.0",
5455
"vue": "~2.6.12"
5556
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/** @type {import('tailwindcss').Config} */
2+
module.exports = {
3+
content: ['./app/**/*.{css,html,vue,ts,tsx}'],
4+
// use the .ns-dark class to control dark mode (applied by NativeScript) - since 'media' (default) is not supported.
5+
darkMode: ['class', '.ns-dark'],
6+
theme: {
7+
extend: {},
8+
},
9+
plugins: [],
10+
corePlugins: {
11+
preflight: false, // disables browser-specific resets
12+
},
13+
}

0 commit comments

Comments
 (0)