From 42e67c32c7fd137d0b9f853714d95181cdddc7a0 Mon Sep 17 00:00:00 2001 From: BeADre Date: Fri, 14 May 2021 19:13:24 +0800 Subject: [PATCH 01/12] chore: remove useless code --- packages/varlet-ui/src/pull-refresh/__tests__/index.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/varlet-ui/src/pull-refresh/__tests__/index.spec.js b/packages/varlet-ui/src/pull-refresh/__tests__/index.spec.js index 0bcc5469582..e6c6ce81cc2 100644 --- a/packages/varlet-ui/src/pull-refresh/__tests__/index.spec.js +++ b/packages/varlet-ui/src/pull-refresh/__tests__/index.spec.js @@ -3,7 +3,7 @@ import PullRefresh from '..' import VarPullRefresh from '../PullRefresh' import { mount } from '@vue/test-utils' import { createApp } from 'vue' -import { delay, trigger, triggerDrag } from '../../utils/jest' +import { delay, trigger } from '../../utils/jest' test('test pullRefresh plugin', () => { const app = createApp({}).use(PullRefresh) From 755383a0f70e267505b3688680f7c5eece342a44 Mon Sep 17 00:00:00 2001 From: BeADre Date: Fri, 14 May 2021 20:04:52 +0800 Subject: [PATCH 02/12] test(slider): add test --- .../__snapshots__/index.spec.js.snap | 272 +++++++++++++++++ .../src/slider/__tests__/index.spec.js | 282 ++++++++++++++++++ .../varlet-ui/src/slider/example/index.vue | 6 +- 3 files changed, 557 insertions(+), 3 deletions(-) create mode 100644 packages/varlet-ui/src/slider/__tests__/__snapshots__/index.spec.js.snap create mode 100644 packages/varlet-ui/src/slider/__tests__/index.spec.js diff --git a/packages/varlet-ui/src/slider/__tests__/__snapshots__/index.spec.js.snap b/packages/varlet-ui/src/slider/__tests__/__snapshots__/index.spec.js.snap new file mode 100644 index 00000000000..e3881e4c2a5 --- /dev/null +++ b/packages/varlet-ui/src/slider/__tests__/__snapshots__/index.spec.js.snap @@ -0,0 +1,272 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`test slider example 1`] = ` +"
+
基本使用
+
+
+
+
+
+
+
+
+
3
+
+ +
+ + + +
+
+
+
指定步长
+
+
+
+
+
+
+
+
+
25
+
+ +
+ + + +
+
+
+
双滑块
+
+
+
+
+
+
+
+
+
24
+
+
+
+
+
50
+
+
+ + + +
+
+
+
禁用
+
+
+
+
+
+
+
+
+
40
+
+ +
+ + + +
+
+
+
只读
+
+
+
+
+
+
+
+
+
40
+
+ +
+ + + +
+
+
+
不同大小
+
+
+
+
+
+
+
+
+
24
+
+
+
+
+
50
+
+
+ + + +
+
+
+
自定义样式
+
+
+
+
+
+
+
+
+
20
+
+ +
+ + + +
+
+
+
显示标签
+
+
+
+
+
+
+
+
+
20
+
+ +
+ + + +
+
+
+
+
+
+
+
+
+
70
+
+ +
+ + + +
+
+
+
+
+
+
+
+
+
50
+
+ +
+ + + +
+
+
+
值的校验
+
+
+
+
+
+
+
+
+
20
+
+ +
+ + + +
+
" +`; + +exports[`test slider rules prop 1`] = ` +"
+
+
+
+
+
+
+
+
0
+
+ +
+ + + +
" +`; + +exports[`test slider rules prop 2`] = ` +"
+
+
+
+
+
+
+
+
NaN
+
+ +
+ + + +
" +`; + +exports[`test slider style 1`] = ` +"
+
+
+
+
+
+
+
+
30
+
+ +
+ + + +
" +`; diff --git a/packages/varlet-ui/src/slider/__tests__/index.spec.js b/packages/varlet-ui/src/slider/__tests__/index.spec.js new file mode 100644 index 00000000000..db6eea963d7 --- /dev/null +++ b/packages/varlet-ui/src/slider/__tests__/index.spec.js @@ -0,0 +1,282 @@ +import example from '../example' +import Slider from '..' +import VarSlider from '../Slider' +import { mount } from '@vue/test-utils' +import { createApp, warn } from 'vue' +import { delay, trigger } from '../../utils/jest' +import VarSwitch from '../../switch/Switch' + + +test('test slider example', () => { + const wrapper = mount(example) + expect(wrapper.html()).toMatchSnapshot() +}) + +test('test slider plugin', () => { + const app = createApp({}).use(Slider) + expect(app.component(Slider.name)).toBeTruthy() +}) + +test('test slider style', async () => { + const template = ` + + ` + + const wrapper = mount({ + components: { + [VarSlider.name]: VarSlider + }, + data() { + return { + value: 30 + } + }, + template + }) + + await delay(0) + + expect(wrapper.html()).toMatchSnapshot() + +}) + +test('test slider range prop', async () => { + const template = ` + + ` + const wrapper = mount({ + components: { + [VarSlider.name]: VarSlider + }, + data() { + return { + value: [30, 50] + } + }, + template + }) + + expect(wrapper.findAll('.var-slider__thumb').length).toBe(2) +}) + +test('test slider labelVisible prop', async () => { + const template = ` ` + + const wrapper = mount({ + components: { + [VarSlider.name]: VarSlider + }, + data() { + return { + value: 0, + visible: 'normal' + } + }, + template + }) + + const el = wrapper.find('.var-slider__thumb-label') + expect(el.classes()).not.toContain('var-slider__thumb-label-active') + + await trigger(el, 'touchstart', 0, 0) + await trigger(el, 'touchmove', 0, 0) + + expect(el.classes()).toContain('var-slider__thumb-label-active') + + await trigger(el, 'touchend', 0, 0) + + expect(el.classes()).not.toContain('var-slider__thumb-label-active') + + await wrapper.setData({ visible: 'never' }) + + expect(el.classes()).not.toContain('var-slider__thumb-label-active') + + await trigger(el, 'touchstart', 0, 0) + await trigger(el, 'touchmove', 0, 0) + expect(el.classes()).not.toContain('var-slider__thumb-label-active') + + await wrapper.setData({ visible: 'always' }) + + expect(el.classes()).toContain('var-slider__thumb-label-active') + + await trigger(el, 'touchstart', 0, 0) + await trigger(el, 'touchmove', 0, 0) + expect(el.classes()).toContain('var-slider__thumb-label-active') + + await trigger(el, 'touchend', 0, 0) + expect(el.classes()).toContain('var-slider__thumb-label-active') +}) + +test('test step prop', async () => { + const template = ` ` + + const wrapper = mount({ + components: { + [VarSlider.name]: VarSlider + }, + data() { + return { + value: 0, + step: NaN + } + }, + template + }) + + await wrapper.setData({ step: -1 }) + await wrapper.setData({ step: 1.23 }) + await wrapper.setData({ step: 10, value: 0 }) + + const el = wrapper.find('.var-slider__thumb') + + await trigger(el, 'touchstart', 0, 0) + await trigger(el, 'touchmove', 50, 0) + await trigger(el, 'touchend', 50, 0) + + expect(wrapper.vm.value).not.toBe(0) +}) + +test('test slider not available', async () => { + const changeFn = jest.fn() + const startFn = jest.fn() + const endFn = jest.fn() + + const template = ` + + ` + const wrapper = mount({ + components: { + [VarSlider.name]: VarSlider + }, + data() { + return { + value: 10, + disabled: true, + readonly: false + } + }, + methods: { + changeFn, + startFn, + endFn + }, + template + }) + + const el = wrapper.find('.var-slider__thumb') + + await trigger(el, 'touchstart', 0, 0) + await trigger(el, 'touchmove', 0, 50) + await trigger(el, 'touchend', 0, 50) + + await wrapper.setData({ + disabled: false, + readonly: true + }) + + await trigger(el, 'touchstart', 0, 0) + await trigger(el, 'touchmove', 0, 50) + await trigger(el, 'touchend', 0, 50) + + expect(startFn).toHaveBeenCalledTimes(0) + expect(changeFn).toHaveBeenCalledTimes(0) + expect(endFn).toHaveBeenCalledTimes(0) +}) + +test('test slider events', async () => { + const changeFn = jest.fn() + const startFn = jest.fn() + const endFn = jest.fn() + + const template = ` + + ` + const wrapper = mount({ + components: { + [VarSlider.name]: VarSlider + }, + data() { + return { + value: 10, + range: false + } + }, + methods: { + changeFn, + startFn, + endFn + }, + template + }) + + const el = wrapper.find('.var-slider__thumb') + const blockEl = wrapper.find('.var-slider-block') + + await trigger(el, 'touchstart', 0, 0) + + expect(startFn).toHaveBeenCalledTimes(1) + + await trigger(el, 'touchmove', 0, 50) + await trigger(el, 'touchend', 0, 50) + + expect(changeFn).toHaveBeenCalled() + expect(endFn).toHaveBeenCalledTimes(1) + expect(wrapper.vm.value).not.toBe(10) + + await wrapper.setData({ + range: true, + value: [20 ,30] + }) + + const el1 = wrapper.findAll('.var-slider__thumb')[1] + + await trigger(el1, 'touchstart', 0, 0) + await trigger(el1, 'touchmove', 0, 50) + await trigger(el1, 'touchend', 0, 50) + + expect(wrapper.vm.value[1]).not.toBe(30) + + await wrapper.setData({ + range: true, + value: [20 ,30] + }) + await blockEl.trigger('click') + + expect(wrapper.vm.value).not.toEqual([20, 30]) + + +}) +test('test slider rules prop', async () => { + const template = `` + const wrapper = mount({ + components: { + [VarSlider.name]: VarSlider + }, + data() { + return { + value: 0, + } + }, + template, + }) + + expect(wrapper.html()).toMatchSnapshot() + + + const el = wrapper.find('.var-slider__thumb') + + await trigger(el, 'touchstart', 0, 0) + await trigger(el, 'touchmove', 0, 50) + await trigger(el, 'touchend', 0, 50) + + expect(wrapper.html()).toMatchSnapshot() +}) diff --git a/packages/varlet-ui/src/slider/example/index.vue b/packages/varlet-ui/src/slider/example/index.vue index c6879191820..0baf858cd6c 100644 --- a/packages/varlet-ui/src/slider/example/index.vue +++ b/packages/varlet-ui/src/slider/example/index.vue @@ -47,13 +47,13 @@ From 6e1774fa57f805027603b2b2c3ed5be08067ea91 Mon Sep 17 00:00:00 2001 From: BeADre Date: Sat, 15 May 2021 00:00:29 +0800 Subject: [PATCH 03/12] fix(slider): fix error method --- packages/varlet-ui/src/slider/__tests__/index.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/varlet-ui/src/slider/__tests__/index.spec.js b/packages/varlet-ui/src/slider/__tests__/index.spec.js index db6eea963d7..504d8790ca6 100644 --- a/packages/varlet-ui/src/slider/__tests__/index.spec.js +++ b/packages/varlet-ui/src/slider/__tests__/index.spec.js @@ -256,7 +256,7 @@ test('test slider events', async () => { }) test('test slider rules prop', async () => { - const template = `` + const template = `` const wrapper = mount({ components: { [VarSlider.name]: VarSlider From 93420c1d344e906d5a7f5ec7a91bc4ece82d40f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8F=9C=E8=8F=9C?= Date: Sat, 15 May 2021 21:30:49 +0800 Subject: [PATCH 04/12] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0form=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit affects: @varlet/ui --- .../__snapshots__/index.spec.js.snap | 40 +++++++++ .../src/form/__tests__/index.spec.js | 90 +++++++++++++++++++ 2 files changed, 130 insertions(+) create mode 100644 packages/varlet-ui/src/form/__tests__/__snapshots__/index.spec.js.snap create mode 100644 packages/varlet-ui/src/form/__tests__/index.spec.js diff --git a/packages/varlet-ui/src/form/__tests__/__snapshots__/index.spec.js.snap b/packages/varlet-ui/src/form/__tests__/__snapshots__/index.spec.js.snap new file mode 100644 index 00000000000..8dbc6b1f135 --- /dev/null +++ b/packages/varlet-ui/src/form/__tests__/__snapshots__/index.spec.js.snap @@ -0,0 +1,40 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`test form with input 1`] = ` +"
+
+
+
+
+
+
+
+
+
+ +
+
不能为空
+
+
+
+
+
" +`; + +exports[`test form with input 2`] = ` +"
+
+
+
+
+
+
+
+
+
+ + + +
+
" +`; diff --git a/packages/varlet-ui/src/form/__tests__/index.spec.js b/packages/varlet-ui/src/form/__tests__/index.spec.js new file mode 100644 index 00000000000..e9e73f8728d --- /dev/null +++ b/packages/varlet-ui/src/form/__tests__/index.spec.js @@ -0,0 +1,90 @@ +import Form from '..' +import VarForm from '../Form' +import VarInput from '../../input/Input' +import { mount } from '@vue/test-utils' +import { createApp } from 'vue' +import { delay } from '../../utils/jest' + +test('test form plugin', () => { + const app = createApp({}).use(Form) + expect(app.component(Form.name)).toBeTruthy() +}) + +const expectValidate = async (form, wrapper, message) => { + form.validate() + await delay(16) + expect(wrapper.find('.var-form-details__message').text()).toBe(message) + expect(wrapper.html()).toMatchSnapshot() +} + +const expectReset = async (form, wrapper) => { + form.reset() + await delay(16) + expect(wrapper.find('.var-form-details__message').exists()).toBeFalsy() + expect(wrapper.html()).toMatchSnapshot() +} + +test('test form with input', async () => { + const onClear = jest.fn() + const onClick = jest.fn() + const onInput = jest.fn() + const onChange = jest.fn() + + const wrapper = mount({ + components: { + [VarInput.name]: VarInput, + [VarForm.name]: VarForm, + }, + data: () => ({ + disabled: true, + readonly: false, + value: '', + }), + methods: { + onClear, + onClick, + onInput, + onChange, + }, + template: ` + + + + `, + }) + + const triggerEvents = async () => { + await wrapper.find('.var-input__input').trigger('input') + await wrapper.find('.var-input__input').trigger('change') + await wrapper.find('.var-input__clear-icon').trigger('click') + await wrapper.trigger('click') + } + + await triggerEvents() + expect(onInput).toHaveBeenCalledTimes(0) + expect(onClear).toHaveBeenCalledTimes(0) + expect(onClick).toHaveBeenCalledTimes(0) + expect(onChange).toHaveBeenCalledTimes(0) + + await wrapper.setData({ disabled: false, readonly: true }) + + await triggerEvents() + expect(onInput).toHaveBeenCalledTimes(0) + expect(onClear).toHaveBeenCalledTimes(0) + expect(onClick).toHaveBeenCalledTimes(1) + expect(onChange).toHaveBeenCalledTimes(0) + + const { form } = wrapper.vm.$refs + await expectValidate(form, wrapper, '不能为空') + await expectReset(form, wrapper) + + wrapper.unmount() +}) From 430e3828a68e595f049599231a36b379dfa81a37 Mon Sep 17 00:00:00 2001 From: BeADre Date: Mon, 17 May 2021 20:05:28 +0800 Subject: [PATCH 05/12] fix(type): fix error type of snackbar --- packages/varlet-ui/src/snackbar/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/varlet-ui/src/snackbar/index.ts b/packages/varlet-ui/src/snackbar/index.ts index d924b358294..96c9330b949 100644 --- a/packages/varlet-ui/src/snackbar/index.ts +++ b/packages/varlet-ui/src/snackbar/index.ts @@ -40,7 +40,7 @@ interface UniqSnackbarOptions { } interface Snackbar { - (options: SnackbarOptions): SnackbarHandel + (options: SnackbarOptions | string): SnackbarHandel install(app: App): void From 0b403cccfb53685488c45ecf86aedd58b96f1553 Mon Sep 17 00:00:00 2001 From: BeADre Date: Mon, 17 May 2021 20:50:21 +0800 Subject: [PATCH 06/12] fix(snackbar): add install method of snackbar component --- packages/varlet-ui/src/snackbar/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/varlet-ui/src/snackbar/index.ts b/packages/varlet-ui/src/snackbar/index.ts index 96c9330b949..a8f32117632 100644 --- a/packages/varlet-ui/src/snackbar/index.ts +++ b/packages/varlet-ui/src/snackbar/index.ts @@ -245,4 +245,8 @@ function getTop(position = 'top'): string { return '5%' } +VarSnackbar.install = function(app: App) { + app.component(VarSnackbar.name, VarSnackbar) +} + export default Snackbar From 4f4e2908b5d766769eab97ec5d0ee67ca1f6398b Mon Sep 17 00:00:00 2001 From: BeADre Date: Tue, 18 May 2021 09:40:08 +0800 Subject: [PATCH 07/12] test(snackbar): add test --- .../__snapshots__/component.spec.js.snap | 67 +++++++++++ .../src/snackbar/__tests__/component.spec.js | 52 ++++++++ .../src/snackbar/__tests__/index.spec.js | 112 ++++++++++++++++++ .../varlet-ui/src/snackbar/example/index.vue | 6 +- packages/varlet-ui/src/snackbar/index.ts | 2 - 5 files changed, 234 insertions(+), 5 deletions(-) create mode 100644 packages/varlet-ui/src/snackbar/__tests__/__snapshots__/component.spec.js.snap create mode 100644 packages/varlet-ui/src/snackbar/__tests__/component.spec.js create mode 100644 packages/varlet-ui/src/snackbar/__tests__/index.spec.js diff --git a/packages/varlet-ui/src/snackbar/__tests__/__snapshots__/component.spec.js.snap b/packages/varlet-ui/src/snackbar/__tests__/__snapshots__/component.spec.js.snap new file mode 100644 index 00000000000..cbe0af55300 --- /dev/null +++ b/packages/varlet-ui/src/snackbar/__tests__/__snapshots__/component.spec.js.snap @@ -0,0 +1,67 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`test snackbar example 1`] = ` +"
+
组件调用
+
+
+
函数调用
+
+
+
Snackbar 类型
+
+
+
+ + + + + + + + + + +
" +`; + +exports[`test snackbar style 1`] = `"
test snackbar
"`; diff --git a/packages/varlet-ui/src/snackbar/__tests__/component.spec.js b/packages/varlet-ui/src/snackbar/__tests__/component.spec.js new file mode 100644 index 00000000000..60e064da3ec --- /dev/null +++ b/packages/varlet-ui/src/snackbar/__tests__/component.spec.js @@ -0,0 +1,52 @@ +import Snackbar from '..' +import VarSnackbar from '../Snackbar' +import example from '../example' +import { mount } from '@vue/test-utils' +import { createApp } from 'vue' +import { delay } from '../../utils/jest' + +test('test snackbar example', () => { + const wrapper = mount(example) + expect(wrapper.html()).toMatchSnapshot() + wrapper.unmount() +}) + +test('test snackbar component plugin', () => { + const app = createApp({}).use(Snackbar.Component) + expect(app.component(Snackbar.Component.name)).toBeTruthy() +}) + +test('test snackbar style', async () => { + const template = ` + + ` + mount({ + components: { + [VarSnackbar.name]: VarSnackbar + }, + data() { + return { + show: true + } + }, + template + }) + + await delay(200) + expect(document.body.innerHTML).toMatchSnapshot() + + await delay(500) + expect(document.querySelector('.var-snackbar').style.display).toBe('none') +}) diff --git a/packages/varlet-ui/src/snackbar/__tests__/index.spec.js b/packages/varlet-ui/src/snackbar/__tests__/index.spec.js new file mode 100644 index 00000000000..442d1dbf6bc --- /dev/null +++ b/packages/varlet-ui/src/snackbar/__tests__/index.spec.js @@ -0,0 +1,112 @@ +import Snackbar from '../index' +import VarSnackbar from '../Snackbar' +import { createApp } from 'vue' +import { delay } from '../../utils/jest' + +test('test snackbar plugin', () => { + const app = createApp({}).use(Snackbar) + expect(app.component(VarSnackbar.name)).toBeTruthy() +}) + +test('test snackbar functional', async () => { + expect(document.body.querySelector('.var-snackbar')).toBeFalsy() + + const { clear } = Snackbar('test snackbar') + + await delay(200) + expect(document.body.querySelector('.var-snackbar')).toBeTruthy() + + clear() + await delay(200) + expect(document.body.querySelector('.var-snackbar')).toBeFalsy() + + Snackbar.clear() +}) + +test('test snackbar type', async () => { + Snackbar.success('test snackbar') + await delay(200) + expect(document.body.querySelector('.var-snackbar__wrapper-success')).toBeTruthy() + + Snackbar.warning('test snackbar') + await delay(200) + expect(document.body.querySelector('.var-snackbar__wrapper-warning')).toBeTruthy() + + Snackbar.error('test snackbar') + await delay(200) + expect(document.body.querySelector('.var-snackbar__wrapper-error')).toBeTruthy() + + Snackbar.info({ + content: 'test snackbar', + forbidClick: true + }) + await delay(200) + expect(document.body.querySelector('.var-snackbar__wrapper-info')).toBeTruthy() + + Snackbar.loading('test snackbar') + await delay(200) + expect(document.body.querySelector('.var-snackbar__wrapper-loading')).toBeTruthy() + + Snackbar.clear() +}) + +test('test snackbar event', async () => { + const open = jest.fn() + const opened = jest.fn() + const close = jest.fn() + const closed = jest.fn() + + const { clear } = Snackbar({ + content: 'test snackbar', + duration: 500, + onOpen: open, + onOpened: opened, + onClose: close, + onClosed: closed + }) + + await delay(200) + + clear() + + await delay(200) + + expect(open).toHaveBeenCalledTimes(1) + expect(opened).toHaveBeenCalled() + expect(close).toHaveBeenCalledTimes(1) + expect(closed).toHaveBeenCalledTimes(1) +}) + +test('test snackbar allowMultiple and clear', async () => { + Snackbar.success('test snackbar') + await delay(200) + expect(document.body.querySelector('.var-snackbar__wrapper-success')).toBeTruthy() + + Snackbar.warning('test snackbar') + await delay(200) + expect(document.body.querySelector('.var-snackbar__wrapper-success')).toBeFalsy() + + Snackbar.allowMultiple(true) + await delay(0) + expect(Snackbar.isAllowMultiple).toBe(true) + + const { clear } = Snackbar.info('test snackbar') + await delay(200) + clear() + await delay(200) + expect(document.body.querySelector('.var-snackbar__wrapper-info')).toBeFalsy() + + Snackbar.success('test snackbar') + await delay(200) + expect(document.body.querySelector('.var-snackbar__wrapper-success')).toBeTruthy() + + Snackbar.warning('test snackbar') + await delay(200) + expect(document.body.querySelector('.var-snackbar__wrapper-success')).toBeTruthy() + expect(document.body.querySelector('.var-snackbar__wrapper-warning')).toBeTruthy() + + Snackbar.clear() + await delay(200) + expect(document.body.querySelector('.var-snackbar__wrapper-success')).toBeFalsy() + expect(document.body.querySelector('.var-snackbar__wrapper-warning')).toBeFalsy() +}) diff --git a/packages/varlet-ui/src/snackbar/example/index.vue b/packages/varlet-ui/src/snackbar/example/index.vue index 03ac741f908..a55f3a3d9c5 100644 --- a/packages/varlet-ui/src/snackbar/example/index.vue +++ b/packages/varlet-ui/src/snackbar/example/index.vue @@ -59,11 +59,11 @@ import Snackbar from '../index' import Button from '../../button' import AppType from '@varlet/cli/site/mobile/components/AppType' -import { defineComponent, reactive, toRefs } from 'vue' +import { reactive, toRefs } from 'vue' import { pack, use } from './locale' import { watchLang } from '../../utils/components' -export default defineComponent({ +export default { name: 'SnackbarExample', components: { [Snackbar.Component.name]: Snackbar.Component, @@ -117,7 +117,7 @@ export default defineComponent({ create, } }, -}) +}