|
@@ -1,21 +1,4 @@
|
|
|
-import { arrIndex, clog } from 'js-fast-way'
|
|
|
-import config from '~src/config/index'
|
|
|
-
|
|
|
-import { useAppStore } from '~src/store'
|
|
|
-
|
|
|
-const store = useAppStore()
|
|
|
-
|
|
|
-//控制台打印
|
|
|
-export const HcLog = (name, tips, data) => {
|
|
|
- const title = store.barMenuName ?? ''
|
|
|
- if (config.isLog === 'auto') {
|
|
|
- if (import.meta.env.DEV) {
|
|
|
- clog(title, name, tips, data)
|
|
|
- }
|
|
|
- } else if (config.isLog === true) {
|
|
|
- clog(title, name, tips, data)
|
|
|
- }
|
|
|
-}
|
|
|
+import { arrIndex } from 'js-fast-way'
|
|
|
|
|
|
//取数组中的值
|
|
|
export const getRowsValue = (arr, key, key2, value) => {
|
|
@@ -78,3 +61,8 @@ export const setAppName = (name) => {
|
|
|
const title = window.document.title
|
|
|
window.document.title = `${title}${name ? ' - ' + name : ''}`
|
|
|
}
|
|
|
+
|
|
|
+//判断是否为网址
|
|
|
+export const isPathUrl = (path) => {
|
|
|
+ return /^(https?:|mailto:|tel:)/.test(path)
|
|
|
+}
|