提交 9c491f43 编写于 作者: Q qq_63480508

Tue Mar 11 18:41:00 CST 2025 inscode

上级 aa50c4cb
<script setup>
defineProps({
msg: {
type: String,
required: true
}
})
</script>
<template>
<div class="greetings">
<h1 class="green">{{ msg }}</h1>
<h3>
You’ve successfully created a project with
<a target="_blank" href="https://vitejs.dev/">Vite</a> +
<a target="_blank" href="https://vuejs.org/">Vue 3</a>.
</h3>
<div>
<h2>仓库列表</h2>
<el-table :data="warehouses" stripe style="width: 100%">
<el-table-column prop="name" label="名称" />
<el-table-column prop="location" label="位置" />
<el-table-column label="操作">
<template #default="scope">
<el-button size="mini" @click="editWarehouse(scope.row)">编辑</el-button>
<el-button size="mini" type="danger" @click="deleteWarehouse(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script setup>
const warehouseStore = useWarehouseStore()
<style scoped>
h1 {
font-weight: 500;
font-size: 2.6rem;
top: -10px;
}
h3 {
font-size: 1.2rem;
}
.greetings h1,
.greetings h3 {
text-align: center;
}
@media (min-width: 1024px) {
.greetings h1,
.greetings h3 {
text-align: left;
}
}
</style>
onMounted(() => {
warehouseStore.fetchWarehouses()
})
const warehouses = computed(() => warehouseStore.warehouses)
</script>
......@@ -29,7 +29,6 @@ i {
place-content: center;
width: 32px;
height: 32px;
color: var(--color-text);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册