add unit configuration item

This commit is contained in:
jiaming743 2019-09-04 11:23:59 +08:00
parent 10824d0c88
commit 26a5c3cedd
2 changed files with 18 additions and 4 deletions

View File

@ -9,7 +9,7 @@
<div class="ranking-info"> <div class="ranking-info">
<div class="rank">No.{{ item.ranking }}</div> <div class="rank">No.{{ item.ranking }}</div>
<div class="info-name">{{ item.name }}</div> <div class="info-name">{{ item.name }}</div>
<div class="ranking-value">{{ item.value }}</div> <div class="ranking-value">{{ item.value + mergedConfig.unit }}</div>
</div> </div>
<div class="ranking-column"> <div class="ranking-column">
@ -69,7 +69,14 @@ export default {
* @default carousel = 'single' * @default carousel = 'single'
* @example carousel = 'single' | 'page' * @example carousel = 'single' | 'page'
*/ */
carousel: 'single' carousel: 'single',
/**
* @description Value unit
* @type {String}
* @default unit = ''
* @example unit = 'ton'
*/
unit: ''
}, },
mergedConfig: null, mergedConfig: null,

View File

@ -9,7 +9,7 @@
<div class="ranking-info"> <div class="ranking-info">
<div class="rank">No.{{ item.ranking }}</div> <div class="rank">No.{{ item.ranking }}</div>
<div class="info-name">{{ item.name }}</div> <div class="info-name">{{ item.name }}</div>
<div class="ranking-value">{{ item.value }}</div> <div class="ranking-value">{{ item.value + mergedConfig.unit }}</div>
</div> </div>
<div class="ranking-column"> <div class="ranking-column">
@ -69,7 +69,14 @@ export default {
* @default carousel = 'single' * @default carousel = 'single'
* @example carousel = 'single' | 'page' * @example carousel = 'single' | 'page'
*/ */
carousel: 'single' carousel: 'single',
/**
* @description Value unit
* @type {String}
* @default unit = ''
* @example unit = 'ton'
*/
unit: ''
}, },
mergedConfig: null, mergedConfig: null,