在spfx中使用Vue

时间:2019-07-08 09:38:05

标签: vue.js

我想在我的Webpart中使用ControlListBuilder,它需要VueControl。

我有我的代码:

new ControlListBuilder<any>({
  scope: "#infoBoxListContainer",
  transport: this.getData(),
  controlFactory: new GenericControlFactory(InfoBox, [
    { source: 'items.item[0]', target: 'image_thumbnail_large' },
    { source: 'items.item[0]', target: 'summary' },
    { source: 'items.item[0]', target: 'url' },
  ]),
  template:
  `<img src = "${InfoBox[0]}">
  <p>${InfoBox[1]}</p>
  <button onclick = ${InfoBox[2]}><img src = 'https://firebasestorage.googleapis.com/v0/b/samsung-9c81a.appspot.com/o/linkArrow.jpg?alt=media&token=b0f9eb52-c554-4ca7-864b-f4839a390783'></button>"`
})

我收到一个错误:

You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.

0 个答案:

没有答案