jwt-ui 0.1.0
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/package.json +46 -0
- package/public/favicon.ico +0 -0
- package/public/index.html +17 -0
- package/src/App.vue +26 -0
- package/src/assets/logo.png +0 -0
- package/src/components/BaseImg/index.vue +32 -0
- package/src/components/BaseInput/index.vue +36 -0
- package/src/components/index.js +14 -0
- package/src/main.js +4 -0
package/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# jwt-ui
|
|
2
|
+
|
|
3
|
+
## Project setup
|
|
4
|
+
```
|
|
5
|
+
yarn install
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
### Compiles and hot-reloads for development
|
|
9
|
+
```
|
|
10
|
+
yarn serve
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### Compiles and minifies for production
|
|
14
|
+
```
|
|
15
|
+
yarn build
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Lints and fixes files
|
|
19
|
+
```
|
|
20
|
+
yarn lint
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Customize configuration
|
|
24
|
+
See [Configuration Reference](https://cli.vuejs.org/config/).
|
package/babel.config.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "jwt-ui",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "vue-cli-service serve --open",
|
|
7
|
+
"build": "vue-cli-service build",
|
|
8
|
+
"lint": "vue-cli-service lint",
|
|
9
|
+
"build-bundle": "vue-cli-service build --target lib --name component-test ./src/components/index.js"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"core-js": "^3.6.5",
|
|
13
|
+
"user": "^0.0.0",
|
|
14
|
+
"vue": "^3.0.0"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@vue/cli-plugin-babel": "~4.5.0",
|
|
18
|
+
"@vue/cli-plugin-eslint": "~4.5.0",
|
|
19
|
+
"@vue/cli-service": "~4.5.0",
|
|
20
|
+
"@vue/compiler-sfc": "^3.0.0",
|
|
21
|
+
"babel-eslint": "^10.1.0",
|
|
22
|
+
"eslint": "^6.7.2",
|
|
23
|
+
"eslint-plugin-vue": "^7.0.0",
|
|
24
|
+
"sass": "^1.49.7",
|
|
25
|
+
"sass-loader": "10.2.1"
|
|
26
|
+
},
|
|
27
|
+
"eslintConfig": {
|
|
28
|
+
"root": true,
|
|
29
|
+
"env": {
|
|
30
|
+
"node": true
|
|
31
|
+
},
|
|
32
|
+
"extends": [
|
|
33
|
+
"plugin:vue/vue3-essential",
|
|
34
|
+
"eslint:recommended"
|
|
35
|
+
],
|
|
36
|
+
"parserOptions": {
|
|
37
|
+
"parser": "babel-eslint"
|
|
38
|
+
},
|
|
39
|
+
"rules": {}
|
|
40
|
+
},
|
|
41
|
+
"browserslist": [
|
|
42
|
+
"> 1%",
|
|
43
|
+
"last 2 versions",
|
|
44
|
+
"not dead"
|
|
45
|
+
]
|
|
46
|
+
}
|
|
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,26 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<img alt="Vue logo" src="./assets/logo.png" />
|
|
3
|
+
<base-input></base-input>
|
|
4
|
+
</template>
|
|
5
|
+
|
|
6
|
+
<script>
|
|
7
|
+
import BaseInput from './components/BaseInput/index.vue';
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
name: 'App',
|
|
11
|
+
components: {
|
|
12
|
+
BaseInput,
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<style>
|
|
18
|
+
#app {
|
|
19
|
+
font-family: Avenir, Helvetica, Arial, sans-serif;
|
|
20
|
+
-webkit-font-smoothing: antialiased;
|
|
21
|
+
-moz-osx-font-smoothing: grayscale;
|
|
22
|
+
text-align: center;
|
|
23
|
+
color: #2c3e50;
|
|
24
|
+
margin-top: 60px;
|
|
25
|
+
}
|
|
26
|
+
</style>
|
|
Binary file
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="table-actions">
|
|
3
|
+
<div>测试发布npm</div>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import { defineComponent } from 'vue';
|
|
9
|
+
|
|
10
|
+
export default defineComponent({
|
|
11
|
+
name: 'BaseImg',
|
|
12
|
+
props: {},
|
|
13
|
+
emits: ['table-action'],
|
|
14
|
+
setup(props, { emit }) {
|
|
15
|
+
const handleTableAction = (action) => {
|
|
16
|
+
// console.log(`action`, action)
|
|
17
|
+
emit('table-action', action);
|
|
18
|
+
};
|
|
19
|
+
return {
|
|
20
|
+
handleTableAction,
|
|
21
|
+
};
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<style lang="scss" scoped>
|
|
27
|
+
// .table-actions {
|
|
28
|
+
// input {
|
|
29
|
+
// border: 1px solid red;
|
|
30
|
+
// }
|
|
31
|
+
// }
|
|
32
|
+
</style>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="table-actions">
|
|
3
|
+
<input type="text" @change="inputChange" />
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import { defineComponent } from 'vue';
|
|
9
|
+
|
|
10
|
+
export default defineComponent({
|
|
11
|
+
name: 'BaseInput',
|
|
12
|
+
props: {},
|
|
13
|
+
emits: ['table-action'],
|
|
14
|
+
setup(props, { emit }) {
|
|
15
|
+
const handleTableAction = (action) => {
|
|
16
|
+
// console.log(`action`, action)
|
|
17
|
+
emit('table-action', action);
|
|
18
|
+
};
|
|
19
|
+
const inputChange = (val) => {
|
|
20
|
+
emit('change', val);
|
|
21
|
+
};
|
|
22
|
+
return {
|
|
23
|
+
handleTableAction,
|
|
24
|
+
inputChange,
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<style lang="scss">
|
|
31
|
+
.table-actions {
|
|
32
|
+
input {
|
|
33
|
+
border: 1px solid red;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
</style>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Vue from "vue";
|
|
2
|
+
import BaseInput from "./BaseInput/index.vue";
|
|
3
|
+
import BaseImg from "./BaseImg/index.vue";
|
|
4
|
+
|
|
5
|
+
const Components = {
|
|
6
|
+
BaseInput,
|
|
7
|
+
BaseImg
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
Object.keys(Components).forEach(name => {
|
|
11
|
+
Vue.component(name, Components[name]);
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export default Components;
|
package/src/main.js
ADDED