fix: .
This commit is contained in:
parent
65613ce895
commit
8be3b1afcb
17
README.md
17
README.md
@ -1,3 +1,18 @@
|
||||
|
||||
|
||||
https://www.npmjs.com/package/@taoya7/print-help
|
||||
https://www.npmjs.com/package/@taoya7/print-help
|
||||
|
||||
示例
|
||||
|
||||
```javascript
|
||||
import { FONTMUL, FONTTYPE, LabelCommand, ROTATION } from '@/command/Label'
|
||||
|
||||
function main() {
|
||||
let label = new LabelCommand(50, 30, 0);
|
||||
label.addText(0, 0, FONTTYPE.FONT_1, ROTATION.ROTATION_0, FONTMUL.MUL_1, FONTMUL.MUL_1, 'Hello World');
|
||||
var command = label.getCommand();
|
||||
console.log(command);// 获取字节码
|
||||
console.log(label.getCommandStr(command));
|
||||
}
|
||||
main();
|
||||
```
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@taoya7/print-help",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"keywords": [
|
||||
|
@ -367,9 +367,15 @@ export class LabelCommand {
|
||||
let str: string = `SET CUTTER ${enable}\r\n`;
|
||||
this.addStrToCommand(str);
|
||||
}
|
||||
/**
|
||||
* 获取命令
|
||||
*/
|
||||
getCommand() {
|
||||
return this.command;
|
||||
}
|
||||
/**
|
||||
* 获取命令字符串
|
||||
*/
|
||||
getCommandStr(command: number[]) {
|
||||
let str = "";
|
||||
for (let i = 0; i < command.length; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user