2024-07-16 20:32:22 +08:00
|
|
|
{{define "style"}}
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{define "content"}}
|
2024-08-01 20:40:06 +08:00
|
|
|
<div id="user-inquire">
|
|
|
|
<div class="alert alert-primary form-inline" role="alert">
|
|
|
|
<button type="button" id="add-domain" class="btn btn-primary" data-toggle="modal" data-target="#DomainModal"><i class="bi bi-plus-lg"></i> 添加域名</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-07-20 20:31:09 +08:00
|
|
|
<div id="user-table"></div>
|
2024-07-16 20:32:22 +08:00
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{define "script"}}
|
2024-07-20 20:31:09 +08:00
|
|
|
<script src="/static/js/table.js"></script>
|
|
|
|
<script>
|
|
|
|
$(document).ready(function() {
|
|
|
|
// 示例数据
|
|
|
|
let columns = ['ID', '名称', '年龄'];
|
|
|
|
let data = [
|
|
|
|
[1, '张三', 25],
|
|
|
|
[2, '李四', 30],
|
|
|
|
[3, '王五', 28]
|
|
|
|
];
|
|
|
|
|
|
|
|
// 操作按钮配置
|
|
|
|
let actions = [
|
|
|
|
{
|
|
|
|
label: '编辑',
|
|
|
|
class: 'primary',
|
|
|
|
onClick: function(row) {
|
|
|
|
alert('编辑:' + row[1]);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '删除',
|
|
|
|
class: 'danger',
|
|
|
|
onClick: function(row) {
|
|
|
|
alert('删除:' + row[1]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
let table = new Table(columns, data, actions, "#user-table")
|
2024-08-01 20:40:06 +08:00
|
|
|
table.RenderTable()
|
2024-07-20 20:31:09 +08:00
|
|
|
})
|
|
|
|
</script>
|
2024-07-16 20:32:22 +08:00
|
|
|
{{end}}
|