Skip to content

Commit 4c45d12

Browse files
committed
feat: 个人页制作完成
1 parent 4528697 commit 4c45d12

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

src/views/personal/userCenter/index.vue

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919
:key="item.id"
2020
>
2121
<admin-icon :icon="item.icon"></admin-icon>
22-
<span class="detail-text">{{item.text}}</span>
22+
<span class="detail-text" v-if="item.icon === 'github'">
23+
<a target="_blank" :href="item.text">前往github</a>
24+
</span>
25+
<span class="detail-text" v-else>{{item.text}}</span>
2326
</el-col>
2427
</el-row>
2528
<el-row class="user-center-wrapper">
@@ -39,15 +42,15 @@
3942
v-if="inputVisible"
4043
v-model="inputValue"
4144
ref="saveTagInput"
42-
size="small"
45+
size="mini"
4346
@keyup.enter.native="onInputConfirm"
4447
@blur="onInputConfirm"
4548
>
4649
</el-input>
4750
<el-button
4851
v-else
4952
class="user-center-tag-item"
50-
size="small"
53+
size="mini"
5154
@click="showInput"
5255
>
5356
+ New Tag
@@ -85,6 +88,9 @@
8588
this.tags.splice(i, 1);
8689
},
8790
onInputConfirm () {
91+
if (this.inputValue.trim() === '') {
92+
return this.$message.warning('请输入内容');
93+
}
8894
this.tags.push(this.inputValue);
8995
this.inputValue = '';
9096
this.inputVisible = false;
@@ -127,14 +133,11 @@
127133
}
128134
&-tag-content {margin-left: -6px; margin-top: -6px;}
129135
&-tag-item {margin-left: 10px;margin-top: 10px;}
130-
&-item:not(:first-child) {
131-
margin: 6px 0;
132-
}
136+
&-item:not(:first-child) {margin: 6px 0;}
133137
.detail-text {
134138
margin-left: 6px;
139+
line-height: 1.2;
135140
}
136-
.new-tag-input {
137-
width: 80px;
138-
}
141+
.new-tag-input {width: 80px;}
139142
}
140143
</style>

0 commit comments

Comments
 (0)