touch-vue-pc 1.0.1 → 1.0.2

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,71 +1,56 @@
1
1
  {
2
2
  "name": "touch-vue-pc",
3
- "version": "1.0.1",
4
- "description": "touch-vue-pc",
3
+ "version": "1.0.2",
4
+ "main":"./packages/index.js",
5
5
  "bin": {
6
- "touch-vue-pc": "index.js"
6
+ "touch-vue-pc": "./packages/index.js"
7
7
  },
8
- "main": "index.js",
9
8
  "scripts": {
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"
9
+ "serve": "vue-cli-service serve",
10
+ "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"
14
13
  },
15
- "author": "guoyq",
16
- "license": "ISC",
14
+ "files": [
15
+ "lib/*",
16
+ "dist/*",
17
+ "src/*",
18
+ "public/*",
19
+ "*.json",
20
+ "*.js"
21
+ ],
17
22
  "dependencies": {
18
- "axios": "^0.19.0",
19
- "babel-polyfill": "^6.26.0",
20
- "clipboard": "1.7.1",
21
- "codemirror": "5.39.2",
22
- "core-js": "^3.3.2",
23
- "crypto-js": "^3.1.9-1",
24
- "driver.js": "0.8.1",
25
- "eslint-import-resolver-webpack": "^0.11.1",
26
- "file-saver": "1.3.8",
27
- "font-awesome": "^4.7.0",
28
- "friendly-errors-webpack-plugin": "^1.7.0",
29
- "fuse.js": "3.4.2",
30
- "html-webpack-plugin": "^5.5.0",
31
- "html2canvas": "^1.0.0-rc.5",
32
- "jquery": "^3.4.1",
33
- "js-cookie": "2.2.0",
34
- "jsuri": "^1.3.1",
35
- "mockjs": "1.0.1-beta3",
36
- "normalize.css": "7.0.0",
37
- "sortablejs": "1.7.0",
38
- "vconsole": "^3.3.4",
39
- "vue": "^2.6.10",
40
- "vue-count-to": "1.0.13",
41
- "vue-fontawesome-elementui-icon-picker": "^0.1.9",
42
- "vue-i18n": "7.3.2",
43
- "vue-router": "^3.1.3",
44
- "vue-splitpane": "1.0.2",
45
- "vuex": "^3.0.1"
23
+ "core-js": "^3.8.3",
24
+ "element-ui": "^2.15.10",
25
+ "vue": "^2.6.14"
46
26
  },
47
27
  "devDependencies": {
48
- "@babel/core": "^7.8.7",
49
- "@babel/plugin-transform-runtime": "^7.8.3",
50
- "@babel/preset-env": "^7.8.7",
51
- "@vue/cli-plugin-babel": "^4.0.0",
52
- "@vue/cli-plugin-eslint": "^4.0.0",
53
- "@vue/cli-plugin-router": "^4.0.0",
54
- "@vue/cli-plugin-unit-mocha": "^4.0.0",
55
- "@vue/cli-plugin-vuex": "^4.0.0",
56
- "@vue/cli-service": "^4.0.0",
57
- "@vue/eslint-config-airbnb": "^4.0.0",
58
- "@vue/test-utils": "1.0.0-beta.29",
59
- "babel-core": "^6.26.3",
60
- "babel-eslint": "^10.0.3",
61
- "babel-loader": "^7.1.5",
62
- "babel-plugin-import": "^1.13.0",
63
- "babel-polyfill": "^6.26.0",
64
- "babel-preset-env": "^1.7.0",
65
- "element-ui": "^2.15.1",
66
- "less": "^3.0.4",
67
- "less-loader": "^5.0.0",
68
- "mockjs": "^1.1.0",
69
- "node-sass": "^4.12.0"
70
- }
28
+ "@babel/core": "^7.12.16",
29
+ "@babel/eslint-parser": "^7.12.16",
30
+ "@vue/cli-plugin-babel": "~5.0.0",
31
+ "@vue/cli-plugin-eslint": "~5.0.0",
32
+ "@vue/cli-service": "~5.0.0",
33
+ "eslint": "^7.32.0",
34
+ "eslint-plugin-vue": "^8.0.3",
35
+ "vue-template-compiler": "^2.6.14"
36
+ },
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
+ "browserslist": [
52
+ "> 1%",
53
+ "last 2 versions",
54
+ "not dead"
55
+ ]
71
56
  }
