Skip to content
This repository was archived by the owner on Apr 1, 2022. It is now read-only.

Commit 04ca02d

Browse files
author
Ken Berkeley
committed
[improve] replace all the meta classes (e.g. .m-0 .p-0) with inline styles
1 parent 982a748 commit 04ca02d

File tree

6 files changed

+13
-43
lines changed

6 files changed

+13
-43
lines changed

lib/HeadSort.vue

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<a href="javascript:;" @click="handleSort" class="p-l-5">
2+
<a href="javascript:;" @click="handleSort" style="padding-left: 5px">
33
<i class="fa" :class="[cls, { 'text-muted': !this.order }]"></i>
44
</a>
55
</template>
@@ -36,8 +36,3 @@ export default {
3636
}
3737
}
3838
</script>
39-
<style>
40-
.p-l-5 {
41-
padding-left: 5px;
42-
}
43-
</style>

lib/HeaderSettings/ColumnGroup.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ export default {
6464
</script>
6565
<style>
6666
.-col-group {
67-
width: 150px;
6867
display: inline-block;
68+
width: 150px;
6969
padding: 0;
7070
vertical-align: top;
7171
}

lib/HeaderSettings/index.vue

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
<i class="fa" :class="[usingBak && 'text-info', processingCls || 'fa-cog']"></i>
55
<span class="caret"></span>
66
</button>
7-
<div class="dropdown-menu p-10 clearfix" :style="drpMenuStyle">
7+
<div class="dropdown-menu clearfix" :style="[drpMenuStyle, { padding: '10px 10px 0' }]">
88
<div class="-col-group-container">
99
<column-group v-for="(group, idx) in colGroups" :key="idx" ref="colGroups" :col-group="group" />
1010
</div>
11-
<div class="m-10 clearfix">
11+
<div class="clearfix" style="margin: 10px">
1212
<div class="btn-group btn-group-sm pull-right">
1313
<button class="btn btn-default" @click="apply()">
1414
{{ $i18n('Apply') }}
1515
</button>
1616
<template v-if="supportBackup">
17-
<button data-toggle="dropdown" class="btn btn-default dropdown-toggle box-shadow-none">
17+
<button data-toggle="dropdown" class="btn btn-default dropdown-toggle" style="box-shadow: none">
1818
<span class="caret"></span>
1919
</button>
2020
<ul class="dropdown-menu">
@@ -34,7 +34,7 @@
3434
</template>
3535
</div>
3636
</div>
37-
<small v-if="usingBak" class="pull-left text-muted m-t--8">
37+
<small v-if="usingBak" class="pull-left text-muted" style="margin-top: -8px">
3838
( {{ $i18n('Using local settings') }} )
3939
</small>
4040
</div>
@@ -126,16 +126,4 @@ export default {
126126
.-col-group-container {
127127
border-bottom: 1px solid #ddd;
128128
}
129-
.p-10 {
130-
padding: 10px 10px 0 10px;
131-
}
132-
.m-10 {
133-
margin: 10px;
134-
}
135-
.m-t--8 {
136-
margin-top: -8px;
137-
}
138-
.box-shadow-none {
139-
box-shadow: none !important;
140-
}
141129
</style>

lib/Pagination.vue

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<ul class="pagination m-0">
2+
<ul class="pagination" style="margin: 0">
33
<li v-if="!isFirstPage" @click="turnPage(-1)">
44
<a href="javascript:;">
55
<i class="fa fa-arrow-left"></i>
@@ -66,8 +66,3 @@ export default {
6666
}
6767
}
6868
</script>
69-
<style>
70-
.m-0 {
71-
margin: 0;
72-
}
73-
</style>

lib/index.vue

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<template>
22
<div>
3-
<div v-if="$slots.default || HeaderSettings" class="m-b-10 clearfix">
3+
<div v-if="$slots.default || HeaderSettings" class="clearfix" style="margin-bottom: 10px">
44
<header-settings v-if="HeaderSettings" class="pull-right"
55
:col-groups="columns" :support-backup="supportBackup">
66
</header-settings>
77
<slot></slot>
88
</div>
99
<!-- `.panel.panel-default` is for rounded table, see http://stackoverflow.com/a/20903465/5172890 -->
10-
<div class="table-responsive panel panel-default m-b-10">
10+
<div class="table-responsive panel panel-default" style="margin-bottom: 10px">
1111
<table class="table table-striped table-hover" :class="tblClass" :style="tblStyle">
1212
<thead>
1313
<transition-group name="fade" tag="tr">
@@ -26,7 +26,7 @@
2626
{{ column.title }}
2727
</template>
2828

29-
<i v-if="column.explain" class="fa fa-info-circle cursor-help" :title="column.explain"></i>
29+
<i v-if="column.explain" class="fa fa-info-circle" style="cursor: help" :title="column.explain"></i>
3030
<head-sort v-if="column.sort" :field="column.field" :query="query" />
3131
</th>
3232
</transition-group>
@@ -96,7 +96,7 @@
9696
</table>
9797
</div><!-- .table-responsive -->
9898
<div v-if="Pagination" class="row">
99-
<div class="col-sm-6 nowrap">
99+
<div class="col-sm-6" style="white-space: nowrap">
100100
<strong>{{ $i18n('Total') }} {{ total }} {{ $i18n(',') }}</strong>
101101
<limit-select :query="query" />
102102
</div>
@@ -220,21 +220,13 @@ export default {
220220
}
221221
</script>
222222
<style>
223+
/* transition effect: fade */
223224
.fade-enter-active, .fade-leave-active {
224225
transition: opacity .2s;
225226
}
226227
.fade-enter, .fade-leave-active {
227228
opacity: 0;
228229
}
229-
.m-b-10 {
230-
margin-bottom: 10px;
231-
}
232-
.nowrap {
233-
white-space: nowrap;
234-
}
235-
.cursor-help {
236-
cursor: help;
237-
}
238230
.-summary-row {
239231
font-weight: bold;
240232
background-color: #ddd !important;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vue2-datatable-component",
33
"description": "The Best Datatable for Vue.js 2.x which never sucks",
44
"author": "Ken Berkeley <[email protected]>",
5-
"version": "1.1.6",
5+
"version": "1.1.7",
66
"scripts": {
77
"start": "vue build examples/src/app.js --config vue-build.config.js",
88
"build": "vue build examples/src/app.js --config vue-build.config.js --prod",

0 commit comments

Comments
 (0)