yc-ui2 0.1.2-beta01 → 0.1.2-beta03
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +99 -6
- package/package.json +1 -1
- package/md/CustomerService.md +0 -70
- package/md/YcSlideVerify.md +0 -16
package/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
安装命令:`npm install yc-ui2`
|
4
4
|
|
5
|
-
|
5
|
+
***main.js 导入***
|
6
6
|
```javascript
|
7
7
|
import Ycui2 from 'yc-ui2'
|
8
8
|
import "yc-ui2/dist/yc-ui2.css"
|
@@ -10,7 +10,7 @@ import "yc-ui2/dist/yc-ui2.css"
|
|
10
10
|
Vue.use(Ycui2)
|
11
11
|
```
|
12
12
|
|
13
|
-
|
13
|
+
***vue.config.js***
|
14
14
|
|
15
15
|
```javascript
|
16
16
|
proxy: {
|
@@ -26,8 +26,101 @@ proxy: {
|
|
26
26
|
```
|
27
27
|
|
28
28
|
# 组件
|
29
|
+
| Name | Describe |
|
30
|
+
| --------------------------------------------------------------------- | -------- |
|
31
|
+
| [YcSlideVerify](#yc-slide-verify) | 滑动验证 |
|
32
|
+
| [YcCustomerService](#yc-customer-service)、[YcQuestion](#yc-question) | 小优客服 |
|
29
33
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
+
|
35
|
+
#### yc-slide-verify
|
36
|
+
> 滑动验证
|
37
|
+
|
38
|
+
```html
|
39
|
+
<yc-slide-verify
|
40
|
+
:isShow="isShow"
|
41
|
+
@success="handleLogin"
|
42
|
+
@close="isShow = false"
|
43
|
+
/>
|
44
|
+
```
|
45
|
+
|
46
|
+
| Param | Type | Describe |
|
47
|
+
| ------- | ---------- | -------- |
|
48
|
+
| title | `String` | 滑动验证 |
|
49
|
+
| isShow | `Boolean` | 是否显示 |
|
50
|
+
| success | `Function` | 成功回调 |
|
51
|
+
| close | `Function` | 关闭显示 |
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
#### yc-customer-service
|
56
|
+
> 小优客服右角展示
|
57
|
+
|
58
|
+
```html
|
59
|
+
<yc-customer-service
|
60
|
+
title="小优客服【38号为您服务】"
|
61
|
+
jumpPage="/question"
|
62
|
+
:json="JSON.stringify(require('@/assets/questions.js').default)"
|
63
|
+
:regular="['发票增值税率', '城市维护建设税', '教育费附加征收率']"
|
64
|
+
>
|
65
|
+
<!-- 定制化插槽部分 -->
|
66
|
+
<div>
|
67
|
+
<!-- 第一个div内容 右下角显示图片 -->
|
68
|
+
<i class="el-icon-mobile"></i>
|
69
|
+
</div>
|
70
|
+
<div>
|
71
|
+
<!-- 第二个div内容 鼠标放入第一个div会提示以下部分 -->
|
72
|
+
<span>客服热线</span>
|
73
|
+
<a href="tel:4000770168">400 0770 168</a>
|
74
|
+
<template v-if="!['/login', '/register'].includes($route.path)">
|
75
|
+
<span style="margin-top: 10px">银行服务电话</span>
|
76
|
+
<a href="tel:13973004180">13973004180(蒋行长)</a>
|
77
|
+
<a href="tel:15773001997">15773001997(彭经理)</a>
|
78
|
+
</template>
|
79
|
+
</div>
|
80
|
+
</yc-customer-service>
|
81
|
+
```
|
82
|
+
|
83
|
+
| Param | Type | Describe |
|
84
|
+
| -------- | -------- | ---------------- |
|
85
|
+
| title | `String` | 标题 |
|
86
|
+
| jumpPage | `String` | 展开跳转客服页面 |
|
87
|
+
| json | `String` | 问题库 |
|
88
|
+
| regular | `Array` | 常见问题 |
|
89
|
+
-------------
|
90
|
+
|
91
|
+
|
92
|
+
#### yc-question
|
93
|
+
> 小优客服页面
|
94
|
+
|
95
|
+
> 需要在白名单中添加 /question 页面;有的在 permission.js 有的在router中
|
96
|
+
```javascript
|
97
|
+
const whiteList = ['/login', '......', '/question']
|
98
|
+
```
|
99
|
+
> 路由中需要配置 yc-customer-service组件中jumpPage参数跳转的页面
|
100
|
+
> router/index.js 路由中添加以下部分
|
101
|
+
|
102
|
+
```javascript
|
103
|
+
{
|
104
|
+
path: "/question", //yc-customer-service组件中jumpPage参数保持一致
|
105
|
+
component: (resolve) => require(["@/views/question"], resolve),
|
106
|
+
hidden: true,
|
107
|
+
},
|
108
|
+
```
|
109
|
+
|
110
|
+
> 根据自己编写的路由文件创建文件:views/question.vue
|
111
|
+
> 新创建的question.vue 中加入以下代码
|
112
|
+
```html
|
113
|
+
<template>
|
114
|
+
<YcQuestion
|
115
|
+
title="小优客服"
|
116
|
+
commit="小优为您提供24小时服务"
|
117
|
+
:json="JSON.stringify(require('@/assets/files/questions.js').default)"
|
118
|
+
></YcQuestion>
|
119
|
+
</template>
|
120
|
+
```
|
121
|
+
|
122
|
+
| Param | Type | Describe |
|
123
|
+
| ------ | -------- | -------- |
|
124
|
+
| title | `String` | 标题 |
|
125
|
+
| commit | `String` | 描述 |
|
126
|
+
| json | `String` | 问题库 |
|
package/package.json
CHANGED
package/md/CustomerService.md
DELETED
@@ -1,70 +0,0 @@
|
|
1
|
-
# yc-customer-service 小优客服右角展示
|
2
|
-
|
3
|
-
```html
|
4
|
-
<yc-customer-service
|
5
|
-
title="小优客服【38号为您服务】"
|
6
|
-
jumpPage="/question"
|
7
|
-
:json="JSON.stringify(require('@/assets/questions.js').default)"
|
8
|
-
:regular="['发票增值税率', '城市维护建设税', '教育费附加征收率']"
|
9
|
-
>
|
10
|
-
<!-- 定制化插槽部分 -->
|
11
|
-
<div>
|
12
|
-
<!-- 第一个div内容 右下角显示图片 -->
|
13
|
-
<i class="el-icon-mobile"></i>
|
14
|
-
</div>
|
15
|
-
<div>
|
16
|
-
<!-- 第二个div内容 鼠标放入第一个div会提示以下部分 -->
|
17
|
-
<span>客服热线</span>
|
18
|
-
<a href="tel:4000770168">400 0770 168</a>
|
19
|
-
<template v-if="!['/login', '/register'].includes($route.path)">
|
20
|
-
<span style="margin-top: 10px">银行服务电话</span>
|
21
|
-
<a href="tel:13973004180">13973004180(蒋行长)</a>
|
22
|
-
<a href="tel:15773001997">15773001997(彭经理)</a>
|
23
|
-
</template>
|
24
|
-
</div>
|
25
|
-
</yc-customer-service>
|
26
|
-
```
|
27
|
-
|
28
|
-
| Param | Type | Describe |
|
29
|
-
| -------- | -------- | ---------------- |
|
30
|
-
| title | `String` | 标题 |
|
31
|
-
| jumpPage | `String` | 展开跳转客服页面 |
|
32
|
-
| json | `String` | 问题库 |
|
33
|
-
| regular | `Array` | 常见问题 |
|
34
|
-
-------------
|
35
|
-
|
36
|
-
|
37
|
-
# yc-question 小优客服页面
|
38
|
-
|
39
|
-
> 需要在白名单中添加 /question 页面;有的在 permission.js 有的在router中
|
40
|
-
```javascript
|
41
|
-
const whiteList = ['/login', '......', '/question']
|
42
|
-
```
|
43
|
-
> 路由中需要配置 yc-customer-service组件中jumpPage参数跳转的页面
|
44
|
-
> router/index.js 路由中添加以下部分
|
45
|
-
|
46
|
-
```javascript
|
47
|
-
{
|
48
|
-
path: "/question", //yc-customer-service组件中jumpPage参数保持一致
|
49
|
-
component: (resolve) => require(["@/views/question"], resolve),
|
50
|
-
hidden: true,
|
51
|
-
},
|
52
|
-
```
|
53
|
-
|
54
|
-
> 根据自己编写的路由文件创建文件:views/question.vue
|
55
|
-
> 新创建的question.vue 中加入以下代码
|
56
|
-
```html
|
57
|
-
<template>
|
58
|
-
<YcQuestion
|
59
|
-
title="小优客服"
|
60
|
-
commit="小优为您提供24小时服务"
|
61
|
-
:json="JSON.stringify(require('@/assets/files/questions.js').default)"
|
62
|
-
></YcQuestion>
|
63
|
-
</template>
|
64
|
-
```
|
65
|
-
|
66
|
-
| Param | Type | Describe |
|
67
|
-
| -------- | -------- | ---------------- |
|
68
|
-
| title | `String` | 标题 |
|
69
|
-
| commit | `String` | 描述 |
|
70
|
-
| json | `String` | 问题库 |
|
package/md/YcSlideVerify.md
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
# yc-slide-verify 滑动验证
|
2
|
-
|
3
|
-
```html
|
4
|
-
<yc-slide-verify
|
5
|
-
:isShow="isShow"
|
6
|
-
@success="handleLogin"
|
7
|
-
@close="isShow = false"
|
8
|
-
/>
|
9
|
-
```
|
10
|
-
|
11
|
-
| Param | Type | Describe |
|
12
|
-
| ------- | ---------- | -------- |
|
13
|
-
| title | `String` | 滑动验证 |
|
14
|
-
| isShow | `Boolean` | 是否显示 |
|
15
|
-
| success | `Function` | 成功回调 |
|
16
|
-
| close | `Function` | 关闭显示 |
|