PageSourceSearch

https://www.cnsmepump.com/assets/js/unit/attr-sort-search.js

js cnsmepump.com collected 2026-10-08 07:29:04 UTC 856 bytes, 31 lines download raw bytes

1/**
2 * 产品属性文本搜索组件
3 */
4class ScriptAttrSortSearch extends Script {
5	constructor(params) {
6		super(params)
7		this.$unit = document.querySelector(`#${this.attrId}`)
8		if (!this.$unit) return
9		this.$searchItem = this.$unit.querySelector('.unit-attr-text-search__items')
10	}
11
12	init() {
13		this.initEvent()
14	}
15
16	initEvent() {
17		const $search = this.$unit.querySelector('.unit-attr-text-search__icon')
18		$search.onclick = (event) => {
19			this.$sortItem = this.$unit.querySelector('.unit-product-sort__filter-text')
20			event = event || window.event;
21			event.stopPropagation()
22			this.$searchItem.classList.toggle('show')
23			this.$sortItem.classList.remove('is_active')
24		}
25
26		// 点击页面空白,折叠已展开栏目
27		document.querySelector('body').addEventListener('click', () => {
28			this.$searchItem.classList.remove('show')
29		})
30	}
31}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.