* Fix bug for js.

This commit is contained in:
songchenxuan
2023-07-26 11:12:46 +08:00
parent 73824d8794
commit 69126f0f32
2 changed files with 2 additions and 5 deletions
+1 -1
View File
@@ -94,7 +94,7 @@ function buildTable(resp)
if(dataview?.langs)
{
var langs = JSON.parse(dataview.langs);
if(langs) fieldName = langs?.[field]?.[clientLang] ? $langs[field][clientLang] : fieldName;
if(langs) fieldName = langs?.[field]?.[clientLang] ? langs[field][clientLang] : fieldName;
}
html += "<th>" + fieldName + "</th>";
+1 -4
View File
@@ -114,10 +114,7 @@
<?php foreach($data as $value):?>
<?php echo '<tr>';?>
<?php foreach($fields as $key => $field):?>
<?php
$tdValue = isset($value->$key) ? $value->$key : 'null';
if(is_array(json_decode($tdValue))) $tdValue = 'null';
?>
<?php $tdValue = isset($value->$key) ? $value->$key : 'null';?>
<td title='<?php echo $tdValue;?>'><?php echo $tdValue;?></td>
<?php endforeach;?>
<?php echo '</tr>';?>