flameresttable 1.0.57 → 1.0.59

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/Table/Table.vue +17 -14
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "flameresttable",
3
- "version": "1.0.57",
3
+ "version": "1.0.59",
4
4
  "main": "./src/plugin.ts",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/FlameArt/resttable.git"
8
8
  },
9
9
  "scripts": {
10
- "push and publish": "git push && npm --no-git-tag-version version patch && npm publish",
10
+ "push and publish": "npm --no-git-tag-version version patch && npm publish",
11
11
  "install/update": "npm i && npm update --save",
12
12
  "dev": "vite"
13
13
  },
@@ -32,18 +32,19 @@
32
32
  </div>
33
33
 
34
34
  <div v-for="column in Table.columns" v-show="column.Table.isShow" :key="'cheader_' + column.name"
35
- :class="' defaultHeader ' + column.Table.classesHeader" class=" align-middle border-r border-r-slate-100 px-2">
35
+ :class="' defaultHeader ' + column.Table.classesHeader"
36
+ class=" col-span-1 align-middle border-r border-r-slate-100 px-2">
36
37
  <span>{{ column.Table.titleCustom !== null ? (column as any).Table.titleCustom(column) : column.Table.title !==
37
38
  '' ?
38
39
  column.Table.title : column.title !== '' ? column.title :
39
40
  column.name }}</span>
40
41
  </div>
41
- <div v-if="opts.Edit.can" class=" border-r border-r-slate-100 px-2">
42
+ <div v-if="opts.Edit.can" class=" col-span-1 border-r border-r-slate-100 px-2">
42
43
  <button class="bg-green-600 invisible">
43
44
 
44
45
  </button>
45
46
  </div>
46
- <div v-if="opts.Remove.can" class=" border-r border-r-slate-100 px-2">
47
+ <div v-if="opts.Remove.can" class=" col-span-1 border-r border-r-slate-100 px-2">
47
48
  <button class="bg-green-600 invisible">
48
49
 
49
50
  </button>
@@ -64,17 +65,19 @@
64
65
  </label>
65
66
  </div>
66
67
 
67
- <div v-for="column in Table.columns" v-show="column.Table.isShow"
68
- :key="'tc_' + column.name + '_row_' + (row as any).id" :class="' defaultCell ' + column.Table.classes"
69
- class=" align-middle border-r border-r-slate-100 px-2 last:border-r-0 last:pr-0"
70
- @click="columnClick(row, column)"
71
- :style="(column.Table.width === null ? '' : 'width:' + column.Table.width + 'px')">
68
+ <template v-for="column in Table.columns">
69
+ <div v-if="column.Table.isShow" :key="'tc_' + column.name + '_row_' + (row as any).id"
70
+ :class="' defaultCell ' + column.Table.classes"
71
+ class=" col-span-1 align-middle border-r border-r-slate-100 px-2 last:border-r-0 last:pr-0"
72
+ @click="columnClick(row, column)"
73
+ :style="(column.Table.width === null ? '' : 'width:' + column.Table.width + 'px')">
72
74
 
73
- <span v-if="!column.Table.isRawValue">{{
74
- column.Table.value(row, column) }}</span>
75
- <span v-else v-html="column.Table.value(row, column)"></span>
76
- </div>
77
- <div v-if="opts.Edit.can" class=" border-r border-r-slate-100 px-2 text-center"
75
+ <span v-if="!column.Table.isRawValue">{{
76
+ column.Table.value(row, column) }}</span>
77
+ <span v-else v-html="column.Table.value(row, column)"></span>
78
+ </div>
79
+ </template>
80
+ <div v-if="opts.Edit.can" class=" col-span-1 border-r border-r-slate-100 px-2 text-center"
78
81
  :key="'edit_' + 'row_' + (row as any).id">
79
82
  <button class="mobile:hidden px-2 py-1 bg-green-600 text-white my-1" @click="edit(row)">
80
83
  Изменить
@@ -83,7 +86,7 @@
83
86
  <img src="/src/assets/icons/edit.svg" class="w-4 h-4 fill-white" />
84
87
  </button>
85
88
  </div>
86
- <div v-if="opts.Remove.can" class=" border-r border-r-slate-100 px-2 text-center"
89
+ <div v-if="opts.Remove.can" class=" col-span-1 border-r border-r-slate-100 px-2 text-center"
87
90
  :key="'delete_' + 'row_' + (row as any).id">
88
91
  <button class="mobile:hidden px-2 py-1 bg-gray-600 opacity-30 text-white my-1" @click="deleteRow(row)">
89
92
  Удалить