🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# language 获取语言列表标签 ## 获取语言列表标签 用于获取前台支持的多语言列表 ## 格式 ``` <pre class="calibre16">``` <span class="token1">{</span>hkcms<span class="token1">:</span>language currentstyle<span class="token">=</span><span class="token4">"active"</span><span class="token1">}</span> <span class="token"><</span>a href<span class="token">=</span><span class="token4">"{$item.url}"</span> class<span class="token">=</span><span class="token4">"{$currentstyle}"</span><span class="token">></span><span class="token1">{</span>$item<span class="token1">.</span>value<span class="token1">}</span>,语言标识:<span class="token1">{</span>$key<span class="token1">}</span>新版可以使用:<span class="token1">{</span>$item<span class="token1">.</span>key<span class="token1">}</span><span class="token"><</span><span class="token">/</span>a<span class="token">></span> <span class="token1">{</span><span class="token">/</span>hkcms<span class="token1">:</span>language<span class="token1">}</span> ``` ``` ## 参数 参数名称可选值默认值是否必填说明id-$item-指定循环里的变量名,例如id='obj',模板调用如:{$item.title} 变成 {$obj.title}currentstyle-active-指定选中的class样式