stdproject/frontend/node_modules/element-plus/es/utils/dom/element.mjs

19 lines
375 B
JavaScript
Raw Normal View History

2025-05-30 13:43:31 +08:00
import { isClient } from '@vueuse/core';
import { isString } from '@vue/shared';
const getElement = (target) => {
if (!isClient || target === "")
return null;
if (isString(target)) {
try {
return document.querySelector(target);
} catch (e) {
return null;
}
}
return target;
};
export { getElement };
//# sourceMappingURL=element.mjs.map