mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-15 13:56:45 +08:00
-- 项目添加图片选择
This commit is contained in:
@@ -68,36 +68,62 @@
|
|||||||
/>
|
/>
|
||||||
<div class="inname">封面图</div>
|
<div class="inname">封面图</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div class="in select" style="flex:1">
|
||||||
:class="`box ${projectInfo.picUrl == src ? 'active' : ''}`"
|
<a-select
|
||||||
style="
|
:getPopupContainer="
|
||||||
width: 100px;
|
(triggerNode) => {
|
||||||
height: 100px;
|
return triggerNode.parentNode || document.body;
|
||||||
border-radius: 5px;
|
|
||||||
cursor: pointer;
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
"
|
|
||||||
v-for="(src, index) in projectPic"
|
|
||||||
:key="index"
|
|
||||||
@click="
|
|
||||||
() => {
|
|
||||||
projectInfo.picUrl = src;
|
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
>
|
v-model:value="projectInfo.picUrl"
|
||||||
|
dropdownClassName="dropdown-style"
|
||||||
|
style="width: 440px"
|
||||||
|
placeholder="请选择"
|
||||||
|
:options="projectPic"
|
||||||
|
allowClear
|
||||||
|
></a-select>
|
||||||
<img
|
<img
|
||||||
style="
|
style="width:100px;height:100px;margin-top:20px;border-radius: 8px"
|
||||||
width: 100px;
|
v-if="projectInfo.picUrl"
|
||||||
height: 100px;
|
:src="projectInfo.picUrl"
|
||||||
margin-bottom: 4px;
|
|
||||||
margin-right: 4px;
|
|
||||||
"
|
|
||||||
:src="src"
|
|
||||||
alt="avatar"
|
alt="avatar"
|
||||||
/>
|
/>
|
||||||
|
<div class="i_bottom">
|
||||||
|
<span style="color: #999ba3">
|
||||||
|
高宽比为16:9 (如:800*450) png或jpg图片
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- <div-->
|
||||||
|
<!-- :class="`box ${projectInfo.picUrl == src ? 'active' : ''}`"-->
|
||||||
|
<!-- style="-->
|
||||||
|
<!-- width: 100px;-->
|
||||||
|
<!-- height: 100px;-->
|
||||||
|
<!-- border-radius: 5px;-->
|
||||||
|
<!-- cursor: pointer;-->
|
||||||
|
<!-- position: relative;-->
|
||||||
|
<!-- overflow: hidden;-->
|
||||||
|
<!-- "-->
|
||||||
|
<!-- v-for="(src, index) in projectPic"-->
|
||||||
|
<!-- :key="index"-->
|
||||||
|
<!-- @click="-->
|
||||||
|
<!-- () => {-->
|
||||||
|
<!-- projectInfo.picUrl = src;-->
|
||||||
|
<!-- }-->
|
||||||
|
<!-- "-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <img-->
|
||||||
|
<!-- style="-->
|
||||||
|
<!-- width: 100px;-->
|
||||||
|
<!-- height: 100px;-->
|
||||||
|
<!-- margin-bottom: 4px;-->
|
||||||
|
<!-- margin-right: 4px;-->
|
||||||
|
<!-- "-->
|
||||||
|
<!-- :src="src"-->
|
||||||
|
<!-- alt="avatar"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </div>-->
|
||||||
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<div class="namebox">
|
<div class="namebox">
|
||||||
<img
|
<img
|
||||||
@@ -333,7 +359,7 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
state.projectPic = store.state.projectPic.map((e) => e.dictValue);
|
state.projectPic = store.state.projectPic.map((e) => ({value:e.dictValue,label:e.dictName}));
|
||||||
state.viewDetail = routers.query.viewDetail;
|
state.viewDetail = routers.query.viewDetail;
|
||||||
getProjectInfo();
|
getProjectInfo();
|
||||||
getTemplate();
|
getTemplate();
|
||||||
|
|||||||
Reference in New Issue
Block a user