ui/src/form/dropdown.js

31 lines
611 B
JavaScript

import { nextTick, css, html, Component, bind } from '@bd/core'
class Dropdown extends Component {
bar = 'balbal'
mounted() {
console.log('Dropdown: ', this.$refs)
bind(this.$refs.balbal, 'mousedown', ev => {
console.log('aa : mousedown')
})
}
foo() {
console.log('foo: click')
}
render() {
return html`
<div class="aa" ref=${this.bar} @click=${this.foo}>
<div class="bb" ref="bb">
<slot ref="dd"></slot>
</div>
<foo>dsdsd</foo>
</div>
<div class="cc" ref="cc">${this.bar}</div>
`
}
}
Dropdown.reg('dropdown')
百搭WCUI组件库, 基于web components开发。面向下一代的UI组件库
JavaScript 98.9%
CSS 1.1%