Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support formatting blocks in Vue SFC
- Loading branch information
Showing
13 changed files
with
339 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<script setup lang="ts"> | ||
// Define reactive data and props | ||
import { ref } from 'vue' | ||
const greeting = ref('Hello, Vue 3!') | ||
const counter = ref<number | string>(0) | ||
// Define a function | ||
function incrementCounter() { | ||
counter.value++ | ||
} | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<h1>{{ greeting }}</h1> | ||
<button @click="incrementCounter"> | ||
Click me! | ||
</button> | ||
<p>Counter: {{ counter }}</p> | ||
</div> | ||
</template> | ||
|
||
<style> | ||
.a { color: red } | ||
</style> | ||
|
||
<style lang="scss"> | ||
$font-stack: Helvetica, sans-serif; | ||
$primary-color: #333; | ||
body { font: 100% $font-stack; | ||
color: $primary-color; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<script setup> | ||
// Define reactive data and props | ||
import { ref } from 'vue' | ||
const greeting = ref(`Hello, Vue 3!${1}`) | ||
const counter = ref(0) | ||
// Define a function | ||
function incrementCounter() { | ||
counter.value++ | ||
} | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<h1> | ||
{{ greeting }} | ||
</h1> | ||
<button @click="incrementCounter"> | ||
Click me! | ||
</button> | ||
<p>Counter: {{ counter }}</p> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.