使用SCSS循环生成嵌套选择器?

时间:2018-09-27 01:25:18

标签: sass

我可以在SCSS中使用循环(或递归)来产生类似的东西吗?

|expr     |       min|      mean|       max| neval|
|:--------|---------:|---------:|---------:|-----:|
|sol1     |  17.67686|  18.68033|  21.04078|     5|
|sol2     | 369.69595| 378.91943| 400.77024|     5|
|sol3     | 149.57088| 154.76857| 159.93155|     5|
|dev_mean | 218.44641| 286.00977| 404.06092|     5|

1 个答案:

答案 0 :(得分:2)

可能会带有循环和selector-nest(),具体取决于您的用例。

Future getUploadImg(access_token,File _image) async {
  print("Image: $_image");
  var result;
  var stream = new http.ByteStream(DelegatingStream.typed(_image.openRead()));
  var length = await _image.length();
  var uri = Uri.parse('$_apiUrl/user/upload-profile-image');
  var request = new http.MultipartRequest("POST", uri);
  request.headers['Accesstoken'] = "Bearer $access_token";
  var multipartFile = new http.MultipartFile('imagefile', stream, length, filename: basename(_image.path));
  request.files.add(multipartFile);
  var response = await request.send();

  print(" ===================response code ${response.statusCode}");
  await response.stream.transform(utf8.decoder).listen((value) {
    print(" =====================response value $value");
    result = value;
  });
  return json.decode(result);

}