[]
Popup 컨트롤의 isDraggable 속성을 통해 드래그 가능한 대화 상자를 만들 수 있습니다.
예시: 드래그 가능한 팝업 대화상자로 표시할 로그인 양식을 작성합니다.
<button style="margin: 20px;" id="btnLogin" class="btn btn-primary">
Log In
</button>
<!-- Log In form -->
<form id="frmLogin">
<div class="wj-dialog-header">
Log in
<button type="button" tabindex="-1" class="close wj-hide">×</button>
</div>
<div class="wj-dialog-body">
<label>
Email:
<input class="form-control" required type="email" />
</label>
<br />
<label>
Password:
<input class="form-control" type="password" required pattern=".{4,}" title="Please enter 4 characters or more." />
</label>
<br />
<label>
Remember Me
<input type="checkbox" />
</label>
<br />
<a href="" class="wj-hide-create">Don't have an account yet?</a>
</div>
<div class="wj-dialog-footer">
<button class="btn btn-primary" type="submit">
Log in
</button>
</div>
</form>
import * as input from '@mescius/wijmo.input';
function init() {
// create forms
let frmLogin = new input.Popup('#frmLogin', {
isDraggable: true
});
//
// show forms
document.querySelector('#btnLogin').addEventListener('click', () => {
frmLogin.show(true);
});
}