imatrix-ui 2.9.19-boe09 → 2.9.19-boe10
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/package.json +1 -1
- package/src/utils/common-util.js +11 -0
package/package.json
CHANGED
package/src/utils/common-util.js
CHANGED
|
@@ -253,3 +253,14 @@ export function removeCustomControlValidatorRef(pageCode, refName) {
|
|
|
253
253
|
const pageCustomControlRef = window.customValidatorRef.get(pageCode)
|
|
254
254
|
pageCustomControlRef.delete(refName)
|
|
255
255
|
}
|
|
256
|
+
|
|
257
|
+
export function isMobileBrowser() {
|
|
258
|
+
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Opera Mobi|Windows CE|Symbian|Windows Phone|POLARIS|lgtelecom|nokia|SonyEricsson|LG|SAMSUNG|Samsung/i
|
|
259
|
+
.test(navigator.userAgent)) {
|
|
260
|
+
// 移动端浏览器
|
|
261
|
+
return true
|
|
262
|
+
} else {
|
|
263
|
+
// PC浏览器
|
|
264
|
+
return false
|
|
265
|
+
}
|
|
266
|
+
}
|