1

enyo アプリのメニューに問題があります。基本的に、maxHeight は何もしていません。問題だけを強調するためにコードを切り詰めました。

enyo.kind({
name: "App",
fit: true,
components:[
    {kind: "onyx.MenuDecorator", components: [
        {name: "firstMonthContent", content: "Month"},
        {name: "firstMonth", kind: "onyx.Menu", maxHeight: 200, onSelect: "getFirstMonth", components: [
                {value: "0", content: "Jan", classes: "menuItem"},
                {value: "1", content: "Feb", classes: "menuItem"},
                {value: "2", content: "Mar", classes: "menuItem"},
                {value: "3", content: "Apr", classes: "menuItem"},
                {value: "4", content: "May", classes: "menuItem"},
                {value: "5", content: "Jun", classes: "menuItem"},
                {value: "6", content: "Jul", classes: "menuItem"},
                {value: "7", content: "Aug", classes: "menuItem"},
                {value: "8", content: "Sep", classes: "menuItem"},
                {value: "9", content: "Oct", classes: "menuItem"},
                {value: "10", content: "Nov", classes: "menuItem"},
                {value: "11", content: "Dec", classes: "menuItem"},
        ]}
    ]},
],
});

基本的なメニューだけで、maxHeight を除いてすべて正常に動作します。問題は、これを jsfiddle に入れると、完全に正常に動作することです ( http://jsfiddle.net/sqHSL/17/ )。これだけを含む新しいenyoファイルを作成しましたが、それでもこの問題が発生するため、修正する方法がわかりません。誰にもアドバイスはありますか?

4

1 に答える 1

0

実際の理由はわかりませんでしたが、回避策はわかりました。

                {kind: "onyx.MenuDecorator", maxHeight: "5px", components: [
                    {name: "firstMonthContent", content: "Month"},
                    {name: "firstMonth", kind: "onyx.Menu", onSelect: "getFirstMonth", components: [
                        {name: "menuScroller2", kind: "enyo.Scroller", defaultKind: "onyx.MenuItem", vertical: "auto", classes: "enyo-unselectable", maxHeight: "200px", components: [
                            {value: "0", content: "Jan", classes: "menuItem"},
                            {value: "1", content: "Feb", classes: "menuItem"},
                            {value: "2", content: "Mar", classes: "menuItem"},
                            {value: "3", content: "Apr", classes: "menuItem"},
                            {value: "4", content: "May", classes: "menuItem"},
                            {value: "5", content: "Jun", classes: "menuItem"},
                            {value: "6", content: "Jul", classes: "menuItem"},
                            {value: "7", content: "Aug", classes: "menuItem"},
                            {value: "8", content: "Sep", classes: "menuItem"},
                            {value: "9", content: "Oct", classes: "menuItem"},
                            {value: "10", content: "Nov", classes: "menuItem"},
                            {value: "11", content: "Dec", classes: "menuItem"},
                        ]}
                    ]}
                ]},
于 2013-01-14T03:52:29.983 に答える