mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-08 15:42:48 +08:00
修正cx标签库
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
namespace think\template\taglib;
|
namespace think\template\taglib;
|
||||||
|
|
||||||
use think\template\Taglib;
|
use think\template\TagLib;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CX标签库解析类
|
* CX标签库解析类
|
||||||
@@ -149,7 +149,7 @@ class Cx extends Taglib
|
|||||||
}
|
}
|
||||||
$parseStr .= 'if(is_array(' . $name . ')): ';
|
$parseStr .= 'if(is_array(' . $name . ')): ';
|
||||||
// 设置了输出数组长度
|
// 设置了输出数组长度
|
||||||
if ($offset != 0 || $length != 'null') {
|
if (0 != $offset || 'null' != $length) {
|
||||||
if (!isset($var)) {
|
if (!isset($var)) {
|
||||||
$var = '$_' . uniqid();
|
$var = '$_' . uniqid();
|
||||||
}
|
}
|
||||||
@@ -167,7 +167,7 @@ class Cx extends Taglib
|
|||||||
if (isset($tag['index'])) {
|
if (isset($tag['index'])) {
|
||||||
$index = $tag['index'];
|
$index = $tag['index'];
|
||||||
if (isset($tag['mod'])) {
|
if (isset($tag['mod'])) {
|
||||||
$mod = (int)$tag['mod'];
|
$mod = (int) $tag['mod'];
|
||||||
$parseStr .= '$mod = ($' . $index . ' % ' . $mod . '); ';
|
$parseStr .= '$mod = ($' . $index . ' % ' . $mod . '); ';
|
||||||
}
|
}
|
||||||
$parseStr .= '++$' . $index . '; ';
|
$parseStr .= '++$' . $index . '; ';
|
||||||
|
|||||||
Reference in New Issue
Block a user