| 1234567891011121314151617181920 |
- import { createApp, h } from 'vue';
- export function isPromise(obj) {
- return Object.prototype.toString.call(obj) === '[object Promise]';
- }
- export const innerComopnent = (components, options, targetElement) => {
- const app = createApp(h(components), options);
- app.mount(targetElement);
- }
- export const isMobile = () => {
- // 获取URL中的查询字符串
- const queryString = window.location.href;
- // 使用URLSearchParams解析查询字符串
- const urlParams = new URLSearchParams(queryString);
- // 获取特定参数的值
- const isMobile = urlParams.get('isMobile');
- return isMobile && isMobile === 'true';
- }
|