您好我有一个reactjs应用程序,我用bellow命令构建我的项目
npm build
Run Code Online (Sandbox Code Playgroud)
这是我的package.json档案:
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"},
Run Code Online (Sandbox Code Playgroud)
在构建之后我有包含构建文件和index.html文件的文件夹但是这个.html中的所有路径都是绝对的,我想用相对路径构建
例如(index.html):现在我有:
Run Code Online (Sandbox Code Playgroud)<script type="text/javascript" src="/static/js/main.af2bdfd5.js"></script> <link href="/static/css/main.097da2df.css" rel="stylesheet"> <link rel="shortcut icon" href="/favicon.ico">
我要这个:
Run Code Online (Sandbox Code Playgroud)<script type="text/javascript" src="./static/js/main.af2bdfd5.js"></script> <link href="./static/css/main.097da2df.css" rel="stylesheet"> <link rel="shortcut icon" href="./favicon.ico">
我有公式,并希望执行它时,店这viewModel是changeData。
当我这样做时,当存储中的数据发生变化时,公式不起作用
stores: {
currentStore: {
extend: 'Ext.store.MyStore',
trackRemoved: false
},
},
formulas: {
'executeWhenStoreChange': {
bind: '{currentStore}',
get: function () {
console.log('store change')
},
Run Code Online (Sandbox Code Playgroud)