iviewUI使用中遇到的问题与解决方案(一)

项目中使用的iviewUI的版本是2.7.3,在使用中遇到的问题总结了一些,后续会更新,如果各位大神有遇到的坑欢迎评论补充
1、modal的样式要放到最外面,否则样式给不到;
2、iview组件的事件@on-change=fn,fn后面没有‘(参数)’;
3、router-view不能放到tabs里面,组件会渲染两次,要把它单独拿出来
4、FormItem里面input或者select不能用:model动态绑定元素,要用v-model
5、表格中嵌套其他组件
(1)table+tooltip
首先:render函数的使用
规则:h('标签名',{属性},[子节点])
eg:
render:  (h,  params)  =>  {
return  h('div', {}, [
h('Tooltip', {
props:  {
    placement:  'bottom'
},
    style:  {
},
on:  {
click:  ()  =>  {

}
}
          }, [
h('Button', {
props:  {
    type:  'text'
}
},  params.row.xxx),
h('div', {
slot:  'content',
style:  {
zIndex:  999,
whiteSpace:  'normal'
}
},  'tooltip內容')
])

])
}

(2) table+switch