diff --git a/examples/sites/demos/pc/app/color-picker/linear-gradient.spec.ts b/examples/sites/demos/pc/app/color-picker/linear-gradient.spec.ts index 97261daaf..2df60d7cb 100644 --- a/examples/sites/demos/pc/app/color-picker/linear-gradient.spec.ts +++ b/examples/sites/demos/pc/app/color-picker/linear-gradient.spec.ts @@ -3,8 +3,8 @@ import { test, expect } from '@playwright/test' test('渐变', async ({ page }) => { page.on('pageerror', (exception) => expect(exception).toBeNull()) await page.goto('color-picker#color-mode') - await page.locator('.tiny-color-picker > .tiny-color-picker__inner').click() + await page.locator('.tiny-color-picker .tiny-color-picker__inner').click() await page.getByRole('button', { name: '确定' }).click() await expect(page.locator('body')).toContainText('linear-gradient(90deg, #66ADFF 21%,#00FEF1 100%)') - await page.locator('.tiny-notify__icon-close > .tiny-svg').click() + await page.locator('.tiny-notify__icon-close .tiny-svg').click() }) diff --git a/packages/theme/src/color-picker/index.less b/packages/theme/src/color-picker/index.less index 3534ee0f5..8dd14f4ef 100644 --- a/packages/theme/src/color-picker/index.less +++ b/packages/theme/src/color-picker/index.less @@ -51,6 +51,11 @@ } } + &__popper { + padding: 0 !important; + background: transparent !important; + } + &--large &__inner { border-radius: 4px; } diff --git a/packages/theme/src/color-select-panel/index.less b/packages/theme/src/color-select-panel/index.less index c09331ba5..da300755d 100644 --- a/packages/theme/src/color-select-panel/index.less +++ b/packages/theme/src/color-select-panel/index.less @@ -7,11 +7,9 @@ .inject-ColorSelectPanel-vars(); display: flex; flex-direction: column; - position: absolute; position: relative; min-width: 320px; z-index: 10; - margin-top: 8px; background: var(--tv-ColorSelectPanel-bg-color); gap: var(--tv-ColorSelectPanel-spacing); padding: var(--tv-ColorSelectPanel-padding-y) var(--tv-ColorSelectPanel-padding-x); diff --git a/packages/vue/src/color-picker/package.json b/packages/vue/src/color-picker/package.json index 7642056ca..827af39e6 100644 --- a/packages/vue/src/color-picker/package.json +++ b/packages/vue/src/color-picker/package.json @@ -9,6 +9,7 @@ "@opentiny/vue-color-select-panel": "workspace:~", "@opentiny/vue-common": "workspace:~", "@opentiny/vue-icon": "workspace:~", + "@opentiny/vue-popover": "workspace:^", "@opentiny/vue-renderless": "workspace:~", "@opentiny/vue-theme": "workspace:~" }, diff --git a/packages/vue/src/color-picker/src/pc.vue b/packages/vue/src/color-picker/src/pc.vue index 11171c214..9b5938912 100644 --- a/packages/vue/src/color-picker/src/pc.vue +++ b/packages/vue/src/color-picker/src/pc.vue @@ -8,15 +8,17 @@ ]" @click="() => changeVisible(!state.isShow)" > -