Authored by 郝肖肖

'友情链接默认选中'

... ... @@ -547,9 +547,9 @@ const friendLink = {
let type = ctx.query.type || 'text';
let resData = {
typeList: [
{type: 'text', name: '文字友链'},
{type: 'footer', name: '底部文字友链'},
{type: 'img', name: '图片友链'},
{type: 'text', name: '文字友链', selected: type === 'text'},
{type: 'footer', name: '底部文字友链', selected: type === 'footer'},
{type: 'img', name: '图片友链', selected: type === 'img'},
]
};
... ...
... ... @@ -234,7 +234,7 @@
<div class="controls">
<select id="select-type">
{{# typeList}}
<option value="{{type}}">{{name}}</option>
<option value="{{type}}" {{#if selected}}selected{{/if}}>{{name}}{{../type}}</option>
{{/ typeList}}
</select>
</div>
... ...