File tree Expand file tree Collapse file tree 6 files changed +21
-7
lines changed Expand file tree Collapse file tree 6 files changed +21
-7
lines changed Original file line number Diff line number Diff line change 10
10
"vitepress" : " ^0.17.3"
11
11
},
12
12
"dependencies" : {
13
- "@vue/repl" : " ^0.3.0 " ,
13
+ "@vue/repl" : " ^0.3.1 " ,
14
14
"@vue/theme" : " ^0.1.8"
15
15
}
16
16
}
Original file line number Diff line number Diff line change @@ -480,6 +480,9 @@ module.exports = {
480
480
optimizeDeps : {
481
481
exclude : [ '@vue/repl' ]
482
482
} ,
483
+ server : {
484
+ host : true
485
+ } ,
483
486
ssr : {
484
487
external : [ '@vue/repl' ]
485
488
} ,
Original file line number Diff line number Diff line change @@ -5,6 +5,10 @@ export default {
5
5
const message = ref ( 'Hello World!' )
6
6
7
7
function reverseMessage ( ) {
8
+ // in JavaScript, we must access/mutate the value of a ref
9
+ // via its .value property.
10
+ // Note we don't need to do so inside templates because
11
+ // refs are automatically "unwrapped" in templates.
8
12
message . value = message . value . split ( '' ) . reverse ( ) . join ( '' )
9
13
}
10
14
Original file line number Diff line number Diff line change 1
- This example demonstrates handling user input with the v-on directive. The @click syntax is short for v-on:click
1
+ This example demonstrates handling user input with the v-on directive. The @click syntax is short for v-on:click.
Original file line number Diff line number Diff line change
1
+ import { ref } from 'vue'
2
+
1
3
export default {
2
4
setup ( ) {
3
- const message = 'Hello World!'
5
+ // A "ref" is a reactive data source that stores a value.
6
+ // Technically, we don't need to wrap the string with ref()
7
+ // in order to display it, but we will see in the next
8
+ // example why it is needed if we ever intend to change
9
+ // the value.
10
+ const message = ref ( 'Hello World!' )
4
11
5
12
return {
6
13
message
Original file line number Diff line number Diff line change 296
296
estree-walker "^2.0.2"
297
297
magic-string "^0.25.7"
298
298
299
- " @vue/repl@^0.3.0 " :
300
- version "0.3.0 "
301
- resolved "https://registry.yarnpkg.com/@vue/repl/-/repl-0.3.0 .tgz#1cae74efa01af097551f4a3c95df99a401527520 "
302
- integrity sha512-+uFU7vpqTE8kq69L6muMHrI0KZUdYWUwlbOSoCjNlNf1gMk7ZLqYbx4jxhswyz7/TqjH9x4eJUgGhKmMRnQZ3w ==
299
+ " @vue/repl@^0.3.1 " :
300
+ version "0.3.1 "
301
+ resolved "https://registry.yarnpkg.com/@vue/repl/-/repl-0.3.1 .tgz#3df4c051f80db363cfce07afdd4da3464b42d18e "
302
+ integrity sha512-Ispx5XonYQ8gpNiiPUD7Ujxbp0a3sITEEIFS+JZOckdwm5O822bkMDJmU9Y9vs7HvWsWNFRFW3KSVav0GoZ/QA ==
303
303
304
304
305
305
version "3.2.11"
You can’t perform that action at this time.
0 commit comments