From 3597c5972a952cd855529589211925cd501c2c2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Mon, 31 May 2021 20:10:42 +0800 Subject: [PATCH] fix click transfer & slider child blend --- doric-Qt/example/doric/shader/DoricViewNode.cpp | 4 +++- doric-Qt/example/doric/shader/slider/DoricSliderNode.cpp | 5 +---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/doric-Qt/example/doric/shader/DoricViewNode.cpp b/doric-Qt/example/doric/shader/DoricViewNode.cpp index 8856070a..6182edda 100644 --- a/doric-Qt/example/doric/shader/DoricViewNode.cpp +++ b/doric-Qt/example/doric/shader/DoricViewNode.cpp @@ -189,7 +189,8 @@ void DoricViewNode::blend(QQuickItem *view, QString name, QJsonValue prop) { view->setProperty("shadowOffsetY", prop["offsetY"].toDouble()); view->setProperty("shadowOpacity", prop["opacity"].toDouble()); } else if (name != "layoutConfig") { - qCritical() << mType << " unhandled prop: " << name << ": " << prop.toString(); + qCritical() << mType << " unhandled prop: " << name << ": " + << prop.toString(); } } @@ -238,6 +239,7 @@ DoricViewNode::pureCallJSResponse(QString funcId, QVariantList args) { void DoricViewNode::onClick() { if (clickFunction.isEmpty()) { + mSuperNode->onClick(); return; } QVariantList args; diff --git a/doric-Qt/example/doric/shader/slider/DoricSliderNode.cpp b/doric-Qt/example/doric/shader/slider/DoricSliderNode.cpp index de07f779..93901f9f 100644 --- a/doric-Qt/example/doric/shader/slider/DoricSliderNode.cpp +++ b/doric-Qt/example/doric/shader/slider/DoricSliderNode.cpp @@ -50,7 +50,7 @@ void DoricSliderNode::blend(QQuickItem *view, QString name, QJsonValue prop) { } else if (name == "loop") { this->loop = prop.toBool(); } else { - DoricViewNode::blend(view, name, prop); + DoricSuperNode::blend(view, name, prop); } } @@ -81,8 +81,5 @@ void DoricSliderNode::afterBlended(QJsonValue prop) { newNode->blend(model["props"]); } } - - int size = childNodes.size(); - qDebug() << size; } }