|
@@ -17,9 +17,9 @@ const deepClone = (arr) =>{
|
|
|
}
|
|
|
|
|
|
const getModelExpStr = (str) =>{
|
|
|
- let matchStr = str.match(/\${number_(.*})/)[0]
|
|
|
let result = {}
|
|
|
- if(matchStr){//数字输入框
|
|
|
+ if(str.match(/\${number_(.*})/)){//数字输入框
|
|
|
+ let matchStr = str.match(/\${number_(.*})/)[0]
|
|
|
result = {
|
|
|
type:'number',
|
|
|
placeholder:matchStr.split('${number_')[1].split('}')[0],
|
|
@@ -27,7 +27,13 @@ const getModelExpStr = (str) =>{
|
|
|
suffix:str.split(matchStr)[1]||''
|
|
|
}
|
|
|
}else if(str.match(/\${input_(.*})/)){
|
|
|
-
|
|
|
+ let matchStr = str.match(/\${input_(.*})/)[0]
|
|
|
+ result = {
|
|
|
+ type:'text',
|
|
|
+ placeholder:matchStr.split('${input_')[1].split('}')[0],
|
|
|
+ prefix:str.split(matchStr)[0]||'',
|
|
|
+ suffix:str.split(matchStr)[1]||''
|
|
|
+ }
|
|
|
}
|
|
|
return result
|
|
|
}
|