centaline-data-driven-v3 0.0.96 → 0.0.98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/centaline-data-driven-v3.umd.js +91 -91
- package/package.json +1 -1
- package/src/components/app/Progress.vue +1 -1
- package/src/components/app/SearchList/SearchStats.vue +3 -3
- package/src/components/app/SearchList/SearchTable.vue +1 -1
- package/src/components/web/Button.vue +84 -26
- package/src/components/web/Form.vue +35 -28
- package/src/components/web/FormList.vue +13 -2
- package/src/components/web/SearchList/SearchStats.vue +3 -3
- package/src/components/web/photo.vue +29 -17
- package/src/loader/src/Button.js +7 -0
- package/src/loader/src/Form.js +3 -2
- package/src/loader/src/Photo.js +23 -7
- package/src/loader/src/Router.js +12 -1
- package/src/loader/src/SearchStats.js +1 -1
- package/src/main.js +2 -2
- package/src/utils/Enum.js +5 -1
- package/src/utils/common.js +21 -2
- package/src/utils/formData.js +362 -358
- package/src/views/SearchList.vue +1 -1
package/src/utils/Enum.js
CHANGED
package/src/utils/common.js
CHANGED
|
@@ -598,8 +598,9 @@ const common = {
|
|
|
598
598
|
strCharLen(str) {
|
|
599
599
|
var len = 0;
|
|
600
600
|
if (str) {
|
|
601
|
-
|
|
602
|
-
|
|
601
|
+
let newstr = extractTagContent(str);
|
|
602
|
+
for (var i = 0; i < newstr.length; i++) {
|
|
603
|
+
var c = newstr.charCodeAt(i);
|
|
603
604
|
//单字节加1
|
|
604
605
|
if ((c >= 0x0001 && c <= 0x007e) || (0xff60 <= c && c <= 0xff9f)) {
|
|
605
606
|
len++;
|
|
@@ -611,6 +612,24 @@ const common = {
|
|
|
611
612
|
|
|
612
613
|
return len;
|
|
613
614
|
},
|
|
615
|
+
/**
|
|
616
|
+
* @method
|
|
617
|
+
* @param {String} str 需要计算的字符串
|
|
618
|
+
* @desc 获取文字。
|
|
619
|
+
* @returns {obj} 返回值
|
|
620
|
+
*/
|
|
621
|
+
extractTagContent(htmlContent) {
|
|
622
|
+
|
|
623
|
+
const pattern = /<[^>]+>(.*?)<\/[^>]+>/gs;
|
|
624
|
+
let matches;
|
|
625
|
+
let result = "";
|
|
626
|
+
while ((matches = pattern.exec(htmlContent)) !== null) {
|
|
627
|
+
// console.log(matches[1].trim()); // 打印提取的内容
|
|
628
|
+
|
|
629
|
+
result += matches[1].trim();
|
|
630
|
+
}
|
|
631
|
+
return result;
|
|
632
|
+
},
|
|
614
633
|
/**
|
|
615
634
|
* @method
|
|
616
635
|
* @param {Object} obj 需要克隆的对象
|