@taole/dev-helper 0.0.12 → 0.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Tdiv/index.js CHANGED
@@ -163,7 +163,7 @@ class Tdiv extends HTMLElement {
163
163
  if (hasValue(zIndex)) layoutStyle += `z-index: ${zIndex};`;
164
164
  if (pointer === true) {
165
165
  layoutStyle += 'cursor: pointer;';
166
- } else if (this._getAttr('onClick') && pointer === false) {
166
+ } else if (this._getAttr('onClick') && pointer === null) {
167
167
  layoutStyle += 'cursor: pointer;';
168
168
  }
169
169
  if (flex) {
@@ -209,6 +209,8 @@ class Tdiv extends HTMLElement {
209
209
  const onClickAttr = this._getAttr('onClick');
210
210
  if (onClickAttr && typeof window[onClickAttr] === 'function') {
211
211
  window[onClickAttr](e);
212
+ } else if(onClickAttr && typeof onClickAttr === 'function') {
213
+ onClickAttr(e);
212
214
  }
213
215
  }
214
216
  }
package/dist/tdiv.umd.js CHANGED
@@ -247,7 +247,7 @@
247
247
  if (hasValue(zIndex)) layoutStyle += `z-index: ${zIndex};`;
248
248
  if (pointer === true) {
249
249
  layoutStyle += 'cursor: pointer;';
250
- } else if (this._getAttr('onClick') && pointer === false) {
250
+ } else if (this._getAttr('onClick') && pointer === null) {
251
251
  layoutStyle += 'cursor: pointer;';
252
252
  }
253
253
  if (flex) {
@@ -293,6 +293,8 @@
293
293
  const onClickAttr = this._getAttr('onClick');
294
294
  if (onClickAttr && typeof window[onClickAttr] === 'function') {
295
295
  window[onClickAttr](e);
296
+ } else if(onClickAttr && typeof onClickAttr === 'function') {
297
+ onClickAttr(e);
296
298
  }
297
299
  }
298
300
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taole/dev-helper",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "npx -y rimraf dist && rollup -c",