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

Commit a9f87cd

Browse files
author
Ken Berkeley
committed
[improve] doc
1 parent 2aa6991 commit a9f87cd

File tree

4 files changed

+19
-7
lines changed

4 files changed

+19
-7
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
[Online examples](https://OneWayTech.github.io/vue2-datatable/examples/dist)
1111

1212
[npm-url]: https://www.npmjs.com/package/vue2-datatable-component
13-
[npm-v-img]: http://img.shields.io/npm/v/vue2-datatable-component.svg
14-
[npm-dl-img]: http://img.shields.io/npm/dm/vue2-datatable-component.svg
13+
[npm-v-img]: https://img.shields.io/npm/v/vue2-datatable-component.svg
14+
[npm-dl-img]: https://img.shields.io/npm/dm/vue2-datatable-component.svg

doc/_coverpage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
[The best Datatable for Vue.js 2.x which never sucks ↓](README)
77

88
[npm-url]: https://www.npmjs.com/package/vue2-datatable-component
9-
[npm-v-img]: http://img.shields.io/npm/v/vue2-datatable-component.svg
10-
[npm-dl-img]: http://img.shields.io/npm/dm/vue2-datatable-component.svg
9+
[npm-v-img]: https://img.shields.io/npm/v/vue2-datatable-component.svg
10+
[npm-dl-img]: https://img.shields.io/npm/dm/vue2-datatable-component.svg

doc/en/i18n.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Wow, it's just a normal object!
4242
Copy and paste from [`src/index.js`](https://github.com/OneWayTech/vue2-datatable/blob/master/src/index.js):
4343

4444
```js
45-
module.exports = {
45+
var Datatable = {
4646
install: function (Vue, options) {
4747
var locale = options && options.locale || {};
4848

@@ -54,6 +54,12 @@ module.exports = {
5454
Vue.component('Datatable', require('./Datatable.vue'));
5555
}
5656
};
57+
58+
if (typeof window !== 'undefined' && window.Vue) {
59+
window.Vue.use(Datatable)
60+
}
61+
62+
module.exports = Datatable;
5763
```
5864

5965
Apply to [`src/LimitSelect.vue`](https://github.com/OneWayTech/vue2-datatable/blob/master/src/LimitSelect.vue):

doc/zh-cn/i18n.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ module.exports = {
4242
本组件采用的是最简单的方案(见 [`src/index.js`](https://github.com/OneWayTech/vue2-datatable/blob/master/src/index.js)):
4343

4444
```js
45-
module.exports = {
45+
var Datatable = {
4646
install: function (Vue, options) {
4747
var locale = options && options.locale || {};
4848

@@ -51,9 +51,15 @@ module.exports = {
5151
return locale[srcTxt] || srcTxt;
5252
};
5353

54-
Vue.component('Datatable', require('./src/Datatable.vue'));
54+
Vue.component('Datatable', require('./Datatable.vue'));
5555
}
5656
};
57+
58+
if (typeof window !== 'undefined' && window.Vue) {
59+
window.Vue.use(Datatable)
60+
}
61+
62+
module.exports = Datatable;
5763
```
5864

5965
模板中是这样操作(以 [`src/LimitSelect.vue`](https://github.com/OneWayTech/vue2-datatable/blob/master/src/LimitSelect.vue) 为例):

0 commit comments

Comments
 (0)