序言
由于现在html标签是自动切换小写,所以在使用
iview
组件时如果与html默认组件同名,则iview
组件的大写字母名字会被默认转译成全小写导致组件引入失败,由于官网上没有找到对应的解释,后来才在开发者文档中找到,所以在此记录一下.
正文
在非 template/render 模式下(例如使用 CDN 引用时),组件名要分隔,例如 DatePicker
必须要写成 date-picker
。
以下组件,在非 template/render 模式下,需要加前缀 i-
:
- Button:
i-button
- Col:
i-col
- Table:
i-table
- Input:
i-input
- Form:
i-form
- Menu:
i-menu
- Select:
i-select
- Option:
i-option
- Progress:
i-progress
- Time:
i-time
以下组件,在所有模式下,必须加前缀 i-,除非使用 iview-loader:
- Switch:
i-switch
- Circle:
i-circle
最后
原文献的地址如下: