|
@@ -28,31 +28,32 @@ export default function () {
|
|
|
constructor(config) {
|
|
|
const me = this
|
|
|
const {dataSource} = config
|
|
|
- this.columnConfigCacheKey = this.makeColumnConfigCacheKey(config)
|
|
|
- if (Array.isArray(config.columns) && config.columns.length > 0) {
|
|
|
- const cacheData = this.getColumnConfigCache()
|
|
|
- if (Array.isArray(cacheData) && cacheData.length > 0) {
|
|
|
- const newColumns = []
|
|
|
-
|
|
|
- for (let j = 0; j < cacheData.length; j++) {
|
|
|
- const itData = cacheData[j]
|
|
|
- for (let i = 0; i < config.columns.length; i++) {
|
|
|
- const column = config.columns[i]
|
|
|
- if (itData.dataIndex === column.dataIndex) {
|
|
|
- if (itData.width) {
|
|
|
- column.width = itData.width
|
|
|
+ if (!window["IS_DESIGN_MODE"]) {
|
|
|
+ this.columnConfigCacheKey = this.makeColumnConfigCacheKey(config)
|
|
|
+ if (Array.isArray(config.columns) && config.columns.length > 0) {
|
|
|
+ const cacheData = this.getColumnConfigCache()
|
|
|
+ if (Array.isArray(cacheData) && cacheData.length > 0) {
|
|
|
+ const newColumns = []
|
|
|
+
|
|
|
+ for (let j = 0; j < cacheData.length; j++) {
|
|
|
+ const itData = cacheData[j]
|
|
|
+ for (let i = 0; i < config.columns.length; i++) {
|
|
|
+ const column = config.columns[i]
|
|
|
+ if (itData.dataIndex === column.dataIndex) {
|
|
|
+ if (itData.width) {
|
|
|
+ column.width = itData.width
|
|
|
+ }
|
|
|
+ column.hidden = itData.hidden
|
|
|
+ column.locked = itData.locked
|
|
|
+ newColumns.push(column)
|
|
|
+ break
|
|
|
}
|
|
|
- column.hidden = itData.hidden
|
|
|
- column.locked = itData.locked
|
|
|
- newColumns.push(column)
|
|
|
- break
|
|
|
}
|
|
|
}
|
|
|
+ config.columns = newColumns
|
|
|
}
|
|
|
- config.columns = newColumns
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
const newConfig = _.defaultsDeep({
|
|
|
// 强制性属性
|
|
|
|