From cfafd3d19135c7649eeae7280579d5a4b07446b3 Mon Sep 17 00:00:00 2001 From: "cinwell.li" Date: Sun, 13 Nov 2016 11:44:29 +0800 Subject: [PATCH] Table: fix render fail in vue-loader 9.9.0 (#1018) --- package.json | 2 +- packages/table/src/table-column.js | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index f4158a3c4..33534b8ad 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,7 @@ "uppercamelcase": "^1.1.0", "url-loader": "^0.5.7", "vue": "^2.0.5", - "vue-loader": "^9.8.0", + "vue-loader": "^9.9.0", "vue-markdown-loader": "^0.5.1", "vue-router": "^2.0.0", "webpack": "^1.13.2", diff --git a/packages/table/src/table-column.js b/packages/table/src/table-column.js index 221aa3251..3bee9c1a0 100644 --- a/packages/table/src/table-column.js +++ b/packages/table/src/table-column.js @@ -209,12 +209,13 @@ export default { column.renderCell = function(h, data) { if (_self.$vnode.data.inlineTemplate) { renderCell = function() { - data._staticTrees = _self._staticTrees; - data.$options = {}; - data.$options.staticRenderFns = _self.$options.staticRenderFns; - data._renderProxy = _self._renderProxy; - data._m = _self._m; - + if (Object.prototype.toString.call(data._self) === '[object Object]') { + for (let prop in data._self) { + if (!data.hasOwnProperty(prop)) { + data[prop] = data._self[prop]; + } + } + } return _self.customRender.call(data); }; }