|
|
@ -47,9 +47,12 @@ |
|
|
|
<!-- 示例插件2 id=100--> |
|
|
|
<button class="bg-blue-500 py-2 px-5 rounded text-white" onclick="p100.show()">测试组建2</button> |
|
|
|
|
|
|
|
<div data-pid="1402932548627206144" data-uid="1323567842540523520" data-rid="rid333" data-tid="tid444" data-did="did555" style="height:40px;width:100px"> |
|
|
|
<div data-root="p102" style="height:100%;width:100"> |
|
|
|
<img style="height:100%;width:100" onclick="p102.jumpDetails()" src="https://img2.baidu.com/it/u=3960470193,627689163&fm=26&fmt=auto&gp=0.jpg"> |
|
|
|
<div data-tname="会诊" data-pid="1402932548627206144" data-uid="1323567842540523520" data-rid="rid333" data-tid="tid444" data-did="did555" style="height:26px;width:150px"> |
|
|
|
<div data-root="p103" style="height:100%;width:100%;display: flex;justify-content: space-between;align-items:center" onclick="p103.jumpDetails(this)"> |
|
|
|
<div style="flex:1;font-size:22px;font-weight: 600;"></div> |
|
|
|
<div style="height:100%"> |
|
|
|
<img style="height:100%;width:100%" src="https://www.tall.wiki/staticrec/photos/right.png"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
@ -60,11 +63,19 @@ |
|
|
|
alert(this.name) |
|
|
|
} |
|
|
|
} |
|
|
|
const p102 = { |
|
|
|
jumpDetails() { |
|
|
|
;(function() { |
|
|
|
var dom = document.querySelector('div[data-root=p103]') |
|
|
|
var domBox = dom.parentNode; |
|
|
|
var domChild = document.querySelectorAll('div[data-root=p103]>div'); |
|
|
|
domChild[0].innerHTML = domBox.getAttribute('data-tname'); |
|
|
|
})() |
|
|
|
const p103 = { |
|
|
|
jumpDetails(that) { |
|
|
|
console.log(that.parentNode.getAttribute('data-tname')) |
|
|
|
console.log(that.parentNode.getAttribute('data-pid')) |
|
|
|
location.href = 'https://www.baidu.com' |
|
|
|
} |
|
|
|
}; |
|
|
|
} |
|
|
|
</script> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|