flameresttable 1.0.14 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/App.vue +9 -0
- package/src/Table/Table.vue +2 -1
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -26,6 +26,15 @@ opts.set('dt1', { title: 'Дата 1' });
|
|
|
26
26
|
opts.set('dt2', { title: 'Дата 2' });
|
|
27
27
|
opts.set('id', { title: 'Дата 2', Filter: { isShow: false } });
|
|
28
28
|
opts.set('file', { title: 'файл', Filter: { isShow: false } });
|
|
29
|
+
opts.set("name", {
|
|
30
|
+
title: 'Название', Table:
|
|
31
|
+
{
|
|
32
|
+
isRawValue: true,
|
|
33
|
+
isShow: true,
|
|
34
|
+
value: (row, column) => '<a href="https://4h.notion.site/' + row[column.name].replace('-', '') + '">Notion</a>'
|
|
35
|
+
},
|
|
36
|
+
Popup: { isShow: true }
|
|
37
|
+
});
|
|
29
38
|
opts.Add.can = true;
|
|
30
39
|
opts.Remove.can = true;
|
|
31
40
|
|
package/src/Table/Table.vue
CHANGED
|
@@ -58,8 +58,9 @@
|
|
|
58
58
|
<div v-for="column in Table.columns" v-show="column.Table.isShow" :key="'tc_' + column"
|
|
59
59
|
class="table-cell border-r border-r-slate-100 px-2 last:border-r-0 last:pr-0"
|
|
60
60
|
@click="columnClick(row, column)">
|
|
61
|
-
<span>{{
|
|
61
|
+
<span v-if="!column.Table.isRawValue">{{
|
|
62
62
|
column.Table.value(row, column) }}</span>
|
|
63
|
+
<span v-else v-html="column.Table.value(row, column)"></span>
|
|
63
64
|
</div>
|
|
64
65
|
<div v-if="opts.Edit.can" class="table-cell border-r border-r-slate-100 px-2 text-center">
|
|
65
66
|
<button class="px-2 py-1 bg-green-600 text-white my-1" @click="edit(row)">
|