File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed
src/jigsaw/pc-components/combo-select Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 3232 < i class ="iconfont iconfont-e14b jigsaw-combo-select-clear " [ngStyle] ="{right: this.selectIcon ? '20px' : '7px'} "
3333 *ngIf ="clearable && value && value.length != 0 " (click) ="_$clearValue($event) ">
3434 </ i >
35- < i class ="jigsaw-combo-select-arrow jigsaw-combo-select-down " [ngClass] ="selectArrowClass "> </ i >
35+ < i class ="jigsaw-combo-select-arrow jigsaw-combo-select-down " [ngClass] ="selectArrowClass "
36+ (click) ="_$handleArrowClick($event) "> </ i >
3637</ div >
3738< ng-content > </ ng-content >
Original file line number Diff line number Diff line change @@ -458,6 +458,28 @@ export class JigsawComboSelect extends AbstractJigsawComponent implements Contro
458458 this . searchKeywordChange . emit ( this . searchKeyword ) ;
459459 }
460460
461+ /* Started by AICoder, pid:i5aa7hffb2947e6144b60964401d5e102379feae */
462+ /**
463+ * @internal
464+ * 处理箭头点击事件,可以被子类覆盖
465+ */
466+ public _$handleArrowClick ( event : Event ) : void {
467+ event . preventDefault ( ) ;
468+ event . stopPropagation ( ) ;
469+
470+ // 如果是禁用状态,不处理点击事件
471+ if ( this . disabled ) {
472+ return ;
473+ }
474+
475+ // 如果当前是打开状态,则关闭
476+ this . open = ! this . _$opened ;
477+
478+ // 触发touched回调
479+ this . _onTouched ( ) ;
480+ }
481+ /* Ended by AICoder, pid:i5aa7hffb2947e6144b60964401d5e102379feae */
482+
461483 public ngOnInit ( ) {
462484 super . ngOnInit ( ) ;
463485 // 设置初始值
You can’t perform that action at this time.
0 commit comments