chore: Remove commented code for vue-router package name handling
All checks were successful
CI / cache-and-install (push) Successful in 1m7s

This commit is contained in:
严浩
2024-08-14 09:43:56 +08:00
parent a544e501c2
commit ed90618007
5 changed files with 66 additions and 18 deletions

View File

@ -13,7 +13,6 @@
</head>
<body ontouchstart ontouchend>
<div>commit: %VITE_BUILD_COMMIT%</div>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
<script src="https://fastly.jsdelivr.net/npm/@vant/touch-emulator/dist/index.min.js"></script>

View File

@ -1,5 +1,8 @@
<script setup lang="ts"></script>
<script setup lang="ts">
const VITE_BUILD_COMMIT = import.meta.env.VITE_BUILD_COMMIT;
</script>
<template>
<div fixed rounded-br-4 top-0 left-0 z-9999 px-4 py-2 bg-black text-white>commit: {{ VITE_BUILD_COMMIT }}</div>
<RouterView />
</template>

View File

@ -20,16 +20,3 @@ a,
background-color: hsla(160, 100%, 37%, 0.2);
}
}
@media (min-width: 1024px) {
body {
display: flex;
place-items: center;
}
#app {
display: grid;
grid-template-columns: 1fr 1fr;
padding: 0 2rem;
}
}

View File

@ -7,7 +7,5 @@ definePage({
</script>
<template>
<div>
<h1>Index Page</h1>
</div>
<h1>Index Page</h1>
</template>

61
unocss.config.ts Normal file
View File

@ -0,0 +1,61 @@
// https://github.dev/unocss/unocss/tree/main/examples/vite-vue3
import { FileSystemIconLoader } from '@iconify/utils/lib/loader/node-loaders';
import presetRemToPx from '@unocss/preset-rem-to-px';
import {
defineConfig,
presetAttributify,
presetIcons,
presetUno,
transformerDirectives,
transformerVariantGroup,
} from 'unocss';
export default defineConfig({
shortcuts: [
{
'logo-transform': 'i-icon:pacman w-6em h-6em transform transition-800',
pacman: 'i-icon:pacman uno-text-(pink 36)',
},
],
presets: [
presetUno({
/* prefix: "u-", */
}),
// https://unocss.dev/presets/rem-to-px
presetRemToPx({ baseFontSize: 4 }),
// https://unocss.dev/presets/attributify
presetAttributify(),
presetIcons({
/*extraProperties: {
display: "inline-block",
"vertical-align": "middle",
},*/
customizations: {
iconCustomizer(collection, icon, props) {
props.width = '1em';
props.height = '1em';
},
},
collections: {
icon: FileSystemIconLoader('src/assets/uno-svg', (svg) => {
// width="200px" height="200.00px"
return svg.replace(/#000000|#000/g, 'currentColor');
}),
},
warn: true,
}),
],
transformers: [
//https://unocss.dev/transformers/variant-group
transformerVariantGroup(),
// https://unocss.dev/transformers/directives
transformerDirectives(),
],
});
// text-[var(--h-gray-1)]
// <div class="i-icon:pacman text-(pink 36)" />