ph-client
v1.0.5
Published
```js import {Page,Layer,Header,Footer,Main,Link,Form} from './lib'
Downloads
3
Readme
###help usage
import {Page,Layer,Header,Footer,Main,Link,Form} from './lib'
class TestPage extends Page{
// private layer:Layer
constructor(){
super()
// this.layer = new Layer({type:"default"})
const header = new Header()
const main = new Main()
const form = new Form({
content:true,
contentJustify:"space-between"
})
form.appendFieldGroup([
{
tag:"textarea",
name:"desc",
text:"描述"
},
{
name:"name",
text:"账户",
action:"name"
}
])
form.appendActionGroup([{
text:"提交",
type:"primary",
action:"submit"
},{
text:"返回"
}])
form.onClick((t,e)=>{
console.log(form.formdata)
})
form.onChange((t,e)=>{
console.log()
})
main.append(form);
// main.append(new Link({text:"click0"}))
// main.append(new Link({text:"click1"}))
// const btn = new Link({text:"dialog"})
// const btn1 = new Link({text:"toast",action:"你好",type:"primary"})
// btn.onClick(()=>{
// this.dialog.show("test dialog","this tip")
// })
// btn1.onClick((t,e)=>{
// this.toast.show(t.dataset.action as string)
// })
// main.append(btn)
// main.append(btn1)
// const footer = new Footer()
this.append(header)
this.append(main)
// this.append(footer)
// this.append(this.layer)
}
openWin(){
// this.layer.show()
}
}
new TestPage()