diff --git a/examples/sites/demos/pc/app/directives/auto-tip/always-show-composition-api.vue b/examples/sites/demos/pc/app/directives/auto-tip/always-show-composition-api.vue index bd133436b1..c0e9209e9f 100644 --- a/examples/sites/demos/pc/app/directives/auto-tip/always-show-composition-api.vue +++ b/examples/sites/demos/pc/app/directives/auto-tip/always-show-composition-api.vue @@ -8,21 +8,33 @@ is_disabled: item.disabled, list: true }" - v-auto-tip="item.disabled ? { always: true, content: item.tip } : false" + v-auto-tip="item.disabled ? { always: true, content: item.disabledReason, effect: 'dark' } : false" > {{ item.text }} - @@ -41,5 +53,6 @@ const options = [ } .is_disabled { cursor: not-allowed; + text-decoration: line-through; } diff --git a/examples/sites/demos/pc/app/directives/auto-tip/always-show.spec.js b/examples/sites/demos/pc/app/directives/auto-tip/always-show.spec.js index 0a7d3cef53..c30ee6d740 100644 --- a/examples/sites/demos/pc/app/directives/auto-tip/always-show.spec.js +++ b/examples/sites/demos/pc/app/directives/auto-tip/always-show.spec.js @@ -5,8 +5,8 @@ test('常显提示', async ({ page }) => { await page.goto('directives-auto-tip#auto-tip-always-show') await page.getByText('去游泳馆游泳').hover() - await expect(page.getByRole('tooltip', { name: '自定义提示内容' })).not.toBeVisible() + await expect(page.getByRole('tooltip', { name: '羽毛球拍坏了' })).not.toBeVisible() await page.getByText('去羽毛球馆打羽毛球').hover() - await expect(page.getByRole('tooltip', { name: '自定义提示内容' })).toBeVisible() + await expect(page.getByRole('tooltip', { name: '羽毛球拍坏了' })).toBeVisible() }) diff --git a/examples/sites/demos/pc/app/directives/auto-tip/always-show.vue b/examples/sites/demos/pc/app/directives/auto-tip/always-show.vue index 226fe96752..c51436c076 100644 --- a/examples/sites/demos/pc/app/directives/auto-tip/always-show.vue +++ b/examples/sites/demos/pc/app/directives/auto-tip/always-show.vue @@ -8,14 +8,14 @@ is_disabled: item.disabled, list: true }" - v-auto-tip="item.disabled ? { always: true, content: item.tip } : false" + v-auto-tip="item.disabled ? { always: true, content: item.disabledReason, effect: 'dark' } : false" > {{ item.text }} -