Skip to content

Commit

Permalink
兼容小币种
Browse files Browse the repository at this point in the history
  • Loading branch information
freedom-git committed Apr 13, 2021
1 parent e155691 commit 9dd23d4
Show file tree
Hide file tree
Showing 6 changed files with 2,620 additions and 252 deletions.
11 changes: 10 additions & 1 deletion dist/esc-pos-encoder.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,14 @@ export default class EscPosEncoder {
*
* @param {Array} dishes 菜品信息数组
* @param {number} size 字体大小,默认1
* @param {boolean} bigPrice 小币种价格,默认false
* @returns {EscPosEncoder} Return the EscPosEncoder, for easy chaining commands
*/
printFrontDeskDishs(dishes: {
name: string;
count: number;
price: number;
}[], size?: number): EscPosEncoder;
}[], size?: number, bigPrice?: boolean): EscPosEncoder;
/**
* 后厨打印菜品,包含菜品名称,数量,不包含价格
*
Expand Down Expand Up @@ -273,4 +274,12 @@ export default class EscPosEncoder {
*
*/
encode(): Uint8Array;
/**
* 格式化小额币种价格
*
* @param {number} price 原始价格
* @returns {string} 返回处理后的价格字符串,10000.54 =》 10,000
*
*/
bigPriceFormat(price: number): string;
}
Loading

0 comments on commit 9dd23d4

Please sign in to comment.