Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(upload): add "null" to the TypeScript type of "capture" #8379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nys013 wants to merge 1 commit into vueComponent:main
base: main
Choose a base branch
Loading
from nys013:fix/upload-ts

Conversation

@nys013
Copy link

@nys013 nys013 commented Sep 30, 2025

文档描述为
image

但设置:capture="null" ts会飘红报错
image

建议修改capture的ts类型,增加null

capture: someType<boolean | 'user' | 'environment' | null>([Boolean, String]),
capture: [Boolean, String] as PropType<boolean | 'user' | 'environment' | null>,

或者改文档描述为

You can set `:capture="undefined"`
你可以设置 `:capture="undefined"`

看代码{...(capture != null ? { capture } : {})}是用!=比较的,所以传undefined也可以

且这一描述一开始应该是针对这个issue5986加的吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /