43 lines
1.5 KiB
HTML
43 lines
1.5 KiB
HTML
<!-- index.html -->
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Hello</title>
|
|
</head>
|
|
<body>
|
|
|
|
|
|
<div class="layui-row" style="height: 1.8rem; line-height: 1.8rem; padding: 2px; font-size: 0.8rem;">
|
|
<div class="layui-col-xs1 ">
|
|
<div class="grid-demo grid-demo-bg1" style="margin:0 4px ;text-align: center;border-radius: 2px;">
|
|
<button type="button" class="layui-btn layui-btn-normal"
|
|
style=" max-width:4rem; height: 1.8rem; line-height: 1.8rem; padding: 0 0.8rem;width: 90%;margin:0 auto;">导入模板</button>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-xs1 ">
|
|
<div class="grid-demo grid-demo-bg1" style="margin:0 4px ;text-align: center;border-radius: 2px;">
|
|
<button type="button" class="layui-btn layui-btn-normal"
|
|
style=" max-width:4rem; height: 1.8rem; line-height: 1.8rem; padding: 0 0.8rem;width: 90%;margin:0 auto;">设为模板</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h1>Hello world</h1>
|
|
<button id="but_id" onClick="buttonClick()">Click me</button>
|
|
<input id="select_dir_id" disabled="disabled" style="width: 400px" placeholder="显示选择的目录">
|
|
<script>
|
|
window.addEventListener('pywebviewready', function() {
|
|
console.log('pywebview is ready');
|
|
})
|
|
function buttonClick(){
|
|
console.log('dddddd');
|
|
pywebview.api.button_click().then((response)=>{
|
|
document.getElementById('select_dir_id').value=response
|
|
})
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|