mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 04:16:45 +08:00
Merge branch 'master-20251023-tag' into test1024
# Conflicts: # src/components/Course/courseTag.vue # src/views/portal/course/Index.vue
This commit is contained in:
@@ -2,21 +2,21 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="tag-container">
|
<div class="tag-container">
|
||||||
<el-select style="width: 100%;"
|
<el-select style="width: 100%;"
|
||||||
v-model="selectedTags"
|
v-model="selectedTags"
|
||||||
multiple
|
multiple
|
||||||
filterable
|
filterable
|
||||||
value-key="id"
|
value-key="id"
|
||||||
remote
|
remote
|
||||||
reserve-keyword
|
reserve-keyword
|
||||||
:remote-method="debouncedSearch"
|
:remote-method="debouncedSearch"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:placeholder="'回车创建新标签'"
|
:placeholder="'回车创建新标签'"
|
||||||
@remove-tag="handleTagRemove"
|
@remove-tag="handleTagRemove"
|
||||||
@change="handleSelectionChange"
|
@change="handleSelectionChange"
|
||||||
@keyup.enter.native="handleEnterKey"
|
@keyup.enter.native="handleEnterKey"
|
||||||
@keyup.delete.native="handleDeleteKey"
|
@keyup.delete.native="handleDeleteKey"
|
||||||
@focus="handleFocus"
|
@focus="handleFocus"
|
||||||
ref="tagSelect"
|
ref="tagSelect"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in searchResults"
|
v-for="item in searchResults"
|
||||||
@@ -346,6 +346,8 @@ export default {
|
|||||||
box-sizing: border-box; /* 确保padding包含在height内 */
|
box-sizing: border-box; /* 确保padding包含在height内 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
::v-deep(.el-select__tags) {
|
::v-deep(.el-select__tags) {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|||||||
@@ -398,8 +398,7 @@
|
|||||||
:key="tagIndex"
|
:key="tagIndex"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="info" style="margin: 2px 2px; border-radius: 2px;"
|
type="info" style="margin: 2px 2px; border-radius: 2px;"
|
||||||
:style="{ color: isTagMatched(tag) ? '#387DF7' : '#333333' }"
|
:style="{ fontWeight: isTagMatched(tag) ? 'bold' : 'normal' }"
|
||||||
class="course-tag-item"
|
|
||||||
>
|
>
|
||||||
{{ tag }}
|
{{ tag }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
@@ -850,9 +849,6 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
isTagMatched(tag) {
|
isTagMatched(tag) {
|
||||||
console.info('isTagMatched tag = ' + tag)
|
|
||||||
console.log('this.stagList = ' + this.stagList.map(item => item.tagName));
|
|
||||||
console.info(this.stagList.some(searchTag => searchTag.tagName === tag || searchTag.name === tag))
|
|
||||||
// 检查stagList中是否有匹配的标签
|
// 检查stagList中是否有匹配的标签
|
||||||
return this.stagList.some(searchTag =>
|
return this.stagList.some(searchTag =>
|
||||||
searchTag.tagName === tag || searchTag.name === tag
|
searchTag.tagName === tag || searchTag.name === tag
|
||||||
@@ -1169,7 +1165,6 @@ handleClearTags() {
|
|||||||
|
|
||||||
// }
|
// }
|
||||||
//this.handleChangeTypes(item);
|
//this.handleChangeTypes(item);
|
||||||
this.course.tags ='';
|
|
||||||
this.searchData();
|
this.searchData();
|
||||||
},
|
},
|
||||||
// 无用
|
// 无用
|
||||||
@@ -1754,15 +1749,6 @@ handleClearTags() {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|
||||||
.course-tag-item {
|
|
||||||
color: #333333; // 默认深灰色
|
|
||||||
}
|
|
||||||
|
|
||||||
.course-tag-item[style*="color: #387DF7"] {
|
|
||||||
color: #387DF7 !important; // 匹配时的蓝色
|
|
||||||
}
|
|
||||||
|
|
||||||
.couser-list-content {
|
.couser-list-content {
|
||||||
min-height: 110%;
|
min-height: 110%;
|
||||||
}
|
}
|
||||||
@@ -2712,6 +2698,13 @@ a.custom2 {
|
|||||||
// color: white !important;
|
// color: white !important;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
.course-tag-item {
|
||||||
|
color: #333333; // 默认深灰色
|
||||||
|
}
|
||||||
|
.course-tag-item[style*="color: #387DF7"] {
|
||||||
|
color: #387DF7 !important; // 匹配时的蓝色
|
||||||
|
}
|
||||||
|
|
||||||
/* 添加热点标签容器样式,支持换行 */
|
/* 添加热点标签容器样式,支持换行 */
|
||||||
.hot-tags-wrapper {
|
.hot-tags-wrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
Reference in New Issue
Block a user