Merge pull request #136 from QingWei-Li/next

Table: fix render static data
pull/2/head
杨奕 2016-09-01 04:05:20 -05:00 committed by GitHub
commit c545f5a447
3 changed files with 10 additions and 2 deletions

View File

@ -6,6 +6,8 @@
- 修复 upload 上传的问题,并增加上传成功和失败的钩子函数 - 修复 upload 上传的问题,并增加上传成功和失败的钩子函数
- button 组件增加 `nativeType` 属性,用于组件内 `<button>` 标签的 `type` 属性,默认值为 `'button' - button 组件增加 `nativeType` 属性,用于组件内 `<button>` 标签的 `type` 属性,默认值为 `'button'
- 修复 Table 自定义模板中渲染静态数据错误
- 修复 TimePicker 的 `picker-options` 属性
### 1.0.0-rc.1 ### 1.0.0-rc.1

View File

@ -768,4 +768,4 @@
| type | 对应列的类型。如果设置了 `selection` 则显示多选框,如果设置了 `index` 则显示该行的索引(从 1 开始计算) | string | selection/index | - | | type | 对应列的类型。如果设置了 `selection` 则显示多选框,如果设置了 `index` 则显示该行的索引(从 1 开始计算) | string | selection/index | - |
| formatter | 用来格式化内容,在 formatter 执行的时候,会传入 row 和 column | function | - | - | | formatter | 用来格式化内容,在 formatter 执行的时候,会传入 row 和 column | function | - | - |
| show-tooltip-when-overflow | 当过长被隐藏时显示 tooltip | Boolean | - | false | | show-tooltip-when-overflow | 当过长被隐藏时显示 tooltip | Boolean | - | false |
| inline-template | 指定该属性后可以自定义 column 模板,参考多选的时间列,通过 row 获取行信息,通过 _self 获取当前上下文。此时不需要配置 property 属性 | - | - | | inline-template | 指定该属性后可以自定义 column 模板,参考多选的时间列,通过 row 获取行信息,JSX 里通过 _self 获取当前上下文。此时不需要配置 property 属性 | - | - |

View File

@ -172,7 +172,13 @@ export default {
let customRender = _self.$options.render; let customRender = _self.$options.render;
renderColumn = function() { renderColumn = function() {
return customRender.call(objectAssign(_self, data)); data._staticTrees = _self._staticTrees;
data.$options = {};
data.$options.staticRenderFns = _self.$options.staticRenderFns;
data._renderProxy = _self._renderProxy;
data._m = _self._m;
return customRender.call(data);
}; };
}; };