質問編集履歴
2
質問追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
### 前提・実現したいこと
|
2
2
|
ページネーションやソートはできました。
|
3
3
|
テーブルにスロット?でボタンアクションを追加する方法がわかりません。
|
4
|
+
あとこれで表示されるときに左上に入力フィルターもついてくるんですが、
|
5
|
+
これを非表示にする方法もわかりません。
|
4
6
|
|
5
7
|
### 該当のソースコード
|
6
8
|
|
1
質問の変更
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
vue
|
1
|
+
vue-table2のテーブルでボタンを表示するセルを作るにはどうすればいいですか?
|
body
CHANGED
@@ -1,57 +1,26 @@
|
|
1
1
|
### 前提・実現したいこと
|
2
|
-
ページネーションや
|
2
|
+
ページネーションやソートはできました。
|
3
|
-
テーブル
|
3
|
+
テーブルにスロット?でボタンアクションを追加する方法がわかりません。
|
4
4
|
|
5
|
-
###
|
5
|
+
### 該当のソースコード
|
6
6
|
|
7
|
-
```
|
7
|
+
```vue
|
8
|
+
<v-client-table :columns="this.tableColumns2" :data="this.tableData" :options="options" >
|
8
|
-
|
9
|
+
</v-client-table>
|
9
|
-
```
|
10
10
|
|
11
|
-
### 該当のソースコード
|
12
|
-
queriedData
|
13
11
|
|
14
12
|
|
15
|
-
<div class="d-flex justify-content-between mt-4">
|
16
|
-
<div class="d-flex">
|
17
|
-
<div class="search-label">表示件数</div>
|
18
|
-
|
13
|
+
tableColumns2: ["formatted_datetime","operation","status","username"],
|
19
|
-
|
14
|
+
options:{
|
15
|
+
headings:{
|
20
|
-
|
16
|
+
formatted_datetime:'日時',
|
21
|
-
v-for="item in pagination.perPageOptions"
|
22
|
-
:key="item"
|
23
|
-
|
17
|
+
operation:'行動',
|
24
|
-
|
18
|
+
status:'結果',
|
25
|
-
|
19
|
+
username:'ユーザー'
|
26
|
-
|
20
|
+
}},
|
27
21
|
|
28
22
|
|
29
|
-
<el-table :data="queriedData" class="table-striped border">
|
30
|
-
<el-table-column
|
31
|
-
v-for="column in tableColumns"
|
32
|
-
:key="column.label"
|
33
|
-
:min-width="column.minWidth"
|
34
|
-
:prop="column.prop"
|
35
|
-
:label="column.label"
|
36
|
-
sortable=
|
37
|
-
:formatter="columnValueFormatter"></el-table-column>
|
38
|
-
|
39
|
-
<el-table-column :min-width="120" label="詳細">
|
40
|
-
<template slot-scope="props">
|
41
|
-
<div class="text-center">
|
42
|
-
<!-- フィルター -->
|
43
|
-
<p-button
|
44
|
-
type="default"
|
45
|
-
@click.native="showOperationLogListModal( props.$index, props.row )">
|
46
|
-
詳細
|
47
|
-
</p-button>
|
48
|
-
</div>
|
49
|
-
</template>
|
50
|
-
</el-table-column>
|
51
|
-
</el-table>
|
52
|
-
```vue
|
53
23
|
|
54
24
|
```
|
55
|
-
|
56
25
|
### 試したこと
|
57
|
-
tableカラムに@onclickイベント
|
26
|
+
tableカラムに@onclickイベントをつけたが変わらなかった。
|