We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
轮子:https://markjs.io/
The text was updated successfully, but these errors were encountered:
#55
7f05d9d
<script src="https://cdn.bootcss.com/mark.js/8.11.1/mark.min.js"></script>
declare const Mark: any;
declare const Mark: any; ... export class HomeComponent implements OnInit { keyword$ = new Subject<string>(); constructor() { this.keyword$.debounceTime(400).subscribe(keyword => { this.performMark(keyword); }); } performMark(keyword: string) { const instance = new Mark('.home-content'); instance.unmark(); if (keyword) { instance.mark(keyword); } }
<input type="text" class="form-control" placeholder="关键词检索" #keyword (keyup)="keyword$.next(keyword.value)"> <div class="home-content">...</div>
Sorry, something went wrong.
No branches or pull requests
轮子:https://markjs.io/
The text was updated successfully, but these errors were encountered: