上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 100 下一页
摘要: let isFull = document.fullscreenElement if(!isFull){ // 不是全屏,设置全屏 document.documentElement.requestFullscreen() } else { // 全屏,退出全屏 document.exitFullsc 阅读全文
posted @ 2025-03-29 13:15 市丸银 阅读(50) 评论(0) 推荐(0)
摘要: 1、引入 import {nextTick} from "vue" 2、使用 nextTick(() => { // 内容 }) 阅读全文
posted @ 2025-03-29 13:02 市丸银 阅读(41) 评论(0) 推荐(0)
摘要: 一、册全局组件 el-icon // main.ts // 如果您正在使用CDN引入,请删除下面一行。 import * as ElementPlusIconsVue from '@element-plus/icons-vue' const app = createApp(App) for (con 阅读全文
posted @ 2025-03-28 10:07 市丸银 阅读(85) 评论(0) 推荐(0)
摘要: 一、安装依赖 npm install sass-embedded 二、配置全局变量 1、新建文件 src/styles/variables.scss 2、配置Vite 修改 vite.config.js css: { preprocessorOptions: { scss: { additional 阅读全文
posted @ 2025-03-22 17:21 市丸银 阅读(1489) 评论(0) 推荐(0)
摘要: 一、自定义插件 参考: 1、创建 src/components/index.ts 2、内容 import SvgIcon from './SvgIcon.vue' // 全部全局组件 const allGloablComponent = { SvgIcon, } export default { i 阅读全文
posted @ 2025-03-22 16:41 市丸银 阅读(259) 评论(0) 推荐(0)
摘要: 一、新建文件 .env.development .env.production .env.test 开发、生产、测试 二、文件内容 1、开发 # 变量必须以 VITE_ 为前缀才能暴露给外部读取 NODE_ENV = 'development' VITE_APP_TITLE = 'developme 阅读全文
posted @ 2025-03-22 11:13 市丸银 阅读(232) 评论(0) 推荐(0)
摘要: 一、SVG图标配置 1、安装依赖 npm install vite-plugin-svg-icons 2、在vite.config.ts中配置插件 import { fileURLToPath, URL } from 'node:url' import VueSetupExtend from 'vi 阅读全文
posted @ 2025-03-22 10:54 市丸银 阅读(372) 评论(0) 推荐(0)
摘要: 1、文件 vite.config.ts 2、注释 阅读全文
posted @ 2025-03-22 09:48 市丸银 阅读(891) 评论(0) 推荐(0)
摘要: 1、安装 npm i -g pnpm 2、创建项目 pnpm create vite 阅读全文
posted @ 2025-03-22 08:20 市丸银 阅读(110) 评论(0) 推荐(0)
摘要: 一、概念 在定义函数、类、接口时,使用类型参数来表示未指定的类型,在使用时,指定具体的类型 二、函数 1、单个泛型 // 在定义函数时,用类型参数,代表类型,在具体使用是指定具体类型 function printData<T>(data:T):T{ console.log(data); return 阅读全文
posted @ 2025-03-21 18:37 市丸银 阅读(34) 评论(0) 推荐(0)
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 100 下一页