-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
jindy
committed
Jun 15, 2022
1 parent
4a710fe
commit 9197be5
Showing
9 changed files
with
238 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { h,ref } from '../../lib/guide-mini-vue.esm.js' | ||
const nextChildren = 'newChildren' | ||
const prevChildren = [h('div', {}, 'A'), h('div', {}, 'B')] | ||
|
||
export default { | ||
name: 'ArrayToText', | ||
setup() { | ||
const isChange = ref(false) | ||
window.isChange = isChange | ||
|
||
return { | ||
isChange | ||
} | ||
}, | ||
render() { | ||
const self = this | ||
return self.isChange ? h('div', {}, nextChildren) : h('div', {}, prevChildren) | ||
} | ||
} |
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,21 @@ | ||
|
||
|
||
import { h,ref } from '../../lib/guide-mini-vue.esm.js' | ||
const prevChildren = 'newChildren' | ||
const nextChildren = [h('div', {}, 'A'), h('div', {}, 'B')] | ||
|
||
export default { | ||
name: 'TextToArray', | ||
setup() { | ||
const isChange = ref(false) | ||
window.isChange = isChange | ||
|
||
return { | ||
isChange | ||
} | ||
}, | ||
render() { | ||
const self = this | ||
return self.isChange ? h('div', {}, nextChildren) : h('div', {}, prevChildren) | ||
} | ||
} |
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,19 @@ | ||
import { h,ref } from '../../lib/guide-mini-vue.esm.js' | ||
const nextChildren = 'newChildren' | ||
const prevChildren = 'oldChildren' | ||
|
||
export default { | ||
name: 'TextToText', | ||
setup() { | ||
const isChange = ref(false) | ||
window.isChange = isChange | ||
|
||
return { | ||
isChange | ||
} | ||
}, | ||
render() { | ||
const self = this | ||
return self.isChange ? h('div', {}, nextChildren) : h('div', {}, prevChildren) | ||
} | ||
} |
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,16 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>patch children</title> | ||
</head> | ||
|
||
<body> | ||
<div id="app"></div> | ||
<script src="./mian.js" type="module"></script> | ||
</body> | ||
|
||
</html> |
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,5 @@ | ||
import { createApp } from '../../lib/guide-mini-vue.esm.js' | ||
import { App } from './App.js' | ||
|
||
const rootContainer = document.querySelector('#app') | ||
createApp(App).mount(rootContainer) |
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.