bk-magic-vue 2.5.1 → 2.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28401,8 +28401,15 @@
28401
28401
  if (selector instanceof Vue) {
28402
28402
  options.content = selector.$el;
28403
28403
  } else if (typeof selector === 'string') {
28404
- var element = document.createElement('div');
28405
- element.innerHTML = selector;
28404
+ try {
28405
+ var element = document.querySelector(selector);
28406
+ if (element) {
28407
+ options.content = element;
28408
+ }
28409
+ } catch (e) {
28410
+ var _element = document.createElement('div');
28411
+ _element.innerHTML = selector;
28412
+ }
28406
28413
  }
28407
28414
  }
28408
28415
  if (options.html) {