更改图片字段

This commit is contained in:
guoyue 2022-10-31 14:07:39 +08:00
parent 2774650d96
commit 5f155dc69a
2 changed files with 30 additions and 3 deletions

View File

@ -1,5 +1,7 @@
<template> <template>
<div class="box"> <div class="box">
<!-- <IntegrationServiceOrder ref="integrationServiceOrderDom" :orderArray="orderArray" :style="styleObj">
</IntegrationServiceOrder> -->
<div class="CanCase"> <div class="CanCase">
<div class="caseBox" v-for="(item, index) in caseList" :key="index" @click="toView(item)"> <div class="caseBox" v-for="(item, index) in caseList" :key="index" @click="toView(item)">
<a-image :preview="false" style="width:300px;height:200px" :src=" <a-image :preview="false" style="width:300px;height:200px" :src="
@ -7,13 +9,14 @@
.attrValue .attrValue
" /> " />
<h3>{{ item.name }}</h3> <h3>{{ item.name }}</h3>
<p>发布时间 {{ item.updateDate }}</p> <p>发布时间 {{ item.createDate }}</p>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script setup> <script setup>
import { ref, onMounted, onBeforeUnmount, watch, defineProps, defineEmits } from 'vue' import { ref, onMounted, onBeforeUnmount, watch, defineProps, defineEmits } from 'vue'
import IntegrationServiceOrder from './integrationServiceOrder.vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
const router = useRouter() const router = useRouter()
@ -27,6 +30,19 @@ const props = defineProps({
default: '组件服务', default: '组件服务',
}, },
}) })
const orderArray = ref([
{
value: 'create_date',
name: '发布时间',
orderType: 'DESC',
},
])
const styleObj = ref({
'justify-content': 'flex-end',
"padding": "0 20px"
})
const emits = defineEmits(['saveSearchCodition']) const emits = defineEmits(['saveSearchCodition'])
const caseList = ref([]) const caseList = ref([])

View File

@ -1,5 +1,5 @@
<template> <template>
<ul class="integrationServiceOrder"> <ul class="integrationServiceOrder" :style="styleObj">
<li v-for="(item, i) in integrationOrderList" :key="i" @click=" <li v-for="(item, i) in integrationOrderList" :key="i" @click="
changeOrder(i, item.value, item.orderType == 'DESC' ? 'ASC' : 'DESC') changeOrder(i, item.value, item.orderType == 'DESC' ? 'ASC' : 'DESC')
"> ">
@ -14,7 +14,7 @@
</ul> </ul>
</template> </template>
<script setup> <script setup>
import { ref, reactive, nextTick, defineExpose } from 'vue' import { ref, reactive, nextTick, defineExpose, defineProps } from 'vue'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
const orderList = [ const orderList = [
@ -39,7 +39,18 @@ const orderList = [
// orderType: 'DESC', // orderType: 'DESC',
// }, // },
] ]
const props = defineProps({
orderArray: { type: Array, default: null },
styleObj: { type: Object, default: null },
})
console.log('props.orderArray------------>', props.orderArray);
const integrationOrderList = ref(JSON.parse(JSON.stringify(orderList))) const integrationOrderList = ref(JSON.parse(JSON.stringify(orderList)))
if(props.orderArray) {
integrationOrderList.value = props.orderArray
}
const integrationOrder = reactive({ const integrationOrder = reactive({
orderField: '', orderField: '',
orderType: '', orderType: '',