fix(expression): should reset lastIndex of regular
This commit is contained in:
parent
0d67141a6b
commit
da6ae90231
@ -399,6 +399,10 @@ export function TextArea(props) {
|
||||
|
||||
async function preloadOptions(scope, value) {
|
||||
const options = cloneDeep(scope ?? []);
|
||||
|
||||
// 重置正则的匹配位置
|
||||
VARIABLE_RE.lastIndex = 0;
|
||||
|
||||
for (let matcher; (matcher = VARIABLE_RE.exec(value ?? '')); ) {
|
||||
const keys = matcher[1].split('.');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user