随笔分类 - 前端
摘要:const mockData = await getVersion_summary_detail({ "client": searchForm?.client || "", }); searchForm 为变量 searchForm?.client - 可选链操作符(Optional Chainin
阅读全文
摘要:<template> <div class="calendar"> <div class="calendar-header"> <button @click="prevMonth">上一月</button> <span>{{ currentYear }}年{{ currentMonth + 1 }}
阅读全文
摘要:父组件 <template> <div style="display: flex; justify-content: center"> <LineChart :style="{ top: '10px', left: '120px', margin: '0px 90px 0px -150px', }"
阅读全文
摘要:<template> <div class="chat-container"> <div class="chat-messages"> <div v-for="(msg, index) in messages" :key="index" class="message" :class="{ 'ai-m
阅读全文
摘要:一、路由 https://blog.csdn.net/qq_43720551/article/details/136333256 使用`lazy`和`Suspense`组件进行懒加载,以提高初始加载速度。通过`import()`动态导入模块,当LazyComponent加载较慢时,会显示备用UI,直
阅读全文
摘要:https://blog.51cto.com/u_16213674/8947330 https://www.cnblogs.com/wangyingblock/p/15062284.html https://www.cnblogs.com/China-Dream/p/13883153.html
阅读全文
摘要:<!DOCTYPE html> <html> <head> <title>带有额外列的表格示例</title> <style> /* 可选的CSS,用于美化表格 */ table { width: 100%; border-collapse: collapse; } th, td { border:
阅读全文
摘要:安装vue-quill-editor npm install vue-quill-editor --save 注意:1. 一定不要忘了 -save ,否则的话可能会导致富文本框加载失败2. 安装完成之后,查看package.json文件中的dependencies里是否有安装好的vue-quill-
阅读全文
摘要:import * as React from "react" // 接收参数 interface IProps{ work?:string } interface State { //名字可以随便起 date: string; // 定义 state 的结构 } export default cla
阅读全文
摘要:数组传递 Hello.tsx import * as React from "react" #组件接收的变量 interface IProps{ title:string, age:number, work?:string #通过增加?确定他为可选项参数(调用时可以不传) } export defa
阅读全文
摘要:教程地址: https://www.bilibili.com/video/BV1FA411i7PD 项目创建和启动 cnpm install -g create-react-app npx create-react-app myapp --template typescript vscode插件 T
阅读全文
摘要:vue.config.js module.exports = { // 解决首页访问出现很多预加载文件的问题 chainWebpack: config => { // 移除 prefetch 插件 config.plugins.delete('prefetch') // 或者 // 修改它的选项:
阅读全文
摘要:vue.config.js module.exports = { configureWebpack:{ externals: { 'element-ui': 'ELEMENT', vue: 'Vue' }} //externals 配置来告诉 Webpack 不要打包它。 index.html <!
阅读全文
摘要:npm install --save vue-clipboard2 import VueClipBoard from 'vue-clipboard2' Vue.use(VueClipBoard) value即是要复制的内容 <button @click="seccendCopy">第二种方式复制</
阅读全文
摘要:https://www.bilibili.com/video/BV1Z44y1K7Fj?p=7&vd_source=caabcbd2a759a67e2a3de8acbaaf08ea
阅读全文
摘要:1,路由组件的基本实现 使用React构建的单页面应用,要想实现页面间的跳转,首先想到的就是使用路由。在React中,常用的有两个包可以实现这个需求,那就是react-router和react-router-dom。本文主要针对react-router-dom进行说明。 安装: 首先进入项目目录,使
阅读全文
摘要:https://blog.csdn.net/weixin_44856917/article/details/128818158 <template> <div> <!-- // 小图标 --> <a-button @click="enlarge">双击放大</a-button> <div id="m
阅读全文
摘要:官网: https://mermaid.js.org/syntax/flowchart.html 例子: https://blog.csdn.net/weixin_55508765/article/details/125735923 https://blog.csdn.net/weixin_4595
阅读全文