angular 表情符号选择器无法在 windows 7 上运行

angular emoji picker not working on windows 7

我有一个angular项目,在我的项目中我使用@joeattardi/emoji-button插件将表情符号选择器添加到我的聊天框

这是模板

<form action="" class="type-message">
        <input type="text" placeholder="{{ 'meeting-side.write-message' | translate }}" id="newMessage"
            (keyup.enter)="sendMessage()" [(ngModel)]="newMessage" [ngModelOptions]="{standalone: true}"  autocomplete="off" required>
        <div class="actions-row">
            <div class="icons-actions">
                <mat-icon id="emojiButton" matTooltip="{{'meeting-side.add-emoji' | translate}}" matTooltipClass="custom-tooltip">sentiment_satisfied_alt</mat-icon>
            </div>
            <a (click)="sendMessage()" [ngClass]="{'disabled': !newMessage}">
                {{ "meeting-side.send" | translate }}
            </a>
        </div>
    </form>

并在我的 component.ts 代码中添加了此代码

ngAfterViewInit() {
    this.cdRef.detectChanges();

    let button = document.querySelector('#emojiButton') as HTMLButtonElement;
    let picker = new EmojiButton({
      autoHide: false
    });
    
    let input = document.querySelector('#newMessage') as HTMLInputElement;

    picker.on('emoji', emoji => {
      this.newMessage += emoji;
    });

    button.addEventListener('click', () => {
      picker.togglePicker(button);
    });
  }

当我在 linux、windows 10 和 mac 上测试我的应用程序时,一切正常,但是当我在 windows 7 上测试时,它看起来像这个

请帮助我如何让这个插件支持 windows 7 或者对任何支持所有操作系统的 MIT 插件的任何建议。

谢谢

这是一个与旧版操作系统支持表情符号相关的问题。只有较新的操作系统才支持您期望的所有表情符号。

在 Windows 7.

发布后,一些表情符号作为不同 Unicode 版本的一部分发布

使用一些 third-party 可能有助于解决这个问题,但我真的不认为有可能修复所有丢失的表情符号。例如,Windows 7 有更新 (KB2729094) which provides unicode emoji support (An update for the Segoe UI)。然而,一些新的表情符号仍然缺失,它们是黑白的。