@lambo-design/shared 1.0.0-beta.319 → 1.0.0-beta.320
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/nstyles/components/table.less +1 -0
- package/package.json +2 -2
- package/utils/locale/en-US.js +2 -0
- package/utils/locale/zh-CN.js +2 -0
- package/utils/style.js +24 -24
- package/utils/transfer-queue.js +7 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lambo-design/shared",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.320",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "lambo",
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
]
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@lambo-design/xlsx": "^1.0.0-beta.2",
|
|
19
18
|
"axios": "^0.24.0",
|
|
20
19
|
"axios-cache-plugin": "^0.1.0",
|
|
21
20
|
"classnames": "^2.3.1",
|
|
@@ -27,6 +26,7 @@
|
|
|
27
26
|
"nanoid": "^3.3.7",
|
|
28
27
|
"node-rsa": "^1.1.1",
|
|
29
28
|
"qs": "^6.11.0",
|
|
29
|
+
"@lambo-design/xlsx": "^1.0.0-beta.2",
|
|
30
30
|
"@lambo-design/xlsx-style": "^1.0.0-beta.9"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
package/utils/locale/en-US.js
CHANGED
|
@@ -102,6 +102,7 @@ let enUSData = {
|
|
|
102
102
|
'form-rule-user-pas': 'The password cannot be empty',
|
|
103
103
|
'form-rule-valid-code': 'The verification code cannot be empty',
|
|
104
104
|
'form-rule-click-login': 'Please click to proceed with login verification',
|
|
105
|
+
"form-rule-choose-verify-method": "Please select a verification method",
|
|
105
106
|
'form-rule-click-valid': 'Click to verify'
|
|
106
107
|
},
|
|
107
108
|
'other': {
|
|
@@ -112,6 +113,7 @@ let enUSData = {
|
|
|
112
113
|
'captcha-method-sms': 'Text message',
|
|
113
114
|
'captcha-method-mail': 'Email',
|
|
114
115
|
'captcha-method-slide-image': 'Slide the image',
|
|
116
|
+
"captcha-method-message-center": "Message Center",
|
|
115
117
|
'check-valid-code': 'Verifying...',
|
|
116
118
|
'check-success': 'Verification successful',
|
|
117
119
|
'check-fail': 'Verification failed, please try again later!',
|
package/utils/locale/zh-CN.js
CHANGED
|
@@ -102,6 +102,7 @@ let zhCNData = {
|
|
|
102
102
|
'form-rule-user-pas': '密码不能为空',
|
|
103
103
|
'form-rule-valid-code': '验证码不能为空',
|
|
104
104
|
'form-rule-click-login': '请点击验证进行登录验证',
|
|
105
|
+
"form-rule-choose-verify-method": "请选择验证方式",
|
|
105
106
|
'form-rule-click-valid': '点击验证'
|
|
106
107
|
},
|
|
107
108
|
'other': {
|
|
@@ -112,6 +113,7 @@ let zhCNData = {
|
|
|
112
113
|
'captcha-method-sms': '短信',
|
|
113
114
|
'captcha-method-mail': '邮箱',
|
|
114
115
|
'captcha-method-slide-image': '滑动图片',
|
|
116
|
+
"captcha-method-message-center": "消息中心",
|
|
115
117
|
'check-valid-code': '验证中...',
|
|
116
118
|
'check-success': '验证成功',
|
|
117
119
|
'check-fail': '验证失败,请稍后重试!',
|
package/utils/style.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
const SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g
|
|
2
|
-
const MOZ_HACK_REGEXP = /^moz([A-Z])/
|
|
3
|
-
|
|
4
|
-
function camelCase(name) {
|
|
5
|
-
return name
|
|
6
|
-
.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) {
|
|
7
|
-
return offset ? letter.toUpperCase() : letter
|
|
8
|
-
})
|
|
9
|
-
.replace(MOZ_HACK_REGEXP, 'Moz$1')
|
|
10
|
-
}
|
|
11
|
-
// getStyle
|
|
12
|
-
export function getStyle(element, styleName) {
|
|
13
|
-
if (!element || !styleName) return null
|
|
14
|
-
styleName = camelCase(styleName)
|
|
15
|
-
if (styleName === 'float') {
|
|
16
|
-
styleName = 'cssFloat'
|
|
17
|
-
}
|
|
18
|
-
try {
|
|
19
|
-
const computed = document.defaultView.getComputedStyle(element, '')
|
|
20
|
-
return element.style[styleName] || computed ? computed[styleName] : null
|
|
21
|
-
} catch (e) {
|
|
22
|
-
return element.style[styleName]
|
|
23
|
-
}
|
|
24
|
-
}
|
|
1
|
+
const SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g
|
|
2
|
+
const MOZ_HACK_REGEXP = /^moz([A-Z])/
|
|
3
|
+
|
|
4
|
+
function camelCase(name) {
|
|
5
|
+
return name
|
|
6
|
+
.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) {
|
|
7
|
+
return offset ? letter.toUpperCase() : letter
|
|
8
|
+
})
|
|
9
|
+
.replace(MOZ_HACK_REGEXP, 'Moz$1')
|
|
10
|
+
}
|
|
11
|
+
// getStyle
|
|
12
|
+
export function getStyle(element, styleName) {
|
|
13
|
+
if (!element || !styleName) return null
|
|
14
|
+
styleName = camelCase(styleName)
|
|
15
|
+
if (styleName === 'float') {
|
|
16
|
+
styleName = 'cssFloat'
|
|
17
|
+
}
|
|
18
|
+
try {
|
|
19
|
+
const computed = document.defaultView.getComputedStyle(element, '')
|
|
20
|
+
return element.style[styleName] || computed ? computed[styleName] : null
|
|
21
|
+
} catch (e) {
|
|
22
|
+
return element.style[styleName]
|
|
23
|
+
}
|
|
24
|
+
}
|
package/utils/transfer-queue.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
let transferIndex = 1000
|
|
2
|
-
|
|
3
|
-
function transferIncrease() {
|
|
4
|
-
transferIndex++
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export { transferIndex, transferIncrease }
|
|
1
|
+
let transferIndex = 1000
|
|
2
|
+
|
|
3
|
+
function transferIncrease() {
|
|
4
|
+
transferIndex++
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export { transferIndex, transferIncrease }
|