flameresttable 1.0.50 → 1.0.52

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flameresttable",
3
- "version": "1.0.50",
3
+ "version": "1.0.52",
4
4
  "main": "./src/plugin.ts",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,6 +35,14 @@ export class Column implements IColumn {
35
35
  */
36
36
  title: "",
37
37
 
38
+ /**
39
+ * Кастомный заголовок
40
+ * @param row
41
+ * @param col
42
+ * @returns
43
+ */
44
+ titleCustom: (col: Column) => null,
45
+
38
46
  /**
39
47
  * Выделена ли строка чекбоксом
40
48
  */
@@ -296,6 +304,15 @@ export interface IColumn {
296
304
  classesHeader?: string,
297
305
  width?: number | null,
298
306
  isSelected?: boolean,
307
+
308
+ /**
309
+ * Кастомный заголовок
310
+ * @param row
311
+ * @param col
312
+ * @returns
313
+ */
314
+ titleCustom: (col: Column) => string | null,
315
+
299
316
  },
300
317
 
301
318
  /**
@@ -34,8 +34,9 @@
34
34
  <div v-for="column in Table.columns" v-show="column.Table.isShow" :key="'cheader_' + column.name"
35
35
  :class="' defaultHeader ' + column.Table.classesHeader"
36
36
  class=" table-cell align-middle border-r border-r-slate-100 px-2">
37
- <span>{{ column.title !== '' ? column.title :
38
- column.name }}</span>
37
+ <span>{{ column.Table.titleCustom !== null ? column.Table.titleCustom(column) : column.Table.title !== '' ?
38
+ column.Table.title : column.title !== '' ? column.title :
39
+ column.name }}</span>
39
40
  </div>
40
41
  <div v-if="opts.Edit.can" class="table-cell border-r border-r-slate-100 px-2">
41
42
  <button class="bg-green-600 invisible">