|
@ -51,19 +51,21 @@ |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
const p1419896043390377984 = { |
|
|
const p1419896043390377984 = { |
|
|
|
|
|
dom: '', |
|
|
|
|
|
|
|
|
init() { |
|
|
init() { |
|
|
var dom = document.querySelector("div[data-root=p1419896043390377984]"); |
|
|
this.dom = document.querySelector("div[data-root=p1419896043390377984]"); |
|
|
var domBox = dom.parentNode; |
|
|
var domBox = this.dom.parentNode; |
|
|
var title = dom.querySelector('.title'); |
|
|
var title = this.dom.querySelector('.title'); |
|
|
title.innerHTML = domBox.getAttribute('data-tname') |
|
|
title.innerHTML = domBox.getAttribute('data-tname') |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 跳转详情 |
|
|
// 跳转详情 |
|
|
jumpDetails(that) { |
|
|
jumpDetails(that) { |
|
|
const pId = that.parentNode.parentNode.getAttribute('data-pid'); |
|
|
const pId = this.dom.parentNode.getAttribute('data-pid'); |
|
|
const rId = that.parentNode.parentNode.getAttribute('data-rid'); |
|
|
const rId = this.dom.parentNode.getAttribute('data-rid'); |
|
|
const uId = that.parentNode.parentNode.getAttribute('data-uid'); |
|
|
const uId = this.dom.parentNode.getAttribute('data-uid'); |
|
|
const tId = that.parentNode.parentNode.getAttribute('data-tid'); |
|
|
const tId = this.dom.parentNode.getAttribute('data-tid'); |
|
|
location.href = 'https://www.kdocs.cn/l/cpcTuiekDTNm'; |
|
|
location.href = 'https://www.kdocs.cn/l/cpcTuiekDTNm'; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -102,10 +104,10 @@ |
|
|
<!-- 示例插件1--> |
|
|
<!-- 示例插件1--> |
|
|
<button class="bg-blue-500 py-2 px-5 rounded text-white" onclick="alert('hello')">测试组建1</button> |
|
|
<button class="bg-blue-500 py-2 px-5 rounded text-white" onclick="alert('hello')">测试组建1</button> |
|
|
<!-- 示例插件2 id=100--> |
|
|
<!-- 示例插件2 id=100--> |
|
|
<button class="bg-blue-500 py-2 px-5 rounded text-white" onclick="p100.show()">测试组建2</button> |
|
|
<button class="bg-blue-500 py-2 px-5 rounded text-white" onclick="p200.show()">测试组建2</button> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
const p100 = { |
|
|
const p200 = { |
|
|
name: 'hello tall plugin', |
|
|
name: 'hello tall plugin', |
|
|
show() { |
|
|
show() { |
|
|
alert(this.name) |
|
|
alert(this.name) |
|
|