-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: __default__ is not defined (#5)
* Update index.ts * 修复 export default defineComponent 跟 const XXX = defineComponent 兼容, 添加示例 C Co-authored-by: Antes <[email protected]>
- Loading branch information
Showing
3 changed files
with
22 additions
and
2 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
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,18 @@ | ||
import {defineComponent, onMounted, ref} from 'vue'; | ||
|
||
export default defineComponent({ | ||
setup() { | ||
onMounted(() => { | ||
console.log('C') | ||
}) | ||
const c = ref(0) | ||
return () => (<> | ||
<div onClick={() => { | ||
c.value++ | ||
}}> 点我加一个 | ||
</div> | ||
<span>我是点C 我的值是 {c.value}</span> | ||
</>) | ||
} | ||
}); | ||
|
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