mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-10 20:39:48 +08:00
fix: Field number with out country and currency definition. (#521)
This commit is contained in:
parent
4bbbd3cfaa
commit
ed083ba3d5
@ -31,8 +31,7 @@
|
|||||||
v-model="displayedValue"
|
v-model="displayedValue"
|
||||||
:placeholder="metadata.help"
|
:placeholder="metadata.help"
|
||||||
:disabled="isDisabled"
|
:disabled="isDisabled"
|
||||||
:precision="precision"
|
:class="cssClassStyle"
|
||||||
:class="'display-type-amount ' + metadata.cssClassName"
|
|
||||||
readonly
|
readonly
|
||||||
@blur="customFocusLost"
|
@blur="customFocusLost"
|
||||||
@focus="customFocusGained"
|
@focus="customFocusGained"
|
||||||
|
@ -204,10 +204,14 @@ const actions = {
|
|||||||
responseGetInfo.defaultContextMap.get('#C_Country_ID'),
|
responseGetInfo.defaultContextMap.get('#C_Country_ID'),
|
||||||
10
|
10
|
||||||
)
|
)
|
||||||
// get country and currency
|
if (isEmptyValue(countryId)) {
|
||||||
dispatch('getCountryFormServer', {
|
console.info('context session without Country ID')
|
||||||
countryId
|
} else {
|
||||||
})
|
// get country and currency
|
||||||
|
dispatch('getCountryFormServer', {
|
||||||
|
countryId
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
dispatch('getUserInfoFromSession', sessionUuid)
|
dispatch('getUserInfoFromSession', sessionUuid)
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
@ -448,7 +452,14 @@ const getters = {
|
|||||||
return state.country
|
return state.country
|
||||||
},
|
},
|
||||||
getCurrency: (state) => {
|
getCurrency: (state) => {
|
||||||
return state.country.currency
|
const currency = state.country.currency
|
||||||
|
if (isEmptyValue(currency)) {
|
||||||
|
return {
|
||||||
|
stdPrecision: 2,
|
||||||
|
iSOCode: 'USD'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return currency
|
||||||
},
|
},
|
||||||
getCountryLanguage(state) {
|
getCountryLanguage(state) {
|
||||||
return state.country.language.replace('_', '-')
|
return state.country.language.replace('_', '-')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user