Skip to content

Commit 05bf9b6

Browse files
author
Lionel Bijaoui
committed
Remove Pug from project
- Convert Pug to HTML
1 parent 878738f commit 05bf9b6

File tree

2 files changed

+62
-25
lines changed

2 files changed

+62
-25
lines changed

projects/full/dataTable.vue

Lines changed: 54 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,65 @@
1-
<template lang="pug">
2-
table.table.table-hover.table-bordered
3-
thead
4-
tr
5-
th ID
6-
th Name
7-
th E-mail
8-
th Country
9-
th Role
10-
th Status
1+
<template>
2+
<table class="table table-hover table-bordered">
3+
<thead>
4+
<tr>
5+
<th>ID</th>
6+
<th>Name</th>
7+
<th>Password </th>
8+
<th>Language</th>
9+
<th>Role</th>
10+
<th>Status</th>
11+
</tr>
12+
</thead>
1113

12-
tbody
13-
tr(v-for="row in rows", @click="select($event, row)", :class="{ active: isSelected(row) }")
14-
td {{ row.id }}
15-
td
16-
img(:src="row.avatar")
17-
| {{ row.firstName + " " + row.lastName }} ({{row.userName}})
18-
.label.label-warning(v-if="!row.status") Inactive
19-
td {{ row.email }}
20-
td(v-if="row.address") {{ row.address.country }}
21-
td {{ getRoleName(row) }}
22-
td
23-
i.fa(:class=" row.status? 'fa-check' : 'fa-ban' ")
14+
<tbody>
15+
<tr v-for="(row, index) in rows"
16+
:key="index"
17+
@click="select($event, row)"
18+
:class="{ active: isSelected(row) }">
19+
<td>{{ row.id }}</td>
20+
<td>
21+
<img :src="row.avatar">
22+
{{ row.firstName + " " + row.lastName }} ({{ row.userName }})
23+
<div class="label label-warning"
24+
v-if="!row.status"> Inactive</div>
25+
</td>
26+
<td>{{ row.password }}</td>
27+
<td>{{ row.language }}</td>
28+
<td>{{ getRoleName(row) }}</td>
29+
<td>
30+
<i class="fa"
31+
:class="row.status? 'fa-check' : 'fa-ban'"></i>
32+
</td>
33+
</tr>
34+
</tbody>
35+
</table>
2436
</template>
2537

2638
<script>
2739
import { find } from "lodash";
2840
import { roles } from "./data";
2941
3042
export default {
31-
props: ["rows", "selected", "select"],
43+
props: {
44+
rows: {
45+
type: Array,
46+
default() {
47+
return [];
48+
}
49+
},
50+
selected: {
51+
type: Array,
52+
default() {
53+
return [];
54+
}
55+
},
56+
select: {
57+
type: Function,
58+
default() {
59+
return [];
60+
}
61+
}
62+
},
3263
3364
methods: {
3465
isSelected(row) {

projects/full/fieldAwesome.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
<template lang="pug">
2-
input.form-control(type="text", v-model="value", :maxlength="schema.max", :readonly="schema.readonly", :disabled="disabled", :placeholder="schema.placeholder")
1+
<template>
2+
<input class="form-control"
3+
type="text"
4+
v-model="value"
5+
:maxlength="schema.max"
6+
:readonly="schema.readonly"
7+
:disabled="disabled"
8+
:placeholder="schema.placeholder">
39
</template>
410

511
<script>

0 commit comments

Comments
 (0)