From 5eaa72cf003832c0636d9225c49ea69ade072237 Mon Sep 17 00:00:00 2001 From: hdx Date: Thu, 30 May 2024 18:52:39 +0800 Subject: [PATCH] =?UTF-8?q?feat(slider):=20=E6=96=B0=E5=A2=9E=20foreColor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/component/slider/slider.test.js | 4 ++++ pages/component/slider/slider.uvue | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pages/component/slider/slider.test.js b/pages/component/slider/slider.test.js index 5585d31f..1f223d2d 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 2b8f9179..3d6bc52e 100644 --- a/pages/component/slider/slider.uvue +++ b/pages/component/slider/slider.uvue @@ -146,7 +146,11 @@ 不同颜色和大小的滑块 -- GitLab