| 1 |
- System.register(["./vendor-legacy.2021e78c.js"],(function(t){"use strict";var e,d,o;return{setters:[function(t){e=t.c,d=t.o,o=t.A}],execute:function(){const n={class:"markdown-body"},r=o('<h1>Price 商品价格</h1><h3>介绍</h3><p>用来对商品价格数值的小数点前后部分应用不同样式,还支持人民币符号、千位分隔符、设置小数点位数等功能。</p><h3>安装</h3><pre><code class="language-javascript">import { createApp } from 'vue';\nimport { Price } from '@nutui/nutui';\n\nconst app = createApp();\napp.use(Price);\n\n</code></pre><h2>代码示例</h2><h3>基本用法</h3><pre><code class="language-html"><nut-price \n :price="1010" \n :needSymbol="false" \n :thousands="true"\n/>\n</code></pre><h3>无人民币符号,有千位分隔</h3><pre><code class="language-html"><nut-price \n :price="10010.01" \n :needSymbol="true" \n :thousands="false"\n/>\n</code></pre><h3>带人民币符号,有千位分隔,保留小数点后三位</h3><pre><code class="language-html"><nut-price \n :price="15213.122" \n :decimalDigits="3" \n :needSymbol="true" \n :thousands="true"\n/>\n</code></pre><h3>Prop</h3><table><thead><tr><th>字段</th><th>说明</th><th>类型</th><th>默认值</th></tr></thead><tbody><tr><td>price</td><td>价格数量</td><td>Number</td><td>0</td></tr><tr><td>need-symbol</td><td>是否需要加上人民币符号</td><td>Boolean</td><td>true</td></tr><tr><td>decimal-digits</td><td>小数位位数</td><td>Number</td><td>2</td></tr><tr><td>thousands</td><td>是否按照千分号形式显示</td><td>Boolean</td><td>false</td></tr></tbody></table>',14);t("default",{expose:[],setup:t=>(t,o)=>(d(),e("div",n,[r]))})}}}));
|