vue 中使用jsx语法的时候v-html 无法解析

908 阅读1分钟
//作为记录

const 	layouts={
   colFormItem(h, scheme) {
    const config = scheme.__config__
    let labelWidth = config.labelWidth ? `${config.labelWidth}px` : null;
    let configValue = config.value;
    if (config.showLabel === false) labelWidth = '0';
         return (
          <el-col span={config.span}>
            <el-form-item label-width={labelWidth} prop={scheme.__vModel__}
              label={config.showLabel ? config.label : ''}>
                   <span domPropsInnerHTML={configValue}></span>
            </el-form-item>
          </el-col>
         )
	 }
}


 <span domPropsInnerHTML={configValue}></span> 关键性语句