fuc-new/tests/_vue2.tpl
hellcat 1fe8673f62 1
2025-10-01 13:34:29 +08:00

118 lines
3.3 KiB
Smarty
Executable File

<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>居中显示的表格</title>
<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 20px;
background-color:#2D2D2D;
color:#FFFFFF;
text-align: center; /* 使 */
}
table {
margin: 0 auto; /* */
border-collapse: collapse; /* */
width: 80%; /* */
border-radius: 5px; /* */
overflow: hidden; /* */
border: 0px;
}
th, td {
border: 0px solid #ddd; /* */
padding: 8px; /* */
text-align: left;
}
th {
background-color: #47344A; /* */
color: white; /* */
}
tr:nth-child(even) {
background-color: #f2f2f2; /* */
}
td:first-child, th:first-child {
padding-left:30px;
}
.action-button {
background-color: #D2B48C15; /* */
color: #ddd; /* */
//border: none; /* */
border-color: #D2B48C;
padding: 7px 15px; /* */
text-align: center; /* */
text-decoration: none; /* 线 */
display: inline-block; /* 使 */
margin: 4px 2px; /* */
cursor: pointer; /* */
border-radius: 10px; /* */
font-size:12px;
}
</style>
</head>
<body>
<script src="/assets/js/jquery-3.7.1.js"></script>
<table id='draw_list'>
<thead>
<tr>
<th>id</th>
<th>用户id</th>
<th>用户邮箱</th>
<th>地址</th>
<th>金额</th>
<th>创建时间</th>
<th>网站</th>
<th>操作</th>
</tr>
</thead>
<tbody>
{foreach $data as $dataRow}
<tr>
<td>{$dataRow->id}</td>
<td>{$dataRow->user_id}</td>
<td>{$dataRow->user_mail}</td>
<td>{$dataRow->addr}</td>
<td>{$dataRow->amount}</td>
<td>{$dataRow->create_at}</td>
<td>{$dataRow->site}</td>
<td>
<button id="done" class="action-button">完成</button>
<button id="back" class="action-button">驳回</button>
<button id="mark" class="action-button">标记</button>
</td>
</tr>
{/foreach}
</tbody>
</table>
<script>
new Vue({
el: '#draw_list',
data: {
newTodo: '',
todos: []
},
methods: {
fetchTodos() {
fetch('exec.php')
.then(response => response.json())
.then(data => {
this.todos = data;
});
}
}
});
</script>
</body>
</html>