mirror of
https://gitee.com/apiadmin/ApiAdmin.git
synced 2025-04-06 03:58:00 +08:00
modified 扩充数据的class支持
This commit is contained in:
parent
b19f11264a
commit
a3ccc69e18
@ -82,6 +82,7 @@ class Menu extends Base {
|
||||
'info' => '',
|
||||
'href' => url('Menu/add'),
|
||||
'param'=> [$this->primaryKey],
|
||||
'class' => 'refresh'
|
||||
]
|
||||
],
|
||||
'hide' => [
|
||||
@ -133,6 +134,7 @@ class Menu extends Base {
|
||||
}
|
||||
}else{
|
||||
$data = \app\admin\model\Menu::where([])->column('name',$this->primaryKey);
|
||||
$defaultFather = $this->request->get($this->primaryKey);
|
||||
$form = [
|
||||
'tempType' => 'add',
|
||||
'formAttr' => [
|
||||
@ -157,7 +159,7 @@ class Menu extends Base {
|
||||
'info' => '父级菜单:',
|
||||
'attr' => [
|
||||
'name' => 'fid',
|
||||
'value' => '',
|
||||
'value' => $defaultFather,
|
||||
'options' => $data
|
||||
]
|
||||
],
|
||||
|
@ -81,7 +81,7 @@
|
||||
}else{
|
||||
if( tableObj.typeRule[fieldName] ){
|
||||
var rule = tableObj.typeRule[fieldName];
|
||||
var styleList ,detailInfo;
|
||||
var styleList ,detailInfo, classAttr = '';
|
||||
switch (rule.module){
|
||||
case 'label':
|
||||
if( rule.rule[dataValue[fieldName]] ){
|
||||
@ -96,7 +96,10 @@
|
||||
styleList = rule.rule;
|
||||
detailInfo = prepareInfo( styleList, dataValue, fieldName);
|
||||
paramStr = prepareParamStr( styleList, dataValue );
|
||||
dataListHtml += '<td><a url="'+styleList['href']+'" data="'+paramStr+'">' + detailInfo + '</a></td>';
|
||||
if( styleList['class'] ){
|
||||
classAttr = 'class="'+ styleList['class'] +'"';
|
||||
}
|
||||
dataListHtml += '<td><a '+ classAttr +' url="'+styleList['href']+'" data="'+paramStr+'">' + detailInfo + '</a></td>';
|
||||
break;
|
||||
case 'date':
|
||||
dataListHtml += '<td>' + $.formatDate(dataValue[fieldName]) + '</td>';
|
||||
|
Loading…
x
Reference in New Issue
Block a user