mcrm-mobile 1.5.2 → 1.5.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 +42 -42
- package/es/data-process/ark.js +14 -14
- package/es/data-process/index.js +36 -36
- package/es/index.js +1 -1
- package/es/nav-bar/index.less +97 -97
- package/es/style/theme.less +1189 -1189
- package/es/tab/index.less +25 -25
- package/es/tabs/index.less +277 -277
- package/es/utils/create-request-body/json.js +4 -4
- package/es/utils/http.js +2 -2
- package/lib/data-process/ark.js +14 -14
- package/lib/data-process/index.js +36 -36
- package/lib/index.js +1 -1
- package/lib/mcrm-mobile.js +57 -57
- package/lib/mcrm-mobile.min.js +1 -1
- package/lib/nav-bar/index.less +97 -97
- package/lib/style/theme.less +1189 -1189
- package/lib/tab/index.less +25 -25
- package/lib/tabs/index.less +277 -277
- package/lib/utils/create-request-body/json.js +4 -4
- package/lib/utils/http.js +2 -2
- package/package.json +158 -158
- package/types/common.d.ts +94 -94
- package/types/data-process.d.ts +18 -18
- package/vetur/attributes.json +365 -365
- package/vetur/tags.json +122 -122
- package/vetur/web-types.json +1269 -1269
package/README.md
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
<div class="card">
|
|
2
|
-
<div class="van-doc-intro">
|
|
3
|
-
<h2 style="margin: 0; font-size: 36px; line-height: 60px;">McrmMobile</h2>
|
|
4
|
-
<p>生意宝专用组件库</p>
|
|
5
|
-
</div>
|
|
6
|
-
</div>
|
|
7
|
-
<p align="center">
|
|
8
|
-
🔥 <a href="http://20.26.39.174/downvue/mcrm-docs-new">文档网站</a>
|
|
9
|
-
</p>
|
|
10
|
-
|
|
11
|
-
### 特性
|
|
12
|
-
|
|
13
|
-
- 完善的文档和示例
|
|
14
|
-
- 支持按需引入
|
|
15
|
-
- 支持 TS
|
|
16
|
-
|
|
17
|
-
### 安装
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
# 通过 npm 安装
|
|
21
|
-
npm i mcrm-mobile -S
|
|
22
|
-
|
|
23
|
-
# 通过 yarn 安装
|
|
24
|
-
yarn add mcrm-mobile
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
### 快速上手
|
|
28
|
-
|
|
29
|
-
```js
|
|
30
|
-
import Vue from "vue";
|
|
31
|
-
import { Button } from "mcrm-mobile";
|
|
32
|
-
|
|
33
|
-
Vue.use(Button);
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### 浏览器支持
|
|
37
|
-
|
|
38
|
-
现代浏览器以及 Android 4.0+, iOS 7+
|
|
39
|
-
|
|
40
|
-
### 开源协议
|
|
41
|
-
|
|
42
|
-
本项目基于 [MIT](https://zh.wikipedia.org/wiki/MIT%E8%A8%B1%E5%8F%AF%E8%AD%89) 协议,请自由地享受和参与开源
|
|
1
|
+
<div class="card">
|
|
2
|
+
<div class="van-doc-intro">
|
|
3
|
+
<h2 style="margin: 0; font-size: 36px; line-height: 60px;">McrmMobile</h2>
|
|
4
|
+
<p>生意宝专用组件库</p>
|
|
5
|
+
</div>
|
|
6
|
+
</div>
|
|
7
|
+
<p align="center">
|
|
8
|
+
🔥 <a href="http://20.26.39.174/downvue/mcrm-docs-new">文档网站</a>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
### 特性
|
|
12
|
+
|
|
13
|
+
- 完善的文档和示例
|
|
14
|
+
- 支持按需引入
|
|
15
|
+
- 支持 TS
|
|
16
|
+
|
|
17
|
+
### 安装
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# 通过 npm 安装
|
|
21
|
+
npm i mcrm-mobile -S
|
|
22
|
+
|
|
23
|
+
# 通过 yarn 安装
|
|
24
|
+
yarn add mcrm-mobile
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### 快速上手
|
|
28
|
+
|
|
29
|
+
```js
|
|
30
|
+
import Vue from "vue";
|
|
31
|
+
import { Button } from "mcrm-mobile";
|
|
32
|
+
|
|
33
|
+
Vue.use(Button);
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### 浏览器支持
|
|
37
|
+
|
|
38
|
+
现代浏览器以及 Android 4.0+, iOS 7+
|
|
39
|
+
|
|
40
|
+
### 开源协议
|
|
41
|
+
|
|
42
|
+
本项目基于 [MIT](https://zh.wikipedia.org/wiki/MIT%E8%A8%B1%E5%8F%AF%E8%AD%89) 协议,请自由地享受和参与开源
|
package/es/data-process/ark.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Base64加解密封装
|
|
1
|
+
/**
|
|
2
|
+
* Base64加解密封装
|
|
3
3
|
*/
|
|
4
4
|
function Base64() {
|
|
5
5
|
// private property
|
|
@@ -116,8 +116,8 @@ function Base64() {
|
|
|
116
116
|
return string;
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
|
-
/**
|
|
120
|
-
* 随机整数: [0, (n-1)]
|
|
119
|
+
/**
|
|
120
|
+
* 随机整数: [0, (n-1)]
|
|
121
121
|
*/
|
|
122
122
|
|
|
123
123
|
|
|
@@ -125,8 +125,8 @@ function rnd(n) {
|
|
|
125
125
|
var random = Math.floor(Math.random() * n);
|
|
126
126
|
return random;
|
|
127
127
|
}
|
|
128
|
-
/**-
|
|
129
|
-
* 简单解密
|
|
128
|
+
/**-
|
|
129
|
+
* 简单解密
|
|
130
130
|
*/
|
|
131
131
|
|
|
132
132
|
|
|
@@ -139,8 +139,8 @@ function decodeBase64ForSec(str) {
|
|
|
139
139
|
result = deleteChar(index2, result);
|
|
140
140
|
return base64.decode(result);
|
|
141
141
|
}
|
|
142
|
-
/**
|
|
143
|
-
* 简单加密
|
|
142
|
+
/**
|
|
143
|
+
* 简单加密
|
|
144
144
|
*/
|
|
145
145
|
|
|
146
146
|
|
|
@@ -153,8 +153,8 @@ function encodeBase64ForSec(str) {
|
|
|
153
153
|
result = insertChar(index2, getRandomForSec(), result);
|
|
154
154
|
return result.toString();
|
|
155
155
|
}
|
|
156
|
-
/**
|
|
157
|
-
* 插入字符
|
|
156
|
+
/**
|
|
157
|
+
* 插入字符
|
|
158
158
|
*/
|
|
159
159
|
|
|
160
160
|
|
|
@@ -162,8 +162,8 @@ function insertChar(n, c, str) {
|
|
|
162
162
|
var result = str.substring(0, n) + c + str.substring(n, str.length);
|
|
163
163
|
return result;
|
|
164
164
|
}
|
|
165
|
-
/**
|
|
166
|
-
* 删除字符
|
|
165
|
+
/**
|
|
166
|
+
* 删除字符
|
|
167
167
|
*/
|
|
168
168
|
|
|
169
169
|
|
|
@@ -171,8 +171,8 @@ function deleteChar(n, str) {
|
|
|
171
171
|
var result = str.substring(0, n) + str.substring(n + 1, str.length);
|
|
172
172
|
return result;
|
|
173
173
|
}
|
|
174
|
-
/**
|
|
175
|
-
* 加解密获取随机字符
|
|
174
|
+
/**
|
|
175
|
+
* 加解密获取随机字符
|
|
176
176
|
*/
|
|
177
177
|
|
|
178
178
|
|
package/es/data-process/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Wuner
|
|
3
|
-
* @date 2021/9/28
|
|
4
|
-
* @Description: 数据加解密
|
|
1
|
+
/**
|
|
2
|
+
* @author Wuner
|
|
3
|
+
* @date 2021/9/28
|
|
4
|
+
* @Description: 数据加解密
|
|
5
5
|
*/
|
|
6
6
|
import Vue from "vue";
|
|
7
7
|
import { strEnc, strDec } from "./des.js";
|
|
@@ -14,11 +14,11 @@ var CryptoJS = require("crypto-js");
|
|
|
14
14
|
|
|
15
15
|
var KEY = "TUNSTWQ1jcm1BQkNEIRUZHSA==";
|
|
16
16
|
var IV = "VGRtYlmdsalAxMWUxBcHJraw==";
|
|
17
|
-
/**
|
|
18
|
-
* AES加密
|
|
19
|
-
* @param content 需加密的文本
|
|
20
|
-
* @param key 密钥
|
|
21
|
-
* @param iv 偏移量
|
|
17
|
+
/**
|
|
18
|
+
* AES加密
|
|
19
|
+
* @param content 需加密的文本
|
|
20
|
+
* @param key 密钥
|
|
21
|
+
* @param iv 偏移量
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
var aesEncrypt = function aesEncrypt(content, key, iv) {
|
|
@@ -34,11 +34,11 @@ var aesEncrypt = function aesEncrypt(content, key, iv) {
|
|
|
34
34
|
});
|
|
35
35
|
return encrypted.toString(); //返回的是base64格式的密文
|
|
36
36
|
};
|
|
37
|
-
/**
|
|
38
|
-
* AES解密
|
|
39
|
-
* @param content 密文
|
|
40
|
-
* @param key 密钥
|
|
41
|
-
* @param iv 偏移量
|
|
37
|
+
/**
|
|
38
|
+
* AES解密
|
|
39
|
+
* @param content 密文
|
|
40
|
+
* @param key 密钥
|
|
41
|
+
* @param iv 偏移量
|
|
42
42
|
*/
|
|
43
43
|
|
|
44
44
|
|
|
@@ -56,30 +56,30 @@ var aesDecrypt = function aesDecrypt(content, key, iv) {
|
|
|
56
56
|
});
|
|
57
57
|
return decrypted.toString(CryptoJS.enc.Utf8);
|
|
58
58
|
};
|
|
59
|
-
/**
|
|
60
|
-
* DES解密
|
|
61
|
-
* @param content 密文
|
|
62
|
-
* @param keys 密钥
|
|
59
|
+
/**
|
|
60
|
+
* DES解密
|
|
61
|
+
* @param content 密文
|
|
62
|
+
* @param keys 密钥
|
|
63
63
|
*/
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
var desDecrypt = function desDecrypt(content, keys) {
|
|
67
67
|
return strDec(content, keys[0], keys[1], keys[2]);
|
|
68
68
|
};
|
|
69
|
-
/**
|
|
70
|
-
* DES加密
|
|
71
|
-
* @param content 需加密的文本
|
|
72
|
-
* @param keys 密钥
|
|
69
|
+
/**
|
|
70
|
+
* DES加密
|
|
71
|
+
* @param content 需加密的文本
|
|
72
|
+
* @param keys 密钥
|
|
73
73
|
*/
|
|
74
74
|
|
|
75
75
|
|
|
76
76
|
var desEncrypt = function desEncrypt(content, keys) {
|
|
77
77
|
return strEnc(content, keys[0], keys[1], keys[2]);
|
|
78
78
|
};
|
|
79
|
-
/**
|
|
80
|
-
* base64加密
|
|
81
|
-
* @param content
|
|
82
|
-
* @returns {*}
|
|
79
|
+
/**
|
|
80
|
+
* base64加密
|
|
81
|
+
* @param content
|
|
82
|
+
* @returns {*}
|
|
83
83
|
*/
|
|
84
84
|
|
|
85
85
|
|
|
@@ -87,10 +87,10 @@ var base64Encrypt = function base64Encrypt(content) {
|
|
|
87
87
|
var words = CryptoJS.enc.Utf8.parse(content);
|
|
88
88
|
return CryptoJS.enc.Base64.stringify(words);
|
|
89
89
|
};
|
|
90
|
-
/**
|
|
91
|
-
* base64解密
|
|
92
|
-
* @param content
|
|
93
|
-
* @returns {*}
|
|
90
|
+
/**
|
|
91
|
+
* base64解密
|
|
92
|
+
* @param content
|
|
93
|
+
* @returns {*}
|
|
94
94
|
*/
|
|
95
95
|
|
|
96
96
|
|
|
@@ -98,18 +98,18 @@ var base64Decrypt = function base64Decrypt(content) {
|
|
|
98
98
|
var words = CryptoJS.enc.Base64.parse(content);
|
|
99
99
|
return CryptoJS.enc.Utf8.stringify(words);
|
|
100
100
|
};
|
|
101
|
-
/**
|
|
102
|
-
* 方舟加密
|
|
103
|
-
* @param content 需要加密对文本
|
|
101
|
+
/**
|
|
102
|
+
* 方舟加密
|
|
103
|
+
* @param content 需要加密对文本
|
|
104
104
|
*/
|
|
105
105
|
|
|
106
106
|
|
|
107
107
|
export var arkEncrypt = function arkEncrypt(content) {
|
|
108
108
|
return encodeBase64ForSec(content);
|
|
109
109
|
};
|
|
110
|
-
/**
|
|
111
|
-
* 方舟解密
|
|
112
|
-
* @param content 需要解密对文本
|
|
110
|
+
/**
|
|
111
|
+
* 方舟解密
|
|
112
|
+
* @param content 需要解密对文本
|
|
113
113
|
*/
|
|
114
114
|
|
|
115
115
|
var arkDecrypt = function arkDecrypt(content) {
|
package/es/index.js
CHANGED
|
@@ -91,7 +91,7 @@ import Tag from './tag';
|
|
|
91
91
|
import Toast from './toast';
|
|
92
92
|
import TreeSelect from './tree-select';
|
|
93
93
|
import Uploader from './uploader';
|
|
94
|
-
var version = '1.5.
|
|
94
|
+
var version = '1.5.3';
|
|
95
95
|
var components = [ActionSheet, AddressPicker, Api, Badge, Biz, Button, Calendar, Card, Cell, CellGroup, Checkbox, CheckboxGroup, Circle, Col, Collapse, CollapseItem, CommonUtils, CountDown, DataProcess, DatePicker, DatetimePicker, Dialog, Directive, Divider, Drag, DropdownItem, DropdownMenu, Empty, Field, GoodsAction, GoodsActionButton, GoodsActionIcon, Grid, GridItem, Http, Icon, Image, ImagePreview, IndexAnchor, IndexBar, Info, List, Loading, Local, Menu, MenuIcon, MenuJump, Menus, NavBar, NoticeBar, Notify, Overlay, Pagination, Panel, PasswordInput, Picker, Popover, Popup, Progress, PullRefresh, Radio, RadioGroup, Rank, Rate, Row, SafeKeyboard, Search, Session, ShareSheet, Sidebar, SidebarItem, Slider, Step, Stepper, Steps, Sticky, Swipe, SwipeCell, SwipeItem, Switch, SwitchCell, Tab, Tabbar, TabbarItem, Table, TableColumn, Tabs, Tag, Toast, TreeSelect, Uploader];
|
|
96
96
|
|
|
97
97
|
var install = function install(Vue) {
|
package/es/nav-bar/index.less
CHANGED
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
@import "../style/theme";
|
|
2
|
-
|
|
3
|
-
.mm-nav-bar {
|
|
4
|
-
display: flex;
|
|
5
|
-
position: relative;
|
|
6
|
-
align-items: center;
|
|
7
|
-
min-height: @nav-bar-min-height;
|
|
8
|
-
justify-content: space-between;
|
|
9
|
-
background-color: @white;
|
|
10
|
-
|
|
11
|
-
&-action {
|
|
12
|
-
display: flex;
|
|
13
|
-
align-items: center;
|
|
14
|
-
height: 100%;
|
|
15
|
-
justify-content: center;
|
|
16
|
-
max-width: 100%;
|
|
17
|
-
font-size: @font-size-lg;
|
|
18
|
-
|
|
19
|
-
> [class*="icon"] {
|
|
20
|
-
font-size: 18px;
|
|
21
|
-
|
|
22
|
-
& + & {
|
|
23
|
-
margin-left: 0.5em;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
&:first-child {
|
|
28
|
-
margin-left: @nav-bar-title-margin;
|
|
29
|
-
font-size: @font-size-lg;
|
|
30
|
-
|
|
31
|
-
> [class*="icon"] {
|
|
32
|
-
margin-left: -0.3em;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
&:last-child {
|
|
37
|
-
margin-right: @nav-bar-title-margin;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&-left {
|
|
41
|
-
color: @blue;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&-close {
|
|
45
|
-
margin-left: @nav-bar-close-margin;
|
|
46
|
-
color: @blue;
|
|
47
|
-
font-size: @nav-bar-close-font-size;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&-chat {
|
|
51
|
-
display: flex;
|
|
52
|
-
height: 22px;
|
|
53
|
-
border-radius: 11px;
|
|
54
|
-
border: 1px solid #0085cf;
|
|
55
|
-
|
|
56
|
-
div {
|
|
57
|
-
display: flex;
|
|
58
|
-
align-items: center;
|
|
59
|
-
padding: 0 12px;
|
|
60
|
-
height: 100%;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
&-left {
|
|
64
|
-
border-right: 1px solid #0085cf;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
&-title {
|
|
70
|
-
position: absolute;
|
|
71
|
-
text-align: center;
|
|
72
|
-
width: calc(100% - 170px);
|
|
73
|
-
left: 0;
|
|
74
|
-
right: 0;
|
|
75
|
-
bottom: 0;
|
|
76
|
-
top: 0;
|
|
77
|
-
margin: auto;
|
|
78
|
-
height: @nav-bar-title-height;
|
|
79
|
-
font-size: @font-size-lg;
|
|
80
|
-
font-weight: bold;
|
|
81
|
-
line-height: @nav-bar-title-height;
|
|
82
|
-
cursor: none;
|
|
83
|
-
pointer-events: none;
|
|
84
|
-
text-overflow: ellipsis;
|
|
85
|
-
white-space: nowrap;
|
|
86
|
-
overflow: hidden;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
&-fixed {
|
|
90
|
-
position: fixed;
|
|
91
|
-
width: 100%;
|
|
92
|
-
left: 0;
|
|
93
|
-
top: 0;
|
|
94
|
-
z-index: 1024;
|
|
95
|
-
box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
1
|
+
@import "../style/theme";
|
|
2
|
+
|
|
3
|
+
.mm-nav-bar {
|
|
4
|
+
display: flex;
|
|
5
|
+
position: relative;
|
|
6
|
+
align-items: center;
|
|
7
|
+
min-height: @nav-bar-min-height;
|
|
8
|
+
justify-content: space-between;
|
|
9
|
+
background-color: @white;
|
|
10
|
+
|
|
11
|
+
&-action {
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
height: 100%;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
max-width: 100%;
|
|
17
|
+
font-size: @font-size-lg;
|
|
18
|
+
|
|
19
|
+
> [class*="icon"] {
|
|
20
|
+
font-size: 18px;
|
|
21
|
+
|
|
22
|
+
& + & {
|
|
23
|
+
margin-left: 0.5em;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&:first-child {
|
|
28
|
+
margin-left: @nav-bar-title-margin;
|
|
29
|
+
font-size: @font-size-lg;
|
|
30
|
+
|
|
31
|
+
> [class*="icon"] {
|
|
32
|
+
margin-left: -0.3em;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&:last-child {
|
|
37
|
+
margin-right: @nav-bar-title-margin;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&-left {
|
|
41
|
+
color: @blue;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&-close {
|
|
45
|
+
margin-left: @nav-bar-close-margin;
|
|
46
|
+
color: @blue;
|
|
47
|
+
font-size: @nav-bar-close-font-size;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&-chat {
|
|
51
|
+
display: flex;
|
|
52
|
+
height: 22px;
|
|
53
|
+
border-radius: 11px;
|
|
54
|
+
border: 1px solid #0085cf;
|
|
55
|
+
|
|
56
|
+
div {
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
padding: 0 12px;
|
|
60
|
+
height: 100%;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&-left {
|
|
64
|
+
border-right: 1px solid #0085cf;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&-title {
|
|
70
|
+
position: absolute;
|
|
71
|
+
text-align: center;
|
|
72
|
+
width: calc(100% - 170px);
|
|
73
|
+
left: 0;
|
|
74
|
+
right: 0;
|
|
75
|
+
bottom: 0;
|
|
76
|
+
top: 0;
|
|
77
|
+
margin: auto;
|
|
78
|
+
height: @nav-bar-title-height;
|
|
79
|
+
font-size: @font-size-lg;
|
|
80
|
+
font-weight: bold;
|
|
81
|
+
line-height: @nav-bar-title-height;
|
|
82
|
+
cursor: none;
|
|
83
|
+
pointer-events: none;
|
|
84
|
+
text-overflow: ellipsis;
|
|
85
|
+
white-space: nowrap;
|
|
86
|
+
overflow: hidden;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&-fixed {
|
|
90
|
+
position: fixed;
|
|
91
|
+
width: 100%;
|
|
92
|
+
left: 0;
|
|
93
|
+
top: 0;
|
|
94
|
+
z-index: 1024;
|
|
95
|
+
box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
|
|
96
|
+
}
|
|
97
|
+
}
|