【问题标题】:antdesign slider second label not shownant design 滑块第二个标签未显示
【发布时间】:2018-09-11 08:50:09
【问题描述】:

在我的 react 项目中使用 antdesign (https://ant.design/components/slider) 的滑块,

在滑块显示点,标题在底部成功,但在顶部无法显示点的第二个标题 代码::

const marks ={
1 : 1.01¥
4 : 4.54¥
7: 7.98¥
}

和渲染();

<Slider 
     min={slider.min} 
     max={slider.max} 
     marks={marks} 
     step={slider.step} 
     included={false} 
     defaultValue={priceOfBestTrade} 
     onChange={this.onChange} 
     value={inputValue || priceOfBestTrade} 
 />

我有这个输出:::

实际上我需要两个标题,一个在顶部,第二个在底部

像这样::

【问题讨论】:

    标签: javascript reactjs redux antd


    【解决方案1】:
    const marks ={
    1 : 1.01¥
    4 : 4.54¥
    7:
     {
        label: <strong> 7.98¥<br />Price of Maximum value</strong>,
      },
    }
    

    这就是你要找的吗?无法从顶部和底部的措辞中弄清楚您到底在寻找什么

    【讨论】:

      猜你喜欢
      • 2021-12-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-08-09
      • 2020-09-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多