# tui-amount-inwords 金额转大写 会员组件

介绍

数字金额转大写。

# 引入

# uni-app引入

第一种,手动引入(可全局引入)

import tuiAmountInwords from "@/components/thorui/tui-amount-inwords/tui-amount-inwords.vue"
export default {
	components:{
		tuiAmountInwords
	}
}

第二种,开启easycom组件模式,如果不了解如何配置,可先查看 官网文档 (opens new window)

# uni-app版本平台差异说明

App-Nvue App-vue H5 微信小程序 支付宝小程序 百度小程序 字节小程序 QQ小程序

# 微信小程序引入(可在app.json中全局引入)

{
  "usingComponents": {
    "tui-amount-inwords": "/components/thorui/tui-amount-inwords/tui-amount-inwords"
  }
}

# 代码演示

部分功能演示,具体可参考示例程序以及文档API。

基础使用
<tui-amount-inwords value="10.00"></tui-amount-inwords>
调整样式
<tui-amount-inwords value="92520.78" color="#5677fc" fontWeight="600"></tui-amount-inwords>

# Slots

插槽名称 说明
- -

# Props

属性名 类型 说明 默认值
value Number, String 数字金额 0
size Number, String 大写金额字体大小,单位rpx 32
color String 大写金额字体颜色 #333
fontWeight Number, String 大写金额字重 400
padding String padding值 0
show Boolean 是否展示大写金额 true

# Events

注:uni-app端绑定事件使用@前缀,如@change;微信小程序原生使用bind前缀,如bindchange

事件名 说明 回调参数
change 金额转换完成后触发 {
  moeny:大写金额
}

# 预览

请以移动端效果为准,touch事件目前尚未在PC端做兼容。

# 特别说明

该组件为 会员组件,非开源内容,需开通会员才可获取使用。

# 线上程序扫码预览

ThorUI组件库 H5二维码 ThorUI示例
ThorUI组件库小程序码 H5二维码 ThorUI示例小程序码
Last Updated: 7/21/2023, 2:12:46 PM