yc-ui2 0.1.3 → 0.1.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/.env +5 -2
- package/README.md +48 -22
- package/dist/yc-ui2.common.js +40627 -3540
- package/dist/yc-ui2.common.js.map +1 -1
- package/dist/yc-ui2.css +1 -1
- package/dist/yc-ui2.umd.js +40631 -3544
- package/dist/yc-ui2.umd.js.map +1 -1
- package/dist/yc-ui2.umd.min.js +24 -1
- package/dist/yc-ui2.umd.min.js.map +1 -1
- package/package.json +4 -3
- package/src/App.vue +13 -4
- package/src/api/customerService.js +56 -0
- package/src/utils/request.js +45 -0
- package/src/views/question.vue +13 -3
- package/vue.config.js +11 -3
- package/src/assets/questions.js +0 -115
package/.env
CHANGED
package/README.md
CHANGED
@@ -10,6 +10,16 @@ import "yc-ui2/dist/yc-ui2.css"
|
|
10
10
|
Vue.use(Ycui2)
|
11
11
|
```
|
12
12
|
|
13
|
+
# 组件
|
14
|
+
| Name | Describe |
|
15
|
+
| --------------------------------------------------------------------- | -------- |
|
16
|
+
| [YcSlideVerify](#yc-slide-verify) | 滑动验证 |
|
17
|
+
| [YcCustomerService](#yc-customer-service) [YcQuestion](#yc-question) | 小优客服 |
|
18
|
+
|
19
|
+
|
20
|
+
#### yc-slide-verify
|
21
|
+
> 滑动验证
|
22
|
+
|
13
23
|
***vue.config.js***
|
14
24
|
|
15
25
|
```javascript
|
@@ -25,16 +35,6 @@ proxy: {
|
|
25
35
|
}
|
26
36
|
```
|
27
37
|
|
28
|
-
# 组件
|
29
|
-
| Name | Describe |
|
30
|
-
| --------------------------------------------------------------------- | -------- |
|
31
|
-
| [YcSlideVerify](#yc-slide-verify) | 滑动验证 |
|
32
|
-
| [YcCustomerService](#yc-customer-service) [YcQuestion](#yc-question) | 小优客服 |
|
33
|
-
|
34
|
-
|
35
|
-
#### yc-slide-verify
|
36
|
-
> 滑动验证
|
37
|
-
|
38
38
|
```html
|
39
39
|
<yc-slide-verify
|
40
40
|
:isShow.sync="isShow"
|
@@ -54,12 +54,26 @@ proxy: {
|
|
54
54
|
#### yc-customer-service
|
55
55
|
> 小优客服右角展示
|
56
56
|
|
57
|
+
***vue.config.js***
|
58
|
+
|
59
|
+
```javascript
|
60
|
+
proxy: {
|
61
|
+
// 在proxy中添加以下代码
|
62
|
+
['/customer-api']: {
|
63
|
+
target: `http://58.20.153.230:7080`,
|
64
|
+
changeOrigin: true,
|
65
|
+
pathRewrite: {
|
66
|
+
["^/customer-api"]: "",
|
67
|
+
},
|
68
|
+
},
|
69
|
+
}
|
70
|
+
```
|
71
|
+
|
57
72
|
```html
|
58
73
|
<yc-customer-service
|
59
|
-
|
74
|
+
:id=""
|
75
|
+
:title=""
|
60
76
|
jumpPage="/question"
|
61
|
-
:json="JSON.stringify(require('@/assets/questions.js').default)"
|
62
|
-
:regular="['发票增值税率', '城市维护建设税', '教育费附加征收率']"
|
63
77
|
>
|
64
78
|
<!-- 定制化插槽部分 -->
|
65
79
|
<div>
|
@@ -81,10 +95,9 @@ proxy: {
|
|
81
95
|
|
82
96
|
| Param | Type | Describe |
|
83
97
|
| -------- | -------- | ---------------- |
|
84
|
-
|
|
98
|
+
| id | `Number` | 服务id |
|
99
|
+
| title | `String` | 服务标题 |
|
85
100
|
| jumpPage | `String` | 展开跳转客服页面 |
|
86
|
-
| json | `String` | 问题库 |
|
87
|
-
| regular | `Array` | 常见问题 |
|
88
101
|
-------------
|
89
102
|
|
90
103
|
|
@@ -111,15 +124,28 @@ const whiteList = ['/login', '......', '/question']
|
|
111
124
|
```html
|
112
125
|
<template>
|
113
126
|
<YcQuestion
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
127
|
+
:id=""
|
128
|
+
:title=""
|
129
|
+
:commit=""
|
130
|
+
></YcQuestion>
|
118
131
|
</template>
|
119
132
|
```
|
120
133
|
|
121
134
|
| Param | Type | Describe |
|
122
135
|
| ------ | -------- | -------- |
|
123
|
-
|
|
136
|
+
| id | `Number` | 服务id |
|
137
|
+
| title | `String` | 服务Name |
|
124
138
|
| commit | `String` | 描述 |
|
125
|
-
|
139
|
+
-------------
|
140
|
+
|
141
|
+
#### YcCA
|
142
|
+
> CA组件
|
143
|
+
|
144
|
+
```html
|
145
|
+
<YcCA :region="region" @caSuccess="login" />
|
146
|
+
```
|
147
|
+
|
148
|
+
| Param | Type | Describe |
|
149
|
+
| ------ | -------- | -------- |
|
150
|
+
| region | `Number` | CA地区类型 |
|
151
|
+
| caSuccess | `Function` | CA成功回调方法 |
|