2012-10-22

ZK-1411 的故事

有人說:我怎麼對 auxheader 設定 width 都沒有用? 這是 bug 吧?

一開始還真的以為是 auxheader 可以設定 width,只是剛好他人品爆發寫了奇怪的 code 踩到雷 (是說他提供的 code 實在... 唉...)。結果我 try 了一下,發現基本上 auxheader 真的完全不會管你 width 設了啥, 統統給你平均分配。

btw... 中間還耍了這樣一個白痴 code

<grid width="900px">
    <auxhead>
        <auxheader width="300px" label="aux 300px" />
        <auxheader width="500px" label="aux 500px" />
        <auxheader label="aux" />
    </auxhead>
</grid>
<!-- 喔喔喔喔... 難道只有第二個的 width 才會有問題嗎? [死] -->

不帶任何希望地爬了一下 ZK 文件(總比去 source code 慢慢 farm 來得好 [逃]), 結果在 component reference 找到這段:

The other limitation is that the width of the Auxheader component depend on the Column component. Thus, if you'd like to specify the width in the Column component, it means it will take some space even when there are no label in all Column components.

除非去質疑 spec,不然這個 issue 是不成立的。 但反過來說,為什麼不在 auxheader 試圖設定 width 的時候炸 exception 呢? 所以我改去發了 ZK-1422,至於後續如何發展,請待下回分解(慢慢等吧你 XD)。

這個 ZK-1411 的故事有點像是來騙文章數的 [毆飛]。

No comments:

Post a Comment