随笔分类 -  vue3

摘要:import { onUnmounted, ref } from 'vue' /** * onReachBottomFn :滚动加载函数 * reachBottomDistance : 距离底部多少距离时触发 */ function useScrollBottom(onReachBottomFn, 阅读全文 »
posted @ 2025-03-03 18:13 wjs0509 阅读(6) 评论(0) 推荐(0) 编辑
摘要:sse流式接口请求一般可以使用插件:@microsoft/fetch-event-source sendMessage(content, userChatId, voice = 1) { const obj = { text: "", showSuggestion: false, role: "ai 阅读全文 »
posted @ 2025-01-16 17:14 wjs0509 阅读(40) 评论(0) 推荐(0) 编辑
摘要:基于父元素的宽度计算是否需要展示el-tooltip <template> <el-tooltip class="item" :effect="effect" :content="content" placement="top-start" :disabled="showPopper"> <slot 阅读全文 »
posted @ 2024-05-09 15:59 wjs0509 阅读(251) 评论(0) 推荐(0) 编辑
摘要:使用 vite-plugin-seo-prerender 做页面预渲染 安装 vite-plugin-seo-prerender 解决打包多个页面 yarn add vite-plugin-seo-prerender -D 配置vite.config文件 import seoPrerender fr 阅读全文 »
posted @ 2024-02-29 09:43 wjs0509 阅读(719) 评论(0) 推荐(0) 编辑
摘要:node版本: =14.21.3 || >=16.0.0 一、配置ESlint 1.1 安装eslint npm install eslint -D 1.2 初始化eslint,生成配置文件 npx eslint --init 1.3 在编辑器安装ESlint插件 1.4 通过执行命令检测文件代码规 阅读全文 »
posted @ 2023-12-19 15:39 wjs0509 阅读(892) 评论(0) 推荐(0) 编辑
摘要:1. 首先需要安装vite-plugin-html插件 yarn add vite-plugin-html -D or npm install vite-plugin-html -D 2. 在vite.config.ts文件中增加如下代码: import { createHtmlPlugin } f 阅读全文 »
posted @ 2023-12-09 17:50 wjs0509 阅读(359) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示