feat: currentProject功能
This commit is contained in:
1
src/assets/icons/CSearch.svg
Normal file
1
src/assets/icons/CSearch.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg t="1761795702180" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5928" width="200" height="200"><path d="M433.505 126.568c174.435 0 316.207 141.805 316.207 316.486 0 75.209-26.384 144.234-69.824 198.526l209.166 209.1c12.849 13.148 12.849 34.459 0 47.582-13.177 13.148-34.692 13.148-47.904 0l-209.166-209.1c-54.203 43.843-123.131 70.111-198.373 70.111-174.987 0-316.682-141.627-316.682-316.434 0-174.724 141.826-316.486 316.682-316.486zM433.505 710.778c147.649 0 267.808-120.113 267.808-267.647 0-147.741-120.204-267.712-267.808-267.712-147.649 0-267.808 120.099-267.808 267.712 0 147.649 120.204 267.647 267.808 267.647z" fill="currentColor" p-id="5929"></path></svg>
|
||||||
|
After Width: | Height: | Size: 717 B |
@@ -19,7 +19,8 @@
|
|||||||
@keydown.enter="handleSearch"
|
@keydown.enter="handleSearch"
|
||||||
:placeholder="placeholder"
|
:placeholder="placeholder"
|
||||||
/>
|
/>
|
||||||
<SearchOutlined class="search_input_icon" @click="handleSearch" />
|
<!-- <SearchOutlined class="search_input_icon" @click="handleSearch" /> -->
|
||||||
|
<SvgIcon name="CSearch" size="20" class="search_input_icon" @click="handleSearch" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -109,17 +110,21 @@ const handleSearch = () => {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
padding-left: 3rem;
|
padding-left: 3rem;
|
||||||
border-radius: 4rem;
|
border-radius: 4rem;
|
||||||
|
// line-height: 4rem;
|
||||||
width: calc(100% - 2rem);
|
width: calc(100% - 2rem);
|
||||||
// placeholder的fontsize设置为1.4rem
|
// placeholder的fontsize设置为1.4rem
|
||||||
&::placeholder {
|
&::placeholder {
|
||||||
font-size: 1.4rem;
|
font-size: 1.6rem;
|
||||||
}
|
}
|
||||||
&::-webkit-input-placeholder{
|
&::-webkit-input-placeholder{
|
||||||
font-size: 1.4rem;
|
font-size: 1.6rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.search_input_icon {
|
.search_input_icon {
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
|
color: #000;
|
||||||
|
width: initial;
|
||||||
|
height: initial;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,14 +55,20 @@
|
|||||||
</svg>
|
</svg>
|
||||||
<p>{{ $t('Header.NewProject') }}</p>
|
<p>{{ $t('Header.NewProject') }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="navList">
|
|
||||||
<div
|
<div
|
||||||
class="current-projct"
|
class="current-projct"
|
||||||
@click="handleNavigateToCurrentProject"
|
@click="handleNavigateToCurrentProject"
|
||||||
:class="{ disabled: disabledCurrentProject }"
|
:class="{
|
||||||
|
disabled: disabledCurrentProject,
|
||||||
|
filled: !disabledCurrentProject,
|
||||||
|
active: currentProjectActive
|
||||||
|
}"
|
||||||
>
|
>
|
||||||
{{ $t('Habit.currentProject') }}
|
<FolderOpenOutlined class="current-project-icon" />
|
||||||
|
<span>{{ $t('Habit.currentProject') }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="divider" />
|
||||||
|
<div class="navList">
|
||||||
<div
|
<div
|
||||||
class="tools list"
|
class="tools list"
|
||||||
v-for="item in navTypeList"
|
v-for="item in navTypeList"
|
||||||
@@ -450,7 +456,7 @@ import TaskPage from '@/component/HomePage/TaskPage.vue'
|
|||||||
import UpgradePlan from '@/component/HomePage/UpgradePlan.vue'
|
import UpgradePlan from '@/component/HomePage/UpgradePlan.vue'
|
||||||
import { Https } from '@/tool/https'
|
import { Https } from '@/tool/https'
|
||||||
import { Modal, message } from 'ant-design-vue'
|
import { Modal, message } from 'ant-design-vue'
|
||||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue'
|
import { ExclamationCircleOutlined, FolderOpenOutlined } from '@ant-design/icons-vue'
|
||||||
import RobotAssist from '@/component/HomePage/RobotAssist.vue'
|
import RobotAssist from '@/component/HomePage/RobotAssist.vue'
|
||||||
import scaleVideo from '@/component/HomePage/scaleVideo.vue'
|
import scaleVideo from '@/component/HomePage/scaleVideo.vue'
|
||||||
import newPosted from '@/component/HomePage/newPosted.vue'
|
import newPosted from '@/component/HomePage/newPosted.vue'
|
||||||
@@ -482,7 +488,8 @@ export default defineComponent({
|
|||||||
TaskPage,
|
TaskPage,
|
||||||
home,
|
home,
|
||||||
projectSetting,
|
projectSetting,
|
||||||
bindEmail
|
bindEmail,
|
||||||
|
FolderOpenOutlined
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
@@ -1002,13 +1009,17 @@ export default defineComponent({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const disabledCurrentProject = computed(() => {
|
const disabledCurrentProject = computed(() => {
|
||||||
if(!currentProjectPath.value) return true
|
if (!currentProjectPath.value) return true
|
||||||
if(route.fullPath === currentProjectPath.value) return true
|
|
||||||
return false
|
return false
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const currentProjectActive = computed(() => {
|
||||||
|
return currentProjectPath.value === route.fullPath
|
||||||
|
})
|
||||||
|
|
||||||
const handleNavigateToCurrentProject = () => {
|
const handleNavigateToCurrentProject = () => {
|
||||||
console.log('store地址',currentProjectPath.value,'当前路径',route.fullPath)
|
if (currentProjectActive.value) return
|
||||||
if (currentProjectPath.value) {
|
if (currentProjectPath.value) {
|
||||||
router.push(currentProjectPath.value)
|
router.push(currentProjectPath.value)
|
||||||
}
|
}
|
||||||
@@ -1049,6 +1060,7 @@ export default defineComponent({
|
|||||||
toUserManual,
|
toUserManual,
|
||||||
currentProjectPath,
|
currentProjectPath,
|
||||||
disabledCurrentProject,
|
disabledCurrentProject,
|
||||||
|
currentProjectActive,
|
||||||
handleNavigateToCurrentProject
|
handleNavigateToCurrentProject
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2190,23 +2202,42 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
.current-projct {
|
.current-projct {
|
||||||
// text-align: center;
|
font-size: 2rem;
|
||||||
padding: 1.2rem;
|
|
||||||
font-size: 1.8rem;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-weight: 500;
|
border: 2px solid rgba(0, 0, 0, 0.1);
|
||||||
border-radius: 2rem;
|
border-radius: 2rem;
|
||||||
border: 2px solid #000;
|
display: flex;
|
||||||
text-align: center;
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 25.1rem;
|
||||||
|
padding: calc(2rem - 2px) 0;
|
||||||
|
margin-top: 2rem;
|
||||||
|
&.filled {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.current-project-icon {
|
||||||
|
margin-right: 1.3rem;
|
||||||
|
}
|
||||||
|
|
||||||
&.disabled {
|
&.disabled {
|
||||||
color: #a5b0c2;
|
color: #9a9a9a;
|
||||||
border-color: #a5b0c2;
|
border-color: rgba(0, 0, 0, 0.1);
|
||||||
|
background: #f5f5f5;
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
&.active {
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&.filled:hover {
|
||||||
background: #fff;
|
border-color: rgba(0, 0, 0, 0.5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.divider {
|
||||||
|
width: 100%;
|
||||||
|
height: 1px;
|
||||||
|
margin-top: 3rem;
|
||||||
|
background-color: rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user