-
Notifications
You must be signed in to change notification settings - Fork 0
/
todo.pug
40 lines (40 loc) · 1.76 KB
/
todo.pug
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
doctype html
html
head
meta(charset="UTF-8")
meta(name="viewport" content="width=device-width, initial-scale=1.0")
meta(http-equiv="X-UA-Compatible" content="ie=edge")
link(rel="stylesheet", href=css)
title #{title}
body
div(id="app")
div(class="box")
div
input(class="input", id="title", type="text", style='width:100%')
div
textarea(id="textarea", style='width:100%', name="", cols="20", rows="10")
button(class="btn btn-primary", id="add_btn") 添加
table(class=datas.length <= 0 ? "styled-table" : "styled-table active", style='width:100%')
thead
tr
th 标题
th 详情
th 创建时间
th 状态
th 操作
tbody(id="table_body")
each val, index in datas
tr('data-id'=val.id, 'data-title'=val.title, 'data-desc'=val.desc, style="border-bottom: 1px solid #333;")
td #{val.title}
td #{val.desc}
td(width="60px") #{val.format_create_at}
td(width="30px") #{val.task_status}
td(width="60px")
div
select(id="select", value=val.task_status, onchange="changeStatus(this, '"+ val.id +"')")
option(value="0" selected=(val.task_status == 0)) 已完成
option(value="1" selected=(val.task_status == 1)) 未完成
option(value="2" selected=(val.task_status == 2)) 未开始
button(class="action-btn", onclick="editTask(this, '"+ val.id +"')") 编辑
button(class="action-btn", onclick="delTask('" + val.id +"')") 删除
script(src=webviewjs)