diff --git a/src/components/Demo.module.less b/src/components/Demo.module.less
index 3bd341c..ccbb96a 100644
--- a/src/components/Demo.module.less
+++ b/src/components/Demo.module.less
@@ -1,4 +1,4 @@
.container {
- width: 50%;
- margin: 20px;
+ width: 50%;
+ margin: 20px;
}
\ No newline at end of file
diff --git a/src/components/Demo.tsx b/src/components/Demo.tsx
index ef59c6d..fb279e4 100644
--- a/src/components/Demo.tsx
+++ b/src/components/Demo.tsx
@@ -4,7 +4,7 @@ import styles from './demo.module.less'
export default defineComponent({
setup() {
- const msg = ref('Hello ViewUIPlus!')
+ const msg = ref('Hello View UI Plus!')
return () => (
diff --git a/src/env.d.ts b/src/env.d.ts
index aafef95..76a9812 100644
--- a/src/env.d.ts
+++ b/src/env.d.ts
@@ -1,8 +1,8 @@
///
declare module '*.vue' {
- import type { DefineComponent } from 'vue'
- // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
- const component: DefineComponent<{}, {}, any>
- export default component
+ import type { DefineComponent } from 'vue'
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
+ const component: DefineComponent<{}, {}, any>
+ export default component
}
diff --git a/src/router/index.ts b/src/router/index.ts
index 25ee35c..a28e0b4 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -2,9 +2,9 @@ import { createRouter, createWebHistory } from 'vue-router'
import routes from './routes'
export default createRouter({
- routes,
- history: createWebHistory(),
- scrollBehavior() {
- return { top: 0 }
- }
+ routes,
+ history: createWebHistory(),
+ scrollBehavior() {
+ return { top: 0 }
+ }
})
\ No newline at end of file
diff --git a/src/router/routes.ts b/src/router/routes.ts
index 4aa1e8d..754a400 100644
--- a/src/router/routes.ts
+++ b/src/router/routes.ts
@@ -1,10 +1,10 @@
import type { RouteRecordRaw } from 'vue-router'
const routes: RouteRecordRaw[] = [
- {
- path: '/',
- component: () => import('@/components/Demo')
- }
+ {
+ path: '/',
+ component: () => import('@/components/Demo')
+ }
]
export default routes
\ No newline at end of file
diff --git a/vite.config.ts b/vite.config.ts
index 91646bd..fb56cf4 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -6,67 +6,67 @@ const autoprefixer = require('autoprefixer')
const path = require('path')
const config = ({ mode }) => {
- const isProd = mode === 'production'
- const envPrefix = 'APP_'
- const { APP_TITLE = '' } = loadEnv(mode, process.cwd(), envPrefix)
- return {
- plugins: [
- vue(),
- vueJsx({
- // options are passed on to @vue/babel-plugin-jsx
- }),
- createHtmlPlugin({
- minify: isProd,
- inject: {
- data: {
- title: APP_TITLE,
- },
- }
- })
- ],
- build: {
- target: 'es2015',
- outDir: path.resolve(__dirname, 'dist'),
- assetsDir: 'assets',
- assetsInlineLimit: 8192,
- sourcemap: !isProd,
- emptyOutDir: true,
- rollupOptions: {
- input: path.resolve(__dirname, 'index.html'),
- output: {
- chunkFileNames: 'js/[name].[hash].js',
- entryFileNames: 'js/[name].[hash].js',
- }
- }
- },
- envPrefix,
- resolve: {
- alias: [
- { find: /^@\//, replacement: path.resolve(__dirname, 'src') + '/' },
- { find: /^~/, replacement: '' }
- ],
- extensions: ['.ts', '.tsx', '.js', '.mjs', '.vue', '.json', '.less', '.css']
- },
- css: {
- postcss: {
+ const isProd = mode === 'production'
+ const envPrefix = 'APP_'
+ const { APP_TITLE = '' } = loadEnv(mode, process.cwd(), envPrefix)
+ return {
plugins: [
- autoprefixer
+ vue(),
+ vueJsx({
+ // options are passed on to @vue/babel-plugin-jsx
+ }),
+ createHtmlPlugin({
+ minify: isProd,
+ inject: {
+ data: {
+ title: APP_TITLE,
+ },
+ }
+ })
],
- },
- preprocessorOptions: {
- less: {
- javascriptEnabled: true,
- additionalData: `@import "${path.resolve(__dirname, 'src/styles/variable.less')}";`
+ build: {
+ target: 'es2015',
+ outDir: path.resolve(__dirname, 'dist'),
+ assetsDir: 'assets',
+ assetsInlineLimit: 8192,
+ sourcemap: !isProd,
+ emptyOutDir: true,
+ rollupOptions: {
+ input: path.resolve(__dirname, 'index.html'),
+ output: {
+ chunkFileNames: 'js/[name].[hash].js',
+ entryFileNames: 'js/[name].[hash].js',
+ }
+ }
+ },
+ envPrefix,
+ resolve: {
+ alias: [
+ { find: /^@\//, replacement: path.resolve(__dirname, 'src') + '/' },
+ { find: /^~/, replacement: '' }
+ ],
+ extensions: ['.ts', '.tsx', '.js', '.mjs', '.vue', '.json', '.less', '.css']
+ },
+ css: {
+ postcss: {
+ plugins: [
+ autoprefixer
+ ],
+ },
+ preprocessorOptions: {
+ less: {
+ javascriptEnabled: true,
+ additionalData: `@import "${path.resolve(__dirname, 'src/styles/variable.less')}";`
+ }
+ }
+ },
+ server: {
+ open: true
+ },
+ preview: {
+ port: 5000
}
- }
- },
- server: {
- open: true
- },
- preview: {
- port: 5000
}
- }
}
export default defineConfig(config)