我尝试在使用react-native-flexmonster的应用程序上隐藏/删除工具栏部分( CSV、JSON、OLAP等),如下图所示:

我试过this,但没有成功
下面是我的代码:
<FlexmonsterReactNative.Pivot
container= "pivot-container"
toolbar={false}
report = {{
dataSource: {
filename: "data/data.csv"
},
slice: {
columns: [{
uniqueName: "Color"
}],
rows: [{
uniqueName: "Country"
}, {
uniqueName: "[Measures]"
}],
measures: [{
uniqueName: "Price",
format: "currency"
}, {
uniqueName: "Discount",
format: "currency"
}],
},
formats: [{
name: "currency",
currencySymbol: "$",
currencySymbolAlign: "left",
thousandsSeparator: ",",
decimalPlaces: 2
}],
conditions: [{
formula: "#value < 2000",
measure: "Discount",
format: {
backgroundColor: "#CCFFCC",
}
}, {
formula: "AND(#value > 2000, #value < 4000)",
measure: "Discount",
format: {
backgroundColor: "#FFFF99",
}
}]
}}
/>发布于 2020-05-19 17:58:32
在使用其模块时,Flexmonster提供的一些功能在React Native中不可用,因为它对JavaScript的执行施加了一些限制。
它包括启用/禁用工具栏。
即使这样,也可以以调整所需配置的方式修改模块本身。
例如,使用以下方法可以实现禁用工具栏的可能性:
下载前面提到的模块,以创建的实例的工具栏属性设置为false的方式修改以下代码片段:https://github.com/flexmonster/react-native-flexmonster/blob/f8d0f7fd6614c06e1a31585c8b8cbe22e3bc653e/src/index.js#L360-L371。
例如:
<script>
new Flexmonster({
container: "#pivot-container",
componentFolder: "<https://cdn.flexmonster.com/>",
toolbar: false,
height: ${height},
width: ${width},
report: JSON.parse('${JSON.stringify(this.props.report)}')
});
${this.registerEvents()}
</script>请注意,如果需要这样的方法,请手动下载并连接模块,而不是通过npm安装。
https://stackoverflow.com/questions/61244906
复制相似问题