Skip to content

Commit 821c35f

Browse files
committed
chore: cleanup
1 parent 92f2778 commit 821c35f

File tree

5 files changed

+24
-21
lines changed

5 files changed

+24
-21
lines changed

examples/vue3/src/App.vue

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
<script setup lang='ts'>
2+
import { ref } from 'vue'
3+
4+
const tree = ref({
5+
label: 'Top Level',
6+
children: [
7+
{ label: 'First Level' },
8+
{ label: 'First Level', children: [{ label: 'Second Level' }] },
9+
],
10+
})
11+
12+
const rate = ref(2.5)
13+
const radio = ref('1')
14+
</script>
15+
116
<template>
217
<div class="block">
318
<h1>Basic (4)</h1>
@@ -54,21 +69,6 @@
5469
</div>
5570
</template>
5671

57-
<script setup lang='ts'>
58-
import { ref } from 'vue'
59-
60-
const tree = ref({
61-
label: 'Top Level',
62-
children: [
63-
{ label: 'First Level' },
64-
{ label: 'First Level', children: [{ label: 'Second Level' }] },
65-
],
66-
})
67-
68-
const rate = ref(2.5)
69-
const radio = ref('1')
70-
</script>
71-
7272
<style scoped>
7373
.block {
7474
padding: 0px 20px 10px 20px;

examples/vue3/src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createApp } from 'vue'
2-
import App from '/src/App.vue'
2+
import App from './App.vue'
33
import './index.css'
44
import 'vant/lib/index.css'
55

examples/vue3/src/shims-vue.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
import { defineComponent } from 'vue'
1+
/* eslint-disable import/no-duplicates */
22

33
declare module '*.vue' {
4+
import { defineComponent } from 'vue'
45
const Component: ReturnType<typeof defineComponent>
56
export default Component
67
}
78

89
declare module '*.md' {
10+
import { defineComponent } from 'vue'
911
const Component: ReturnType<typeof defineComponent>
1012
export default Component
1113
}

test/__snapshots__/search.test.ts.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
exports[`search should with namespace 1`] = `
44
Array [
5+
Object {
6+
"name": "Avatar",
7+
"path": "/src/components/global/avatar.vue",
8+
},
59
Object {
610
"name": "Book",
711
"path": "/src/components/book/index.vue",
@@ -22,10 +26,6 @@ Array [
2226
"name": "ComponentD",
2327
"path": "/src/components/ComponentD.vue",
2428
},
25-
Object {
26-
"name": "GlobalAvatar",
27-
"path": "/src/components/global/avatar.vue",
28-
},
2929
Object {
3030
"name": "Recursive",
3131
"path": "/src/components/Recursive.vue",

test/search.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ describe('search', () => {
1919
it('should with namespace', async() => {
2020
const ctx = new Context({
2121
directoryAsNamespace: true,
22+
globalNamespaces: ['global'],
2223
}, { root: resolve(__dirname, '../examples/vue3') } as any)
2324
ctx.searchGlob()
2425

0 commit comments

Comments
 (0)