update
parent
e34d164f51
commit
5517c249b7
23
src/index.js
23
src/index.js
|
@ -12,29 +12,16 @@ import {
|
||||||
} from './constants.js'
|
} from './constants.js'
|
||||||
import { css, adoptStyles } from './css.js'
|
import { css, adoptStyles } from './css.js'
|
||||||
import { render, html, svg } from './html.js'
|
import { render, html, svg } from './html.js'
|
||||||
import {
|
import { fire, bind, unbind } from './utils.js'
|
||||||
$,
|
|
||||||
$$,
|
|
||||||
nextTick,
|
|
||||||
offset,
|
|
||||||
bind,
|
|
||||||
unbind,
|
|
||||||
outsideClick,
|
|
||||||
clearOutsideClick,
|
|
||||||
fire
|
|
||||||
} from './utils.js'
|
|
||||||
|
|
||||||
export { html, css, svg }
|
|
||||||
export {
|
export {
|
||||||
$,
|
$,
|
||||||
$$,
|
$$,
|
||||||
nextTick,
|
nextTick,
|
||||||
offset,
|
offset,
|
||||||
bind,
|
|
||||||
unbind,
|
|
||||||
outsideClick,
|
outsideClick,
|
||||||
clearOutsideClick
|
clearOutsideClick
|
||||||
}
|
} from './utils.js'
|
||||||
|
export { html, css, svg, bind, unbind }
|
||||||
|
|
||||||
export class Component extends HTMLElement {
|
export class Component extends HTMLElement {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -306,6 +293,10 @@ export class Component extends HTMLElement {
|
||||||
return bind(this, type, callback)
|
return bind(this, type, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$off(type, callback) {
|
||||||
|
unbind(this, type, callback)
|
||||||
|
}
|
||||||
|
|
||||||
$emit(type, data = {}) {
|
$emit(type, data = {}) {
|
||||||
return fire(this, type, data)
|
return fire(this, type, data)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue