Compare commits

...

6 Commits

  1. 23
      index.html
  2. 12
      package-lock.json

23
index.html

@ -47,6 +47,15 @@
<!-- 示例插件2 id=100-->
<button class="bg-blue-500 py-2 px-5 rounded text-white" onclick="p100.show()">测试组建2</button>
<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="p1419895828960780288" style="height:100%;width:100%;display: flex;justify-content: space-between;align-items:center" onclick="p1419895828960780288.jumpDetails(this)">
<div style="flex:1;font-size:22px;"></div>
<div style="height:100%">
<img style="height:100%;width:100%" src="https://www.tall.wiki/staticrec/photos/right.png">
</div>
</div>
</div>
<script>
const p100 = {
name: 'hello tall plugin',
@ -54,6 +63,19 @@
alert(this.name)
}
}
;(function() {
var dom = document.querySelector('div[data-root=p1419895828960780288]')
var domBox = dom.parentNode;
var domChild = document.querySelectorAll('div[data-root=p1419895828960780288]>div');
domChild[0].innerHTML = domBox.getAttribute('data-tname');
})()
const p1419895828960780288 = {
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>
@ -75,7 +97,6 @@
<button class="bg-blue-500 py-2 px-5 rounded text-white" onclick="alert('hello')">测试组建1</button>
<!-- 示例插件2 id=100-->
<button class="bg-blue-500 py-2 px-5 rounded text-white" onclick="p100.show()">测试组建2</button>
<script>
const p100 = {
name: 'hello tall plugin',

12
package-lock.json

@ -0,0 +1,12 @@
{
"name": "plugin-templete",
"version": "1.0.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"version": "1.0.0",
"license": "ISC"
}
}
}
Loading…
Cancel
Save