广告牌添加属性框
This commit is contained in:
@ -1,6 +1,13 @@
|
||||
class cy_tabs {
|
||||
constructor(id, clickTabCallBack, sdk) {
|
||||
let elm = document.getElementById(id);
|
||||
constructor(boxElm, clickTabCallBack, sdk) {
|
||||
let elm
|
||||
if(typeof boxElm === 'string') {
|
||||
elm = document.getElementById(boxElm);
|
||||
}
|
||||
else {
|
||||
elm = boxElm
|
||||
}
|
||||
// let elm = document.getElementById(id);
|
||||
let pane = elm.getElementsByTagName('DIV-cy-tab-pane')
|
||||
|
||||
let tabTop = `<div class="DIV-cy-tab-top">`
|
||||
@ -37,7 +44,9 @@
|
||||
tabContent = tabContent + `</div>`
|
||||
|
||||
let BoxElm = document.createElement('div');
|
||||
BoxElm.setAttribute('id', id)
|
||||
if(typeof boxElm === 'string') {
|
||||
BoxElm.setAttribute('id', boxElm)
|
||||
}
|
||||
BoxElm.setAttribute('class', 'DIV-cy-tabs')
|
||||
BoxElm.innerHTML = tabTop + tabContent
|
||||
elm.parentNode.insertBefore(BoxElm, elm);
|
||||
|
Reference in New Issue
Block a user