javascript - 角度表情符号选择器在 Windows 7 上不起作用
问题描述
我有一个角度项目,在我的项目中,我使用@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 插件的任何建议支持所有操作系统。
谢谢你
解决方案
推荐阅读
- docker - 无法通过用户定义的网络名称从另一个容器访问容器
- swiftui - .onDrop 在 SwiftUI 的表单和部分中的视图中不起作用
- mysql - 是一个分区表更好的响应时间还是多个表,用于网站和操作(插入,更新,删除)经常使用
- reactjs - React 表头未与表体正确对齐
- methods - getter 和 setter 方法是什么?
- java - 检查 Firestore 集合元素是否存在
- javascript - 将值从雪花中的另一个表插入临时表的存储过程
- google-apps-script - 如何从 Google 表格中人名的多个实例创建单个 PDF?
- amazon-redshift - ETL 与 Talend + AWS Redshift?
- ruby-on-rails - 远程按钮方法发布到控制器中重定向的问题