update readme

This commit is contained in:
dntzhang 2019-04-07 13:45:31 +08:00
parent 323975b0d1
commit d651d46123
3 changed files with 31 additions and 0 deletions

View File

@ -12,3 +12,12 @@ todo:
vscode 安装 lit-html 使 html`内容` 高亮
import testSVG from 'svg/test'
new cax.SVG(testSVG.bind(this)())
没有方法:
new cax.SVG(testSVG())

14
packages/mps/svg/test.js Normal file
View File

@ -0,0 +1,14 @@
export default function () {
return cax.h(
"svg",
{ x: "100", y: "100" },
cax.h("polyline", {
bindtap: this.tapHandler,
points: "30,2 80,2 55,52",
style: "stroke:#006600; stroke-width: 4; fill: #33cc33;"
})
);
}

View File

@ -0,0 +1,8 @@
<svg x="100" y="100">
<polyline bindtap="tapHandler" points="30,2 80,2 55,52"
style="stroke:#006600; stroke-width: 4;
fill: #33cc33;"/>
</svg>

After

Width:  |  Height:  |  Size: 167 B