我正在尝试按照此处的说明加载Radium(这是一个内联css的javascript库).
在app.browserify.js:Radium = require("radium");.
在package.json:"radium": "0.13.4"
但是,当我尝试在应用程序中的js中使用Radium时,内联css不起作用.Chrome开发工具表明了这一点Radium = module.exports(ComposedComponent)..
我假设这应该是一个对象,考虑到我以相同方式加载的ReactPIXI,工作正常,开发工具说ReactPIXI = Object {factories: Object}.
这是我的代码:
AppBody = React.createClass({
mixins: [ReactMeteorData, Navigation, State, Radium.StyleResolverMixin,
Radium.BrowserStateMixin],
render: function() {
var self = this;
var styles = {
base: {
color: this.state.fontColor,
background: 'red',
states: [
{hover: {background: 'blue', color: 'red'}},
{focus: {background: 'pink', outline: 'none', color: 'yellow'}}
]
//also tried
//':hover': {background: 'blue', color: 'red'},
//':focus': {background: 'pink', outline: …Run Code Online (Sandbox Code Playgroud) 所以,首先我要预先知道这个问题,我知道之前已经问过这个问题,它是在.NET解决方案中查找未使用的资源,我觉得它已经很老了,对我目前的情况没什么价值.
首先是这个解决方案的规格和要求,以满足我的需求.