@@ -0,0 +1,23 @@
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
+ }
Binary file
@@ -0,0 +1,17 @@
1
+ <!DOCTYPE html>
2
+ <html lang="">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+ <meta name="viewport" content="width=device-width,initial-scale=1.0">
7
+ <link rel="icon" href="<%= BASE_URL %>favicon.ico">
8
+ <title><%= htmlWebpackPlugin.options.title %></title>
9
+ </head>
10
+ <body>
11
+ <noscript>
12
+ <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
13
+ </noscript>
14
+ <div id="app"></div>
15
+ <!-- built files will be auto injected -->
16
+ </body>
17
+ </html>
package/src/App.vue ADDED
@@ -0,0 +1,28 @@
1
+ <template>
2
+ <div id="app">
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
+ import HelloWorld from './components/HelloWorld.vue'
10
+
11
+ export default {
12
+ name: 'App',
13
+ components: {
14
+ HelloWorld
15
+ }
16
+ }
17
+ </script>
18
+
19
+ <style>
20
+ #app {
21
+ font-family: Avenir, Helvetica, Arial, sans-serif;
22
+ -webkit-font-smoothing: antialiased;
23
+ -moz-osx-font-smoothing: grayscale;
24
+ text-align: center;
25
+ color: #2c3e50;
26
+ margin-top: 60px;
27
+ }
28
+ </style>
Binary file
@@ -0,0 +1,58 @@
1
+ <template>
2
+ <div class="hello">
3
+ <h1>{{ msg }}</h1>
4
+ <p>
5
+ For a guide and recipes on how to configure / customize this project,<br>
6
+ check out the
7
+ <a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
8
+ </p>
9
+ <h3>Installed CLI Plugins</h3>
10
+ <ul>
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>
13
+ </ul>
14
+ <h3>Essential Links</h3>
15
+ <ul>
16
+ <li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
17
+ <li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
18
+ <li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
19
+ <li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
20
+ <li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
21
+ </ul>
22
+ <h3>Ecosystem</h3>
23
+ <ul>
24
+ <li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
25
+ <li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
26
+ <li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
27
+ <li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
28
+ <li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
29
+ </ul>
30
+ </div>
31
+ </template>
32
+
33
+ <script>
34
+ export default {
35
+ name: 'HelloWorld',
36
+ props: {
37
+ msg: String
38
+ }
39
+ }
40
+ </script>
41
+
42
+ <!-- Add "scoped" attribute to limit CSS to this component only -->
43
+ <style scoped>
44
+ h3 {
45
+ margin: 40px 0 0;
46
+ }
47
+ ul {
48
+ list-style-type: none;
49
+ padding: 0;
50
+ }
51
+ li {
52
+ display: inline-block;
53
+ margin: 0 10px;
54
+ }
55
+ a {
56
+ color: #42b983;
57
+ }
58
+ </style>
package/src/main.js ADDED
@@ -0,0 +1,8 @@
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')
package/vue.config.js ADDED
@@ -0,0 +1,5 @@
1
+ const { defineConfig } = require('@vue/cli-service')
2
+ module.exports = defineConfig({
3
+ transpileDependencies: true,
4
+ lintOnSave:false
5
+ })
package/index.js DELETED
@@ -1,25 +0,0 @@
1
- #!/usr/bin/env node
2
- import Vue from 'vue'
3
- const axios = require('axios');
4
- import ElementUI from 'element-ui'
5
- import 'element-ui/lib/theme-chalk/index.css'
6
- Vue.use(ElementUI)
7
- axios.get('https://api.gushi.ci/all.json')
8
- .then(function (response) {
9
- let data = response.data || {};
10
- let signature = data.author + '《' + data.origin + '》';
11
- let prefix = '———— ';
12
- let paddingSpacing = '';
13
- let spacingLength = data.content.length * 2 - signature.length * 2 - prefix.length;
14
- if (spacingLength > 0) {
15
- if (data.origin.indexOf('·') !== -1) {
16
- spacingLength++;
17
- }
18
- paddingSpacing = new Array(spacingLength).fill(' ').join('');
19
- }
20
- signature = (paddingSpacing + prefix) + signature
21
- console.log();
22
- console.log(data.content);
23
- console.log(signature);
24
- console.log();
25
- });
@@ -1,8 +0,0 @@
1
- import CTable from './src/table';
2
-
3
- /* istanbul ignore next */
4
- CTable.install = function(Vue) {
5
- Vue.component(CTable.name, CTable);
6
- };
7
-
8
- export default CTable;
@@ -1,31 +0,0 @@
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>