SafetyScreen-ui/node_modules/vue-grid-layout/website/public/assets/js/61.8b9ba428.js

1 line
17 KiB
JavaScript
Raw Normal View History

2025-03-29 19:33:58 +08:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[61],{533:function(e,v,_){"use strict";_.r(v);var r=_(34),a=Object(r.a)({},(function(){var e=this,v=e._self._c;return v("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[v("h1",{attrs:{id:"属性"}},[v("a",{staticClass:"header-anchor",attrs:{href:"#属性"}},[e._v("#")]),e._v(" 属性")]),e._v(" "),v("h2",{attrs:{id:"gridlayout"}},[v("a",{staticClass:"header-anchor",attrs:{href:"#gridlayout"}},[e._v("#")]),e._v(" GridLayout")]),e._v(" "),v("h3",{attrs:{id:"layout"}},[v("a",{staticClass:"header-anchor",attrs:{href:"#layout"}},[e._v("#")]),e._v(" layout")]),e._v(" "),v("ul",[v("li",[e._v("type: "),v("code",[e._v("Array")])]),e._v(" "),v("li",[e._v("required: "),v("code",[e._v("true")])])]),e._v(" "),v("p",[e._v("这是栅格的初始布局。")]),e._v(" "),v("p",[e._v("数据源。值必须为 "),v("code",[e._v("Array")]),e._v(",其数据项为 "),v("code",[e._v("Object")]),e._v("。 每条数据项必须有 "),v("code",[e._v("i, x, y, w 和 h")]),e._v(" 属性。 请参考下面的 "),v("code",[e._v("GridItem")]),e._v("。")]),e._v(" "),v("h3",{attrs:{id:"responsivelayouts"}},[v("a",{staticClass:"header-anchor",attrs:{href:"#responsivelayouts"}},[e._v("#")]),e._v(" responsiveLayouts")]),e._v(" "),v("ul",[v("li",[e._v("type: "),v("code",[e._v("Object")])]),e._v(" "),v("li",[e._v("required: "),v("code",[e._v("false")])]),e._v(" "),v("li",[e._v("default : "),v("code",[e._v("{}")])])]),e._v(" "),v("p",[e._v("如果 "),v("code",[e._v("responsive")]),e._v(" 设置为 "),v("code",[e._v("true")]),e._v(",该配置将作为栅格中每个断点的初始布局。键值是断点名称,每项的值都是类似 "),v("code",[e._v("layout")]),e._v(" 属性定义的数据结构,值必须为 "),v("code",[e._v("Array")]),e._v(",其数据项为 "),v("code",[e._v("Object")]),e._v("。例如: "),v("code",[e._v("{lg: [layout items], md: [layout items]}")]),e._v("。需要注意的是,在创建栅格布局后设置该属性无效。\n在创建GridLayout之后设置prop无效。")]),e._v(" "),v("p",[e._v("可以查看 "),v("a",{attrs:{href:"#responsive"}},[e._v("responsive")]),e._v(", "),v("a",{attrs:{href:"#breakpoints"}},[e._v("breakpoints")]),e._v(" 和 "),v("a",{attrs:{href:"#cols"}},[e._v("cols")])]),e._v(" "),v("h3",{attrs:{id:"colnum"}},[v("a",{staticClass:"header-anchor",attrs:{href:"#colnum"}},[e._v("#")]),e._v(" colNum")]),e._v(" "),v("ul",[v("li",[e._v("type: "),v("code",[e._v("Number")])]),e._v(" "),v("li",[e._v("required: "),v("code",[e._v("false")])]),e._v(" "),v("li",[e._v("default: "),v("code",[e._v("12")])])]),e._v(" "),v("p",[e._v("定义栅格系统的列数,其值需为自然数。")]),e._v(" "),v("h3",{attrs:{id:"rowheight"}},[v("a",{staticClass:"header-anchor",attrs:{href:"#rowheight"}},[e._v("#")]),e._v(" rowHeight")]),e._v(" "),v("ul",[v("li",[e._v("type: "),v("code",[e._v("Number")])]),e._v(" "),v("li",[e._v("required: "),v("code",[e._v("false")])]),e._v(" "),v("li",[e._v("default: "),v("code",[e._v("150")])])]),e._v(" "),v("p",[e._v("每行的高度,单位像素。")]),e._v(" "),v("h3",{attrs:{id:"maxrows"}},[v("a",{staticClass:"header-anchor",attrs:{href:"#maxrows"}},[e._v("#")]),e._v(" maxRows")]),e._v(" "),v("ul",[v("li",[e._v("type: "),v("code",[e._v("Number")])]),e._v(" "),v("li",[e._v("required: "),v("code",[e._v("false")])]),e._v(" "),v("li",[e._v("default: "),v("code",[e._v("Infinity")])])]),e._v(" "),v("p",[e._v("定义最大行数。")]),e._v(" "),v("h3",{attrs:{id:"margin"}},[v("a",{staticClass:"header-anchor",attrs:{href:"#margin"}},[e._v("#")]),e._v(" margin")]),e._v(" "),v("ul",[v("li",[e._v("type: "),v("code",[e._v("Array")])]),e._v(" "),v("li",[e._v("required: "),v("code",[e._v("false")])]),e._v(" "),v("li",[e._v("default: "),v("code",[e._v("[10, 10]")])])]),e._v(" "),v("p",[e._v("定义栅格中的元素边距。")]),e._v(" "),v("p",[e._v("值必须是包含两个 "),v("code",[e._v("Number")]),e._v("的数组,数组中第一个元素表示水平边距,第二个表示垂直边距,单位为像素。")]),e._v(" "),v