设置默认控件属性

该示例展示了如何为设计器控件配置默认的属性值,可在下面的设计器界面上添加文本框来查看文本框预置的背景色,文本对齐,字体等属性,也可以打开帮助文档 获取更多信息。

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <title>ActiveReportsJS 示例</title> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <script src="/activereportsjs/demos/arjs/dist/ar-js-core.js"></script> <script src="/activereportsjs/demos/arjs/dist/ar-js-designer.js"></script> <script src="$DEMOROOT$/lib/purejs/license.js"></script> <link rel="stylesheet" type="text/css" href="/activereportsjs/demos/arjs/styles/ar-js-ui.css" /> <link rel="stylesheet" type="text/css" href="/activereportsjs/demos/arjs/styles/ar-js-designer.css" /> <style> #designer-host { width: 100%; height: 550px; } </style> </head> <body> <div id="designer-host"></div> <script> GC.ActiveReports.Core.FontStore.registerFonts( "/activereportsjs/demos/resource/fontsConfig.json" ); var defaultTemplates = { metricTemplates: [{ id: "templates/metric-template.rdlx-json" }], imperialTemplates: [{ id: "templates/imperial-template.rdlx-json" }], }; var designer = new GC.ActiveReports.ReportDesigner.Designer( "#designer-host", { customInitTemplates: defaultTemplates, language: "zh", } ); </script> </body> </html>