Skip to content

Commit

Permalink
fix:
Browse files Browse the repository at this point in the history
  • Loading branch information
jinfeiyang committed Nov 27, 2020
1 parent a2a0d98 commit abd06b3
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dist/easy-canvas.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/easy-canvas.min.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions example/basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@
}
},
[
// drawTicket(h),
// drawListItem(h),
drawTicket(h),
drawListItem(h),
// ...list,
h('view', {
styles: {
Expand All @@ -115,7 +115,7 @@
color: '#333',
height: '100%'
}
}, 'sdsdsfd')])
}, '盒模型border-box')])
])
]
)
Expand Down
2 changes: 1 addition & 1 deletion lib/create-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function createElement(model) {
if (typeof children === 'string' && name !== 'text') {
// 支持text简写
_children = [new Text({}, children)]
} else if (!Array.isArray(children)) {
} else if (!Array.isArray(children) && name !== 'text') {
throw Error(`Element [${name}]:Children must be type of Array!`)
}
_element = elementFactory[name](options, _children, c)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "easy-canvas-layout",
"version": "0.1.7",
"version": "0.1.8",
"description": "A canvas lib help to easy layout in canvas.",
"miniprogram_dist": "dist",
"main": "./lib/index.js",
Expand Down

0 comments on commit abd06b3

Please sign in to comment.