src/zzsper/onCreated.js
// here we use the event proxy instead of binding each date dom
here we use the event proxy instead of binding each date dom
here we use the event proxy instead of binding each date dom
function dDsRegistClickEv(datas, opts) {
  const { ymDs } = datas.doms
  const { cls_date } = datas.opts
  for (let y in ymDs) {
    const ms = ymDs[y]
    for (let m in ms) {
      const mDoms = ms[m]
      mDoms.mCD.addEventListener('click', (ev) => {
        const dom = ev.target
        if ([...dom.classList].includes(cls_date[0])) {
          handleSelectDate(dom, datas, opts)
        }
      })
    }
  }
}
function dDsRegistClickEv ( datas , opts ) { const { ymDs } = datas . doms const { cls_date } = datas . opts for ( let y in ymDs ) { const ms = ymDs [ y ] for ( let m in ms ) { const mDoms = ms [ m ] mDoms . mCD . addEventListener ( 'click' , ( ev ) => { const dom = ev . target if ( [ ... dom . classList ] . includes ( cls_date [ 0 ] ) ) { handleSelectDate ( dom , datas , opts ) } } ) } } }
here we use the event proxy instead of binding each date dom
here we use the event proxy instead of binding each date dom