zhangli
1 year ago
6 changed files with 137 additions and 58 deletions
@ -0,0 +1,3 @@ |
|||
import Annex from './src/Annex.vue' |
|||
|
|||
export { Annex } |
@ -0,0 +1,65 @@ |
|||
<!-- tabs组件 --> |
|||
<template> |
|||
<div class="tabs flex items-center"> |
|||
<div :class="current == index ? 'active' : ''" v-for="(item, index) in tabsList" :key="index" @click="change(item, index)">{{ item.label }}</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
// const message = useMessage() // 消息弹窗 |
|||
|
|||
import { emit } from "process"; |
|||
|
|||
// const { t } = useI18n() // 国际化 |
|||
defineComponent({ |
|||
name: 'Tabs' |
|||
}) |
|||
// 接受父组件参数 |
|||
const props = defineProps({ |
|||
tabsList: { |
|||
type: Array, |
|||
required: true |
|||
}, |
|||
current: { |
|||
type: Number, |
|||
required: false, |
|||
default: 0 |
|||
}, |
|||
}) |
|||
const tabsList = ref(JSON.parse(JSON.stringify(props.tabsList))) |
|||
tabsList.value.unshift({ |
|||
label: '详情', |
|||
prop:'Detail' |
|||
}) |
|||
const current = ref(props.current); |
|||
const change = (item, index) => { |
|||
current.value = index |
|||
console.log(index); |
|||
emit('change',item,index) |
|||
} |
|||
const emit = defineEmits(['change']) |
|||
</script> |
|||
|
|||
|
|||
<style scoped lang="scss"> |
|||
|
|||
.tabs{ |
|||
display: flex; |
|||
align-items: center; |
|||
border-bottom: 1px solid #d6d6d6; |
|||
margin-bottom: 16px; |
|||
margin-top: 20px; |
|||
div{ |
|||
height: 30px; |
|||
margin-right: 30px; |
|||
font-size: 14px; |
|||
cursor: pointer; |
|||
|
|||
} |
|||
.active{ |
|||
color:#409eff !important; |
|||
border-bottom: 2px solid #409eff; |
|||
} |
|||
|
|||
} |
|||
</style> |
@ -0,0 +1,32 @@ |
|||
// 页面tabs标签
|
|||
|
|||
export const ItemBasicTabsList = [{ |
|||
label: "供应商物品", |
|||
prop: 'SupplierItems', |
|||
}, |
|||
{ |
|||
label: "客户物品", |
|||
prop: 'CustomerItems', |
|||
}, |
|||
{ |
|||
label: "采购订单", |
|||
prop: 'PurchaseOrder', |
|||
}, |
|||
{ |
|||
label: "要货计划", |
|||
prop: 'PurchasingPlan', |
|||
}, |
|||
{ |
|||
label: "库存余额", |
|||
prop: 'InventoryBalance', |
|||
}, |
|||
{ |
|||
label: "预计入库存", |
|||
prop: 'ExpectedIn', |
|||
},{ |
|||
label: "预计出库存", |
|||
prop: 'ExpectedOut', |
|||
}, |
|||
|
|||
] |
|||
|
Loading…
Reference in new issue