Skip to content

Commit

Permalink
chore(examples): update vue-composition-api
Browse files Browse the repository at this point in the history
to reflect vue 2.7 upgrade

Signed-off-by: Chawye Hsu <[email protected]>
  • Loading branch information
chawyehsu committed Jan 20, 2025
1 parent 8229bd6 commit a9c1577
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
8 changes: 2 additions & 6 deletions examples/vue-composition-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@
"name": "vue-composition-api",
"version": "0.0.0",
"private": true,
"description": "How to use the module @vue/composition-api with Saber",
"description": "How to use Vue Composition API in Saber",
"scripts": {
"dev": "saber",
"build": "saber build"
},
"dependencies": {
"@alterjs/saber": "^0.13.0",
"@vue/composition-api": "^0.3.2"
},
"volta": {
"node": "16.20.2"
"@alterjs/saber": "^0.13.0"
}
}
6 changes: 3 additions & 3 deletions examples/vue-composition-api/pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<script>
// Using Vue 3.x composition API in Vue 2.x
import { computed, createComponent, reactive } from '@vue/composition-api'
import { computed, reactive, defineComponent } from 'vue'
// Wrapping component definition with `createComponent`
// Wrapping component definition with `defineComponent`
// is only required for TypeScript users
export default createComponent({
export default defineComponent({
setup() {
const state = reactive({
count: 0,
Expand Down
4 changes: 0 additions & 4 deletions examples/vue-composition-api/saber-browser.js

This file was deleted.

0 comments on commit a9c1577

Please sign in to comment.