Skip to content

Commit

Permalink
releases 4.3.36
Browse files Browse the repository at this point in the history
  • Loading branch information
xuliangzhan committed Dec 17, 2024
1 parent f65dc1c commit 9ea6929
Show file tree
Hide file tree
Showing 21 changed files with 94 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vxe-pc-ui",
"version": "4.3.35",
"version": "4.3.36",
"description": "A vue based PC component library",
"scripts": {
"update": "npm install --legacy-peer-deps",
Expand Down
3 changes: 3 additions & 0 deletions packages/language/ar-EG.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@ export default {
}
}
},
numberInput: {
currencySymbol: '$'
},
imagePreview: {
popupTitle: '预览',
operBtn: {
Expand Down
3 changes: 3 additions & 0 deletions packages/language/de-DE.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@ export default {
}
}
},
numberInput: {
currencySymbol: '$'
},
imagePreview: {
popupTitle: '预览',
operBtn: {
Expand Down
3 changes: 3 additions & 0 deletions packages/language/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@ export default {
}
}
},
numberInput: {
currencySymbol: '$'
},
imagePreview: {
popupTitle: 'Preview',
operBtn: {
Expand Down
3 changes: 3 additions & 0 deletions packages/language/es-ES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@ export default {
}
}
},
numberInput: {
currencySymbol: '$'
},
imagePreview: {
popupTitle: 'Preview',
operBtn: {
Expand Down
3 changes: 3 additions & 0 deletions packages/language/fr-FR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@ export default {
}
}
},
numberInput: {
currencySymbol: '$'
},
imagePreview: {
popupTitle: '预览',
operBtn: {
Expand Down
3 changes: 3 additions & 0 deletions packages/language/hu-HU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@ export default {
}
}
},
numberInput: {
currencySymbol: '$'
},
imagePreview: {
popupTitle: 'Előnézet',
operBtn: {
Expand Down
3 changes: 3 additions & 0 deletions packages/language/hy-AM.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@ export default {
}
}
},
numberInput: {
currencySymbol: '$'
},
imagePreview: {
popupTitle: '预览',
operBtn: {
Expand Down
3 changes: 3 additions & 0 deletions packages/language/ja-JP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@ export default {
}
}
},
numberInput: {
currencySymbol: '$'
},
imagePreview: {
popupTitle: 'Preview',
operBtn: {
Expand Down
3 changes: 3 additions & 0 deletions packages/language/ko-KR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@ export default {
}
}
},
numberInput: {
currencySymbol: '$'
},
imagePreview: {
popupTitle: '预览',
operBtn: {
Expand Down
3 changes: 3 additions & 0 deletions packages/language/nb-NO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@ export default {
}
}
},
numberInput: {
currencySymbol: '$'
},
imagePreview: {
popupTitle: '预览',
operBtn: {
Expand Down
3 changes: 3 additions & 0 deletions packages/language/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@ export default {
}
}
},
numberInput: {
currencySymbol: '$'
},
imagePreview: {
popupTitle: 'Preview',
operBtn: {
Expand Down
3 changes: 3 additions & 0 deletions packages/language/ru-RU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@ export default {
}
}
},
numberInput: {
currencySymbol: '$'
},
imagePreview: {
popupTitle: 'Предварительный просмотр',
operBtn: {
Expand Down
3 changes: 3 additions & 0 deletions packages/language/ug-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@ export default {
}
}
},
numberInput: {
currencySymbol: '$'
},
imagePreview: {
popupTitle: 'كۆرۈش',
operBtn: {
Expand Down
3 changes: 3 additions & 0 deletions packages/language/uk-UA.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@ export default {
}
}
},
numberInput: {
currencySymbol: '$'
},
imagePreview: {
popupTitle: '预览',
operBtn: {
Expand Down
3 changes: 3 additions & 0 deletions packages/language/vi-VN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@ export default {
}
}
},
numberInput: {
currencySymbol: '$'
},
imagePreview: {
popupTitle: '预览',
operBtn: {
Expand Down
3 changes: 3 additions & 0 deletions packages/language/zh-CHT.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@ export default {
}
}
},
numberInput: {
currencySymbol: '¥'
},
imagePreview: {
popupTitle: '預覽',
operBtn: {
Expand Down
3 changes: 3 additions & 0 deletions packages/language/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@ export default {
}
}
},
numberInput: {
currencySymbol: '¥'
},
imagePreview: {
popupTitle: '预览',
operBtn: {
Expand Down
16 changes: 14 additions & 2 deletions packages/number-input/src/number-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ export default defineComponent({
type: Boolean as PropType<VxeNumberInputPropTypes.Exponential>,
default: () => getConfig().numberInput.exponential
},
showCurrency: {
type: Boolean as PropType<VxeNumberInputPropTypes.ShowCurrency>,
default: () => getConfig().numberInput.showCurrency
},
currencySymbol: {
type: String as PropType<VxeNumberInputPropTypes.CurrencySymbol>,
default: () => getConfig().numberInput.currencySymbol
},

// number、integer、float
controls: {
Expand Down Expand Up @@ -234,11 +242,15 @@ export default defineComponent({
})

const computeNumLabel = computed(() => {
const { type } = props
const { type, showCurrency, currencySymbol } = props
const { inputValue } = reactData
const digitsValue = computeDigitsValue.value
if (type === 'amount') {
return XEUtils.commafy(XEUtils.toNumber(inputValue), { digits: digitsValue })
const amountLabel = XEUtils.commafy(XEUtils.toNumber(inputValue), { digits: digitsValue })
if (showCurrency) {
return `${currencySymbol || getI18n('vxe.numberInput.currencySymbol') || ''}${amountLabel}`
}
return amountLabel
}
return XEUtils.toString(inputValue)
})
Expand Down
12 changes: 12 additions & 0 deletions types/components/number-input.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ export namespace VxeNumberInputPropTypes {
export type PrefixIcon = string
export type SuffixIcon = string

export type ShowCurrency = boolean
export type CurrencySymbol = string | null

/**
* 请使用 AutoComplete
* @deprecated
Expand Down Expand Up @@ -91,6 +94,15 @@ export interface VxeNumberInputProps {
prefixIcon?: VxeNumberInputPropTypes.PrefixIcon
suffixIcon?: VxeNumberInputPropTypes.SuffixIcon

/**
* 只对 type=amount 有效,是否显示前缀货币符号
*/
showCurrency?: VxeNumberInputPropTypes.ShowCurrency
/**
* 只对 type=amount 有效,自定义货币符号
*/
currencySymbol?: VxeNumberInputPropTypes.CurrencySymbol

/**
* 请使用 autoComplete
* @deprecated
Expand Down
16 changes: 16 additions & 0 deletions types/components/table.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1943,6 +1943,14 @@ export namespace VxeTablePropTypes {
* 自定义列
*/
columns?: VxeTableDefines.ColumnInfo[] | ExportOrPrintColumnOption[]
/**
* 指定列
*/
includeFields?: string[]
/**
* 排序列
*/
excludeFields?: string[]
/**
* 列过滤方法
*/
Expand Down Expand Up @@ -2052,6 +2060,14 @@ export namespace VxeTablePropTypes {
* 自定义参数
*/
params?: Record<string, any>
/**
* 指定列
*/
includeFields?: string[]
/**
* 排序列
*/
excludeFields?: string[]
/**
* 列过滤方法
*/
Expand Down

0 comments on commit 9ea6929

Please sign in to comment.