This commit is contained in:
parent
1bf898e84d
commit
c266c8527a
2 changed files with 2 additions and 2 deletions
|
@ -401,7 +401,7 @@ export const popTextCell = (protyle: IProtyle, cellElements: HTMLElement[], type
|
|||
}
|
||||
cellRect = cellElements[0].getBoundingClientRect();
|
||||
let html = "";
|
||||
const style = `style="position:absolute;left: ${cellRect.left}px;top: ${cellRect.top}px;width:${Math.max(cellRect.width, 100)}px;height: ${cellRect.height}px"`;
|
||||
const style = `style="position:absolute;left: ${cellRect.left}px;top: ${cellRect.top}px;width:${Math.max(cellRect.width, 58)}px;height: ${cellRect.height}px"`;
|
||||
if (["text", "url", "email", "phone", "block", "template"].includes(type)) {
|
||||
html = `<textarea ${style} class="b3-text-field">${cellElements[0].firstElementChild.textContent}</textarea>`;
|
||||
} else if (type === "number") {
|
||||
|
|
|
@ -383,7 +383,7 @@ export class WYSIWYG {
|
|||
const dragColId = dragElement.getAttribute("data-col-id");
|
||||
let newWidth: string;
|
||||
documentSelf.onmousemove = (moveEvent: MouseEvent) => {
|
||||
newWidth = Math.max(oldWidth + (moveEvent.clientX - event.clientX), 100) + "px";
|
||||
newWidth = Math.max(oldWidth + (moveEvent.clientX - event.clientX), 58) + "px";
|
||||
dragElement.parentElement.parentElement.querySelectorAll(".av__row, .av__row--footer").forEach(item => {
|
||||
(item.querySelector(`[data-col-id="${dragColId}"]`) as HTMLElement).style.width = newWidth;
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue