diff --git a/index.js b/index.js index 2a91a27..3274f40 100644 --- a/index.js +++ b/index.js @@ -17,15 +17,6 @@ document.body.appendChild(div.fixed.t_2.r_2.bg_red_500.childs([ div.text('session-x') ])) -// 动画三阶段 -// 1. 初始状态 -// 2. 变化过程 -// 3. 结束状态 -// 4. 触发事件 -// 5. 中途变化 - -console.log("h1.m('2rem'):", h1.p('2rem')) - // cursor-pointer overflow-clip hover:text-pink-500 document.body.appendChild(div.cursor_pointer.bg_red_500.overflow_clip.w_1000.childs([ h1.m_2rem.pt_2rem.text('Widgets!'), diff --git a/main.js b/main.js index 41b3871..45ca24d 100644 --- a/main.js +++ b/main.js @@ -62,7 +62,6 @@ export function createElement({ innerText, innerHTML, textContent, readOnly, chi if (styleMap.hasOwnProperty(key)) { styleMap[key].forEach(style => { - console.log('styleMap:', style, value) element.style[style] = isNaN(value) ? value : `${value}px` }) return @@ -249,6 +248,7 @@ function createProxy(tagName) { } export const div = createProxy('div') +export const pre = createProxy('pre') export class span extends BaseElement { @@ -269,12 +269,6 @@ export class img extends BaseElement { } } -export class pre extends BaseElement { - constructor(options) { - super(options) - } -} - export class input extends BaseElement { constructor(options) { super(options)