Vue - 带有DHX插值的 Json 形式

问题描述

我正在关注 this 链接以使 dhtmlx Suite 与 Vue 配合使用,并且我能够正确创建表单。

然而,问题是,由于此表单是在 mount() 之后注入的,因此我无法向表单元素添加插值“{{}}”。

有人知道如何使它成为可能吗?

<template>
  <div ref="form"></div>
</template>

<script>
import { Form as FormDHX } from "dhx-suite";
export default {
  name: "FormBase",data: () => ({
    form: null,}),mounted() {
    this.form = new FormDHX(this.$refs.form,{
      css: "dhx_widget--bordered dhx_widget--bg_white",width: 400,rows: [
        {
          type: "input",label: "Name",icon: "dxi-magnify",placeholder: "John Doe",},{
          type: "input",label: "Email",placeholder: "[email protected]",inputType: "password",label: "Password",placeholder: "********",{
          type: "checkBox",text: "I agree",name: "agree",{
          type: "button",text: "Send",size: "medium",view: "flat",submit: true,color: "primary",],});
  },beforeDestroy() {
    if (this.form) {
      this.form.destructor();
    }
  },};
</script>

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)