-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
wenqing
committed
Dec 20, 2023
1 parent
e4ae9db
commit 54f3126
Showing
3 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<template> | ||
<div class="">See console</div> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { onMounted } from 'vue' | ||
const iconsImport = import.meta.glob('@/icons/**.svg', { | ||
import: 'default', | ||
eager: true, | ||
query: { | ||
component: '', // import SVG as a vue component | ||
// raw: '', // Or import SVG as a pure text | ||
// url: '', // or import SVG as a url | ||
}, | ||
}) | ||
onMounted(() => { | ||
console.log(iconsImport) | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<template> | ||
<div class=""> | ||
<FeatureSection> | ||
<template #title> <code>with glob of vite</code> </template> | ||
|
||
<template #sub-title> | ||
<div> | ||
Supports importing multiple modules from the file system via the | ||
special | ||
<code class="lang-js">import.meta.glob</code> | ||
function: | ||
</div> | ||
</template> | ||
|
||
<template #demo> | ||
<DemoCode /> | ||
</template> | ||
|
||
<template #code> | ||
{{ DemoCodeRaw }} | ||
</template> | ||
</FeatureSection> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import FeatureSection from '@/components/FeatureSection.vue' | ||
import DemoCode from './DemoCode.vue' | ||
import DemoCodeRaw from './DemoCode.vue?raw' | ||
</script> | ||
|
||
<script lang="ts"> | ||
import { defineComponent } from 'vue' | ||
export default defineComponent({ | ||
name: 'UrlQueryString', | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters