Commit 3428b6b5 by lianyang

公共组件xml文本格式化获取<tdfmt>标签中的内容,c-input-xml标签修改

parent 098c981c
......@@ -67,7 +67,8 @@ export default {
let strs = rows.length > 0 ? rows[0] : "";
if (strs.startsWith("<?xml")) {
this.isXml = true;
var pattern = /<tdfmt\s[^>]*>(.*)<\/tdfmt>/;
// .点符号匹配除换行符\n以外的任意字符,相匹配包括换行符在内的任意字符,可以用[\s\S]*
var pattern = /<tdfmt\s[^>]*>([\s\S]*)<\/tdfmt>/;
var temp = pattern.exec(strs);
if (temp != null) {
strs = temp[1];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment