Skip to content

Commit

Permalink
feat: change bind event of click
Browse files Browse the repository at this point in the history
  • Loading branch information
kungfuboy committed Jun 23, 2022
1 parent bdbe922 commit 7d68591
Showing 1 changed file with 2 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,47 +6,16 @@
</a>
</div>
<div class="flex items-center">
<span
nzPlacement="bottomRight"
class="icon mx-1 flex items-center justify-center"
nz-dropdown
[nzDropdownMenu]="contentTemplate"
>
<span class="icon mx-1 flex items-center justify-center" title="打开设置项" (click)="handleShowModal()">
<iconpark-icon name="setting-two"></iconpark-icon>
</span>
<nz-dropdown-menu #contentTemplate="nzDropdownMenu">
<ul nz-menu [nzSelectable]="false">
<li nz-menu-item (click)="handleShowModal()">设置</li>
<li nz-menu-item (click)="switchDataSource()">{{ isRemote ? '切换到本地' : '切换到远程' }}</li>
</ul>
</nz-dropdown-menu>
<span
class="icon mx-1 flex items-center justify-center"
title="{{ dataSourceText }}数据源"
nz-dropdown
[nzDropdownMenu]="settingMenu"
nzPlacement="bottomRight"
[nzDisabled]="isRemote"
(click)="isRemote && switchDataSource()"
(click)="switchDataSource()"
>
<iconpark-icon [name]="isRemote ? 'link-cloud-sucess' : 'link-cloud-faild'"></iconpark-icon>
</span>
<nz-dropdown-menu #settingMenu="nzDropdownMenu">
<div nz-menu class="switch-data-source-box">
<div>
<i nz-icon [nzType]="isRemote ? 'cloud' : 'cloud-sync'" nzTheme="outline" class="fs20"></i>
</div>
<div>
<h4 class="title">{{ dataSourceText }}数据源</h4>
<div class="desc">
数据储存在{{ dataSourceText }},{{
isRemote ? '如不需协作,可以切换到本地数据源' : '如需协作请切换到远程数据源'
}}
</div>
<button nz-button nzType="default" nzSize="small" (click)="switchDataSource()">切换</button>
</div>
</div>
</nz-dropdown-menu>
<span class="icon mx-1 flex items-center justify-center" nz-dropdown [nzDropdownMenu]="menu">
<iconpark-icon name="help"></iconpark-icon>
</span>
Expand Down

0 comments on commit 7d68591

Please sign in to comment.