惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
AWS News Blog
AWS News Blog
V
Vulnerabilities – Threatpost
D
Darknet – Hacking Tools, Hacker News & Cyber Security
量子位
博客园 - 叶小钗
AI
AI
T
Tor Project blog
Forbes - Security
Forbes - Security
W
WeLiveSecurity
博客园_首页
爱范儿
爱范儿
J
Java Code Geeks
B
Blog
G
GRAHAM CLULEY
aimingoo的专栏
aimingoo的专栏
Cloudbric
Cloudbric
C
CXSECURITY Database RSS Feed - CXSecurity.com
TaoSecurity Blog
TaoSecurity Blog
L
LINUX DO - 热门话题
阮一峰的网络日志
阮一峰的网络日志
有赞技术团队
有赞技术团队
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Simon Willison's Weblog
Simon Willison's Weblog
云风的 BLOG
云风的 BLOG
Google DeepMind News
Google DeepMind News
H
Help Net Security
博客园 - 三生石上(FineUI控件)
C
Cisco Blogs
C
Cybersecurity and Infrastructure Security Agency CISA
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
P
Palo Alto Networks Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Recent Commits to openclaw:main
Recent Commits to openclaw:main
博客园 - 司徒正美
The Last Watchdog
The Last Watchdog
Blog — PlanetScale
Blog — PlanetScale
T
The Blog of Author Tim Ferriss
S
Secure Thoughts
Spread Privacy
Spread Privacy
F
Fortinet All Blogs
月光博客
月光博客
大猫的无限游戏
大猫的无限游戏
S
SegmentFault 最新的问题
H
Hackread – Cybersecurity News, Data Breaches, AI and More
A
About on SuperTechFans
Security Latest
Security Latest
Webroot Blog
Webroot Blog
Scott Helme
Scott Helme
Hugging Face - Blog
Hugging Face - Blog

博客园 - AABBbaby

