touch-vue-pc 1.0.4 → 1.0.5
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/package.json +2 -10
- package/src/App.vue +2 -1
- package/src/main.js +2 -4
- package/src/packages/index.js +26 -0
- package/src/packages/table/index.js +5 -0
- package/src/packages/table/src/table.vue +42 -0
- package/src/router/index.js +0 -8
- package/package-lock.json +0 -7541
package/package.json
CHANGED
@@ -1,22 +1,14 @@
|
|
1
1
|
{
|
2
2
|
"name": "touch-vue-pc",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.5",
|
4
4
|
"private": false,
|
5
|
-
"main": "
|
5
|
+
"main": "src/packages/index.js",
|
6
6
|
"scripts": {
|
7
7
|
"serve": "vue-cli-service serve",
|
8
8
|
"build": "vue-cli-service build",
|
9
9
|
"lib":"vue-cli-service build --target lib --name touch-vue-pc --dest lib ./packages/index.js",
|
10
10
|
"pub": "npm publish --access public"
|
11
11
|
},
|
12
|
-
"files": [
|
13
|
-
"lib/*",
|
14
|
-
"dist/*",
|
15
|
-
"src/*",
|
16
|
-
"public/*",
|
17
|
-
"*.json",
|
18
|
-
"*.js"
|
19
|
-
],
|
20
12
|
"dependencies": {
|
21
13
|
"core-js": "^3.8.3",
|
22
14
|
"element-ui": "^2.15.10",
|
package/src/App.vue
CHANGED
package/src/main.js
CHANGED
@@ -2,10 +2,8 @@ import Vue from 'vue'
|
|
2
2
|
import App from './App.vue'
|
3
3
|
import router from './router'
|
4
4
|
import store from './store'
|
5
|
-
import
|
6
|
-
|
7
|
-
Vue.use(Button)
|
8
|
-
Vue.use(Input)
|
5
|
+
import TouchVuePc from './packages/index.js'
|
6
|
+
Vue.use(TouchVuePc)
|
9
7
|
Vue.config.productionTip = false
|
10
8
|
|
11
9
|
new Vue({
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import ElementUI from 'element-ui'
|
2
|
+
import 'element-ui/lib/theme-chalk/index.css';
|
3
|
+
import TcTable from './table/index.js'
|
4
|
+
const components = [
|
5
|
+
TcTable
|
6
|
+
]
|
7
|
+
const install = function (Vue) {
|
8
|
+
|
9
|
+
Vue.use(ElementUI)
|
10
|
+
components.forEach(component => {
|
11
|
+
Vue.component(component.name, component);
|
12
|
+
});
|
13
|
+
}
|
14
|
+
|
15
|
+
if (typeof window !== 'undefined' && window.Vue) {
|
16
|
+
install(window.Vue);
|
17
|
+
}
|
18
|
+
|
19
|
+
export default {
|
20
|
+
install,
|
21
|
+
TcTable
|
22
|
+
}
|
23
|
+
export {
|
24
|
+
install,
|
25
|
+
TcTable
|
26
|
+
}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
<template>
|
2
|
+
<div v-show="showInput">
|
3
|
+
<el-input v-model="currentValue" v-bind="$props" :placeholder="placeholder" ref="input">
|
4
|
+
|
5
|
+
</el-input>
|
6
|
+
</div>
|
7
|
+
</template>
|
8
|
+
<script>
|
9
|
+
import { Input, Button } from 'element-ui'
|
10
|
+
|
11
|
+
export default {
|
12
|
+
name: "TcTable",
|
13
|
+
data() {
|
14
|
+
return {
|
15
|
+
editorErrorMessage: null,
|
16
|
+
showInput: true,
|
17
|
+
currentValue:''
|
18
|
+
};
|
19
|
+
},
|
20
|
+
props: {
|
21
|
+
...Input.props, //继承elementUI原有的props
|
22
|
+
...Button.props,
|
23
|
+
value: {
|
24
|
+
type: [Number, String],
|
25
|
+
default: ''
|
26
|
+
},
|
27
|
+
placeholder: {
|
28
|
+
type: String,
|
29
|
+
default: '请输入内容'
|
30
|
+
},
|
31
|
+
},
|
32
|
+
methods: {
|
33
|
+
},
|
34
|
+
mounted() {
|
35
|
+
this.currentValue=this.value
|
36
|
+
console.log('mounted');
|
37
|
+
},
|
38
|
+
}
|
39
|
+
|
40
|
+
</script>
|
41
|
+
<style stylus="css">
|
42
|
+
</style>
|
package/src/router/index.js
CHANGED
@@ -18,14 +18,6 @@ const routes = [
|
|
18
18
|
// which is lazy-loaded when the route is visited.
|
19
19
|
component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
|
20
20
|
},
|
21
|
-
{
|
22
|
-
path: '/table',
|
23
|
-
name: 'table',
|
24
|
-
// route level code-splitting
|
25
|
-
// this generates a separate chunk (about.[hash].js) for this route
|
26
|
-
// which is lazy-loaded when the route is visited.
|
27
|
-
component: () => import(/* webpackChunkName: "about" */ '../../packages/table/src/table.vue')
|
28
|
-
}
|
29
21
|
]
|
30
22
|
|
31
23
|
const router = new VueRouter({
|