fix: use two words component
This commit is contained in:
parent
82ca803748
commit
85081134f0
@ -68,6 +68,7 @@ See [Vitesse](https://github.com/antfu/vitesse) for full featureset.
|
|||||||
- [`vite-plugin-pages`](https://github.com/hannoeru/vite-plugin-pages) - file system based routing
|
- [`vite-plugin-pages`](https://github.com/hannoeru/vite-plugin-pages) - file system based routing
|
||||||
- [`unplugin-auto-import`](https://github.com/antfu/unplugin-auto-import) - Directly use Vue Composition API and others without importing
|
- [`unplugin-auto-import`](https://github.com/antfu/unplugin-auto-import) - Directly use Vue Composition API and others without importing
|
||||||
- [`unplugin-vue-components`](https://github.com/antfu/unplugin-vue-components) - components auto import
|
- [`unplugin-vue-components`](https://github.com/antfu/unplugin-vue-components) - components auto import
|
||||||
|
- [`unplugin-vue-macros`](https://github.com/sxzz/unplugin-vue-macros) - Explore and extend more macros and syntax sugar to Vue.
|
||||||
- [VueUse](https://github.com/antfu/vueuse) - collection of useful composition APIs
|
- [VueUse](https://github.com/antfu/vueuse) - collection of useful composition APIs
|
||||||
|
|
||||||
## Try it now!
|
## Try it now!
|
||||||
|
|||||||
6
components.d.ts
vendored
6
components.d.ts
vendored
@ -7,10 +7,10 @@ export {}
|
|||||||
|
|
||||||
declare module '@vue/runtime-core' {
|
declare module '@vue/runtime-core' {
|
||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
Counter: typeof import('./src/components/Counter.vue')['default']
|
|
||||||
Footer: typeof import('./src/components/Footer.vue')['default']
|
|
||||||
Input: typeof import('./src/components/Input.vue')['default']
|
|
||||||
RouterLink: typeof import('vue-router')['RouterLink']
|
RouterLink: typeof import('vue-router')['RouterLink']
|
||||||
RouterView: typeof import('vue-router')['RouterView']
|
RouterView: typeof import('vue-router')['RouterView']
|
||||||
|
TheCounter: typeof import('./src/components/TheCounter.vue')['default']
|
||||||
|
TheFooter: typeof import('./src/components/TheFooter.vue')['default']
|
||||||
|
TheInput: typeof import('./src/components/TheInput.vue')['default']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<main font-sans p="x-4 y-10" text="center gray-700 dark:gray-200">
|
<main font-sans p="x-4 y-10" text="center gray-700 dark:gray-200">
|
||||||
<RouterView />
|
<RouterView />
|
||||||
<Footer />
|
<TheFooter />
|
||||||
</main>
|
</main>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -26,7 +26,7 @@ const go = () => {
|
|||||||
|
|
||||||
<div py-4 />
|
<div py-4 />
|
||||||
|
|
||||||
<Input
|
<TheInput
|
||||||
v-model="name"
|
v-model="name"
|
||||||
placeholder="What's your name?"
|
placeholder="What's your name?"
|
||||||
autocomplete="false"
|
autocomplete="false"
|
||||||
|
|||||||
@ -1,16 +1,16 @@
|
|||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import { describe, expect, it } from 'vitest'
|
import { describe, expect, it } from 'vitest'
|
||||||
import Counter from '../src/components/Counter.vue'
|
import TheCounter from '../src/components/TheCounter.vue'
|
||||||
|
|
||||||
describe('Counter.vue', () => {
|
describe('TheCounter.vue', () => {
|
||||||
it('should render', () => {
|
it('should render', () => {
|
||||||
const wrapper = mount(Counter, { props: { initial: 10 } })
|
const wrapper = mount(TheCounter, { props: { initial: 10 } })
|
||||||
expect(wrapper.text()).toContain('10')
|
expect(wrapper.text()).toContain('10')
|
||||||
expect(wrapper.html()).toMatchSnapshot()
|
expect(wrapper.html()).toMatchSnapshot()
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should be interactive', async () => {
|
it('should be interactive', async () => {
|
||||||
const wrapper = mount(Counter, { props: { initial: 0 } })
|
const wrapper = mount(TheCounter, { props: { initial: 0 } })
|
||||||
expect(wrapper.text()).toContain('0')
|
expect(wrapper.text()).toContain('0')
|
||||||
|
|
||||||
expect(wrapper.find('.inc').exists()).toBe(true)
|
expect(wrapper.find('.inc').exists()).toBe(true)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user