@timus-networks/theme 1.0.23 → 1.0.24
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/components-js/ThemeAlert.vue +76 -0
- package/components-js/ThemeAvatar.vue +55 -0
- package/components-js/ThemeBadge.vue +86 -0
- package/components-js/ThemeCascader.vue +337 -0
- package/components-js/ThemeLink.vue +30 -100
- package/components-js/ThemeLogo.vue +57 -0
- package/components-js/ThemeRadio.vue +20 -41
- package/components-js/ThemeTable.vue +228 -194
- package/components-js/TimusSamples.vue +33 -28
- package/components-js/exporter.js +5 -5
- package/components-ts/ThemeAlert.vue +76 -0
- package/components-ts/ThemeAvatar.vue +55 -0
- package/components-ts/ThemeBadge.vue +86 -0
- package/components-ts/ThemeCascader.vue +337 -0
- package/components-ts/ThemeLink.vue +30 -100
- package/components-ts/ThemeLogo.vue +57 -0
- package/components-ts/ThemeRadio.vue +20 -41
- package/components-ts/ThemeTable.vue +228 -194
- package/components-ts/TimusSamples.vue +33 -28
- package/components-ts/exporter.js +5 -5
- package/logo/timus-icon.svg +17 -0
- package/logo/timus-logo.svg +22 -0
- package/module.js +6 -2
- package/output/main.css +1 -1
- package/package.json +40 -40
|
@@ -1,211 +1,245 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
2
|
+
<div class="pt-8 pb-16 flex gap-12 flex-col">
|
|
3
|
+
<section>
|
|
4
|
+
<h1>Fixed Height</h1>
|
|
5
|
+
<p class="p-md-c my-6">
|
|
6
|
+
This example demonstrates the basic usage of creating a data table using the `el-table` component provided by Element UI. Please note
|
|
7
|
+
that the outer border is applied with `table-container`.
|
|
8
|
+
</p>
|
|
9
|
+
<div class="grid flex-column">
|
|
10
|
+
<div class="table-container mb-4">
|
|
11
|
+
<el-table
|
|
12
|
+
:data="tableData"
|
|
13
|
+
:default-sort="{ prop: 'date', order: 'descending' }"
|
|
14
|
+
@selection-change="handleSelectionChange"
|
|
15
|
+
ref="multipleTable"
|
|
16
|
+
height="360px"
|
|
17
|
+
style="width: 100%"
|
|
18
|
+
>
|
|
19
|
+
<el-table-column type="selection" width="55"> </el-table-column>
|
|
20
|
+
<el-table-column
|
|
21
|
+
fixed
|
|
22
|
+
prop="date"
|
|
23
|
+
label="Date"
|
|
24
|
+
sortable
|
|
25
|
+
column-key="date"
|
|
26
|
+
:filters="[
|
|
27
|
+
{ text: '2016-05-01', value: '2016-05-01' },
|
|
28
|
+
{ text: '2016-05-02', value: '2016-05-02' },
|
|
29
|
+
{ text: '2016-05-03', value: '2016-05-03' },
|
|
30
|
+
{ text: '2016-05-04', value: '2016-05-04' },
|
|
31
|
+
]"
|
|
32
|
+
:filter-method="filterHandler"
|
|
33
|
+
>
|
|
34
|
+
</el-table-column>
|
|
35
|
+
<el-table-column prop="name" label="Name" width="180"> </el-table-column>
|
|
36
|
+
<el-table-column prop="address" label="Address" :formatter="formatter"> </el-table-column>
|
|
37
|
+
<el-table-column
|
|
38
|
+
prop="tag"
|
|
39
|
+
label="Tag"
|
|
40
|
+
:filters="[
|
|
41
|
+
{ text: 'Home', value: 'Home' },
|
|
42
|
+
{ text: 'Office', value: 'Office' },
|
|
43
|
+
{ text: 'Potato', value: 'Potato' },
|
|
44
|
+
]"
|
|
45
|
+
:filter-method="filterTag"
|
|
46
|
+
filter-placement="top-start"
|
|
47
|
+
>
|
|
48
|
+
</el-table-column>
|
|
49
|
+
<el-table-column prop="name" label="Name" width="120"> </el-table-column>
|
|
50
|
+
<el-table-column prop="state" label="State" width="120"> </el-table-column>
|
|
51
|
+
<el-table-column prop="city" label="City" width="120"> </el-table-column>
|
|
52
|
+
<el-table-column prop="address" label="Address" width="300"> </el-table-column>
|
|
53
|
+
<el-table-column prop="zip" label="Zip" width="120"> </el-table-column>
|
|
54
|
+
<el-table-column fixed="right" label="Operations" width="120">
|
|
55
|
+
<template slot-scope="scope">
|
|
56
|
+
<el-button @click.native.prevent="deleteRow(scope.$index, tableData)" type="text" size="small"> Remove </el-button>
|
|
57
|
+
</template>
|
|
58
|
+
</el-table-column>
|
|
59
|
+
</el-table>
|
|
60
|
+
</div>
|
|
61
|
+
<el-pagination
|
|
62
|
+
@size-change="handleSizeChange"
|
|
63
|
+
@current-change="handleCurrentChange"
|
|
64
|
+
:current-page.sync="currentPage4"
|
|
65
|
+
:page-sizes="[100, 200, 300, 400]"
|
|
66
|
+
:page-size="100"
|
|
67
|
+
layout="total, prev, pager, next, jumper, sizes"
|
|
68
|
+
:total="400"
|
|
69
|
+
>
|
|
70
|
+
</el-pagination>
|
|
71
|
+
</div>
|
|
72
|
+
<div class="my-4 p-4 border-l-4 border-blue-600 bg-blue-100">
|
|
73
|
+
<p class="text-xs">
|
|
74
|
+
<code>
|
|
75
|
+
<div class="table-container"><el-table :data="tableData" :default-sort="{ prop: 'date', order: 'descending'
|
|
76
|
+
}"></el-table></div>
|
|
77
|
+
</code>
|
|
78
|
+
</p>
|
|
79
|
+
</div>
|
|
80
|
+
</section>
|
|
81
|
+
|
|
82
|
+
<section>
|
|
83
|
+
<h1>Expandable Row</h1>
|
|
84
|
+
<p class="p-md-c my-6">
|
|
85
|
+
When the row content is too long and you do not want to display the horizontal scroll bar, you can use the expandable row feature.
|
|
86
|
+
Activate expandable row by adding type="expand" and scoped slot. The template for el-table-column will be rendered as the contents of
|
|
87
|
+
the expanded row, and you can access the same attributes as when you are using Scoped slot in custom column templates.
|
|
88
|
+
</p>
|
|
89
|
+
<div class="grid grid-flow-col auto-cols-max gap-4">
|
|
90
|
+
<div class="table-container mb-4">
|
|
91
|
+
<el-table :data="tableData" style="width: 100%">
|
|
92
|
+
<el-table-column type="expand">
|
|
93
|
+
<template slot-scope="props">
|
|
94
|
+
<p>State: {{ props.row.state }}</p>
|
|
95
|
+
<p>City: {{ props.row.city }}</p>
|
|
96
|
+
<p>Address: {{ props.row.address }}</p>
|
|
97
|
+
<p>Zip: {{ props.row.zip }}</p>
|
|
98
|
+
</template>
|
|
99
|
+
</el-table-column>
|
|
100
|
+
<el-table-column label="Date" prop="date"> </el-table-column>
|
|
101
|
+
<el-table-column label="Name" prop="name"> </el-table-column>
|
|
102
|
+
</el-table>
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
<div class="my-4 p-4 border-l-4 border-blue-600 bg-blue-100">
|
|
106
|
+
<p class="text-xs">
|
|
107
|
+
<code>
|
|
108
|
+
<el-table :data="tableData"> <el-table-column type="expand"> <template v-slot="props"> <p>State: {
|
|
109
|
+
props.row.state } </p> </template> </el-table-column> </el-table>
|
|
110
|
+
</code>
|
|
111
|
+
</p>
|
|
112
|
+
</div>
|
|
113
|
+
</section>
|
|
114
|
+
</div>
|
|
82
115
|
</template>
|
|
116
|
+
|
|
83
117
|
<script>
|
|
84
118
|
import Vue from 'vue';
|
|
85
119
|
|
|
86
120
|
export default Vue.extend({
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
121
|
+
name: 'ThemeTable',
|
|
122
|
+
computed: {
|
|
123
|
+
gridSize() {
|
|
124
|
+
const grids = {
|
|
125
|
+
5: 'grid-cols-5',
|
|
126
|
+
6: 'grid-cols-6',
|
|
127
|
+
7: 'grid-cols-7',
|
|
128
|
+
8: 'grid-cols-8',
|
|
129
|
+
};
|
|
130
|
+
return grids;
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
data() {
|
|
134
|
+
return {
|
|
135
|
+
multipleSelection: [],
|
|
136
|
+
currentPage1: 5,
|
|
137
|
+
currentPage2: 5,
|
|
138
|
+
currentPage3: 5,
|
|
139
|
+
currentPage4: 4,
|
|
140
|
+
tableData: [
|
|
141
|
+
{
|
|
142
|
+
date: '2016-05-03',
|
|
143
|
+
name: 'Tom',
|
|
144
|
+
state: 'California',
|
|
145
|
+
city: 'Los Angeles',
|
|
146
|
+
address: 'No. 189, Grove St, Los Angeles',
|
|
147
|
+
zip: 'CA 90036',
|
|
148
|
+
tag: 'Home',
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
date: '2016-05-02',
|
|
152
|
+
name: 'Tom',
|
|
153
|
+
state: 'California',
|
|
154
|
+
city: 'Los Angeles',
|
|
155
|
+
address: 'No. 189, Grove St, Los Angeles',
|
|
156
|
+
zip: 'CA 90036',
|
|
157
|
+
tag: 'Office',
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
date: '2016-05-04',
|
|
161
|
+
name: 'Tom',
|
|
162
|
+
state: 'California',
|
|
163
|
+
city: 'Los Angeles',
|
|
164
|
+
address: 'No. 189, Grove St, Los Angeles',
|
|
165
|
+
zip: 'CA 90036',
|
|
166
|
+
tag: 'Home',
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
date: '2016-05-01',
|
|
170
|
+
name: 'Tom',
|
|
171
|
+
state: 'California',
|
|
172
|
+
city: 'Los Angeles',
|
|
173
|
+
address: 'No. 189, Grove St, Los Angeles',
|
|
174
|
+
zip: 'CA 90036',
|
|
175
|
+
tag: 'Office',
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
date: '2016-05-08',
|
|
179
|
+
name: 'Tom',
|
|
180
|
+
state: 'California',
|
|
181
|
+
city: 'Los Angeles',
|
|
182
|
+
address: 'No. 189, Grove St, Los Angeles',
|
|
183
|
+
zip: 'CA 90036',
|
|
184
|
+
tag: 'Office',
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
date: '2016-05-06',
|
|
188
|
+
name: 'Tom',
|
|
189
|
+
state: 'California',
|
|
190
|
+
city: 'Los Angeles',
|
|
191
|
+
address: 'No. 189, Grove St, Los Angeles',
|
|
192
|
+
zip: 'CA 90036',
|
|
193
|
+
tag: 'Home',
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
date: '2016-05-07',
|
|
197
|
+
name: 'Tom',
|
|
198
|
+
state: 'California',
|
|
199
|
+
city: 'Los Angeles',
|
|
200
|
+
address: 'No. 189, Grove St, Los Angeles',
|
|
201
|
+
zip: 'CA 90036',
|
|
202
|
+
tag: 'Office',
|
|
203
|
+
},
|
|
204
|
+
],
|
|
205
|
+
};
|
|
97
206
|
},
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
{
|
|
108
|
-
date: '2016-05-03',
|
|
109
|
-
name: 'Tom',
|
|
110
|
-
state: 'California',
|
|
111
|
-
city: 'Los Angeles',
|
|
112
|
-
address: 'No. 189, Grove St, Los Angeles',
|
|
113
|
-
zip: 'CA 90036',
|
|
114
|
-
tag: 'Home',
|
|
207
|
+
methods: {
|
|
208
|
+
toggleSelection(rows) {
|
|
209
|
+
if (rows) {
|
|
210
|
+
rows.forEach((row) => {
|
|
211
|
+
this.$refs.multipleTable.toggleRowSelection(row);
|
|
212
|
+
});
|
|
213
|
+
} else {
|
|
214
|
+
this.$refs.multipleTable.clearSelection();
|
|
215
|
+
}
|
|
115
216
|
},
|
|
116
|
-
{
|
|
117
|
-
|
|
118
|
-
name: 'Tom',
|
|
119
|
-
state: 'California',
|
|
120
|
-
city: 'Los Angeles',
|
|
121
|
-
address: 'No. 189, Grove St, Los Angeles',
|
|
122
|
-
zip: 'CA 90036',
|
|
123
|
-
tag: 'Office',
|
|
217
|
+
handleSelectionChange(val) {
|
|
218
|
+
this.multipleSelection = val;
|
|
124
219
|
},
|
|
125
|
-
{
|
|
126
|
-
|
|
127
|
-
name: 'Tom',
|
|
128
|
-
state: 'California',
|
|
129
|
-
city: 'Los Angeles',
|
|
130
|
-
address: 'No. 189, Grove St, Los Angeles',
|
|
131
|
-
zip: 'CA 90036',
|
|
132
|
-
tag: 'Home',
|
|
220
|
+
resetDateFilter() {
|
|
221
|
+
this.$refs.filterTable.clearFilter('date');
|
|
133
222
|
},
|
|
134
|
-
{
|
|
135
|
-
|
|
136
|
-
name: 'Tom',
|
|
137
|
-
state: 'California',
|
|
138
|
-
city: 'Los Angeles',
|
|
139
|
-
address: 'No. 189, Grove St, Los Angeles',
|
|
140
|
-
zip: 'CA 90036',
|
|
141
|
-
tag: 'Office',
|
|
223
|
+
clearFilter() {
|
|
224
|
+
this.$refs.filterTable.clearFilter();
|
|
142
225
|
},
|
|
143
|
-
{
|
|
144
|
-
|
|
145
|
-
name: 'Tom',
|
|
146
|
-
state: 'California',
|
|
147
|
-
city: 'Los Angeles',
|
|
148
|
-
address: 'No. 189, Grove St, Los Angeles',
|
|
149
|
-
zip: 'CA 90036',
|
|
150
|
-
tag: 'Office',
|
|
226
|
+
formatter(row, column) {
|
|
227
|
+
return row.address;
|
|
151
228
|
},
|
|
152
|
-
{
|
|
153
|
-
|
|
154
|
-
name: 'Tom',
|
|
155
|
-
state: 'California',
|
|
156
|
-
city: 'Los Angeles',
|
|
157
|
-
address: 'No. 189, Grove St, Los Angeles',
|
|
158
|
-
zip: 'CA 90036',
|
|
159
|
-
tag: 'Home',
|
|
229
|
+
filterTag(value, row) {
|
|
230
|
+
return row.tag === value;
|
|
160
231
|
},
|
|
161
|
-
{
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
232
|
+
filterHandler(value, row, column) {
|
|
233
|
+
console.log(row, column, value);
|
|
234
|
+
const property = column['property'];
|
|
235
|
+
return row[property] === value;
|
|
236
|
+
},
|
|
237
|
+
handleSizeChange(val) {
|
|
238
|
+
console.log(`${val} items per page`);
|
|
239
|
+
},
|
|
240
|
+
handleCurrentChange(val) {
|
|
241
|
+
console.log(`current page: ${val}`);
|
|
169
242
|
},
|
|
170
|
-
],
|
|
171
|
-
};
|
|
172
|
-
},
|
|
173
|
-
methods: {
|
|
174
|
-
toggleSelection(rows) {
|
|
175
|
-
if (rows) {
|
|
176
|
-
rows.forEach((row) => {
|
|
177
|
-
this.$refs.multipleTable.toggleRowSelection(row);
|
|
178
|
-
});
|
|
179
|
-
} else {
|
|
180
|
-
this.$refs.multipleTable.clearSelection();
|
|
181
|
-
}
|
|
182
|
-
},
|
|
183
|
-
handleSelectionChange(val) {
|
|
184
|
-
this.multipleSelection = val;
|
|
185
|
-
},
|
|
186
|
-
resetDateFilter() {
|
|
187
|
-
this.$refs.filterTable.clearFilter('date');
|
|
188
|
-
},
|
|
189
|
-
clearFilter() {
|
|
190
|
-
this.$refs.filterTable.clearFilter();
|
|
191
|
-
},
|
|
192
|
-
formatter(row, column) {
|
|
193
|
-
return row.address;
|
|
194
|
-
},
|
|
195
|
-
filterTag(value, row) {
|
|
196
|
-
return row.tag === value;
|
|
197
|
-
},
|
|
198
|
-
filterHandler(value, row, column) {
|
|
199
|
-
console.log(row, column, value);
|
|
200
|
-
const property = column['property'];
|
|
201
|
-
return row[property] === value;
|
|
202
|
-
},
|
|
203
|
-
handleSizeChange(val) {
|
|
204
|
-
console.log(`${val} items per page`);
|
|
205
|
-
},
|
|
206
|
-
handleCurrentChange(val) {
|
|
207
|
-
console.log(`current page: ${val}`);
|
|
208
243
|
},
|
|
209
|
-
},
|
|
210
244
|
});
|
|
211
245
|
</script>
|
|
@@ -1,38 +1,43 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
2
|
+
<div class="container">
|
|
3
|
+
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
4
|
+
<el-tab-pane label="Button" name="first"><ThemeButtons></ThemeButtons></el-tab-pane>
|
|
5
|
+
<el-tab-pane label="Typo" name="second"><ThemeTypo></ThemeTypo></el-tab-pane>
|
|
6
|
+
<el-tab-pane label="Input" name="third"><ThemeInputs></ThemeInputs></el-tab-pane>
|
|
7
|
+
<el-tab-pane label="Checkbox" name="fourth"><ThemeCheckbox></ThemeCheckbox></el-tab-pane>
|
|
8
|
+
<el-tab-pane label="Radio" name="five"><ThemeRadio></ThemeRadio></el-tab-pane>
|
|
9
|
+
<el-tab-pane label="Number" name="six"><ThemeInputNumbers></ThemeInputNumbers></el-tab-pane>
|
|
10
|
+
<el-tab-pane label="Picker" name="seven"><ThemeTimePicker></ThemeTimePicker></el-tab-pane>
|
|
11
|
+
<el-tab-pane label="Select" name="eight"><ThemeSelect></ThemeSelect></el-tab-pane>
|
|
12
|
+
<el-tab-pane label="Form" name="nine"><ThemeForm></ThemeForm></el-tab-pane>
|
|
13
|
+
<el-tab-pane label="Link" name="ten"><ThemeLink></ThemeLink></el-tab-pane>
|
|
14
|
+
<el-tab-pane label="Tag" name="eleven"><ThemeTag></ThemeTag></el-tab-pane>
|
|
15
|
+
<el-tab-pane label="Switch" name="twelve"><ThemeToggle></ThemeToggle></el-tab-pane>
|
|
16
|
+
<el-tab-pane label="Table" name="thirteen"><ThemeTable></ThemeTable></el-tab-pane>
|
|
17
|
+
<el-tab-pane label="Tooltip" name="fourteen"><ThemeTooltip></ThemeTooltip></el-tab-pane>
|
|
18
|
+
<el-tab-pane label="Alert" name="fifteen"><ThemeAlert></ThemeAlert></el-tab-pane>
|
|
19
|
+
<el-tab-pane label="Cascader" name="sixteen"><ThemeCascader></ThemeCascader></el-tab-pane>
|
|
20
|
+
<el-tab-pane label="Badge" name="seventeen"><ThemeBadge></ThemeBadge></el-tab-pane>
|
|
21
|
+
<el-tab-pane label="Avatar" name="eighteen"><ThemeAvatar></ThemeAvatar></el-tab-pane>
|
|
22
|
+
<el-tab-pane label="Logo" name="nineteen"><ThemeLogo></ThemeLogo></el-tab-pane>
|
|
23
|
+
</el-tabs>
|
|
24
|
+
</div>
|
|
20
25
|
</template>
|
|
21
26
|
<script>
|
|
22
27
|
import ThemeInputNumbers from './ThemeInputNumbers.vue';
|
|
23
28
|
import ThemeInputs from './ThemeInputs.vue';
|
|
24
29
|
|
|
25
30
|
export default {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
methods: {
|
|
32
|
-
handleClick(tab, event) {
|
|
33
|
-
console.log(tab, event);
|
|
31
|
+
data() {
|
|
32
|
+
return {
|
|
33
|
+
activeName: 'first',
|
|
34
|
+
};
|
|
34
35
|
},
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
methods: {
|
|
37
|
+
handleClick(tab, event) {
|
|
38
|
+
console.log(tab, event);
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
components: { ThemeInputs, ThemeInputNumbers },
|
|
37
42
|
};
|
|
38
43
|
</script>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const components = {};
|
|
2
2
|
const requireComponent = require.context(
|
|
3
|
-
'.', //
|
|
4
|
-
false, //
|
|
5
|
-
/[A-Z]\w+\.(vue)$/, // Vue
|
|
6
|
-
// EXPERIMENTAL: /[A-Z]\w+\.(vue|js)$/, // Vue
|
|
3
|
+
'.', // read from current directory
|
|
4
|
+
false, // don't look in subdirectories
|
|
5
|
+
/[A-Z]\w+\.(vue)$/, // only look for Vue files
|
|
6
|
+
// EXPERIMENTAL: /[A-Z]\w+\.(vue|js)$/, // only look for Vue or JS files
|
|
7
7
|
);
|
|
8
8
|
|
|
9
9
|
requireComponent.keys().forEach((fileName) => {
|
|
@@ -11,7 +11,7 @@ requireComponent.keys().forEach((fileName) => {
|
|
|
11
11
|
const componentName = fileName
|
|
12
12
|
.split('/')
|
|
13
13
|
.pop()
|
|
14
|
-
.replace(/\.\w+$/, ''); //
|
|
14
|
+
.replace(/\.\w+$/, ''); // remove file extension and set file name as component name
|
|
15
15
|
|
|
16
16
|
components[componentName] = componentConfig.default || componentConfig;
|
|
17
17
|
});
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="pt-8 pb-16 flex gap-12 flex-col">
|
|
3
|
+
<section>
|
|
4
|
+
<h1>Alert</h1>
|
|
5
|
+
<p class="p-lg-c my-6">Uyarı bileşenleri, sayfada otomatik olarak kaybolmayan non-overlay mesajlarını görüntülemek için kullanılır.</p>
|
|
6
|
+
<div class="grid grid-flow-col auto-cols-max gap-4">
|
|
7
|
+
<el-alert :title="`${item}`" :type="item" class="isax-activity" v-for="(item, key) in colors" :key="key"></el-alert>
|
|
8
|
+
</div>
|
|
9
|
+
<div class="my-4 p-4 border-l-4 border-blue-600 bg-blue-100">
|
|
10
|
+
<p class="text-xs">
|
|
11
|
+
<code><el-alert title="Success alert" type="success" class="isax-activity"></el-alert></code>
|
|
12
|
+
</p>
|
|
13
|
+
</div>
|
|
14
|
+
</section>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
<script>
|
|
18
|
+
import Vue from 'vue';
|
|
19
|
+
|
|
20
|
+
export default Vue.extend({
|
|
21
|
+
name: 'ThemeTable',
|
|
22
|
+
computed: {
|
|
23
|
+
gridSize() {
|
|
24
|
+
const grids = {
|
|
25
|
+
5: 'grid-cols-5',
|
|
26
|
+
6: 'grid-cols-6',
|
|
27
|
+
7: 'grid-cols-7',
|
|
28
|
+
8: 'grid-cols-8',
|
|
29
|
+
};
|
|
30
|
+
return grids;
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
data() {
|
|
34
|
+
return {
|
|
35
|
+
colors: ['primary', 'secondary', 'gray', 'warning', 'danger', 'info', 'success'],
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
methods: {
|
|
39
|
+
toggleSelection(rows) {
|
|
40
|
+
if (rows) {
|
|
41
|
+
rows.forEach((row) => {
|
|
42
|
+
this.$refs.multipleTable.toggleRowSelection(row);
|
|
43
|
+
});
|
|
44
|
+
} else {
|
|
45
|
+
this.$refs.multipleTable.clearSelection();
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
handleSelectionChange(val) {
|
|
49
|
+
this.multipleSelection = val;
|
|
50
|
+
},
|
|
51
|
+
resetDateFilter() {
|
|
52
|
+
this.$refs.filterTable.clearFilter('date');
|
|
53
|
+
},
|
|
54
|
+
clearFilter() {
|
|
55
|
+
this.$refs.filterTable.clearFilter();
|
|
56
|
+
},
|
|
57
|
+
formatter(row, column) {
|
|
58
|
+
return row.address;
|
|
59
|
+
},
|
|
60
|
+
filterTag(value, row) {
|
|
61
|
+
return row.tag === value;
|
|
62
|
+
},
|
|
63
|
+
filterHandler(value, row, column) {
|
|
64
|
+
console.log(row, column, value);
|
|
65
|
+
const property = column['property'];
|
|
66
|
+
return row[property] === value;
|
|
67
|
+
},
|
|
68
|
+
handleSizeChange(val) {
|
|
69
|
+
console.log(`${val} items per page`);
|
|
70
|
+
},
|
|
71
|
+
handleCurrentChange(val) {
|
|
72
|
+
console.log(`current page: ${val}`);
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
</script>
|