@opentiny/vue-renderless
Version:
An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.
15 lines (14 loc) • 374 B
JavaScript
import "../../../chunk-G2ADBYYC.js";
import toValString from "./toString";
import get from "../base/get";
const template = (str, obj) => {
let rest = toValString(str);
if (rest && obj) {
return rest.replace(/\{{2}([.\w[\]\s]+)\}{2}/g, (match, keys) => get(obj, keys));
}
return rest;
};
var template_default = template;
export {
template_default as default
};