lindell / lindell/JsBarcode

关于写法和提示的问题

Open
#471 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
5.9k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

这样写会报错
```js
JsBarcode("#barcode1").options({
width: 1.5,
height: 22,
}).CODE128('1234567890128').render()
```

![Image](https://github.com/user-attachments/assets/1c55b37c-ba68-4852-90e5-afb0d6bc7a45)

必须要
```js
CODE128('1234567890128', {})
```
这样写才可以,看d.ts里面是非必传的

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report provides a JavaScript reproduction and points to the d.ts declaration; start by locating the CODE128 API implementation and comparing its accepted arguments with that declaration. Run the shown options example and add or update a regression test so the omitted second argument behaves as the declaration promises.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.