今天用Layui開發的時候突然遇到一個表格渲染出錯的問題。js報錯 Uncaught TypeError: Cannot create property 'key' on boolean 'true' , 原始碼壓縮後我是看不懂,後面搜社群的時候找到問題所在,文件 cols: [] 不行 用示例的 [[ ]] 解決。 權引用自 Fly社群
例子
var tableIn = table.render({ ···省略··· cols: [ {field: 'id', title: '{:lang("id")}', width: 80, fixed: true}, {field: 'title', title: '公告名稱', width: 400,templet: '#title'}, ], ···省略··· }); //改成 var tableIn = table.render({ ···省略··· cols: [[ {field: 'id', title: '{:lang("id")}', width: 80, fixed: true}, {field: 'title', title: '公告名稱', width: 400,templet: '#title'}, ]], ···省略··· });
(排坑) Cannot create property 'key' on boolean 'true'
相關文章
- vue 踩坑記錄 cannot read property xxx of undefinedVueUndefined
- el-tree 報錯 TypeError: Cannot read property ‘setCheckedKeys‘ of undefined“ErrorUndefined
- Cannot set property 'innerHTML' of nullHTMLNull
- ORA-01452: cannot CREATE UNIQUE INDEX; duplicate keys foundIndex
- Cannot set property ‘type‘ of null(vue)NullVue
- Cannot read property ‘aDataSort‘ of undefinedUndefined
- js提示Cannot read property ‘replace‘ of undefinedJSUndefined
- BUG——AngularJS:Cannot set property ‘pic‘ of undefinedAngularJSUndefined
- hive orc表'orc.create.index'='true'與'orc.create.index'='false'HiveIndexFalse
- echarts:Uncaught TypeError: Cannot read property '0' of undefinedEchartsErrorUndefined
- 前端報錯:cannot read property length of undefined前端Undefined
- vue+echarts報錯Cannot read property ‘init‘ of underfinedVueEcharts
- 執行專案報錯Cannot read property 'styles' of undefinedUndefined
- Appium dmg 安裝:[TypeError: Cannot read property 'replace' of undefined]APPErrorUndefined
- [Vue warn]: Invalid prop: type check failed for prop "unlinkPanels". Expected Boolean, got String with value "true".VueAIBooleanGo
- [譯] 避免那些可惡的 "cannot read property of undefined" 錯誤Undefined
- configure: error: C++ compiler cannot create executablesErrorC++Compile
- JDBC踩坑──`tinyint(1)`預設對應Java中的`Boolean`JDBCJavaBoolean
- JavaScript Boolean()JavaScriptBoolean
- spring中<context:property-placeholder/>一個坑SpringContext
- Spring context:property-placeholder 一些坑SpringContext
- better-scroll滾動排坑
- ORA-02429: cannot drop index used for enforcement of unique/primary keyIndex
- vue 中引用echarts 初始化init undefind問題(Cannot read property ‘init‘ of undefined)VueEchartsUndefined
- 開發中遇到的bug-Cannot set property ‘__VUE_DEVTOOLS_UID__‘ of nullVuedevUINull
- [Vue warn]: Error in render: "TypeError: Cannot read property 'matched' of undefined" found in <App> at src/App.vueVueErrorUndefinedAPP
- JavaScript Boolean 物件JavaScriptBoolean物件
- 【爬坑日記】vue中傳props時預設為Boolean問題VueBoolean
- 6150680: Cannot Create Guaranteed Restore Point In Physical Standby DB_602270.1REST
- vue-router.esm.js?fe87:2210 TypeError: Cannot read property ‘$createElement‘ of undefinedVueJSErrorUndefined
- Redis 修改過期 key 的一個坑Redis
- MonkeyRunner進坑——errors importing other modulesErrorImport
- Python建立字典與fromkeys的坑Python
- 在專案中應該使用Boolean還是使用boolean?Boolean
- JavaScript Boolean物件 valueOf()JavaScriptBoolean物件
- mark mybatis 返回booleanMyBatisBoolean
- FreeMarker boolean IssueBoolean
- Windows nvm的安裝使用(及排坑)Windows