diff --git a/src/components/Discover/Conformance/MoreModal.vue b/src/components/Discover/Conformance/MoreModal.vue index f193c54..218bb5b 100644 --- a/src/components/Discover/Conformance/MoreModal.vue +++ b/src/components/Discover/Conformance/MoreModal.vue @@ -116,11 +116,13 @@ export default { }, columnData: function() { const data = JSON.parse(JSON.stringify(this.cases)); // 深拷貝原始 cases 的內容 + const facetName = facName => facName.trim().replace(/^(.)(.*)$/, (match, firstChar, restOfString) => firstChar.toUpperCase() + restOfString.toLowerCase()); + const result = [ { field: 'id', header: 'Case Id' }, { field: 'started_at', header: 'Start Date' }, { field: 'completed_at', header: 'End Date' }, - ...data[0].facets.map((fac, index) => ({ field: `fac_${index}`, header: fac.name })), + ...data[0].facets.map((fac, index) => ({ field: `fac_${index}`, header: facetName(fac.name) })), ...data[0].attributes.map((att, index) => ({ field: `att_${index}`, header: att.key })), ]; return result