Will vue/cli or vue provide a way to generate HTML fragments directly in the future?

English:
When I use some frameworks, some methods in the framework, and the latter attributes require me to pass in a piece of HTML. But I wonder if I can directly bring in the Vue component as a parameter.

For example, when I use ArcGIS, I need to customize the popup of map clicks through the way it provides, like this

image

code:
let options = {
location: event.mapPoint,
content: "

X : " + event.mapPoint.x.toFixed(3) + "

Y : " + event.mapPoint.y.toFixed(3) + “

”,
title: “详情”,
};
view.popup.open(options); // view is provided by arcgis,

can content be replace by some vue component?

i tried to assign values directly with components, but got some errors
code :
let options = {
location: event.mapPoint,
title:“详情”,
content: mapTable // introduce custom component by ‘import’
};
view.popup.open(options);

Will vue/cli or vue provide a way to generate HTML fragments directly in the future?
I appreciate any help

汉语:
我在使用某些框架的时候,框架中的一些方法后者属性需要我传入一段html。但是我想能不能直接将vue的组件作为一个参数直接带入,使他也能享受vue的响应式。

例如:我在使用arcgis 的时候需要通过它的提供的方式去自定义地图点击的弹出,就像这样

code:
let options = {
location: event.mapPoint,
content: "

X : " + event.mapPoint.x.toFixed(3) + "

Y : " + event.mapPoint.y.toFixed(3) + “

”,
title: “详情”,
};
view.popup.open(options); // view is provided by arcgis

尝试用过组件直接赋值,但得到了一些错误
code :
let options = {
location: event.mapPoint,
title:“详情”,
content: mapTable // introduce custom component by ‘import’
};
view.popup.open(options);


vue/cli 或者vue 以后会提供直接生成html 片段的方法吗?
任何帮助,我都非常感谢

I suggest looking into ‘creating webcomponents using vue’, see also Vue and Web Components | Vue.js

This will allow you to create selfcontained vue components that you can render in Dom intependently of anything else around them, also e.g. in a popup for your map

1 Like

Vue is really amazing!This should be the function I want