UNPKG

amis-theme-editor

Version:

amis主题编辑器

28 lines (24 loc) 580 B
/** * amis-theme-editor v2.0.22-beta.2 * Copyright 2018-2023 @fex */ import { __assign } from 'tslib'; var tpls = {}; function getSchemaTpl(name, patch, rendererSchema) { var tpl = tpls[name] || {}; var schema = null; if (typeof tpl === 'function') { schema = tpl(patch, rendererSchema); } else { schema = tpl ? patch ? __assign(__assign({}, tpl), patch) : tpl : null; } return schema; } function setSchemaTpl(name, value) { tpls[name] = value; } export { getSchemaTpl, setSchemaTpl };