fix: 关闭按钮位置错误

This commit is contained in:
dataeaseShu 2022-06-23 15:34:40 +08:00
parent 745fb10a1f
commit c00c9e9468

View File

@ -51,11 +51,13 @@ function textSelectWidget(nodeCache, style) {
const textNode = item.querySelector('.el-select__tags-text'); const textNode = item.querySelector('.el-select__tags-text');
const closeNode = item.querySelector('.el-tag__close'); const closeNode = item.querySelector('.el-tag__close');
textNode.style.width = '100%'; textNode.style.width = '100%';
item.style.position = 'relative';
textNode.style.padding = '0 20px 0 8px'; textNode.style.padding = '0 20px 0 8px';
textNode.style.borderRadius = '3px'; textNode.style.borderRadius = '3px';
if (closeNode) { if (closeNode) {
closeNode.style.position = 'absolute'; closeNode.style.position = 'absolute';
closeNode.style.top = '8px'; closeNode.style.top = '60%';
closeNode.style.transform = 'translateY(-50%)';
closeNode.style.right = '2px'; closeNode.style.right = '2px';
} }
styleAttrs.forEach((ele) => { styleAttrs.forEach((ele) => {