touch-vue-pc 1.0.2 → 1.0.4

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 CHANGED
@@ -1,15 +1,13 @@
1
1
  {
2
2
  "name": "touch-vue-pc",
3
- "version": "1.0.2",
4
- "main":"./packages/index.js",
5
- "bin": {
6
- "touch-vue-pc": "./packages/index.js"
7
- },
3
+ "version": "1.0.4",
4
+ "private": false,
5
+ "main": "./lib/touch-vue-pc.common.js",
8
6
  "scripts": {
9
7
  "serve": "vue-cli-service serve",
10
8
  "build": "vue-cli-service build",
11
- "lint": "vue-cli-service lint",
12
- "lib": "vue-cli-service build --target lib --name touch-vue-pc --dest lib ./packages/index.js"
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
12
  "files": [
15
13
  "lib/*",
@@ -22,32 +20,19 @@
22
20
  "dependencies": {
23
21
  "core-js": "^3.8.3",
24
22
  "element-ui": "^2.15.10",
25
- "vue": "^2.6.14"
23
+ "vue": "^2.6.14",
24
+ "vue-router": "^3.5.1",
25
+ "vuex": "^3.6.2"
26
26
  },
27
27
  "devDependencies": {
28
- "@babel/core": "^7.12.16",
29
- "@babel/eslint-parser": "^7.12.16",
30
28
  "@vue/cli-plugin-babel": "~5.0.0",
31
- "@vue/cli-plugin-eslint": "~5.0.0",
29
+ "@vue/cli-plugin-router": "~5.0.0",
30
+ "@vue/cli-plugin-vuex": "~5.0.0",
32
31
  "@vue/cli-service": "~5.0.0",
33
- "eslint": "^7.32.0",
34
- "eslint-plugin-vue": "^8.0.3",
32
+ "sass": "^1.32.7",
33
+ "sass-loader": "^12.0.0",
35
34
  "vue-template-compiler": "^2.6.14"
36
35
  },
37
- "eslintConfig": {
38
- "root": true,
39
- "env": {
40
- "node": true
41
- },
42
- "extends": [
43
- "plugin:vue/essential",
44
- "eslint:recommended"
45
- ],
46
- "parserOptions": {
47
- "parser": "@babel/eslint-parser"
48
- },
49
- "rules": {}
50
- },
51
36
  "browserslist": [
52
37
  "> 1%",
53
38
  "last 2 versions",
package/src/App.vue CHANGED
@@ -1,28 +1,32 @@
1
1
  <template>
2
2
  <div id="app">
3
- <img alt="Vue logo" src="./assets/logo.png">
4
- <HelloWorld msg="Welcome to Your Vue.js App"/>
3
+ <!-- <nav>
4
+ <router-link to="/">Home</router-link> |
5
+ <router-link to="/about">About</router-link>
6
+ </nav> -->
7
+ <router-view/>
5
8
  </div>
6
9
  </template>
7
10
 
8
- <script>
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>
11
+ <style lang="scss">
20
12
  #app {
21
13
  font-family: Avenir, Helvetica, Arial, sans-serif;
22
14
  -webkit-font-smoothing: antialiased;
23
15
  -moz-osx-font-smoothing: grayscale;
24
16
  text-align: center;
25
17
  color: #2c3e50;
26
- margin-top: 60px;
18
+ }
19
+
20
+ nav {
21
+ padding: 30px;
22
+
23
+ a {
24
+ font-weight: bold;
25
+ color: #2c3e50;
26
+
27
+ &.router-link-exact-active {
28
+ color: #42b983;
29
+ }
30
+ }
27
31
  }
28
32
  </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-eslint" target="_blank" rel="noopener">eslint</a></li>
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,15 @@
1
- import Vue from 'vue'
2
- import App from './App.vue'
3
-
4
- Vue.config.productionTip = false
5
-
6
- new Vue({
7
- render: h => h(App),
8
- }).$mount('#app')
1
+ import Vue from 'vue'
2
+ import App from './App.vue'
3
+ import router from './router'
4
+ import store from './store'
5
+ import { Button,Input }
6
+ from 'element-ui'
7
+ Vue.use(Button)
8
+ Vue.use(Input)
9
+ Vue.config.productionTip = false
10
+
11
+ new Vue({
12
+ router,
13
+ store,
14
+ render: h => h(App)
15
+ }).$mount('#app')
@@ -0,0 +1,35 @@
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
+ 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
+ ]
30
+
31
+ const router = new VueRouter({
32
+ routes
33
+ })
34
+
35
+ export default router
@@ -0,0 +1,17 @@
1
+ import Vue from 'vue'
2
+ import Vuex from 'vuex'
3
+
4
+ Vue.use(Vuex)
5
+
6
+ export default new Vuex.Store({
7
+ state: {
8
+ },
9
+ getters: {
10
+ },
11
+ mutations: {
12
+ },
13
+ actions: {
14
+ },
15
+ modules: {
16
+ }
17
+ })
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <div class="about">
3
+ <h1>This is an about page</h1>
4
+ </div>
5
+ </template>
@@ -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
@@ -1,5 +1,4 @@
1
1
  const { defineConfig } = require('@vue/cli-service')
2
2
  module.exports = defineConfig({
3
- transpileDependencies: true,
4
- lintOnSave:false
3
+ transpileDependencies: true
5
4
  })
package/packages/index.js DELETED
@@ -1,23 +0,0 @@
1
- #!/usr/bin/env node
2
- import TcTable from './table/index.js'
3
- const components = [
4
- TcTable
5
- ]
6
- const install = function(Vue) {
7
- components.forEach(component => {
8
- Vue.component(component.name, component);
9
- });
10
- }
11
-
12
- if (typeof window !== 'undefined' && window.Vue) {
13
- install(window.Vue);
14
- }
15
-
16
- export default {
17
- TcTable,
18
- install
19
- }
20
- export {
21
- TcTable,
22
- install
23
- }