Commit 1a435fc1 authored by ibuler's avatar ibuler

[Bugfix] 修复login_to连接多次的bug

parent f123450b
......@@ -43,6 +43,7 @@ export class ElementAssetTreeComponent implements OnInit, OnChanges {
zTree: any;
isShowRMenu = false;
rightClickSelectNode: any;
hasLoginTo = false;
onCzTreeOnClick(event, treeId, treeNode, clickFlag) {
if (treeNode.isParent) {
......@@ -125,9 +126,10 @@ export class ElementAssetTreeComponent implements OnInit, OnChanges {
this.activatedRoute.queryParams.subscribe(params => {
const login_to = params['login_to'];
if (login_to) {
if (login_to && !this.hasLoginTo) {
this.Data.forEach(t => {
if (login_to === t.id && t.isParent === false) {
this.hasLoginTo = true;
this.Connect(t);
return;
}
......
......@@ -16,6 +16,9 @@
<script>
window.onload = function (ev) {
var clipboardData = "";
if (!document.hasFocus()) {
return
}
if (navigator.clipboard && navigator.clipboard.readText) {
navigator.clipboard.readText().then(function textRead(text) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment