Update Readme.md

pull/1/head
yutent 2023-03-07 20:41:55 +08:00 committed by GitHub
parent 1853aeabb0
commit 487392b085
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -1,5 +1,9 @@
## 9号UI组件库的核心 ## 9号UI组件库的核心
### 开发文档
[开发文档](https://github.com/9th-js/core/wiki)
### 示例
```js ```js
import { css, html, Component } from '//jscdn.ink/@ninejs/core/latest/index.js' import { css, html, Component } from '//jscdn.ink/@ninejs/core/latest/index.js'
@ -21,7 +25,7 @@ class Hello extends Component {
render(){ render(){
return html` return html`
<div> <div>
<button @click="increase">点击我</button> <button @click="${this.increase}">点击我</button>
</div> </div>
<div>所有点击数为: <span>${this.count}</span></div> <div>所有点击数为: <span>${this.count}</span></div>
` `
@ -67,7 +71,7 @@ class Hello extends Component {
render(){ render(){
return html` return html`
<div> <div>
<button @click="increase">点击我</button> <button @click="${this.increase}">点击我</button>
</div> </div>
<div>所有点击数为: <span>${this.count}</span></div> <div>所有点击数为: <span>${this.count}</span></div>
` `
@ -90,4 +94,4 @@ class Hello extends Component {
*/ */
``` ```