touch-vue-pc 1.0.1 → 1.0.3
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 +24 -0
- package/babel.config.js +5 -0
- package/jsconfig.json +19 -0
- package/lib/demo.html +1 -0
- package/lib/touch-vue-pc.common.js +25766 -0
- package/lib/touch-vue-pc.common.js.map +1 -0
- package/lib/touch-vue-pc.umd.js +25777 -0
- package/lib/touch-vue-pc.umd.js.map +1 -0
- package/lib/touch-vue-pc.umd.min.js +17 -0
- package/lib/touch-vue-pc.umd.min.js.map +1 -0
- package/package-lock.json +8378 -0
- package/package.json +47 -61
- package/packages/index.js +22 -0
- package/packages/table/index.js +5 -0
- package/packages/table/src/table.vue +73 -0
- package/public/favicon.ico +0 -0
- package/public/index.html +17 -0
- package/src/App.vue +28 -0
- package/src/assets/logo.png +0 -0
- package/src/components/HelloWorld.vue +58 -0
- package/src/main.js +8 -0
- package/vue.config.js +5 -0
- package/index.js +0 -25
- package/pages/table/index.js +0 -8
- package/pages/table/src/index.vue +0 -31
package/package.json
CHANGED
@@ -1,71 +1,57 @@
|
|
1
1
|
{
|
2
2
|
"name": "touch-vue-pc",
|
3
|
-
"version": "1.0.
|
4
|
-
"
|
3
|
+
"version": "1.0.3",
|
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
|
-
"
|
11
|
-
"
|
12
|
-
"
|
13
|
-
"
|
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
|
-
"
|
16
|
-
|
14
|
+
"files": [
|
15
|
+
"lib/*",
|
16
|
+
"dist/*",
|
17
|
+
"src/*",
|
18
|
+
"public/*",
|
19
|
+
"packages/*",
|
20
|
+
"*.json",
|
21
|
+
"*.js"
|
22
|
+
],
|
17
23
|
"dependencies": {
|
18
|
-
"
|
19
|
-
"
|
20
|
-
"
|
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"
|
24
|
+
"core-js": "^3.8.3",
|
25
|
+
"element-ui": "^2.15.10",
|
26
|
+
"vue": "^2.6.14"
|
46
27
|
},
|
47
28
|
"devDependencies": {
|
48
|
-
"@babel/core": "^7.
|
49
|
-
"@babel/
|
50
|
-
"@
|
51
|
-
"@vue/cli-plugin-
|
52
|
-
"@vue/cli-
|
53
|
-
"
|
54
|
-
"
|
55
|
-
"
|
56
|
-
|
57
|
-
|
58
|
-
"
|
59
|
-
"
|
60
|
-
|
61
|
-
|
62
|
-
"
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
"
|
67
|
-
|
68
|
-
|
69
|
-
"
|
70
|
-
}
|
29
|
+
"@babel/core": "^7.12.16",
|
30
|
+
"@babel/eslint-parser": "^7.12.16",
|
31
|
+
"@vue/cli-plugin-babel": "~5.0.0",
|
32
|
+
"@vue/cli-plugin-eslint": "~5.0.0",
|
33
|
+
"@vue/cli-service": "~5.0.0",
|
34
|
+
"eslint": "^7.32.0",
|
35
|
+
"eslint-plugin-vue": "^8.0.3",
|
36
|
+
"vue-template-compiler": "^2.6.14"
|
37
|
+
},
|
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
|
+
"browserslist": [
|
53
|
+
"> 1%",
|
54
|
+
"last 2 versions",
|
55
|
+
"not dead"
|
56
|
+
]
|
71
57
|
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import TcTable from './table/index.js'
|
2
|
+
const components = [
|
3
|
+
TcTable
|
4
|
+
]
|
5
|
+
const install = function(Vue) {
|
6
|
+
components.forEach(component => {
|
7
|
+
Vue.component(component.name, component);
|
8
|
+
});
|
9
|
+
}
|
10
|
+
|
11
|
+
if (typeof window !== 'undefined' && window.Vue) {
|
12
|
+
install(window.Vue);
|
13
|
+
}
|
14
|
+
|
15
|
+
export default {
|
16
|
+
TcTable,
|
17
|
+
install
|
18
|
+
}
|
19
|
+
export {
|
20
|
+
TcTable,
|
21
|
+
install
|
22
|
+
}
|
@@ -0,0 +1,73 @@
|
|
1
|
+
<template>
|
2
|
+
<div v-show="showInput">
|
3
|
+
<el-input v-model="currentValue" v-bind="$props" @keydown.enter.native="handleInputEnter" :placeholder="placeholder" :dataType="dataType" ref="input" :inputPattern='inputPattern'>
|
4
|
+
|
5
|
+
</template>
|
6
|
+
</el-input>
|
7
|
+
</div>
|
8
|
+
</template>
|
9
|
+
<script>
|
10
|
+
import { Input, Button, Select, Option } from 'element-ui'
|
11
|
+
|
12
|
+
const EMAIL_ERROR = '邮箱验证失败';
|
13
|
+
|
14
|
+
export default {
|
15
|
+
name: "TcTable",
|
16
|
+
data() {
|
17
|
+
return {
|
18
|
+
showInput: true,
|
19
|
+
inputType: '',
|
20
|
+
};
|
21
|
+
},
|
22
|
+
props: {
|
23
|
+
...Input.props, //继承elementUI原有的props
|
24
|
+
...Button.props,
|
25
|
+
...Select.props,
|
26
|
+
...Option.props,
|
27
|
+
value: {
|
28
|
+
type: [Number, String],
|
29
|
+
default: ''
|
30
|
+
},
|
31
|
+
placeholder: {
|
32
|
+
type: String,
|
33
|
+
default: '请输入内容'
|
34
|
+
},
|
35
|
+
},
|
36
|
+
computed: {
|
37
|
+
currentValue: {
|
38
|
+
get: function() {
|
39
|
+
return this.value;
|
40
|
+
},
|
41
|
+
set: function(newValue) {
|
42
|
+
this.$emit("input", newValue); // 通过 input 事件更新 model
|
43
|
+
}
|
44
|
+
}
|
45
|
+
},
|
46
|
+
methods: {
|
47
|
+
evtChange(newValue, lr) {
|
48
|
+
this.$emit('change', newValue, lr); // 事件传值
|
49
|
+
},
|
50
|
+
handleInputEnter() {
|
51
|
+
},
|
52
|
+
},
|
53
|
+
mounted() {
|
54
|
+
this.$nextTick(_ => {
|
55
|
+
this.inputType = this.$refs.input.type;
|
56
|
+
})
|
57
|
+
console.log('mounted');
|
58
|
+
},
|
59
|
+
updata() {
|
60
|
+
|
61
|
+
},
|
62
|
+
watch: {
|
63
|
+
currentValue: {
|
64
|
+
immediate: true,
|
65
|
+
handler(val) {
|
66
|
+
}
|
67
|
+
}
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
71
|
+
</script>
|
72
|
+
<style stylus="css">
|
73
|
+
</style>
|
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
package/vue.config.js
ADDED
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
|
-
});
|
package/pages/table/index.js
DELETED
@@ -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>
|