You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+59-19Lines changed: 59 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,13 @@
2
2
3
3
[](https://gitter.im/gurghet/vue-smart-table?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
<nationalitycol="nat"></nationality><!-- queries a remote server for country code to country name conversion -->
36
+
<fontawesomecol="gender"></fontawesome><!-- font awesome! -->
32
37
</smart-table>
33
38
```
34
39
@@ -40,7 +45,7 @@ and you get this
40
45
41
46
## Installation
42
47
43
-
#### Webpack/Browserify
48
+
#### If you use Webpack/Browserify
44
49
45
50
```bash
46
51
npm install vue-smart-table --save
@@ -52,17 +57,43 @@ In your app then you write:
52
57
importSmartTablefrom"vue-smart-table"
53
58
Vue.component('smart-table', SmartTable)
54
59
```
60
+
Alternatively you can add it to your components options
61
+
62
+
```javascript
63
+
importSmartTablefrom"vue-smart-table"
64
+
// ...
65
+
components: {
66
+
'smart-table': SmartTable
67
+
}
68
+
// ...
69
+
```
70
+
In Webpack you will have to transpile some `.js` files inside the vue-smart-table, since the `node_modules` directory it’s excluded by default in the `vue-cli` template, remember to enable it. This means that if your js loader is like this:
71
+
72
+
```javascript
73
+
{
74
+
test:/\.js$/,
75
+
loader:'babel',
76
+
include: projectRoot,
77
+
exclude:/node_modules/// <-- this needs to be changed
78
+
}
79
+
```
80
+
You will have to spare the folder `node_modules/vue-smart-table/src/components` from exclusion. Just turn the `exclude` property to:
0 commit comments