|
@@ -1,47 +1,59 @@
|
|
|
-<script setup>
|
|
|
-import { onMounted } from 'vue'
|
|
|
-import { getProductSelect } from '../api'
|
|
|
+<script setup lang="ts">
|
|
|
+import { Search } from '@element-plus/icons-vue'
|
|
|
+import { Ref, inject, onMounted, ref } from 'vue'
|
|
|
+import { getProductline } from '../api'
|
|
|
+import InfinityList from './InfinityList/index.vue'
|
|
|
|
|
|
-const isVisible = ref(false)
|
|
|
+const profile = <Ref>inject('profile')
|
|
|
|
|
|
-function handlePopover() {
|
|
|
- isVisible.value = !isVisible.value
|
|
|
-}
|
|
|
-
|
|
|
-const productFilterInput = ref('')
|
|
|
-const productFilterSelect = ref('')
|
|
|
-const productFilterOptions = ref([])
|
|
|
+const activeName = ref('search')
|
|
|
+const searchInput = ref('')
|
|
|
+const options = ref([])
|
|
|
+const textarea = ref('')
|
|
|
|
|
|
-async function fetchProductSelect() {
|
|
|
+async function fetchProductLine() {
|
|
|
try {
|
|
|
- const response = await getProductSelect()
|
|
|
- productFilterOptions.value = response.data
|
|
|
- productFilterSelect.value = response.data[0].value
|
|
|
+ const response = await getProductline({ profileId: profile.value.profile_id })
|
|
|
+ options.value = response.data
|
|
|
} catch (error) {
|
|
|
console.log('error:', error)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
onMounted(() => {
|
|
|
- fetchProductSelect()
|
|
|
+ fetchProductLine()
|
|
|
})
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
- <div style="max-width: 350px">
|
|
|
- <el-popover :visible="isVisible" placement="bottom-start" title="Title" :width="1000">
|
|
|
- <template #reference>
|
|
|
- <el-input v-model="productFilterInput" @click="handlePopover" style="width: 350px" placeholder="Please input">
|
|
|
- <template #prepend>
|
|
|
- <el-select v-model="productFilterSelect" placeholder="Select" style="width: 115px">
|
|
|
- <el-option v-for="item in productFilterOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
+ <div class="flex justify-between border border-solid border-inherit rounded-md">
|
|
|
+ <div style="flex: 2 1 0; border-right: 1px solid #e6e6e6">
|
|
|
+ <el-tabs v-model="activeName" class="demo-tabs">
|
|
|
+ <el-tab-pane label="搜索" name="search">
|
|
|
+ <div class="flex gap-1 p-2">
|
|
|
+ <el-input v-model="searchInput" placeholder="输入产品标题/父ASIN/ASIN查询" :prefix-icon="Search" style="width: 360px" />
|
|
|
+ <el-select>
|
|
|
+ <el-option v-for="item in options" :key="item.productlineId" :label="item.productlineName" :value="item.productlineId" />
|
|
|
</el-select>
|
|
|
- </template>
|
|
|
- </el-input>
|
|
|
- </template>
|
|
|
- <div class="flex"></div>
|
|
|
- </el-popover>
|
|
|
+ <el-select></el-select>
|
|
|
+ </div>
|
|
|
+ <InfinityList></InfinityList>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="输入" name="input" class="w-full p-2">
|
|
|
+ <el-input v-model="textarea" :autosize="{ minRows: 10, maxRows: 100 }" type="textarea" placeholder="Please input" />
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ </div>
|
|
|
+ <div style="flex: 1 1 0">
|
|
|
+ <div class="h-10" style="background-color: #edf0f8">已添加:</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
-<style scoped></style>
|
|
|
+<style scoped>
|
|
|
+/* Tab栏 */
|
|
|
+::v-deep(.el-tabs__nav-scroll) {
|
|
|
+ overflow: hidden;
|
|
|
+ margin-left: 10px;
|
|
|
+}
|
|
|
+</style>
|