javascript - Element UI表格錯(cuò)行
問題描述
用Element UI和Vue開發(fā)時(shí),將Element UI中的diaolog組件改成自己的組件,在這個(gè)組件中使用Element UI中的表格組件,發(fā)現(xiàn)渲染的時(shí)候有的時(shí)候會錯(cuò)行,目前發(fā)現(xiàn)原因是我加的單選按鈕radio的原因,但是不知道如何解決。如下圖所示,求大神答疑解惑
<!--diaolog表格-->
<el-table :data='gridData' highlight-current-row fit> <el-table-column label='' width='50'> <template scope='scope'><el-radio :label='gridData[scope.$index].classId' v-model='radio' @change.native='getCurrentRow(scope.$index)'></el-radio> </template> </el-table-column> <el-table-column prop='className' label='班級名稱' width='220'></el-table-column> <el-table-column prop='gradeSubject' label='年級/科目' width='150'></el-table-column> <el-table-column prop='teachingTime' label='授課時(shí)段' width=''></el-table-column> <el-table-column prop='teacher' label='任課老師' width='100'></el-table-column> <el-table-column prop='classTypeName' label='班型' width=''></el-table-column> </el-table> <!--分頁--> <p class='page-box'> <el-pagination layout='prev, pager, next' :page-count='pageTotal' :current-page='currentPage' @current-change='onChangePage'></el-pagination> </p>
問題解答
回答1:<el-table-column type='index' width='60px'></el-table-column>1.需要加上width屬性;2.如果你有五列,讓其中一列不設(shè)置width,這樣能好看一些。
--> 你可以試一下。^_^
相關(guān)文章:
1. mysql 查詢身份證號字段值有效的數(shù)據(jù)2. python bottle跑起來以后,定時(shí)執(zhí)行的任務(wù)為什么每次都重復(fù)(多)執(zhí)行一次?3. 視頻文件不能播放,怎么辦?4. html5 - HTML代碼中的文字亂碼是怎么回事?5. python - 爬蟲模擬登錄后,爬取csdn后臺文章列表遇到的問題6. visual-studio - Python OpenCV: 奇怪的自動補(bǔ)全問題7. mysql - 分庫分表、分區(qū)、讀寫分離 這些都是用在什么場景下 ,會帶來哪些效率或者其他方面的好處8. javascript - 彈出一個(gè)子窗口,操作之后關(guān)閉,主窗口會得到相應(yīng)的響應(yīng),例如網(wǎng)站的某些登錄界面,django后臺的管理等,這是怎么實(shí)現(xiàn)的呢?9. javascript - ios返回不執(zhí)行js怎么解決?10. android - 分享到微信,如何快速轉(zhuǎn)換成字節(jié)數(shù)組
