3h1-ui 2.15.29 → 2.15.30
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/es/index.js +10 -3
- package/lib/index.js +10 -3
- package/package.json +1 -1
package/es/index.js
CHANGED
|
@@ -19164,12 +19164,19 @@ const Description = /* @__PURE__ */ defineComponent({
|
|
|
19164
19164
|
...props3
|
|
19165
19165
|
};
|
|
19166
19166
|
};
|
|
19167
|
-
|
|
19167
|
+
function findAncestorWithClassName(element, className) {
|
|
19168
|
+
while ((element = element.parentElement) && !element.classList.contains(className))
|
|
19169
|
+
;
|
|
19170
|
+
return element;
|
|
19171
|
+
}
|
|
19172
|
+
const handleClick = (event, value) => {
|
|
19173
|
+
const dom = findAncestorWithClassName(event.target, `shy-basic-description-value`);
|
|
19174
|
+
const text = dom == null ? void 0 : dom.textContent;
|
|
19168
19175
|
const tempInput = document.createElement("textarea");
|
|
19169
19176
|
tempInput.style.position = "absolute";
|
|
19170
19177
|
tempInput.style.opacity = "0";
|
|
19171
19178
|
document.body.append(tempInput);
|
|
19172
|
-
tempInput.value =
|
|
19179
|
+
tempInput.value = text;
|
|
19173
19180
|
tempInput.select();
|
|
19174
19181
|
try {
|
|
19175
19182
|
document.execCommand("copy");
|
|
@@ -19261,7 +19268,7 @@ const Description = /* @__PURE__ */ defineComponent({
|
|
|
19261
19268
|
}
|
|
19262
19269
|
}, [element, (item == null ? void 0 : item.isCopy) ? createVNode("span", {
|
|
19263
19270
|
"style": "cursor:pointer;margin-left:5px",
|
|
19264
|
-
"onClick": () => handleClick(getProps.value.data[`${item.field}`])
|
|
19271
|
+
"onClick": ($event) => handleClick($event, getProps.value.data[`${item.field}`])
|
|
19265
19272
|
}, [createVNode(CopyOutlined$1, {
|
|
19266
19273
|
"style": {
|
|
19267
19274
|
color: "#458ef9",
|
package/lib/index.js
CHANGED
|
@@ -19188,12 +19188,19 @@ const Description = /* @__PURE__ */ vue.defineComponent({
|
|
|
19188
19188
|
...props3
|
|
19189
19189
|
};
|
|
19190
19190
|
};
|
|
19191
|
-
|
|
19191
|
+
function findAncestorWithClassName(element, className) {
|
|
19192
|
+
while ((element = element.parentElement) && !element.classList.contains(className))
|
|
19193
|
+
;
|
|
19194
|
+
return element;
|
|
19195
|
+
}
|
|
19196
|
+
const handleClick = (event, value) => {
|
|
19197
|
+
const dom = findAncestorWithClassName(event.target, `shy-basic-description-value`);
|
|
19198
|
+
const text = dom == null ? void 0 : dom.textContent;
|
|
19192
19199
|
const tempInput = document.createElement("textarea");
|
|
19193
19200
|
tempInput.style.position = "absolute";
|
|
19194
19201
|
tempInput.style.opacity = "0";
|
|
19195
19202
|
document.body.append(tempInput);
|
|
19196
|
-
tempInput.value =
|
|
19203
|
+
tempInput.value = text;
|
|
19197
19204
|
tempInput.select();
|
|
19198
19205
|
try {
|
|
19199
19206
|
document.execCommand("copy");
|
|
@@ -19285,7 +19292,7 @@ const Description = /* @__PURE__ */ vue.defineComponent({
|
|
|
19285
19292
|
}
|
|
19286
19293
|
}, [element, (item == null ? void 0 : item.isCopy) ? vue.createVNode("span", {
|
|
19287
19294
|
"style": "cursor:pointer;margin-left:5px",
|
|
19288
|
-
"onClick": () => handleClick(getProps.value.data[`${item.field}`])
|
|
19295
|
+
"onClick": ($event) => handleClick($event, getProps.value.data[`${item.field}`])
|
|
19289
19296
|
}, [vue.createVNode(CopyOutlined$1, {
|
|
19290
19297
|
"style": {
|
|
19291
19298
|
color: "#458ef9",
|