yc-ui2 0.1.1-beta19 → 0.1.2-beta01

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,70 @@
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` | 问题库 |
@@ -0,0 +1,16 @@
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` | 关闭显示 |
package/package.json CHANGED
@@ -1,55 +1,55 @@
1
- {
2
- "name": "yc-ui2",
3
- "version": "0.1.1-beta19",
4
- "private": false,
5
- "description": "湖南优创UI组件库",
6
- "main": "dist/yc-ui2.umd.min.js",
7
- "scripts": {
8
- "dev": "vue-cli-service serve",
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 src/packages/index.js && npm publish"
13
- },
14
- "dependencies": {
15
- "core-js": "^3.8.3",
16
- "path": "^0.12.7",
17
- "vue": "^2.6.14",
18
- "vue-monoplasty-slide-verify": "^1.3.1"
19
- },
20
- "devDependencies": {
21
- "@babel/core": "^7.12.16",
22
- "@babel/eslint-parser": "^7.12.16",
23
- "@vue/cli-plugin-babel": "~5.0.0",
24
- "@vue/cli-plugin-eslint": "~5.0.0",
25
- "@vue/cli-service": "~5.0.0",
26
- "element-ui": "^2.15.14",
27
- "eslint": "^7.32.0",
28
- "eslint-plugin-vue": "^8.0.3",
29
- "file-loader": "^6.2.0",
30
- "node-sass": "^9.0.0",
31
- "sass-loader": "^13.3.2",
32
- "url-loader": "^4.1.1",
33
- "vue-template-compiler": "^2.6.14",
34
- "vue-router": "3.4.9"
35
- },
36
- "eslintConfig": {
37
- "root": true,
38
- "env": {
39
- "node": true
40
- },
41
- "extends": [
42
- "plugin:vue/essential",
43
- "eslint:recommended"
44
- ],
45
- "parserOptions": {
46
- "parser": "@babel/eslint-parser"
47
- },
48
- "rules": {}
49
- },
50
- "browserslist": [
51
- "> 1%",
52
- "last 2 versions",
53
- "not dead"
54
- ]
55
- }
1
+ {
2
+ "name": "yc-ui2",
3
+ "version": "0.1.2-beta01",
4
+ "private": false,
5
+ "description": "湖南优创UI组件库",
6
+ "main": "dist/yc-ui2.umd.min.js",
7
+ "scripts": {
8
+ "dev": "vue-cli-service serve",
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 src/packages/index.js && npm publish"
13
+ },
14
+ "dependencies": {
15
+ "core-js": "^3.8.3",
16
+ "path": "^0.12.7",
17
+ "vue": "^2.6.14",
18
+ "vue-monoplasty-slide-verify": "^1.3.1"
19
+ },
20
+ "devDependencies": {
21
+ "@babel/core": "^7.12.16",
22
+ "@babel/eslint-parser": "^7.12.16",
23
+ "@vue/cli-plugin-babel": "~5.0.0",
24
+ "@vue/cli-plugin-eslint": "~5.0.0",
25
+ "@vue/cli-service": "~5.0.0",
26
+ "element-ui": "^2.15.14",
27
+ "eslint": "^7.32.0",
28
+ "eslint-plugin-vue": "^8.0.3",
29
+ "file-loader": "^6.2.0",
30
+ "node-sass": "^9.0.0",
31
+ "sass-loader": "^13.3.2",
32
+ "url-loader": "^4.1.1",
33
+ "vue-template-compiler": "^2.6.14",
34
+ "vue-router": "3.4.9"
35
+ },
36
+ "eslintConfig": {
37
+ "root": true,
38
+ "env": {
39
+ "node": true
40
+ },
41
+ "extends": [
42
+ "plugin:vue/essential",
43
+ "eslint:recommended"
44
+ ],
45
+ "parserOptions": {
46
+ "parser": "@babel/eslint-parser"
47
+ },
48
+ "rules": {}
49
+ },
50
+ "browserslist": [
51
+ "> 1%",
52
+ "last 2 versions",
53
+ "not dead"
54
+ ]
55
+ }
package/src/App.vue CHANGED
@@ -1,41 +1,41 @@
1
- <template>
2
- <div id="app">
3
- <!-- <YcSlideVerify /> -->
4
- <router-view></router-view>
5
- <YcCustomerService
6
- title="小优客服【38号为您服务】"
7
- jumpPage="/question"
8
- :json="JSON.stringify(require('@/assets/questions.js').default)"
9
- :regular="['发票增值税率', '城市维护建设税', '教育费附加征收率']"
10
- >
11
- <div><i class="el-icon-mobile"></i></div>
12
- <div>
13
- <span>客服热线</span>
14
- <a href="tel:4000770168">400 0770 168</a>
15
- <template v-if="!['/login', '/register'].includes($route.path)">
16
- <span style="margin-top: 10px">银行服务电话</span>
17
- <a href="tel:13973004180">13973004180(蒋行长)</a>
18
- <a href="tel:15773001997">15773001997(彭经理)</a>
19
- </template>
20
- </div>
21
- </YcCustomerService>
22
- </div>
23
- </template>
24
-
25
- <script>
26
- export default {
27
- name: "App",
28
- components: {
29
- // YcSlideVerify: () => import("comp/YcSlideVerify"),
30
- YcCustomerService: () => import("comp/YcCustomerService"),
31
- },
32
- }
33
- </script>
34
-
35
- <style>
36
- html,
37
- body {
38
- padding: 0px;
39
- margin: 0px;
40
- }
41
- </style>
1
+ <template>
2
+ <div id="app">
3
+ <!-- <YcSlideVerify /> -->
4
+ <router-view></router-view>
5
+ <YcCustomerService
6
+ title="小优客服【38号为您服务】"
7
+ jumpPage="/question"
8
+ :json="JSON.stringify(require('@/assets/questions.js').default)"
9
+ :regular="['发票增值税率', '城市维护建设税', '教育费附加征收率']"
10
+ >
11
+ <div><i class="el-icon-mobile"></i></div>
12
+ <div>
13
+ <span>客服热线</span>
14
+ <a href="tel:4000770168">400 0770 168</a>
15
+ <template v-if="!['/login', '/register'].includes($route.path)">
16
+ <span style="margin-top: 10px">银行服务电话</span>
17
+ <a href="tel:13973004180">13973004180(蒋行长)</a>
18
+ <a href="tel:15773001997">15773001997(彭经理)</a>
19
+ </template>
20
+ </div>
21
+ </YcCustomerService>
22
+ </div>
23
+ </template>
24
+
25
+ <script>
26
+ export default {
27
+ name: "App",
28
+ components: {
29
+ // YcSlideVerify: () => import("comp/YcSlideVerify"),
30
+ YcCustomerService: () => import("comp/YcCustomerService"),
31
+ },
32
+ }
33
+ </script>
34
+
35
+ <style>
36
+ html,
37
+ body {
38
+ padding: 0px;
39
+ margin: 0px;
40
+ }
41
+ </style>
package/src/main.js CHANGED
@@ -1,18 +1,18 @@
1
- import Vue from 'vue'
2
- import App from './App.vue'
3
- import router from './router'
4
-
5
- import SlideVerify from "vue-monoplasty-slide-verify"
6
- import ElementUI from 'element-ui'
7
- import 'element-ui/lib/theme-chalk/index.css';
8
-
9
- Vue.config.productionTip = false
10
-
11
- Vue.use(SlideVerify)
12
- Vue.use(ElementUI)
13
-
14
- new Vue({
15
- render: h => h(App),
16
- router
17
- }).$mount('#app')
18
-
1
+ import Vue from 'vue'
2
+ import App from './App.vue'
3
+ import router from './router'
4
+
5
+ import SlideVerify from "vue-monoplasty-slide-verify"
6
+ import ElementUI from 'element-ui'
7
+ import 'element-ui/lib/theme-chalk/index.css';
8
+
9
+ Vue.config.productionTip = false
10
+
11
+ Vue.use(SlideVerify)
12
+ Vue.use(ElementUI)
13
+
14
+ new Vue({
15
+ render: h => h(App),
16
+ router
17
+ }).$mount('#app')
18
+
package/vue.config.js CHANGED
@@ -1,32 +1,32 @@
1
- const { defineConfig } = require("@vue/cli-service")
2
-
3
- let path = require("path")
4
-
5
- function resolve(dir) {
6
- return path.join(__dirname, dir)
7
- }
8
-
9
- module.exports = defineConfig({
10
- transpileDependencies: true,
11
- chainWebpack: (config) => {
12
- config.resolve.alias
13
- .set("@", resolve("src"))
14
- .set("assets", resolve("src/assets"))
15
- .set("comp", resolve("src/components"))
16
- .set("views", resolve("src/views"))
17
- },
18
- // 前端代理服务器
19
- devServer: {
20
- proxy: {
21
- ['/cloud-img']: {
22
- target: `http://113.219.171.47:6610/cloud-img`,
23
- changeOrigin: true,
24
- pathRewrite: {
25
- ["^/cloud-img"]: "",
26
- },
27
- },
28
- },
29
- historyApiFallback: true,
30
- allowedHosts: "all"
31
- },
1
+ const { defineConfig } = require("@vue/cli-service")
2
+
3
+ let path = require("path")
4
+
5
+ function resolve(dir) {
6
+ return path.join(__dirname, dir)
7
+ }
8
+
9
+ module.exports = defineConfig({
10
+ transpileDependencies: true,
11
+ chainWebpack: (config) => {
12
+ config.resolve.alias
13
+ .set("@", resolve("src"))
14
+ .set("assets", resolve("src/assets"))
15
+ .set("comp", resolve("src/components"))
16
+ .set("views", resolve("src/views"))
17
+ },
18
+ // 前端代理服务器
19
+ devServer: {
20
+ proxy: {
21
+ [process.env.VUE_APP_PATH]: {
22
+ target: process.env.VUE_APP_PATH+process.env.VUE_APP_BASE_API,
23
+ changeOrigin: true,
24
+ pathRewrite: {
25
+ ["^"+process.env.VUE_APP_PATH]: "",
26
+ },
27
+ },
28
+ },
29
+ historyApiFallback: true,
30
+ allowedHosts: "all"
31
+ },
32
32
  })