发布时间:2026/8/3 19:24:54
Material-UI使用 1、安装npm install mui/material emotion/react emotion/styled npm install mui/x-data-grid2、表格使用DataGrid组件时其模型中需要有属性id有CheckBox时使用onSelectionModelChange方法来监听选择的变化。返回的新选择模式是属性id3、时间轴组件需要安装mui/labnpm install mui/lab4、MUI System(v9.2)4.1 styled方法输入为tag, inputOptions {}taginputOptions输出为函数muiStyledResolver其输入为expressionsInput返回值为Componentconst muiStyledResolver (...expressionsInput) { const expressionsHead []; const expressionsBody expressionsInput.map(transformStyle); const expressionsTail []; // Preprocess props to set the scoped theme value. // This must run before any other expression. expressionsHead.push(styleAttachTheme); if (componentName overridesResolver) { expressionsTail.push(function styleThemeOverrides(props) { const theme props.theme; const styleOverrides theme.components?.[componentName]?.styleOverrides; if (!styleOverrides) { return null; } const resolvedStyleOverrides {}; // TODO: v7 remove iteration and use resolveStyleArg(styleOverrides[slot]) directly // eslint-disable-next-line guard-for-in for (const slotKey in styleOverrides) { resolvedStyleOverrides[slotKey] processStyle( props, styleOverrides[slotKey], props.theme.modularCssLayers ? theme : undefined, ); } return overridesResolver(props, resolvedStyleOverrides); }); } if (componentName !skipVariantsResolver) { expressionsTail.push(function styleThemeVariants(props) { const theme props.theme; const themeVariants theme?.components?.[componentName]?.variants; if (!themeVariants) { return null; } return processStyleVariants( props, themeVariants, [], props.theme.modularCssLayers ? theme : undefined, ); }); } if (!skipSx) { expressionsTail.push(styleFunctionSx); } // This function can be called as a tagged template, so the first argument would contain // CSS string[] values. if (Array.isArray(expressionsBody[0])) { const inputStrings expressionsBody.shift(); // We need to add placeholders in the tagged template for the custom functions we have // possibly added (attachTheme, overrides, variants, and sx). const placeholdersHead new Array(expressionsHead.length).fill(); const placeholdersTail new Array(expressionsTail.length).fill(); let outputStrings; // prettier-ignore { outputStrings [...placeholdersHead, ...inputStrings, ...placeholdersTail]; outputStrings.raw [...placeholdersHead, ...inputStrings.raw, ...placeholdersTail]; } // The only case where we put something before attachTheme expressionsHead.unshift(outputStrings); } const expressions [...expressionsHead, ...expressionsBody, ...expressionsTail]; const Component defaultStyledResolver(...expressions); if (tag.muiName) { Component.muiName tag.muiName; } if (process.env.NODE_ENV ! production) { Component.displayName generateDisplayName(componentName, componentSlot, tag); } return Component; };5、组件(v4)5.1 Card卡片集成内容和操作CardContentCardActions参考资料安装 - MUIGitHub - mui-org/material-ui at v5.1.0

相关新闻

2026/8/3 19:24:54

Unity-Weld MVVM框架:数据绑定与UI开发效率提升实践

1. 项目概述:为什么Unity-Weld值得你花时间研究? 如果你正在用Unity做UI,尤其是那种数据驱动、需要频繁更新的界面,比如一个实时显示玩家状态的HUD、一个动态刷新的背包列表,或者一个复杂的设置面板,那你大…

2026/8/3 19:24:54

从Unix Pipe到Go Channel:深入解析管道模式在并发与系统设计中的应用

1. 从“管道”到“管道”:一个后端工程师的PIPE学习心路 最近在梳理一个老项目的日志处理模块时,遇到了一个典型的性能瓶颈:主业务线程需要将大量实时生成的日志条目,异步地、可靠地写入到远端的日志分析服务。最初的实现简单粗暴…

2026/8/3 19:24:54

基于LangGraph 搭建的 Agent 架构图

一个完整的 Agent,到底是怎么运行的? 这张图梳理了基于 LangGraph 搭建 Agent 的核心流程:从用户任务输入、State 状态初始化,到大模型理解任务、调用工具、处理结果、条件判断,再到最终输出。 同时还包含记忆管理、知…

2026/8/3 20:09:56

YOLOv11改进 | 主干/Backbone篇 | 目标检测网络FasterNeT轻量化网络助力yolov11改进(提高FPS和检测效率)

一、本文介绍 本文给大家带来的改进机制是FasterNet网络,将其用来替换我们的特征提取网络,其旨在提高计算速度而不牺牲准确性,特别是在视觉任务中。它通过一种称为部分卷积(PConv)的新技术来减少冗余计算和内存访问。这种方法使得FasterNet在多种设备上运行速度比其他网络…

2026/8/3 20:09:56

Vue Router导航守卫重定向死循环:原理、调试与最佳实践

1. 项目概述:导航守卫中的重定向死循环 在Vue.js的单页应用开发中, vue-router 的导航守卫(Navigation Guards)是实现路由权限控制、数据预加载和页面跳转逻辑的核心机制。然而,许多开发者,包括我自己&am…

2026/8/3 20:09:56

嵌入式开发

文章目录零、学习大纲一、嵌入式驱动开发1.具体情况2.RTOS:FreeRTOS二、Linux驱动开发零、学习大纲 了解GPIO协议、I2C协议、SPI Flash、WatchDog、FreeRTOS、CAN总线、串口编程 一、嵌入式驱动开发 1.具体情况 1.就业单位: (1)主控芯片原厂&#xff…

2026/8/3 20:09:56

行为树实战:从状态机到py_trees,掌握AI决策核心与Fallback节点精髓

1. 从状态机到行为树:为什么我们需要更灵活的决策逻辑如果你做过机器人、游戏AI或者任何需要复杂行为逻辑的项目,大概率用过状态机。状态机是个好东西,它把行为拆分成一个个离散的状态,通过事件触发状态转移,逻辑清晰&…

2026/8/3 20:09:56

Base16/32/64多层编码破解技术与实战应用

1. 项目概述 Base16/32/64多层随机编码破解是一个典型的编码逆向工程实战项目。这类技术常见于安全研究、数字取证和渗透测试领域,主要用于处理经过多重编码混淆的数据。我在实际工作中遇到过不少案例:从恶意软件分析中提取的混淆payload,到网…

2026/8/3 20:04:56

3个微信小程序调试的巧妙技巧,让你的开发效率翻倍!

3个微信小程序调试的巧妙技巧,让你的开发效率翻倍! 【免费下载链接】WMPFDebugger Yet another WeChat miniapp debugger on Windows 项目地址: https://gitcode.com/gh_mirrors/wm/WMPFDebugger 你是不是也遇到过这样的烦恼?在微信小…

2026/8/2 0:02:18

如何用免费工具突破游戏窗口限制:SRWE完整使用指南

如何用免费工具突破游戏窗口限制:SRWE完整使用指南 【免费下载链接】SRWE Simple Runtime Window Editor 项目地址: https://gitcode.com/gh_mirrors/sr/SRWE 你是否遇到过这样的困扰?想为心爱的游戏截图,却发现游戏不支持自定义分辨率…

2026/8/2 1:52:02

实测才敢推 AI论文网站 2026最新测评与推荐

2026年真正好用的AI论文网站,核心看生成的论文质量、低AI味、格式正确、学术适配四大指标。综合实测,千笔AI、ThouPen、豆包、DeepSeek、Grammarly 是当前最值得推荐的梯队,覆盖从免费到付费、从中文到英文、从文科到理工的全场景需求。一、综…

2026/8/3 13:26:41

2026必备!AI论文网站测评:最新推荐与深度对比

2026年真正好用的AI论文网站,核心看生成的论文质量、低AI味、格式正确、学术适配四大指标。综合实测,千笔AI、ThouPen、豆包、DeepSeek、Grammarly 是当前最值得推荐的梯队,覆盖从免费到付费、从中文到英文、从文科到理工的全场景需求。 一、…

2026/8/3 16:43:13

摆脱论文困扰!盘点2026年全网爆红的的AI论文写作工具

一天写完毕业论文在2026年已不再是天方夜谭。2026年最炸裂、实测能大幅提速的AI论文写作工具,覆盖选题构思、文献整理、内容生成、格式排版等核心场景,真正帮你高效搞定论文难题。 一、全流程王者:一站式搞定论文全链路(一天定稿首…