Open guoguoss opened 1 year ago
import "amis-ui/lib/themes/antd.css"; import "amis-ui/lib/themes/cxd.css"; import "amis-ui/lib/themes/default.css"; import 'amis/lib/themes/cxd.css'; import 'amis/lib/helper.css'; import "amis/lib/themes/default.css"; import './style.scss'; const [preview, setPreview] = useState(false); // const [defaultPageConfig] = useState<Schema>(props.defaultPageConfig); // 传入配置 const defaultPageConfig = null; const defaultSchema = { type: "page", body: "", title: "标题", regions: ["body"], }; const [schema] = useState(defaultSchema); let pageJsonObj = defaultSchema; const onChange = (value) => { pageJsonObj = value; // props.pageChangeHandler && props.pageChangeHandler(value); }; const onSave = () => { // props.codeGenHandler && props.codeGenHandler(pageJsonObj); }; return ( <div className="Editor-Demo"> <div className="Editor-header"> <div className="Editor-title">amis 可视化编辑器</div> <div className="Editor-view-mode-group-container"> <div className="Editor-view-mode-group"> </div> </div> <div className="Editor-header-actions"> </div> </div> <div className="Editor-inner"> <Editor // theme={'cxd'} preview={preview} isMobile={false} onChange={onChange} className="is-fixed" value={schema} theme={"cxd"} onSave={onSave} showCustomRenderersPanel={true} /> </div> </div> ) };
👍 Thanks for this! 🏷 I have applied any labels matching special text in your issue.
Please review the labels and make any necessary changes.
editor 的样式没加载?