上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 98 下一页
摘要: 一、册全局组件 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 市丸银 阅读(74) 评论(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 市丸银 阅读(1422) 评论(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 市丸银 阅读(247) 评论(0) 推荐(0)
摘要: 一、新建文件 .env.development .env.production .env.test 开发、生产、测试 二、文件内容 1、开发 # 变量必须以 VITE_ 为前缀才能暴露给外部读取 NODE_ENV = 'development' VITE_APP_TITLE = 'developme 阅读全文
posted @ 2025-03-22 11:13 市丸银 阅读(215) 评论(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 市丸银 阅读(359) 评论(0) 推荐(0)
摘要: 1、文件 vite.config.ts 2、注释 阅读全文
posted @ 2025-03-22 09:48 市丸银 阅读(865) 评论(0) 推荐(0)
摘要: 1、安装 npm i -g pnpm 2、创建项目 pnpm create vite 阅读全文
posted @ 2025-03-22 08:20 市丸银 阅读(101) 评论(0) 推荐(0)
摘要: 一、概念 在定义函数、类、接口时,使用类型参数来表示未指定的类型,在使用时,指定具体的类型 二、函数 1、单个泛型 // 在定义函数时,用类型参数,代表类型,在具体使用是指定具体类型 function printData<T>(data:T):T{ console.log(data); return 阅读全文
posted @ 2025-03-21 18:37 市丸银 阅读(24) 评论(0) 推荐(0)
摘要: 一、特点 1、接口可以被实现,接口不能实例化,没有自己的方法 2、一个类可以实现多个接口 3、接口可以继承接口 3、同名接口可以组合 4、定义类和对象的结构 二、定义类的接口 1、接口不能实例化,没有自己的方法,属性和方法都要被类实现 2、案例 interface PersonInterface{ 阅读全文
posted @ 2025-03-20 22:23 市丸银 阅读(47) 评论(0) 推荐(0)
摘要: 一、概念 1、抽象类不能实例化,可以被继承,抽象类有普通方法和抽象方法 2、特点 抽象方法和属性必须被继承,普通方法不用 3、案例 abstract class Package { constructor(public weight:number) {} abstract calculate():n 阅读全文
posted @ 2025-03-20 19:57 市丸银 阅读(44) 评论(0) 推荐(0)
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 98 下一页