编辑表单自定义提示


[vue3代码]写在生成的[表.vue]文件中,[vue2代码]写在[表.jsx]文件methods方法中;二选一实现
vue3 代码
const conInit=($vm)=> {
    gridRef=$vm
    const option = gridRef.getFormOption("字段");
    option.extra = {
        render: (h, {}) => {
          return (
            <div>
              <el-popover
                placement="top-start"
                title="提示"
                width="200"
                trigger="hover"
                content="还没想好"
              >
                {{
                  reference: () => {
                    <i
                      style="color:rgb(6 118 169);font-size:12px;margin-left:5px"
                      onClick={() => {
                        proxy.$message.success("提示信息");
                      }}
                      class="el-icon-warning-outline"
                    ></i>
                  }
                }}
              </el-popover>
            </div>
          );
        },
    }
}

Last Updated 2025/5/16 03:46:13