touch-vue-pc 1.0.3 → 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/README.md +0 -5
- package/lib/touch-vue-pc.common.js +9 -47
- package/lib/touch-vue-pc.common.js.map +1 -1
- package/lib/touch-vue-pc.umd.js +9 -47
- package/lib/touch-vue-pc.umd.js.map +1 -1
- package/lib/touch-vue-pc.umd.min.js +1 -1
- package/lib/touch-vue-pc.umd.min.js.map +1 -1
- package/package.json +12 -36
- package/src/App.vue +20 -15
- package/src/components/HelloWorld.vue +3 -2
- package/src/main.js +13 -8
- package/{packages → src/packages}/index.js +12 -8
- package/src/packages/table/index.js +5 -0
- package/src/packages/table/src/table.vue +42 -0
- package/src/router/index.js +27 -0
- package/src/store/index.js +17 -0
- package/src/views/AboutView.vue +5 -0
- package/src/views/HomeView.vue +18 -0
- package/vue.config.js +1 -2
- package/package-lock.json +0 -8378
- package/packages/table/index.js +0 -5
- package/packages/table/src/table.vue +0 -73
package/package.json
CHANGED
@@ -1,54 +1,30 @@
|
|
1
1
|
{
|
2
2
|
"name": "touch-vue-pc",
|
3
|
-
"version": "1.0.
|
4
|
-
"
|
5
|
-
"
|
6
|
-
"touch-vue-pc": "./packages/index.js"
|
7
|
-
},
|
3
|
+
"version": "1.0.5",
|
4
|
+
"private": false,
|
5
|
+
"main": "src/packages/index.js",
|
8
6
|
"scripts": {
|
9
7
|
"serve": "vue-cli-service serve",
|
10
8
|
"build": "vue-cli-service build",
|
11
|
-
"
|
12
|
-
"
|
9
|
+
"lib":"vue-cli-service build --target lib --name touch-vue-pc --dest lib ./packages/index.js",
|
10
|
+
"pub": "npm publish --access public"
|
13
11
|
},
|
14
|
-
"files": [
|
15
|
-
"lib/*",
|
16
|
-
"dist/*",
|
17
|
-
"src/*",
|
18
|
-
"public/*",
|
19
|
-
"packages/*",
|
20
|
-
"*.json",
|
21
|
-
"*.js"
|
22
|
-
],
|
23
12
|
"dependencies": {
|
24
13
|
"core-js": "^3.8.3",
|
25
14
|
"element-ui": "^2.15.10",
|
26
|
-
"vue": "^2.6.14"
|
15
|
+
"vue": "^2.6.14",
|
16
|
+
"vue-router": "^3.5.1",
|
17
|
+
"vuex": "^3.6.2"
|
27
18
|
},
|
28
19
|
"devDependencies": {
|
29
|
-
"@babel/core": "^7.12.16",
|
30
|
-
"@babel/eslint-parser": "^7.12.16",
|
31
20
|
"@vue/cli-plugin-babel": "~5.0.0",
|
32
|
-
"@vue/cli-plugin-
|
21
|
+
"@vue/cli-plugin-router": "~5.0.0",
|
22
|
+
"@vue/cli-plugin-vuex": "~5.0.0",
|
33
23
|
"@vue/cli-service": "~5.0.0",
|
34
|
-
"
|
35
|
-
"
|
24
|
+
"sass": "^1.32.7",
|
25
|
+
"sass-loader": "^12.0.0",
|
36
26
|
"vue-template-compiler": "^2.6.14"
|
37
27
|
},
|
38
|
-
"eslintConfig": {
|
39
|
-
"root": true,
|
40
|
-
"env": {
|
41
|
-
"node": true
|
42
|
-
},
|
43
|
-
"extends": [
|
44
|
-
"plugin:vue/essential",
|
45
|
-
"eslint:recommended"
|
46
|
-
],
|
47
|
-
"parserOptions": {
|
48
|
-
"parser": "@babel/eslint-parser"
|
49
|
-
},
|
50
|
-
"rules": {}
|
51
|
-
},
|
52
28
|
"browserslist": [
|
53
29
|
"> 1%",
|
54
30
|
"last 2 versions",
|
package/src/App.vue
CHANGED
@@ -1,28 +1,33 @@
|
|
1
1
|
<template>
|
2
2
|
<div id="app">
|
3
|
-
<
|
4
|
-
|
3
|
+
<!-- <nav>
|
4
|
+
<router-link to="/">Home</router-link> |
|
5
|
+
<router-link to="/about">About</router-link>
|
6
|
+
</nav> -->
|
7
|
+
<!-- <router-view/> -->
|
8
|
+
<tc-table></tc-table>
|
5
9
|
</div>
|
6
10
|
</template>
|
7
11
|
|
8
|
-
<
|
9
|
-
import HelloWorld from './components/HelloWorld.vue'
|
10
|
-
|
11
|
-
export default {
|
12
|
-
name: 'App',
|
13
|
-
components: {
|
14
|
-
HelloWorld
|
15
|
-
}
|
16
|
-
}
|
17
|
-
</script>
|
18
|
-
|
19
|
-
<style>
|
12
|
+
<style lang="scss">
|
20
13
|
#app {
|
21
14
|
font-family: Avenir, Helvetica, Arial, sans-serif;
|
22
15
|
-webkit-font-smoothing: antialiased;
|
23
16
|
-moz-osx-font-smoothing: grayscale;
|
24
17
|
text-align: center;
|
25
18
|
color: #2c3e50;
|
26
|
-
|
19
|
+
}
|
20
|
+
|
21
|
+
nav {
|
22
|
+
padding: 30px;
|
23
|
+
|
24
|
+
a {
|
25
|
+
font-weight: bold;
|
26
|
+
color: #2c3e50;
|
27
|
+
|
28
|
+
&.router-link-exact-active {
|
29
|
+
color: #42b983;
|
30
|
+
}
|
31
|
+
}
|
27
32
|
}
|
28
33
|
</style>
|
@@ -9,7 +9,8 @@
|
|
9
9
|
<h3>Installed CLI Plugins</h3>
|
10
10
|
<ul>
|
11
11
|
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
|
12
|
-
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-
|
12
|
+
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-router" target="_blank" rel="noopener">router</a></li>
|
13
|
+
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-vuex" target="_blank" rel="noopener">vuex</a></li>
|
13
14
|
</ul>
|
14
15
|
<h3>Essential Links</h3>
|
15
16
|
<ul>
|
@@ -40,7 +41,7 @@ export default {
|
|
40
41
|
</script>
|
41
42
|
|
42
43
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
43
|
-
<style scoped>
|
44
|
+
<style scoped lang="scss">
|
44
45
|
h3 {
|
45
46
|
margin: 40px 0 0;
|
46
47
|
}
|
package/src/main.js
CHANGED
@@ -1,8 +1,13 @@
|
|
1
|
-
import Vue from 'vue'
|
2
|
-
import App from './App.vue'
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
import Vue from 'vue'
|
2
|
+
import App from './App.vue'
|
3
|
+
import router from './router'
|
4
|
+
import store from './store'
|
5
|
+
import TouchVuePc from './packages/index.js'
|
6
|
+
Vue.use(TouchVuePc)
|
7
|
+
Vue.config.productionTip = false
|
8
|
+
|
9
|
+
new Vue({
|
10
|
+
router,
|
11
|
+
store,
|
12
|
+
render: h => h(App)
|
13
|
+
}).$mount('#app')
|
@@ -1,22 +1,26 @@
|
|
1
|
+
import ElementUI from 'element-ui'
|
2
|
+
import 'element-ui/lib/theme-chalk/index.css';
|
1
3
|
import TcTable from './table/index.js'
|
2
4
|
const components = [
|
3
|
-
|
5
|
+
TcTable
|
4
6
|
]
|
5
|
-
const install = function(Vue) {
|
7
|
+
const install = function (Vue) {
|
8
|
+
|
9
|
+
Vue.use(ElementUI)
|
6
10
|
components.forEach(component => {
|
7
11
|
Vue.component(component.name, component);
|
8
12
|
});
|
9
13
|
}
|
10
|
-
|
14
|
+
|
11
15
|
if (typeof window !== 'undefined' && window.Vue) {
|
12
16
|
install(window.Vue);
|
13
17
|
}
|
14
|
-
|
18
|
+
|
15
19
|
export default {
|
16
|
-
|
17
|
-
|
20
|
+
install,
|
21
|
+
TcTable
|
18
22
|
}
|
19
23
|
export {
|
20
|
-
|
21
|
-
|
24
|
+
install,
|
25
|
+
TcTable
|
22
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>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import Vue from 'vue'
|
2
|
+
import VueRouter from 'vue-router'
|
3
|
+
import HomeView from '../views/HomeView.vue'
|
4
|
+
|
5
|
+
Vue.use(VueRouter)
|
6
|
+
|
7
|
+
const routes = [
|
8
|
+
{
|
9
|
+
path: '/',
|
10
|
+
name: 'home',
|
11
|
+
component: HomeView
|
12
|
+
},
|
13
|
+
{
|
14
|
+
path: '/about',
|
15
|
+
name: 'about',
|
16
|
+
// route level code-splitting
|
17
|
+
// this generates a separate chunk (about.[hash].js) for this route
|
18
|
+
// which is lazy-loaded when the route is visited.
|
19
|
+
component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
|
20
|
+
},
|
21
|
+
]
|
22
|
+
|
23
|
+
const router = new VueRouter({
|
24
|
+
routes
|
25
|
+
})
|
26
|
+
|
27
|
+
export default router
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="home">
|
3
|
+
<img alt="Vue logo" src="../assets/logo.png">
|
4
|
+
<HelloWorld msg="Welcome to Your Vue.js App"/>
|
5
|
+
</div>
|
6
|
+
</template>
|
7
|
+
|
8
|
+
<script>
|
9
|
+
// @ is an alias to /src
|
10
|
+
import HelloWorld from '@/components/HelloWorld.vue'
|
11
|
+
|
12
|
+
export default {
|
13
|
+
name: 'HomeView',
|
14
|
+
components: {
|
15
|
+
HelloWorld
|
16
|
+
}
|
17
|
+
}
|
18
|
+
</script>
|
package/vue.config.js
CHANGED