mirror of
https://github.com/RoganDawes/P4wnP1_aloa.git
synced 2025-04-04 01:48:30 +02:00
59 lines
1.1 KiB
Go
59 lines
1.1 KiB
Go
// +build js
|
|
|
|
package main
|
|
|
|
import (
|
|
"github.com/mame82/hvue"
|
|
)
|
|
|
|
/*
|
|
type CompModalData struct {
|
|
*js.Object
|
|
ShowModal bool `js:"showModal"`
|
|
}
|
|
|
|
func NewCompModalData(vm *hvue.VM) interface{} {
|
|
d:= &CompModalData{Object:O()}
|
|
d.ShowModal = false
|
|
return d
|
|
}
|
|
*/
|
|
func InitCompModal() {
|
|
hvue.NewComponent(
|
|
"modal",
|
|
// hvue.DataFunc(NewCompModalData),
|
|
hvue.Template(compModalTemplate),
|
|
)
|
|
}
|
|
|
|
const compModalTemplate = `
|
|
<transition name="modal">
|
|
<div class="modal-mask">
|
|
<div class="modal-wrapper">
|
|
<div class="modal-container">
|
|
|
|
<div class="modal-header">
|
|
<slot name="header">
|
|
Modal window header
|
|
</slot>
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
<slot name="body">
|
|
body
|
|
</slot>
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
<slot name="footer">
|
|
footer
|
|
<button class="modal-default-button" @click="$emit('close')">
|
|
OK
|
|
</button>
|
|
</slot>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</transition>
|
|
` |