99re热视频这里只精品,久久久天堂国产精品女人,国产av一区二区三区,久久久精品成人免费看片,99久久精品免费看国产一区二区三区

Element-React Progress 進(jìn)度條

2020-10-16 11:26 更新

用于展示操作進(jìn)度,告知用戶當(dāng)前狀態(tài)和預(yù)期。

線形進(jìn)度條 — 百分比外顯

Progress 組件設(shè)置percentage屬性即可,表示進(jìn)度條對(duì)應(yīng)的百分比,必填,必須在 0-100。

render() {
  return (
    <div>
      <Progress percentage={0} />
      <Progress percentage={70} />
      <Progress percentage={100} status="success" />
      <Progress percentage={50} status="exception" />
    </div>
  )
}

線形進(jìn)度條 — 百分比內(nèi)顯

百分比不占用額外控件,適用于文件上傳等場(chǎng)景。

Progress 組件可通過(guò) strokeWidth 屬性更改進(jìn)度條的高度,并可通過(guò) textInside 屬性來(lái)將進(jìn)度條描述置于進(jìn)度條內(nèi)部。

render() {
  return (
    <div>
      <Progress strokeWidth={18} percentage={0} textInside />
      <Progress strokeWidth={18} percentage={70} textInside />
      <Progress strokeWidth={18} percentage={100} status="success" textInside />
      <Progress strokeWidth={18} percentage={50} status="exception" textInside />
    </div>
  )
}

環(huán)形進(jìn)度條

Progress 組件可通過(guò) type 屬性來(lái)指定使用環(huán)形進(jìn)度條,在環(huán)形進(jìn)度條中,還可以通過(guò) width 屬性來(lái)設(shè)置其大小。

render() {
  return (
    <div>
      <Progress type="circle" percentage={0} />
      <Progress type="circle" percentage={25} />
      <Progress type="circle" percentage={100} status="success" />
      <Progress type="circle" percentage={50} status="exception" />
    </div>
  )
}

Attributes

參數(shù) 說(shuō)明 類型 可選值 默認(rèn)值
percentage 百分比(必填) number 0-100 0
type 進(jìn)度條類型 string line/circle line
strokeWidth 進(jìn)度條的寬度,單位 px number 6
textInside 進(jìn)度條顯示文字內(nèi)置在進(jìn)度條內(nèi)(只在 type=line 時(shí)可用) Boolean false
status 進(jìn)度條當(dāng)前狀態(tài) string success/exception
width 環(huán)形進(jìn)度條畫布寬度(只在 type=circle 時(shí)可用) number 126
showText 是否顯示進(jìn)度條文字內(nèi)容 boolean true
以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)