update readme

This commit is contained in:
dntzhang 2019-04-17 14:19:07 +08:00
parent 2d66aedb29
commit 658e866b80
1 changed files with 4 additions and 2 deletions

View File

@ -172,7 +172,7 @@ renderSVG(html`
style="stroke:#ff0000; fill: #ccccff"
transform="translate(100 50) rotate(45 50 50)">
</rect>
</svg>, 'svg-a', this.scope)
</svg>, 'svg-a', this.$scope)
```
@ -184,9 +184,11 @@ renderSVG(
<polygon fill="white" points="159.97,807.8 338.71,532.42 509.9,829.62 519.41,829.62 678.85,536.47 864.03,807.8 739.83,194.38 729.2,194.38 517.73,581.23 293.54,194.38 283.33,194.38 "/>
<circle fill="white" cx="839.36" cy="242.47" r="50"/>
</g>
</svg>, 'svg-a', this.scope)
</svg>, 'svg-a', this.$scope)
```
> 需要注意的是在 omip 中传递的最后一个参数不是 `this`,而是 `this.$scope`
在 mps 中,更加彻底,你可以单独创建 svg 文件,通过 import 导入。
```js