<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                本文地址:[http://blog.csdn.net/sushengmiyan/article/details/39057243](http://blog.csdn.net/sushengmiyan/article/details/39057243) sencha官方API:[?http://docs.sencha.com/extjs/5.0/apidocs/#!/api/Ext.grid.Panel-cfg-store](http://docs.sencha.com/extjs/5.0/apidocs/#!/api/Ext.grid.Panel-cfg-store)[](http://docs.sencha.com/extjs/5.0/apidocs/#!/api/Ext-method-each) 本文作者:[sushengmiyan](http://blog.csdn.net/sushengmiyan) ------------------------------------------------------------------------------------------------------------------------------------ Ext的官方例子顯示如下: ![](https://box.kancloud.cn/2016-02-03_56b214ea14484.jpg) 我寫的代碼,顯示出來的就是這個樣子?這是何原因? 為什么我的Extjs中表格顯示不友好?panel的frame屬性在作怪 ![](https://box.kancloud.cn/2016-02-03_56b214ea23b87.jpg) 標題欄沒有排序那些也沒有分隔條,下方的數據也是沒有分割,看起來很難受的。誰給看下癥候在哪? 代碼如下: ~~~ { xtype: 'panel', region: 'center', //layout: { type: 'fit' }, items:[{ xtype: 'gridpanel', title: '表格面板', columns: [ { text: 'Name', dataIndex: 'name' }, { text: 'Email', dataIndex: 'email' ,flex: 1 }, { text: 'Phone', dataIndex: 'phone' }], store: Ext.create( 'Ext.data.Store', { //alias: 'paneldatastore', //storeId:'simpsonsStore', fields:['name', 'email', 'phone'], data:{'items':[ { 'name': 'Lisa', "email":"lisa@simpsons.com", "phone":"555-111-1224" }, { 'name': 'Bart', "email":"bart@simpsons.com", "phone":"555-222-1234" }, { 'name': 'Homer', "email":"homer@simpsons.com", "phone":"555-222-1244" }, { 'name': 'Marge', "email":"marge@simpsons.com", "phone":"555-222-1254" } ]}, proxy: { type: 'memory', reader: { type: 'json', rootProperty: 'items' } } }), }] } ~~~ 對比了官方提供的grid綁定xml文件的例子,發現需要將panel的frame屬性設置為true。于是重新來試一下: ![](https://box.kancloud.cn/2016-02-03_56b214ea31d2c.jpg) 最終顯示效果如下: ![](https://box.kancloud.cn/2016-02-03_56b214ea3faf7.jpg) 最新代碼如下: ~~~ { xtype: 'panel', frame: true,//加上frame屬性,表格顯示就友好了 region: 'center', //layout: { type: 'fit' }, items:[{ xtype: 'gridpanel', title: '表格面板', columns: [ { text: 'Name', dataIndex: 'name' }, { text: 'Email', dataIndex: 'email' ,flex: 1 }, { text: 'Phone', dataIndex: 'phone' }], store: Ext.create( 'Ext.data.Store', { //alias: 'paneldatastore', //storeId:'simpsonsStore', fields:['name', 'email', 'phone'], data:{'items':[ { 'name': 'Lisa', "email":"lisa@simpsons.com", "phone":"555-111-1224" }, { 'name': 'Bart', "email":"bart@simpsons.com", "phone":"555-222-1234" }, { 'name': 'Homer', "email":"homer@simpsons.com", "phone":"555-222-1244" }, { 'name': 'Marge', "email":"marge@simpsons.com", "phone":"555-222-1254" } ]}, proxy: { type: 'memory', reader: { type: 'json', rootProperty: 'items' } } }), }] } ~~~ 原因:panel的frame屬性設置為true之后,就可以友好顯示表格了。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看