handle response

This commit is contained in:
王劲鹏
2021-06-02 11:26:11 +08:00
committed by osborn
parent a0a6ebf50d
commit 80301837c3
8 changed files with 52 additions and 3 deletions

View File

@@ -88,7 +88,8 @@ v8::Local<v8::Value> Variant2JS(QVariant variant) {
result.ToChecked();
}
jsValue = array;
} else if (variant.type() == QVariant::Int) {
} else if (variant.type() == QVariant::Int ||
variant.type() == QVariant::Double) {
jsValue = v8::Number::New(isolate, variant.toDouble());
} else if (variant.type() == QVariant::Bool) {
jsValue = v8::Boolean::New(isolate, variant.toBool());