diff --git a/src/components/data/InAppPurchaseDetails/index.vue b/src/components/data/InAppPurchaseDetails/index.vue index 2f61e70..746e7fd 100644 --- a/src/components/data/InAppPurchaseDetails/index.vue +++ b/src/components/data/InAppPurchaseDetails/index.vue @@ -73,7 +73,7 @@
{{ $t('pages.inAppPurchaseDetails.section.statusFlow') }}
- +
@@ -127,7 +127,7 @@ v-for="(item, index) in order.details.payNotices" :key="index" placement="top" - :timestamp="item.createTime" + :timestamp="getElementText(item.createTime)" >
{{ $t('pages.inAppPurchaseDetails.label.eventId') }}: {{ item.eventId }}
@@ -243,6 +243,12 @@ export default { getOrderFactory(details) { return (details && details.factory) || {} }, + getElementText(value) { + if (value === undefined || value === null) { + return '' + } + return String(value) + }, loadInAppPurchase() { const that = this that.orderLoading = true diff --git a/src/main.js b/src/main.js index f7db042..711c287 100644 --- a/src/main.js +++ b/src/main.js @@ -41,8 +41,9 @@ if (isMock()) { // initialize ElementUI and runtime locale const DEFAULT_TABLE_COLUMN_MIN_WIDTH = 120 +const TABLE_COLUMN_MIN_WIDTH_PATCH_FLAG = '__defaultMinWidthPatched__' -if (TableColumn && TableColumn.methods && !TableColumn.methods.__defaultMinWidthPatched__) { +if (TableColumn && TableColumn.methods && !TableColumn[TABLE_COLUMN_MIN_WIDTH_PATCH_FLAG]) { const originalSetColumnWidth = TableColumn.methods.setColumnWidth TableColumn.methods.setColumnWidth = function(column) { const nextColumn = originalSetColumnWidth.call(this, column) @@ -57,7 +58,11 @@ if (TableColumn && TableColumn.methods && !TableColumn.methods.__defaultMinWidth return nextColumn } - TableColumn.methods.__defaultMinWidthPatched__ = true + delete TableColumn.methods[TABLE_COLUMN_MIN_WIDTH_PATCH_FLAG] + Object.defineProperty(TableColumn, TABLE_COLUMN_MIN_WIDTH_PATCH_FLAG, { + value: true, + configurable: true + }) } Vue.use(ElementUI, { size: Cookies.get('size') || 'medium' })