fix click transfer & slider child blend

This commit is contained in:
王劲鹏 2021-05-31 20:10:42 +08:00 committed by osborn
parent 94045f11bf
commit 3597c5972a
2 changed files with 4 additions and 5 deletions

View File

@ -189,7 +189,8 @@ void DoricViewNode::blend(QQuickItem *view, QString name, QJsonValue prop) {
view->setProperty("shadowOffsetY", prop["offsetY"].toDouble()); view->setProperty("shadowOffsetY", prop["offsetY"].toDouble());
view->setProperty("shadowOpacity", prop["opacity"].toDouble()); view->setProperty("shadowOpacity", prop["opacity"].toDouble());
} else if (name != "layoutConfig") { } 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() { void DoricViewNode::onClick() {
if (clickFunction.isEmpty()) { if (clickFunction.isEmpty()) {
mSuperNode->onClick();
return; return;
} }
QVariantList args; QVariantList args;

View File

@ -50,7 +50,7 @@ void DoricSliderNode::blend(QQuickItem *view, QString name, QJsonValue prop) {
} else if (name == "loop") { } else if (name == "loop") {
this->loop = prop.toBool(); this->loop = prop.toBool();
} else { } else {
DoricViewNode::blend(view, name, prop); DoricSuperNode::blend(view, name, prop);
} }
} }
@ -81,8 +81,5 @@ void DoricSliderNode::afterBlended(QJsonValue prop) {
newNode->blend(model["props"]); newNode->blend(model["props"]);
} }
} }
int size = childNodes.size();
qDebug() << size;
} }
} }