提交 5eaa72cf 编写于 作者: H hdx

feat(slider): 新增 foreColor

上级 91eee44f
...@@ -24,6 +24,8 @@ describe('slider', () => { ...@@ -24,6 +24,8 @@ describe('slider', () => {
expect(await slider.attribute('backgroundColor')).toBe('#000000') expect(await slider.attribute('backgroundColor')).toBe('#000000')
expect(await slider.attribute('activeColor')).toBe('#FFCC33') expect(await slider.attribute('activeColor')).toBe('#FFCC33')
expect(await slider.attribute('blockColor')).toBe('#8A6DE9') expect(await slider.attribute('blockColor')).toBe('#8A6DE9')
expect(await slider.attribute('activeBackgroundColor')).toBe('#FFCC33')
expect(await slider.attribute('foreColor')).toBe('#8A6DE9')
const backgroundColor = '#008000' const backgroundColor = '#008000'
const activeColor = '#00FF00' const activeColor = '#00FF00'
...@@ -37,7 +39,9 @@ describe('slider', () => { ...@@ -37,7 +39,9 @@ describe('slider', () => {
await page.waitFor(100) await page.waitFor(100)
expect(await slider.attribute('backgroundColor')).toBe(backgroundColor) expect(await slider.attribute('backgroundColor')).toBe(backgroundColor)
expect(await slider.attribute('activeColor')).toBe(activeColor) expect(await slider.attribute('activeColor')).toBe(activeColor)
expect(await slider.attribute('activeBackgroundColor')).toBe(activeColor)
expect(await slider.attribute('blockColor')).toBe(blockColor) expect(await slider.attribute('blockColor')).toBe(blockColor)
expect(await slider.attribute('foreColor')).toBe(blockColor)
}) })
it('block-size', async () => { it('block-size', async () => {
const slider = await page.$('#slider-custom-color-and-size') const slider = await page.$('#slider-custom-color-and-size')
......
...@@ -146,7 +146,11 @@ ...@@ -146,7 +146,11 @@
<view class="uni-title">不同颜色和大小的滑块</view> <view class="uni-title">不同颜色和大小的滑块</view>
<view> <view>
<slider id="slider-custom-color-and-size" @change="sliderChange" :value="sliderValue" <slider id="slider-custom-color-and-size" @change="sliderChange" :value="sliderValue"
:backgroundColor="sliderBackgroundColor" :activeColor="sliderActiveColor" :blockColor="sliderBlockColor" :backgroundColor="sliderBackgroundColor"
:activeColor="sliderActiveColor"
:activeBackgroundColor="sliderActiveColor"
:blockColor="sliderBlockColor"
:foreColor="sliderBlockColor"
:block-size="sliderBlockSize" /> :block-size="sliderBlockSize" />
</view> </view>
</view> </view>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册