Compare commits

...

9 Commits

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

30
index.html

@ -47,13 +47,38 @@
<!-- 示例插件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="p1419895863458930688" style="height:100%;width:100%;display: flex;justify-content: space-between;align-items:center" onclick="p1419895863458930688.jumpDetails(this)">
<div class="flex-1 title"></div>
<div class="flex flex-row-reverse items-center" onclick="p1419895659787722752.jumpDetails(this)">
<img style="height:16px" src="https://www.tall.wiki/staticrec/photos/right.png">
</div>
</div>
</div>
<script>
const p100 = {
var p100 = {
name: 'hello tall plugin',
show() {
alert(this.name)
}
}
;(function() {
var dom = document.querySelector('div[data-root=p1419895863458930688]')
var domBox = dom.parentNode;
var domChild = document.querySelectorAll('div[data-root=p1419895863458930688]>div');
domChild[0].innerHTML = domBox.getAttribute('data-tname');
})()
var p1419895863458930688 = {
jumpDetails(that) {
var pId = that.parentNode.getAttribute('data-pid');
var rId = that.parentNode.getAttribute('data-rid');
var uId = that.parentNode.getAttribute('data-uid');
var tId = that.parentNode.getAttribute('data-tid');
console.log(pId)
location.href = `https://www.tall.wiki/qc/treatmentPlan?projectId=${pId}&roleId=${rId}&userId=${uId}&id=${tId}`;
}
}
</script>
</div>
</div>
@ -75,9 +100,8 @@
<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 = {
var p100 = {
name: 'hello tall plugin',
show() {
alert(this.name)

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