touch-vue-pc 1.0.0 → 1.0.1
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/index.js +4 -1
- package/package.json +5 -2
- package/pages/table/index.js +8 -0
- package/pages/table/src/index.vue +31 -0
package/index.js
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
|
+
import Vue from 'vue'
|
2
3
|
const axios = require('axios');
|
3
|
-
|
4
|
+
import ElementUI from 'element-ui'
|
5
|
+
import 'element-ui/lib/theme-chalk/index.css'
|
6
|
+
Vue.use(ElementUI)
|
4
7
|
axios.get('https://api.gushi.ci/all.json')
|
5
8
|
.then(function (response) {
|
6
9
|
let data = response.data || {};
|
package/package.json
CHANGED
@@ -1,13 +1,16 @@
|
|
1
1
|
{
|
2
2
|
"name": "touch-vue-pc",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.1",
|
4
4
|
"description": "touch-vue-pc",
|
5
5
|
"bin": {
|
6
6
|
"touch-vue-pc": "index.js"
|
7
7
|
},
|
8
8
|
"main": "index.js",
|
9
9
|
"scripts": {
|
10
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
10
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
11
|
+
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
|
12
|
+
"start": "npm run dev",
|
13
|
+
"build": "node build/build.js"
|
11
14
|
},
|
12
15
|
"author": "guoyq",
|
13
16
|
"license": "ISC",
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<template>
|
2
|
+
<el-table :data="data">
|
3
|
+
<el-table-column
|
4
|
+
v-for="(item,index) in headData"
|
5
|
+
:key="index"
|
6
|
+
:prop="item.prop"
|
7
|
+
:label="item.label"
|
8
|
+
:width="item.width">
|
9
|
+
</el-table-column>
|
10
|
+
</el-table>
|
11
|
+
</template>
|
12
|
+
<script>
|
13
|
+
export default {
|
14
|
+
props: {
|
15
|
+
data: {
|
16
|
+
type: Array,
|
17
|
+
default: function() {
|
18
|
+
return [];
|
19
|
+
}
|
20
|
+
},
|
21
|
+
headData: {
|
22
|
+
type: Array,
|
23
|
+
default: function() {
|
24
|
+
return [];
|
25
|
+
}
|
26
|
+
},
|
27
|
+
|
28
|
+
},
|
29
|
+
|
30
|
+
}
|
31
|
+
</script>
|