日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

EasyUI中layout布局的简单使用

發布時間:2025/3/19 编程问答 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 EasyUI中layout布局的简单使用 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

場景

效果

布局選項(Layout Options)

名稱類型描述默認值
fitboolean當設置為 true 時,就設置布局(layout)的尺寸適應它的父容器。當在 'body' 標簽上創建布局(layout)時,它將自動最大化到整個頁面的全部尺寸。false

區域面板選項(Region Panel Options)

區域面板選項(Region Panel Options)是定義在面板(panel)組件中,下面是一些共同的和新增的屬性:

名稱類型描述默認值
titlestring布局面板(layout panel)的標題文本。null
regionstring定義布局面板(layout panel)的位置,其值是下列之一:north、south、east、west、center。?
borderboolean當設置為 true 時,就顯示布局面板(layout panel)的邊框。true
splitboolean當設置為 true 時,就顯示拆分欄,用戶可以用它改變面板(panel)的尺寸。false
iconClsstring在面板(panel)頭部顯示一個圖標的 CSS class。null
hrefstring從遠程站點加載數據的 URL 。null
collapsibleboolean定義是否顯示可折疊按鈕。true
minWidthnumber面板(panel)最小寬度。10
minHeightnumber面板(panel)最小高度。10
maxWidthnumber面板(panel)最大寬度。10000
maxHeightnumber面板(panel)最大高度。10000

方法

名稱參數描述
resizenone設置布局(layout)的尺寸。
panelregion返回指定的面板(panel),'region' 參數可能的值是:'north'、'south'、'east'、'west'、'center'。
collapseregion折疊指定的面板(panel),'region' 參數可能的值是:'north'、'south'、'east'、'west'。
expandregion展開指定的面板(panel),'region' 參數可能的值是:'north'、'south'、'east'、'west'。
addoptions添加一個指定的面板(panel),options 參數一個配置對象,更多細節請參閱標簽頁面板(tab panel)屬性。
removeregion移除指定的面板(panel),'region' 參數可能的值:'north'、'south'、'east'、'west'。

實現

簡單layout布局的實現

<!DOCTYPE html> <html lang="en"> <head><meta charset="UTF-8"><title>Title</title><link rel="stylesheet" type="text/css" href="/easyui/themes/icon.css"><link rel="stylesheet" type="text/css" href="/easyui/themes/default/easyui.css"><script type="text/javascript" src="/easyui/jquery.min.js"></script><script type="text/javascript" src="/easyui/jquery.easyui.min.js"></script> </head> <body> <div id="cc" class="easyui-layout" style="width:600px;height:400px;"><div data-options="region:'north',title:'North Title',split:true" style="height:100px;"></div><div data-options="region:'south',title:'South Title',split:true" style="height:100px;"></div><div data-options="region:'east',title:'East',split:true" style="width:100px;"></div><div data-options="region:'west',title:'West',split:true" style="width:100px;"></div><div data-options="region:'center',title:'center title'" style="padding:5px;background:#eee;"></div> </div> </body> </html>

在整個頁面上創建布局

將class="easyui-layout"放在body上

<body class="easyui-layout">

layout動態加載內容

新建動態加載頁面

<!DOCTYPE html> <html lang="en"> <head><meta charset="UTF-8"><title>Title</title> </head> <body> 動態加載內容 </body> </html>

添加href屬性實現動態加載內容

<!DOCTYPE html> <html lang="en"> <head><meta charset="UTF-8"><title>Title</title><link rel="stylesheet" type="text/css" href="/easyui/themes/icon.css"><link rel="stylesheet" type="text/css" href="/easyui/themes/default/easyui.css"><script type="text/javascript" src="/easyui/jquery.min.js"></script><script type="text/javascript" src="/easyui/jquery.easyui.min.js"></script> </head> <body> <div id="cc" class="easyui-layout" style="width:600px;height:400px;"><div data-options="region:'north',title:'North Title',split:true" style="height:100px;"></div><div data-options="region:'south',title:'South Title',split:true" style="height:100px;"></div><div data-options="region:'east',title:'East',split:true" style="width:100px;"></div><div data-options="region:'west',title:'West',split:true" style="width:100px;"></div><div data-options="region:'center',title:'center title',href:'dynamic.html'" style="padding:5px;background:#eee;"></div> </div> </body> </html>

效果

總結

以上是生活随笔為你收集整理的EasyUI中layout布局的简单使用的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。