File tree Expand file tree Collapse file tree
src/pages/dashboard/Detail Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,5 +18,5 @@ fs.writeFileSync(
1818 return `VITE_IS_${ feat } =true` ;
1919 } ) ,
2020 '\n' ,
21- ) ,
21+ ) + `\nNODE_ENV=production` ,
2222) ;
Original file line number Diff line number Diff line change @@ -130,12 +130,12 @@ export default function DetailV2({ isPreview = false }: { isPreview?: boolean })
130130 const dashboardConfigs : any = JSONParse ( dashboard . configs ) ;
131131 dashboardConfigs . var = value ;
132132 // 更新变量配置
133- b && handleUpdateDashboardConfigs ( id , { configs : JSON . stringify ( dashboardConfigs ) } ) ;
133+ b && handleUpdateDashboardConfigs ( dashboard . id , { configs : JSON . stringify ( dashboardConfigs ) } ) ;
134134 // 更新变量配置状态
135135 if ( valueWithOptions ) {
136136 setVariableConfigWithOptions ( valueWithOptions ) ;
137137 setDashboardMeta ( {
138- dashboardId : id ,
138+ dashboardId : _ . toString ( dashboard . id ) ,
139139 variableConfigWithOptions : valueWithOptions ,
140140 } ) ;
141141 }
@@ -149,8 +149,8 @@ export default function DetailV2({ isPreview = false }: { isPreview?: boolean })
149149 } , [ id ] ) ;
150150
151151 useInterval ( ( ) => {
152- if ( import . meta. env . PROD ) {
153- getDashboardPure ( id ) . then ( ( res ) => {
152+ if ( import . meta. env . PROD && dashboard . id ) {
153+ getDashboardPure ( _ . toString ( dashboard . id ) ) . then ( ( res ) => {
154154 if ( updateAtRef . current && res . update_at > updateAtRef . current ) {
155155 if ( editable ) setEditable ( false ) ;
156156 } else {
You can’t perform that action at this time.
0 commit comments