scss @function getzIndex($layer: default){ $zindexMap: (default: 1, modal: 1000, dropdown: 500, grid: 300); $zindex:; @if map-has-key($zindexMap, $layer){ $zindex: map-get($zindexMap, $layer); } @return $zindex; } @debug getzIndex('afd'); //$layer可选:…