mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: problem_main: allow multi-page selection
This commit is contained in:
4 files changed
+106
-7
No files matched your search
@@ -6,7 +6,7 @@ import DOMServer from 'react-dom/server';
|
||||
|
||||
export function substitute(str: string, obj: any) {
|
||||
return str.replace(/\{([^{}]+)\}/g, (match, key) => {
|
||||
if (obj[key] !== undefined) return obj[key].toString();
|
||||
if (obj[key] !== undefined && obj[key] !== null) return obj[key].toString();
|
||||
return `{${key}}`;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user