序言
由於現在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
最后
原文獻的地址如下: