* [misc] support to turn off morph update.
This commit is contained in:
@@ -40,6 +40,7 @@ $config->visions = ',rnd,lite,or,'; // 支持的界面类型。
|
||||
/* ZIN 设置。 ZIN settings. */
|
||||
$config->zin = new stdclass();
|
||||
$config->clientCache = true; // 启用客户端缓存。
|
||||
$config->morphUpdate = true; // 平滑更新。
|
||||
|
||||
/* 支持的主题和语言。Supported themes and languages. */
|
||||
$config->themes['default'] = 'default';
|
||||
|
||||
@@ -1203,6 +1203,7 @@ EOT;
|
||||
$jsConfig->pingInterval = $config->pingInterval ?? '';
|
||||
$jsConfig->onlybody = zget($_GET, 'onlybody', 'no');
|
||||
$jsConfig->clientCache = $config->clientCache;
|
||||
$jsConfig->morphUpdate = $config->morphUpdate;
|
||||
$jsConfig->account = isset($app->user->account) ? $app->user->account : '';
|
||||
if($config->tabSession and helper::isWithTID()) $jsConfig->tid = zget($_GET, 'tid', '');
|
||||
|
||||
|
||||
+2
-2
@@ -387,7 +387,7 @@
|
||||
function renderWithHtml($target, html, selector, noMorph)
|
||||
{
|
||||
if(typeof selector === 'string') selector = parseSelector(selector);
|
||||
if($target.hasClass('no-morph')) noMorph = true;
|
||||
if(config.morphUpdate === false || $target.hasClass('no-morph')) noMorph = true;
|
||||
if(selector.inner)
|
||||
{
|
||||
if(noMorph)
|
||||
@@ -539,7 +539,7 @@
|
||||
let cacheHit;
|
||||
const renderPageData = (data, onlyZinDebug) =>
|
||||
{
|
||||
const renderOptions = $.extend({noMorph: !options.partial && options.isDiffPage}, options);
|
||||
const renderOptions = $.extend({noMorph: config.morphUpdate && !options.partial && options.isDiffPage}, options);
|
||||
if(!onlyZinDebug) updatePerfInfo(options, 'renderBegin');
|
||||
renderPage(data.reduce((list, item, idx) =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user