从研发到供应链——轻量级CAD查看器SpinFire Insight在汽车行业的应用价值 DevExpress发布文档MCP Server:提升开发体验的AI文档智能服务(五) 基于嵌入向量的智能检索!HOOPS AI 解锁 CAD 零件相似性搜索新方式 从自研到外购:HOOPS如何帮助工业软件开发商加速上市、聚焦差异化 车企携手Tech Soft 3D:基于 HOOPS 工具集打造Web端一体化工程可视化解决方案 CAD格式转换引擎HOOPS Exchange v2026.2.0:计算镶嵌能力升级,释放3D数据处理新潜力 界面控件DevExpress JS & ASP.NET Core v25.2新版亮点 - AI驱动扩展功能升级 CAD格式转换引擎HOOPS Exchange 2026.2.0发布:率先支持 NX 2512,引领工业数据交换新标杆 界面组件DevExpress正式官宣发布v25.2.5|附高速下载 HOOPS Mesh、HOOPS Access 与 HOOPS Solve 发布 SAM 2.15:全面提升 CAE 数据处理与仿真互操作能力 DevExpress WPF中文教程:Data Grid - 服务器模式和即时反馈模式 界面控件DevExpress WinForms中文教程:Data Grid - 数据绑定(二) CAE后处理开发选商业还是开源工具?HOOPS Envision与VTK/ParaView深度对比 DevExpress发布文档MCP Server:提升开发体验的AI文档智能服务(四) 工业级可视化引擎HOOPS Visualize Web 2026.1.0重塑Web 3D可视化体验 界面控件DevExpress VCL v25.2新功能亮点:支持RAD Studio 13 HOOPS可视化技术如何推动SINTEF Ocean海洋结构仿真软件走向工程化应用? DevExpress WPF中文教程:Data Grid - 示例服务教程 突破性迈进 | HOOPS Exchange 2026.1正式发布DGN阅读器,全面开启 DGN 数据高保真访问时代 3D Web可视化引擎HOOPS Visualize Web v2026.1.0更新发布:持续增强Web端工程级3D可视化能力 应用程序主题研发有妙招!DevExtreme拥有多种预定义主题样式 界面组件DevExpress WPF v22.1 - 全新升级数据分析功能 移动应用开发推荐这个三方组件,时间选择即刻拥有全新体验 UI组件Kendo UI for Angular R3 2022亮点——让应用程序体验更酷炫 如何用界面组件DevExpress WPF创建Excel式的过滤功能?赶紧Get 响应式UI组件DevExtreme 10月新版——v22.1.6全新发布 界面控件DevExtreme中文使用指南——如何构建 & 应用模板 行业领先的界面控价DevExpress 10月新版——v22.1.6发布 「行业应用」界面框架Kendo UI助力企业加速完成财务数据可视化 如何用界面组件DevExpress WinForm创建一个支持High DPI的应用? 界面组件Telerik WinForm R3 2022,让应用启动变得更酷炫 界面组件DevExpress WinForms v22.1新版亮点 - 支持High-DPI UI组件Kendo UI for jQuery R3 2022亮点——拥有全新的按钮组件 界面组件DevExpress WPF TreeView中文指南 - 如何实现数据分层展示 「详解」看界面控件DevExtreme如何实现异步验证 界面控件DevExpress WinForm中文指南 - 使用HTML&CSS模板的条件样式 MyEclipse技术全面解析——Spring IDE,改变应用程序研发 界面组件DevExpress WinForms v22.1 - 类office功能全新升级 界面组件Telerik UI for WPF R3 2022——支持最新的.NET 7预览版 界面控件DevExpress WPF Data Grid组件,拥有XAML设计时项目源向导 B/S端界面控件DevExtreme React Scheduler—与Material UI无缝集成 来看界面组件DevExpress WinForm是如何实现地图搜索的 VCL界面组件DevExpress VCL v22.1 - 发布全新的Shell组件 响应式UI组件集DevExtreme v22.1.5,9月全新发布! 界面组件包DevExpress v22.1.5——9月全新发布 界面控件DevExtreme React Grid—如何将数据导出到Excel文档? 界面控件DevExpress WinForms - 有关.NET Core 6+的项目迁移说明 如何为WPF应用程序制作一个虚拟键盘?这里有答案(Part 2) Visual Studio插件DevExpress CodeRush v22.1- 支持C# 10 一篇文章教你如何用界面组件DevExpress WPF创建一个WPF视图模型 B/S架构下的界面控件DevExtreme甘特图有哪些功能?一起来看 界面控件DevExpress WinForms Property Grid - 全新的Office视图 界面组件DevExpress MAUI & Xamarin v22.1 - 全新的项目模板 界面组件DevExpress WPF Data Grid哪些功能还能增强?一起来看 如何为WPF应用程序制作一个虚拟键盘?这里有答案(Part 1) B/S端界面控件DevExtreme JavaScript—全新的UI模板库 (v22.2) 界面控件DevExpress WinForms & WPF v22.2——全新的.NET和ARM支持 跨平台UI组件DevExpress XAF v22.1 - 程序集默认面向 .NET 6 如何用界面组件DevExpress WPF Scheduler实现数据的按需加载?
Web开发者福音!创建第一个Vite支持的Web应用(2/2)
AABBbaby · 2022-08-29 · via 博客园 - AABBbaby

Vite 是一个基于开发服务器的构建工具,它在启动应用程序之前组装 JavaScript 代码,同时Vite还有助于在进行更改时减少加载速度,并允许您几乎可以立即查看结果。

在这篇文章中,我们将解决前端 Web 开发人员的需求,并向您展示如何使用 Vite 库来显着提高 Javascript 客户端应用程序的启动/更新速度。

Vite将代码创建为ES模块——现代浏览器可以用来加载JavaScript的模块,在依赖较大的情况下,Vite 会预先捆绑这些模块,以减少浏览器对 Web 服务器的请求数量。在以下部分中,我们将向您展示如何将Vite添加到由DevExtreme提供支持的React Reporting应用程序中。

在上文中,我们已为大家介绍如何创建示例DevExtreme应用、配置应用程序来使用Vite和DevExpress Reports,具体步骤可点击查看回顾>>

接下来我们将继续介绍如何添加DevExpress Document Viewer和Report Designer组件等。

添加DevExpress Document Viewer和Report Designer组件

添加Document Viewer的步骤

将 src/pages/document-viewer/document-viewer.tsx 文件内容替换为以下内容:

import React from 'react';
import ko from 'knockout';
import 'devexpress-reporting/dx-webdocumentviewer';
import './document-viewer.scss';

class ReportViewer extends React.Component {
constructor(props) {
super(props);
this.viewerRef = React.createRef();
this.reportUrl = ko.observable("Invoice");
this.requestOptions = {
host: "https://localhost:5001/",
invokeAction: "DXXRDV"
};
}
render() {
return (<div ref={this.viewerRef} data-bind="dxReportViewer: $data"></div>);
}
componentDidMount() {
ko.applyBindings({
reportUrl: this.reportUrl,
requestOptions: this.requestOptions
}, this.viewerRef.current);
}
componentWillUnmount() {
ko.cleanNode(this.viewerRef.current);
}
};

