Fix missing class filter

This commit is contained in:
the1812 2023-03-26 14:37:50 +08:00
parent e422ca01b6
commit 7ee1b85b66

View File

@ -14,7 +14,11 @@ export const component = defineComponentMetadata({
entry: async () => {
allMutations(records => {
records.forEach(record => {
if (record.target instanceof HTMLInputElement && record.target.placeholder !== '搜索') {
if (
record.target instanceof HTMLInputElement &&
record.target.classList.contains('nav-search-input') &&
record.target.placeholder !== '搜索'
) {
record.target.placeholder = '搜索'
}
})