点标注属性框增加pdf浏览
This commit is contained in:
@ -304,8 +304,8 @@ function html(that) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</DIV-cy-tab-pane>-->
|
</DIV-cy-tab-pane>-->
|
||||||
<!-- <DIV-cy-tab-pane label="灯光控制">
|
<DIV-cy-tab-pane label="灯光控制">
|
||||||
<div
|
<div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<span class="label" style="flex: unset;">指令</span>
|
<span class="label" style="flex: unset;">指令</span>
|
||||||
@ -314,7 +314,7 @@ function html(that) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- </DIV-cy-tab-pane> -->
|
</DIV-cy-tab-pane>
|
||||||
<!-- <DIV-cy-tab-pane label="设置操作点">-->
|
<!-- <DIV-cy-tab-pane label="设置操作点">-->
|
||||||
<!-- <div>-->
|
<!-- <div>-->
|
||||||
<!-- <div class="row">-->
|
<!-- <div class="row">-->
|
||||||
|
|||||||
@ -3189,8 +3189,14 @@ class BillboardObject extends Base {
|
|||||||
let goodsHtml = ''
|
let goodsHtml = ''
|
||||||
let richTextHtml = ''
|
let richTextHtml = ''
|
||||||
for (let i = 0; i < this.options.attribute.link.content.length; i++) {
|
for (let i = 0; i < this.options.attribute.link.content.length; i++) {
|
||||||
|
const match = this.options.attribute.link.content[i].url.match(/\.([^.?#]+)(?=\?|#|$)/);
|
||||||
|
if(match && (match[1] === 'pdf' || match[1] === 'PDF')) {
|
||||||
|
linkHtml += `<DIV-cy-tab-pane label="${this.options.attribute.link.content[i].name}"><embed width='100%' height='100%' src="${this.options.attribute.link.content[i].url}" type="application/pdf"></embed></DIV-cy-tab-pane>`
|
||||||
|
}
|
||||||
|
else {
|
||||||
linkHtml += `<DIV-cy-tab-pane label="${this.options.attribute.link.content[i].name}"><iframe width='100%' height='100%' src="${this.options.attribute.link.content[i].url}" sandbox="allow-scripts allow-same-origin"></iframe></DIV-cy-tab-pane>`
|
linkHtml += `<DIV-cy-tab-pane label="${this.options.attribute.link.content[i].name}"><iframe width='100%' height='100%' src="${this.options.attribute.link.content[i].url}" sandbox="allow-scripts allow-same-origin"></iframe></DIV-cy-tab-pane>`
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (this.options.attribute.goods && this.options.attribute.goods.content && this.options.attribute.goods.content.length > 0) {
|
if (this.options.attribute.goods && this.options.attribute.goods.content && this.options.attribute.goods.content.length > 0) {
|
||||||
goodsHtml += `<DIV-cy-tab-pane label="物资">
|
goodsHtml += `<DIV-cy-tab-pane label="物资">
|
||||||
<div class="table">
|
<div class="table">
|
||||||
|
|||||||
Reference in New Issue
Block a user