Commit 1a435fc1 authored by ibuler's avatar ibuler

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

parent f123450b
...@@ -43,6 +43,7 @@ export class ElementAssetTreeComponent implements OnInit, OnChanges { ...@@ -43,6 +43,7 @@ export class ElementAssetTreeComponent implements OnInit, OnChanges {
zTree: any; zTree: any;
isShowRMenu = false; isShowRMenu = false;
rightClickSelectNode: any; rightClickSelectNode: any;
hasLoginTo = false;
onCzTreeOnClick(event, treeId, treeNode, clickFlag) { onCzTreeOnClick(event, treeId, treeNode, clickFlag) {
if (treeNode.isParent) { if (treeNode.isParent) {
...@@ -125,9 +126,10 @@ export class ElementAssetTreeComponent implements OnInit, OnChanges { ...@@ -125,9 +126,10 @@ export class ElementAssetTreeComponent implements OnInit, OnChanges {
this.activatedRoute.queryParams.subscribe(params => { this.activatedRoute.queryParams.subscribe(params => {
const login_to = params['login_to']; const login_to = params['login_to'];
if (login_to) { if (login_to && !this.hasLoginTo) {
this.Data.forEach(t => { this.Data.forEach(t => {
if (login_to === t.id && t.isParent === false) { if (login_to === t.id && t.isParent === false) {
this.hasLoginTo = true;
this.Connect(t); this.Connect(t);
return; return;
} }
......
...@@ -16,6 +16,9 @@ ...@@ -16,6 +16,9 @@
<script> <script>
window.onload = function (ev) { window.onload = function (ev) {
var clipboardData = ""; var clipboardData = "";
if (!document.hasFocus()) {
return
}
if (navigator.clipboard && navigator.clipboard.readText) { if (navigator.clipboard && navigator.clipboard.readText) {
navigator.clipboard.readText().then(function textRead(text) { 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