+
查看更多
@@ -110,17 +116,25 @@ const onClipboard = () => {
position: sticky;
bottom: 0;
left: 0;
- background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
+ background: linear-gradient(
+ to bottom,
+ rgba(255, 255, 255, 0) 0%,
+ rgba(255, 255, 255, 1) 100%
+ );
color: var(--im-text-color);
}
}
-html[theme-mode='dark'] {
+html[theme-mode="dark"] {
.im-message-code {
background: var(--im-message-bg-color);
.mask {
- background: linear-gradient(to bottom, transparent 0%, var(--im-bg-color) 100%);
+ background: linear-gradient(
+ to bottom,
+ transparent 0%,
+ var(--im-bg-color) 100%
+ );
}
}
}
diff --git a/vite.config.cts b/vite.config.cts
new file mode 100644
index 0000000..97bfb89
--- /dev/null
+++ b/vite.config.cts
@@ -0,0 +1,61 @@
+import vue from '@vitejs/plugin-vue'
+import AutoImport from 'unplugin-auto-import/vite'
+import { NaiveUiResolver } from 'unplugin-vue-components/resolvers'
+import Components from 'unplugin-vue-components/vite'
+import { defineConfig } from 'vite'
+import Uni from '@dcloudio/vite-plugin-uni'
+import UniKuRoot from '@uni-ku/root'
+import { resolve } from 'node:path'
+import UnoCSS from 'unocss/vite'
+
+export default defineConfig({
+ envDir: './env', // 自定义env目录
+ resolve: {
+ alias: [
+ {
+ find: "@",
+ replacement: resolve(process.cwd(), 'src')
+ }
+ ]
+ },
+ server: {
+ host: '0.0.0.0', // 监听所有网络接口
+ port: 2367,
+ // 选项写法
+ proxy: {
+ '/pag': {
+ target: 'https://cdn.tmui.design',
+ changeOrigin: true,
+ rewrite: (path) => path.replace(/^\/api/, '/api')
+ },
+ }
+ },
+ plugins: [
+ Uni(),
+ UniKuRoot(),
+ UnoCSS(),
+ AutoImport({
+ imports: [
+ 'vue',
+ {
+ 'naive-ui': [
+ 'useDialog',
+ 'useMessage',
+ 'useNotification',
+ 'useLoadingBar'
+ ]
+ }
+ ]
+ }),
+ Components({
+ resolvers: [NaiveUiResolver()]
+ })
+ ],
+ css: {
+ preprocessorOptions: {
+ scss: {
+ additionalData: `@import "@/static/css/color.scss";`,
+ },
+ },
+ }
+})
diff --git a/vite.config.js b/vite.config.js
deleted file mode 100644
index e36429a..0000000
--- a/vite.config.js
+++ /dev/null
@@ -1,63 +0,0 @@
-import AutoImport from 'unplugin-auto-import/vite'
-import { NaiveUiResolver } from 'unplugin-vue-components/resolvers'
-import Components from 'unplugin-vue-components/vite'
-
-import { defineConfig } from 'vite'
-import Uni from '@dcloudio/vite-plugin-uni'
-import UniKuRoot from '@uni-ku/root'
-import { resolve } from "path"
-export default async () => {
- const UnoCSS = (await import('unocss/vite')).default
-
- return defineConfig({
- envDir: './env', // 自定义env目录
- resolve: {
- alias: [
- {
- find: "@",
- replacement: resolve(__dirname, 'src')
- }
- ]
- },
- server: {
- host: '0.0.0.0', // 监听所有网络接口
- port: 2367,
- // 选项写法
- proxy: {
- '/pag': {
- target: 'https://cdn.tmui.design',
- changeOrigin: true,
- rewrite: (path) => path.replace(/^\/api/, '/api')
- },
- }
- },
- plugins: [
- Uni(),
- UniKuRoot(),
- UnoCSS(),
- AutoImport({
- imports: [
- 'vue',
- {
- 'naive-ui': [
- 'useDialog',
- 'useMessage',
- 'useNotification',
- 'useLoadingBar'
- ]
- }
- ]
- }),
- Components({
- resolvers: [NaiveUiResolver()]
- })
- ],
- css: {
- preprocessorOptions: {
- scss: {
- additionalData: `@import "@/static/css/color.scss";`,
- },
- },
- }
- })
-}