跳到正文

ProgressView

确定或不确定的原生 SwiftUI 进度指示器。

#导入

从 @quickgui/solid/swift-ui 导入 ProgressView。

import { Host, ProgressView } from "@quickgui/solid/swift-ui";

#用法

<Host matchContents={{ vertical: true }} style={{ width: 320 }}>
  <ProgressView
    value={completed()}
    total={100}
    label="Exporting"
    currentValueLabel={String(completed()) + "%"}
  />
</Host>

#API 参考

展开条目查看说明和完整签名。短横线表示声明中未记录默认值。

ProgressView

查看源码
ProgressView(props: ProgressViewProps): NativeNode
testIDstring—

Stable identifier exposed to macOS accessibility and UI testing.

string
查看源码
modifiersViewModifier[]—

SwiftUI modifiers, applied in array order.

ViewModifier[]
查看源码
valuenumber—

Omit for an indeterminate progress indicator.

number
查看源码
totalnumber—

Declares total (optional). Reactive JSX expressions update this property in place.

number
查看源码
labelstring—

Declares label (optional). Reactive JSX expressions update this property in place.

string
查看源码
currentValueLabelstring—

Declares currentValueLabel (optional). Reactive JSX expressions update this property in place.

string
查看源码
ref((node: NativeNode) => void) | NativeNode—

Declares ref (optional). Reactive JSX expressions update this property in place.

((node: NativeNode) => void) | NativeNode
查看源码