使用vue.js,我想知道在多个给定positions处将span元素插入到text中的最佳方式是什么?具体地说,在一个简化的示例中,我有: text = "This is a random text. It goes on and on..."
positions = [0, 5, 17]
span_templ = '<span class="some_class" />' <-- closed span for sake of simplicity 工作流程是:用户单击一个按钮,一些RESTful请求被发送到服务器,
似乎我在vue中加载外部umd组件时遇到了问题。
我尝试做一些类似的事情,比如
这对使用vue2和webpack的我来说很有效
现在我使用的是Vue3/Vite和上面问题中相同的源码。
但是当解析外部组件promise时,我得到以下错误:
vue.js:1184 [Vue warn]: Unhandled error during execution of async component loader
at <AsyncComponentWrapper>
at <DemoComponent>
at <HelloWorld msg="He