1、展示代码:
//其中:{{{item}.style.paddingleft}}是指样式左边界,{{{item}.style.paddingleft}}样式右边距//{item}.params.childs 是子容器的个数<div class=&quot;row margin0&quot; style=&quot;padding-left:{{{item}.style.paddingleft}}px;padding-right:{{{item}.style.paddingleft}}px;padding-top:{{{item}.style.paddingtop}}px;&quot;> <div class=&quot;col-sm-8 selected min-height40&quot; ng-repeat=&quot;{item}x in {item}.params.childs&quot; ng-if=&quot;$index==0&quot; onmouseenter=&quot;$(this).children(&#39;.panel-edit&#39;).show();&quot; onmouseleave=&quot;$(this).children(&#39;.panel-edit&#39;).hide();&quot;> <div class=&quot;panel-edit edit-left&quot;><a ng-click=&quot;pagedata.add({item}x.childs);&quot; class=&quot;btn btn-default edit-a&quot;>添加组件</a><a ng-click=&quot;pagedata.edit_style({item}x);&quot; class=&quot;btn btn-default edit-a&quot;>容器样式</a> <a ng-click=&quot;{item}.params.childs.splice($index,1);&quot; class=&quot;btn btn-danger edit-a&quot;>删除</a></div> <div ng-include=&quot;pagedata.show_html({item}x.cloud_id,&#39;{item}x&#39;)&quot;></div> </div> <div class=&quot;col-sm-4 selected min-height40&quot; ng-repeat=&quot;{item}x in {item}.params.childs&quot; ng-if=&quot;$index==1&quot; onmouseenter=&quot;$(this).children(&#39;.panel-edit&#39;).show();&quot; onmouseleave=&quot;$(this).children(&#39;.panel-edit&#39;).hide();&quot;> <div class=&quot;panel-edit edit-left&quot;><a ng-click=&quot;pagedata.add({item}x.childs);&quot; class=&quot;btn btn-default edit-a&quot;>添加组件</a><a ng-click=&quot;pagedata.edit_style({item}x);&quot; class=&quot;btn btn-default edit-a&quot;>容器样式</a> <a ng-click=&quot;{item}.params.childs.splice($index,1);&quot; class=&quot;btn btn-danger edit-a&quot;>删除</a></div> <div ng-include=&quot;pagedata.show_html({item}x.cloud_id,&#39;{item}x&#39;)&quot;></div> </div></div>2、编辑代码:
//容器一般不需要单独编辑内容;<div ><div class=&quot;table-responsive&quot;>无</div></div>3、生成代码
//这里是真实PC页面生成后的代码,{style.paddingleft}表示替换成样式设置的左边距,其他的以此类推!{childs0} 是第一个容器的设计代码内容,以此类推{childs1}<div class=&quot;row margin0&quot; style=&quot;padding-left:{style.paddingleft}px;padding-right:{style.paddingleft}px;padding-top:{style.paddingtop}px;&quot;> <div class=&quot;col-sm-8&quot;> {childs0} </div> <div class=&quot;col-sm-4&quot;> {childs1} </div></div>4、默认代码
//由于是容器,下面无论分多少个容器,每个子容器必须是一个子容器,cloud_id必须是基础容器4{&quot;childs&quot;:[{&quot;type&quot;:&quot;1&quot;,&quot;title&quot;:&quot;列1&quot;,&quot;cloud_id&quot;:&quot;4&quot;,&quot;childs&quot;:[]},{&quot;type&quot;:&quot;1&quot;,&quot;title&quot;:&quot;列2&quot;,&quot;cloud_id&quot;:&quot;4&quot;,&quot;childs&quot;:[]}]} |