diff --git a/pages/component/slider/slider.test.js b/pages/component/slider/slider.test.js index 5585d31fd3e4ce474b88ac4f0aea6a8b61caab7d..1f223d2dc8c7c0bb8948c05d15721cde34d99ef3 100644 --- a/pages/component/slider/slider.test.js +++ b/pages/component/slider/slider.test.js @@ -24,6 +24,8 @@ describe('slider', () => { expect(await slider.attribute('backgroundColor')).toBe('#000000') expect(await slider.attribute('activeColor')).toBe('#FFCC33') 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 activeColor = '#00FF00' @@ -37,7 +39,9 @@ describe('slider', () => { await page.waitFor(100) expect(await slider.attribute('backgroundColor')).toBe(backgroundColor) 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('foreColor')).toBe(blockColor) }) it('block-size', async () => { const slider = await page.$('#slider-custom-color-and-size') diff --git a/pages/component/slider/slider.uvue b/pages/component/slider/slider.uvue index 2b8f9179e0c6a5691b4b2fbadea64a3834d5ccfc..3d6bc52ea7a2650d165e5008f9338858a4bbf4f4 100644 --- a/pages/component/slider/slider.uvue +++ b/pages/component/slider/slider.uvue @@ -146,7 +146,11 @@ 不同颜色和大小的滑块