Skip to content
This repository was archived by the owner on May 12, 2024. It is now read-only.

Commit e630455

Browse files
committed
chore: up deps
1 parent 575afb4 commit e630455

File tree

9 files changed

+1050
-994
lines changed

9 files changed

+1050
-994
lines changed

examples/index.html

+17-7
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8" />
55
<title>VueFire Todo App Demo</title>
6-
<script src="https://www.gstatic.com/firebasejs/7.7.0/firebase.js"></script>
6+
<script src="https://www.gstatic.com/firebasejs/7.24.0/firebase.js"></script>
77
<script src="https://unpkg.com/vue@3"></script>
88
<script src="../dist/vuefire.global.js"></script>
99
</head>
@@ -58,17 +58,17 @@ <h5>Original data</h5>
5858
</div>
5959

6060
<script>
61-
var db = firebase
61+
let db = firebase
6262
.initializeApp({
6363
projectId: 'vue-fire-store',
6464
databaseURL: 'https://vue-fire-store.firebaseio.com',
6565
})
6666
.firestore()
6767
firebase.firestore().enablePersistence()
68-
var todosRef = db.collection('todos')
69-
var unFinishedTodos = todosRef.where('finished', '==', false)
70-
var finishedTodos = todosRef.where('finished', '==', true)
71-
var configRef = db.collection('configs').doc('jORwjIykFo2NmkdzTkhU')
68+
let todosRef = db.collection('todos')
69+
let unFinishedTodos = todosRef.where('finished', '==', false)
70+
let finishedTodos = todosRef.where('finished', '==', true)
71+
let configRef = db.collection('configs').doc('jORwjIykFo2NmkdzTkhU')
7272

7373
const OptionAPI = {
7474
data: () => ({
@@ -88,6 +88,10 @@ <h5>Original data</h5>
8888
config: configRef,
8989
},
9090

91+
beforeCreate() {
92+
console.log('Using Options API version')
93+
},
94+
9195
methods: {
9296
addTodo: function () {
9397
if (this.newTodoText) {
@@ -119,6 +123,8 @@ <h5>Original data</h5>
119123

120124
const CompositionAPI = {
121125
setup() {
126+
console.log('Using Composition API version')
127+
122128
const todos = Vue.ref([])
123129
const tweets = Vue.ref([])
124130
const moments = Vue.ref([])
@@ -173,7 +179,11 @@ <h5>Original data</h5>
173179
},
174180
}
175181

176-
var vm = Vue.createApp(CompositionAPI)
182+
let params = new URLSearchParams(location.search)
183+
184+
let vm = Vue.createApp(
185+
params.get('composition') != null ? CompositionAPI : OptionAPI
186+
)
177187
.use(Vuefire.firestorePlugin, { wait: true })
178188
.mount('#app')
179189
</script>

examples/rtdb.html

+6-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8" />
55
<title>VueFire Todo App Demo</title>
6-
<script src="https://www.gstatic.com/firebasejs/7.7.0/firebase.js"></script>
6+
<script src="https://www.gstatic.com/firebasejs/7.24.0/firebase.js"></script>
77
<script src="https://unpkg.com/vue@3"></script>
88
<script src="../dist/vuefire.global.js"></script>
99
</head>
@@ -41,12 +41,12 @@
4141
</div>
4242

4343
<script>
44-
var db = firebase
44+
let db = firebase
4545
.initializeApp({
4646
databaseURL: 'https://vuefiredemo.firebaseio.com',
4747
})
4848
.database()
49-
var todosRef = db.ref('todos')
49+
let todosRef = db.ref('todos')
5050

5151
const OptionsAPI = {
5252
data: () => ({
@@ -101,7 +101,9 @@
101101
},
102102
}
103103

104-
let app = Vue.createApp(CompositionAPI)
104+
let vm = Vue.createApp(
105+
params.get('composition') != null ? CompositionAPI : OptionAPI
106+
)
105107
.use(Vuefire.rtdbPlugin, { wait: true })
106108
.mount('#app')
107109
</script>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)