MCPcopy
hub / github.com/iChochy/NCE / bindUnitSelect

Method bindUnitSelect

js/ReadingSystem.js:946–956  ·  view source on GitHub ↗

* 绑定单元选择器事件

()

Source from the content-addressed store, hash-verified

944 * 绑定单元选择器事件
945 */
946 bindUnitSelect() {
947 if (this.bindingFlags.unitSelect || !this.dom.unitSelect) return;
948 this.bindingFlags.unitSelect = true;
949
950 on(this.dom.unitSelect, 'change', (event) => {
951 const unitIndex = parseInt(event.target.value);
952 if (unitIndex >= 0) {
953 this.loadUnitByIndex(unitIndex);
954 }
955 });
956 }
957
958 /**
959 * 绑定歌词事件

Callers 1

bindAllEventsMethod · 0.95

Calls 2

loadUnitByIndexMethod · 0.95
onFunction · 0.90

Tested by

no test coverage detected