File tree Expand file tree Collapse file tree
blog-business-boot/src/main/java/com/hackyle/blog/business/service/impl
blog-business-vue2/src/views/article/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -363,6 +363,9 @@ private void checkAndAdjustURI(ArticleAddDto articleAddDto) {
363363 uri = "/" + uri ;
364364 }
365365
366+ //URI中如果有空格,替换为横线
367+ uri = uri .replaceAll (" " , "-" );
368+
366369 //在URI前拼接文章分类的编码
367370 String categoryIds = articleAddDto .getCategoryIds ();
368371 if (StringUtils .isNotBlank (categoryIds ) && categoryIds .split ("," ).length >= 1 ) {
@@ -401,6 +404,9 @@ private void adjustURI(ArticleAddDto articleAddDto) {
401404 uri = "/" + uri ;
402405 }
403406
407+ //URI中如果有空格,替换为横线
408+ uri = uri .replaceAll (" " , "-" );
409+
404410 articleAddDto .setUri (uri );
405411 }
406412
Original file line number Diff line number Diff line change 6262 <el-col :span =" 12" >
6363 <el-form-item label =" Tags" prop =" tagList" >
6464 <!-- <select-tags :initTags="articleDataForm.tags" @chooseTags="chooseTagHandler"/>-->
65- <el-select v-model =" articleDataForm.tags" placeholder =" Please Select Tags "
65+ <el-select v-model =" articleDataForm.tags" placeholder =" Please select tags "
6666 :filterable =" true" :multiple =" true"
6767 style =" width : 100% ;" value-key =" id" >
6868 <!-- NOTICE:v-model绑定的是一个对象,option里面也要绑定一个对象--->
You can’t perform that action at this time.
0 commit comments