diff --git a/README.md b/README.md index 4066b65..c05fc70 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,7 @@ pnpm add @utopia-utils/dom * waitForSelector: 等待指定的选择器匹配的元素出现在页面中,如果调用此方法时已经有匹配的元素,那么此方法立即返回。 如果指定的选择器在超时时间后扔不出现,返回 `null`。[source](https://github.com/GreatAuk/utopia-utils/blob/main/packages/dom/src/waitForSelector.ts) * panzoom: 为指定的元素添加拖拽缩放功能。[source](https://github.com/GreatAuk/utopia-utils/blob/main/packages/dom/src/panzoom/core.ts) * isWeixin: 判断是否是微信浏览器。[source](https://github.com/GreatAuk/utopia-utils/blob/main/packages/dom/src/isWeixin.ts) +* isMobile: 判断是否是移动端浏览器。[source](https://github.com/GreatAuk/utopia-utils/blob/main/packages/share/src/isMobile.ts) ### 杂项 * [defineDictionary](#defineDictionary): 定义业务字典。 **typesafe** [source](https://github.com/GreatAuk/utopia-utils/blob/main/packages/core/src/defineDictionary.ts) * ~~[createEnumFromOptions](#createEnumFromOptions): 通过 `options` 自动生成对应的 `enum`, 后期只需要维护 `options`。**typesafe**。[source](https://github.com/GreatAuk/utopia-utils/blob/main/packages/core/src/createEnumFromOptions.ts)~~ @@ -120,7 +121,6 @@ pnpm add @utopia-utils/share * isObject * isIntegerKey * isEmpty -* isMobile: 判断是否是移动端浏览器。[source](https://github.com/GreatAuk/utopia-utils/blob/main/packages/share/src/isMobile.ts) ------ ### vendor diff --git a/packages/dom/src/index.ts b/packages/dom/src/index.ts index 70164e6..496bc67 100644 --- a/packages/dom/src/index.ts +++ b/packages/dom/src/index.ts @@ -1,3 +1,4 @@ export * from './panzoom' +export * from './isMobile' export * from './isWeixin' export * from './waitForSelector' diff --git a/packages/share/src/isMobile.test.ts b/packages/dom/src/isMobile.test.ts similarity index 100% rename from packages/share/src/isMobile.test.ts rename to packages/dom/src/isMobile.test.ts diff --git a/packages/share/src/isMobile.ts b/packages/dom/src/isMobile.ts similarity index 100% rename from packages/share/src/isMobile.ts rename to packages/dom/src/isMobile.ts diff --git a/packages/share/src/index.ts b/packages/share/src/index.ts index f046137..9f61409 100644 --- a/packages/share/src/index.ts +++ b/packages/share/src/index.ts @@ -1,5 +1,5 @@ export * from './is' -export * from './isMobile' +export * from '../../dom/src/isMobile' export * from './isEmpty' export * from './measurePerformance' export * from './utils'