$width: (camera: 1842, tv: 2066, lamp: 1050, phone: 1173, full: 3521);
$height: (camera: 1149, tv: 1488, lamp: 1107, phone: 1196, full: 2484);
$size: map-get($width, full) / map-get($height, full); // no error
@function get-width($width) {
@return #{$width * 100 / map-get($width, full)}vw; // error
}
此代码给出错误:$map
的参数map-get($map, $key)
必须是地图