isdata-customer-sdk 0.1.96 → 0.1.97
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/index.common.js +14 -10
- package/dist/index.common.js.map +1 -1
- package/dist/index.umd.js +14 -10
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/index.common.js
CHANGED
|
@@ -33163,9 +33163,13 @@ function processElement(element) {
|
|
|
33163
33163
|
for (let i = 0; i < children.length; i++) {
|
|
33164
33164
|
processElement(children[i]);
|
|
33165
33165
|
}
|
|
33166
|
-
|
|
33166
|
+
// 检查是否是input元素
|
|
33167
|
+
const isButtonElement = element.tagName === "BUTTON";
|
|
33168
|
+
if (!isButtonElement) {
|
|
33169
|
+
return false;
|
|
33170
|
+
}
|
|
33167
33171
|
}
|
|
33168
|
-
element.setAttribute("i18nProcessed", "true"); // 标记元素已被处理
|
|
33172
|
+
// element.setAttribute("i18nProcessed", "true"); // 标记元素已被处理
|
|
33169
33173
|
// 检查是否是input元素
|
|
33170
33174
|
const isInputElement = element.tagName === "INPUT";
|
|
33171
33175
|
// 检查placeholder是否匹配
|
|
@@ -33178,10 +33182,10 @@ function processElement(element) {
|
|
|
33178
33182
|
|
|
33179
33183
|
// 检查innerHTML是否匹配(仅对没有子元素的元素)
|
|
33180
33184
|
let innerHTMLMatch = null;
|
|
33181
|
-
if (!hasChildren) {
|
|
33182
|
-
|
|
33183
|
-
|
|
33184
|
-
}
|
|
33185
|
+
// if (!hasChildren) {
|
|
33186
|
+
const innerHTML = element.innerHTML;
|
|
33187
|
+
innerHTMLMatch = checkTextFormat(innerHTML);
|
|
33188
|
+
// }
|
|
33185
33189
|
|
|
33186
33190
|
// 如果没有匹配的内容,则不处理
|
|
33187
33191
|
if (!placeholderMatch && !valueMatch && !innerHTMLMatch) {
|
|
@@ -33222,8 +33226,8 @@ function processElement(element) {
|
|
|
33222
33226
|
oldValue: innerHTMLMatch ? element.innerHTML : null,
|
|
33223
33227
|
oldPlaceholderValue: placeholderMatch ? placeholder : null,
|
|
33224
33228
|
oldValueValue: valueMatch ? value : null,
|
|
33225
|
-
isInputElement: isInputElement
|
|
33226
|
-
hasChildren: hasChildren
|
|
33229
|
+
isInputElement: isInputElement
|
|
33230
|
+
// hasChildren: hasChildren,
|
|
33227
33231
|
});
|
|
33228
33232
|
applyTranslation(element);
|
|
33229
33233
|
return true;
|
|
@@ -33301,8 +33305,8 @@ const applyTranslation = async element => {
|
|
|
33301
33305
|
}
|
|
33302
33306
|
}
|
|
33303
33307
|
|
|
33304
|
-
// 处理innerHTML
|
|
33305
|
-
if (
|
|
33308
|
+
// 处理innerHTML
|
|
33309
|
+
if (cachedItem.key) {
|
|
33306
33310
|
const key = element.getAttribute("localKey");
|
|
33307
33311
|
const oldValue = element.getAttribute("oldValue");
|
|
33308
33312
|
if (key && oldValue) {
|