mirror of https://github.com/veypi/OneAuth.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
508 B
JavaScript
26 lines
508 B
JavaScript
|
|
import v, { proxy } from '../vyes.js'
|
|
|
|
const data = proxy.Watch({ a: 2 })
|
|
|
|
const body = v('bg-gray-200 flex gap-4 h-12 items-center justify-evenly rounded', [
|
|
v('', [v('span', 'count:'), v('span', () => data.a)]),
|
|
v({
|
|
typ: 'input',
|
|
vbind: [data, 'a']
|
|
}),
|
|
v({
|
|
class: 'select-none cursor-pointer hover:bg-gray-300 p-2 rounded',
|
|
children: 'add',
|
|
onclick: () => {
|
|
data.a++
|
|
}
|
|
}),
|
|
])
|
|
|
|
export const setup = (node, data) => {
|
|
console.log(node, data)
|
|
}
|
|
|
|
export default body
|