element-plus
Version:
A Component Library for Vue 3
21 lines (18 loc) • 423 B
JavaScript
import '../types.mjs';
import '../browser.mjs';
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