UNPKG

eapp-amis-theme-editor

Version:

amis主题编辑器

33 lines (27 loc) 702 B
/** * amis-theme-editor v2.0.11-beta.2 * Copyright 2018-2023 @fex */ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var tslib = require('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 ? tslib.__assign(tslib.__assign({}, tpl), patch) : tpl : null; } return schema; } function setSchemaTpl(name, value) { tpls[name] = value; } exports.getSchemaTpl = getSchemaTpl; exports.setSchemaTpl = setSchemaTpl;