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

Commit a4f7fc2

Browse files
author
Ken Berkeley
committed
[refactor] rename: src{index.js => main.js, Datatable.vue => index.vue}
1 parent 05f76ce commit a4f7fc2

File tree

16 files changed

+18
-19
lines changed

16 files changed

+18
-19
lines changed

build/lib.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
var path = require('path')
33

44
module.exports = {
5-
entry: path.join(__dirname, '../src/index.js'),
5+
entry: path.join(__dirname, '../src/main.js'),
66
html: false,
77
filename: {
88
js: 'min.js',

dist/min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/en/details/README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ It would be better for you to understand the structure of this Datatable before
55
The source tree [`src/`](https://github.com/OneWayTech/vue2-datatable/tree/master/src) is shown as below:
66

77
```
8-
src/
98
├─ _mixins/
109
├─ _utils/
1110
├─ HeaderSettings/
@@ -19,9 +18,9 @@ src/
1918
│   ├─ TableFooter.vue
2019
│   ├─ TableFrame.vue
2120
│   └─ TableHeader.vue
22-
├─ Datatable.vue
23-
├─ index.js
21+
├─ index.vue
2422
├─ LimitSelect.vue
23+
├─ main.js
2524
└─ Pagination.vue
2625
```
2726

doc/en/details/props-data.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Normally, it's not necessary to talk about this prop (it's too simple).
77
But this Datatable supports `nested components` feature by performing magic on it.
88

9-
It would be more direct to excerpt `watch:data` from the source code ([`src/Datatable.vue`](https://github.com/OneWayTech/vue2-datatable/blob/master/src/Datatable.vue)) to see how it works:
9+
It would be more direct to excerpt `watch:data` from the source code ([`src/index.vue`](https://github.com/OneWayTech/vue2-datatable/blob/master/src/index.vue)) to see how it works:
1010

1111
```js
1212
watch: {

doc/en/details/props-query.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# `:query`
22

3-
Let's see how this Datatable initializes `query` (source: `created` hook in [`src/Datatable.vue`](https://github.com/OneWayTech/vue2-datatable/blob/master/src/Datatable.vue)):
3+
Let's see how this Datatable initializes `query` (source: `created` hook in [`src/index.vue`](https://github.com/OneWayTech/vue2-datatable/blob/master/src/index.vue)):
44

55
```js
66
created () {

doc/en/i18n.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Wow, it's just a normal object!
3838

3939
## ⊙ Magic
4040

41-
Copy and paste from [`src/index.js`](https://github.com/OneWayTech/vue2-datatable/blob/master/src/index.js):
41+
Copy and paste from [`src/main.js`](https://github.com/OneWayTech/vue2-datatable/blob/master/src/main.js):
4242

4343
```js
4444
import Datatable from './Datatable.vue'

doc/zh-cn/details/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
│   ├─ TableFooter.vue
1919
│   ├─ TableFrame.vue
2020
│   └─ TableHeader.vue
21-
├─ Datatable.vue
22-
├─ index.js
21+
├─ index.vue
2322
├─ LimitSelect.vue
23+
├─ main.js
2424
└─ Pagination.vue
2525
```
2626

doc/zh-cn/details/props-data.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
> 实际上该项应该叫 `rows` 才合理,但主流的 Datatable 都是这样称呼,我也不能免俗
44
55
本身该项是没啥好讲的,但本 Datatable 支持**内嵌组件 (nested component)**,靠的就是在这里做文章
6-
直接把源码 [`src/Datatable.vue`](https://github.com/OneWayTech/vue2-datatable/blob/master/src/Datatable.vue) 中的 `watch:data` 搬出来:
6+
直接把源码 [`src/index.vue`](https://github.com/OneWayTech/vue2-datatable/blob/master/src/index.vue) 中的 `watch:data` 搬出来:
77

88
```js
99
watch: {

doc/zh-cn/details/props-query.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# `:query`
22

3-
让我们来看看本 Datatable 是如何初始化 `query` 的(源码见 [`src/Datatable.vue`](https://github.com/OneWayTech/vue2-datatable/blob/master/src/Datatable.vue) 中的 `created` 钩子函数):
3+
让我们来看看本 Datatable 是如何初始化 `query` 的(源码见 [`src/index.vue`](https://github.com/OneWayTech/vue2-datatable/blob/master/src/index.vue) 中的 `created` 钩子函数):
44

55
```js
66
created () {

doc/zh-cn/i18n.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default {
3838

3939
## ⊙ 原理
4040

41-
本组件采用的是最简单的方案(见 [`src/index.js`](https://github.com/OneWayTech/vue2-datatable/blob/master/src/index.js)):
41+
本组件采用的是最简单的方案(见 [`src/main.js`](https://github.com/OneWayTech/vue2-datatable/blob/master/src/main.js)):
4242

4343
```js
4444
import Datatable from './Datatable.vue'

examples/dist/client.73ad0f32.js renamed to examples/dist/client.3b2a3d53.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/dist/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212

1313
<script src="//unpkg.com/jquery@2.1.4/dist/jquery.min.js"></script>
1414
<script src="//unpkg.com/bootstrap@3.3.5/dist/js/bootstrap.min.js"></script>
15-
<script type="text/javascript" src="client.73ad0f32.js"></script></body>
15+
<script type="text/javascript" src="client.3b2a3d53.js"></script></body>
1616
</html>

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "vue2-datatable-component",
33
"description": "The best Datatable for Vue.js 2.x which never sucks",
4-
"version": "2.1.9",
4+
"version": "2.1.10",
55
"main": "dist/min.js",
6-
"module": "src/index.js",
6+
"module": "src/main.js",
77
"author": "Ken Berkeley <kenberkeley@foxmail.com>",
88
"files": [
99
"dist",

src/_mixins/props.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default {
1919
},
2020
data () {
2121
if (!comp) {
22-
// only src/Datatable.vue could reach here
22+
// only src/index.vue could reach here
2323
comp = this.$parent.$options.components
2424
}
2525
return {
File renamed without changes.

src/index.js renamed to src/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Datatable from './Datatable.vue'
1+
import Datatable from './index.vue'
22

33
Datatable.install = (Vue, options) => {
44
const locale = options && options.locale || {}

0 commit comments

Comments
 (0)