Open xiaodanlee opened 6 years ago
`import datas from '../datas.js';
export default class Button{ constructor(btnName,ind){ this.btnName = btnName; this.ind = ind; } display(){ let list = datas.buttonList; return (<div style="border:1px solid black;" onclick="myTest(["${datas.buttonList}"],${this.ind})" id="btns_"+${this.btnName}>${this.btnName}</div>); }
<div style="border:1px solid black;" onclick="myTest(["${datas.buttonList}"],${this.ind})" id="btns_"+${this.btnName}>${this.btnName}</div>
}`
` import Button from "./button/button"; import datas from './datas.js'
export default class ButtonList{ constructor(){
} display(){ return (`
`)
} } `
export default { buttonList:["button1","button2","button3"] }
`
`import datas from '../datas.js';
export default class Button{ constructor(btnName,ind){ this.btnName = btnName; this.ind = ind; } display(){ let list = datas.buttonList; return (
<div style="border:1px solid black;" onclick="myTest(["${datas.buttonList}"],${this.ind})" id="btns_"+${this.btnName}>${this.btnName}</div>
); }}`
` import Button from "./button/button"; import datas from './datas.js'
export default class ButtonList{ constructor(){
} display(){ return (`
} } `
export default { buttonList:["button1","button2","button3"] }
`
`