Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit166bc26

Browse files
author
minjk-bl
committed
Edit Import app
1 parent4b52c7c commit166bc26

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

‎visualpython/js/m_apps/Import.js‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,27 @@ define([
2222

2323
constimportTemplates={
2424
'data-analysis':[
25-
{i0:'numpy',i1:'np',type:'module'},
26-
{i0:'pandas',i1:'pd',type:'module'},
25+
{i0:'numpy',i1:'np',type:'module',checked:'checked'},
26+
{i0:'pandas',i1:'pd',type:'module',checked:'checked'},
2727
{
2828
i0:'matplotlib.pyplot',i1:'plt',type:'module'
2929
,include:[
3030
'%matplotlib inline'
31-
]
31+
],checked:'checked'
3232
},
33-
{i0:'seaborn',i1:'sns',type:'module'},
33+
{i0:'seaborn',i1:'sns',type:'module',checked:'checked'},
3434
{
3535
i0:'plotly.express',i1:'px',type:'module'
3636
,include:[
3737
'from plotly.offline import init_notebook_mode',
3838
'init_notebook_mode(connected=True)'
39-
],checked:false
39+
],checked:''
4040
},
41-
{i0:'pyarrow',i1:'pa',type:'module',checked:false},
41+
{i0:'pyarrow',i1:'pa',type:'module',checked:''},
4242
],
4343
'machine-learning':[
44-
{i0:'sklearn.model_selection',i1:'train_test_split',type:'function'},
45-
{i0:'sklearn',i1:'metrics',type:'function'}
44+
{i0:'sklearn.model_selection',i1:'train_test_split',type:'function',checked:'checked'},
45+
{i0:'sklearn',i1:'metrics',type:'function',checked:'checked'}
4646
]
4747
}
4848

@@ -175,9 +175,9 @@ define([
175175
letthat=this;
176176
libraries&&libraries.forEach((lib,idx)=>{
177177
if(lib.type=='function'){
178-
page.appendLine(that.templateForFunction(idx,lib.i0,lib.i1,lib.checked));
178+
page.appendLine(that.templateForFunction(idx,lib.i0,lib.i1,lib.checked==='checked'));
179179
}else{
180-
page.appendLine(that.templateForModule(idx,lib.i0,lib.i1,lib.checked));
180+
page.appendLine(that.templateForModule(idx,lib.i0,lib.i1,lib.checked==='checked'));
181181
}
182182
});
183183
page.appendLine('</tbody>');
@@ -246,7 +246,7 @@ define([
246246
if(pacI0==""){
247247
continue;
248248
}
249-
if(pacChecked){
249+
if(pacChecked===true){
250250
if(sbCode.toString().trim().length>0){
251251
sbCode.appendLine();
252252
}
@@ -270,7 +270,7 @@ define([
270270
}
271271
}
272272

273-
importMeta.push({i0:pacI0,i1:pacI1,type:pacType,checked:pacChecked});
273+
importMeta.push({i0:pacI0,i1:pacI1,type:pacType,checked:(pacChecked?'checked':'')});
274274
}
275275
this.state.importMeta=importMeta;
276276

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp