提交 d124bd82 编写于 作者: Q qiang

fix(h5): picker fields

上级 88954196
...@@ -612,13 +612,18 @@ export default { ...@@ -612,13 +612,18 @@ export default {
if (this.mode === mode.DATE) { if (this.mode === mode.DATE) {
const locale = getLocale() const locale = getLocale()
if (!locale.startsWith('zh')) { if (!locale.startsWith('zh')) {
switch (locale) { switch (this.fields) {
case 'es': case fields.DAY:
case 'fr': switch (locale) {
return [array[2], array[1], array[0]] case 'es':
// case 'en': case 'fr':
default: return [array[2], array[1], array[0]]
return normalize ? [array[2], array[0], array[1]] : [array[1], array[2], array[0]] // case 'en':
default:
return normalize ? [array[2], array[0], array[1]] : [array[1], array[2], array[0]]
}
case fields.MONTH:
return [array[1], array[0]]
} }
} }
} }
...@@ -630,7 +635,7 @@ export default { ...@@ -630,7 +635,7 @@ export default {
if (locale.startsWith('zh')) { if (locale.startsWith('zh')) {
const array = ['', '', ''] const array = ['', '', '']
return item + array[index] return item + array[index]
} else if (index === (locale === 'es' || locale === 'fr' ? 1 : 0)) { } else if (this.fields !== fields.YEAR && index === (this.fields === fields.DAY && (locale === 'es' || locale === 'fr') ? 1 : 0)) {
let array let array
switch (locale) { switch (locale) {
case 'es': case 'es':
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册