diff --git a/src/js/anot.shim.js b/src/js/anot.shim.js
index 0d97598..554f4af 100644
--- a/src/js/anot.shim.js
+++ b/src/js/anot.shim.js
@@ -3723,16 +3723,22 @@
if (!W3C && propMap[k]) {
k = propMap[k]
}
+ if (obj[i] === false || obj[i] === null || obj[i] === undefined) {
+ obj[i] = ''
+ }
if (typeof elem[boolMap[k]] === 'boolean') {
//布尔属性必须使用el.xxx = true|false方式设值
elem[boolMap[k]] = !!obj[i]
//如果为false, IE全系列下相当于setAttribute(xxx, ''),会影响到样式,需要进一步处理
- if (!obj[i]) obj[i] = !!obj[i]
+ if (!obj[i]) {
+ obj[i] = !!obj[i]
+ }
+ if (obj[i] === false) {
+ return elem.removeAttribute(k)
+ }
}
- if (obj[i] === false || obj[i] === null || obj[i] === undefined)
- return elem.removeAttribute(k)
//SVG只能使用setAttribute(xxx, yyy), VML只能使用elem.xxx = yyy ,HTML的固有属性必须elem.xxx = yyy
var isInnate = rsvg.test(elem)
diff --git a/src/js/tree/index.js b/src/js/tree/index.js
index bb651d4..8792e04 100644
--- a/src/js/tree/index.js
+++ b/src/js/tree/index.js
@@ -44,6 +44,7 @@ export default Anot.component('tree', {
@@ -72,8 +74,10 @@ export default Anot.component('tree', {
props.parent = props.parent || 'parent'
props.children = props.children || 'children'
state.list = format(props.list || [], props)
+ state.multiCheck = !!props.multiCheck
delete props.list
delete props.theme
+ delete props.multiCheck
},
componentDidMount: function() {
if (typeof this.props.onCreated === 'function') {
@@ -82,16 +86,17 @@ export default Anot.component('tree', {
},
state: {
list: [],
+ multiCheck: false,
currItem: -1,
checked: {}
},
skip: ['checked'],
props: {
className: '',
- id: 'id',
- label: 'label',
- parent: 'parent',
- children: 'children',
+ id: '',
+ label: '',
+ parent: '',
+ children: '',
onCreated: Anot.PropsTypes.isFunction(),
onSelected: Anot.PropsTypes.isFunction(),
onChecked: Anot.PropsTypes.isFunction()