export default () => (
<React.Fragment>
<h2 className={'content-block'}>Document Viewer</h2>
<div className={'content-block'}>
<div className={'dx-card responsive-paddings'}>
<div style={{ width: "100%", height: "700px" }}>
<ReportViewer />
</div>
</div>
</div>
</React.Fragment>
);

以下属性指定报表名称:

this.reportUrl = ko.observable("Invoice");

主机指定服务器端应用地址:

host: https://localhost:5001/

最后在 src/pages/document-viewer/document-viewer.scss 页面添加如下内容:

@import url("../../../node_modules/jquery-ui/themes/base/all.css");
@import url("../../../node_modules/devextreme/dist/css/dx.material.orange.light.css");
@import url("../../../node_modules/@devexpress/analytics-core/dist/css/dx-analytics.common.css");
@import url("../../../node_modules/@devexpress/analytics-core/dist/css/dx-analytics.material.orange.light.css");
@import url("../../../node_modules/devexpress-reporting/dist/css/dx-webdocumentviewer.css");

添加DevExpress Report Designer的步骤

 src/pages/report-designer/report-designer.tsx 文件内容替换为以下内容:

import React from 'react';
import ko from 'knockout';
import 'devexpress-reporting/dx-reportdesigner';
import './report-designer.scss';

class ReportDesigner extends React.Component {
constructor(props) {
super(props);
this.designerRef = React.createRef();
this.reportUrl = ko.observable("Invoice");
this.requestOptions = {
host: "https://localhost:5001/",
getDesignerModelAction: "/DXXRD/GetDesignerModel"
};
}
render() {
return (<div ref={this.designerRef} data-bind="dxReportDesigner: $data"></div>);
}
componentDidMount() {
ko.applyBindings({
reportUrl: this.reportUrl,
requestOptions: this.requestOptions
}, this.designerRef.current);
}
componentWillUnmount() {
ko.cleanNode(this.designerRef.current);
}
};
export default () => (
<React.Fragment>
<h2 className={'content-block'}>Report Designer</h2>
<div className={'content-block'}>
<div className={'dx-card responsive-paddings'}>
<div style={{ width: "100%", height: "700px" }}>
<ReportDesigner />
</div>
</div>
</div>
</React.Fragment>
);

以下属性指定报表名称:

this.reportUrl = ko.observable("Invoice");

主机指定服务器端应用地址:

host: https://localhost:5001/

因此,将以下内容添加到 src/pages/report-designer/report-designer.scss 页面以完成此步骤:

@import url("../../../node_modules/jquery-ui/themes/base/all.css");
@import url("../../../node_modules/devextreme/dist/css/dx.material.orange.light.css");
@import url("../../../node_modules/@devexpress/analytics-core/dist/css/dx-analytics.common.css");
@import url("../../../node_modules/@devexpress/analytics-core/dist/css/dx-analytics.material.orange.light.css");
@import url("../../../node_modules/@devexpress/analytics-core/dist/css/dx-querybuilder.css");
@import url("../../../node_modules/devexpress-reporting/dist/css/dx-webdocumentviewer.css");
@import url("../../../node_modules/devexpress-reporting/dist/css/dx-reportdesigner.css");
运行报表后端应用程序

Web报表组件需要一个后端应用程序来存储和处理报告,运行后端应用程序以确定地址,并将该地址分别指定为 src/pages/document-viewer/document-viewer.tsx和src/pages/report-designer/report-designer中 ReportViewer和ReportDesigner组件的主机选项.tsx文件。

如果您刚刚创建了一个后端应用程序,可以从模板中创建一个TestReport,除了这个简单的报告,您还可以加载我们的发行版附带的报表。要加载报表,请在官方的WinForms Reporting演示中打开 Invoice 模块,切换到 Designer,然后将报表另存为REPX文件。在Visual Studio Report Designer中打开TestReport 报表,然后单击报表智能标记中的打开/导入以加载您保存的REPX文件。

运行客户端应用程序

确保后端应用程序正在运行,导航到devextreme-react-sample文件夹,然后执行以下命令:

npm install
npm run start

完成后,应用程序应如下所示:


DevExpress技术交流群6:600715373      欢迎一起进群讨论

更多DevExpress线上公开课、中文教程资讯请上中文网获取