Skip to content

Commit 401301b

Browse files
committed
wip
1 parent 963b0a8 commit 401301b

File tree

6 files changed

+21
-7
lines changed

6 files changed

+21
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"vitepress": "^0.17.3"
1111
},
1212
"dependencies": {
13-
"@vue/repl": "^0.3.0",
13+
"@vue/repl": "^0.3.1",
1414
"@vue/theme": "^0.1.8"
1515
}
1616
}

src/.vitepress/config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,9 @@ module.exports = {
480480
optimizeDeps: {
481481
exclude: ['@vue/repl']
482482
},
483+
server: {
484+
host: true
485+
},
483486
ssr: {
484487
external: ['@vue/repl']
485488
},

src/examples/src/handling-input/App/composition.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ export default {
55
const message = ref('Hello World!')
66

77
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.
812
message.value = message.value.split('').reverse().join('')
913
}
1014

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
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.

src/examples/src/hello-world/App/composition.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
import { ref } from 'vue'
2+
13
export default {
24
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!')
411

512
return {
613
message

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,10 @@
296296
estree-walker "^2.0.2"
297297
magic-string "^0.25.7"
298298

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==
303303

304304
305305
version "3.2.11"

0 commit comments

Comments
 (0)