# tm-data-room **Repository Path**: zychhf/tm-data-room ## Basic Information - **Project Name**: tm-data-room - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-06-09 - **Last Updated**: 2025-06-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 自定义系统组件标准配置 nodejs 18.X 说明:setting 中的《维度》 和 《指标》是必须的(在需要数据集的情况下), ```js import baseOption from './baseOption'; import { displayOption } from 'data-room-ui/js/config'; // 配置版本号 const version = '20240401'; const title = '自定义Options'; // 右侧配置项 const setting = [ { label: '维度', // 设置组件类型, select / input / colorPicker type: 'select', // 字段 field: 'xField', optionField: 'xField', // 对应options中的字段 // 是否多选 multiple: false, // 绑定的值 value: '', // tab页。 data: 数据, custom: 自定义 tabName: 'data', }, { label: '指标', // 设置组件类型 type: 'select', // 字段 field: 'yField', // 对应options中的字段 optionField: 'yField', // 是否多选 multiple: false, value: '', tabName },: 'data', { label: '自定义Options', type: 'textarea', field: 'customize_option', optionField: 'getOption', direction: 'column', value: `return ${JSON.stringify(baseOption)}`, tabName: 'custom', }, { label: '打开编辑器', title: '在编辑器中编辑', type: 'button', event: 'openEdit', tabName: 'custom', }, ]; // 模拟数据 const data = []; const option = { // 数据 data: data, xField: '', yField: '', seriesField: '', // 自定义组件其他属性 getOption: '', // 如果要选择数据集类型,下面配置是必须的; // 如果只有单纯的数据集,则不需要下面的代码 displayOption: { ...displayOption, expression: { enable: true, }, }, // 如果不需要数据集 displayOption: { dataAllocation: { enable: false } } }; export default { version, title, setting, option, }; ```