From a1d7e81859f554f3a53680cc35f0f49bf1f77098 Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期四, 14 五月 2026 14:37:02 +0800
Subject: [PATCH] 导入项目
---
src/components/DiyEditor/components/mobile/PromotionArticle/property.vue | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 56 insertions(+), 0 deletions(-)
diff --git a/src/components/DiyEditor/components/mobile/PromotionArticle/property.vue b/src/components/DiyEditor/components/mobile/PromotionArticle/property.vue
new file mode 100644
index 0000000..10c5840
--- /dev/null
+++ b/src/components/DiyEditor/components/mobile/PromotionArticle/property.vue
@@ -0,0 +1,56 @@
+<template>
+ <ComponentContainerProperty v-model="formData.style">
+ <el-form label-width="40px" :model="formData">
+ <el-form-item label="鏂囩珷" prop="id">
+ <el-select
+ v-model="formData.id"
+ placeholder="璇烽�夋嫨鏂囩珷"
+ class="w-full"
+ filterable
+ remote
+ :remote-method="queryArticleList"
+ :loading="loading"
+ >
+ <el-option
+ v-for="article in articles"
+ :key="article.id"
+ :label="article.title"
+ :value="article.id"
+ />
+ </el-select>
+ </el-form-item>
+ </el-form>
+ </ComponentContainerProperty>
+</template>
+
+<script setup lang="ts">
+import { PromotionArticleProperty } from './config'
+import { useVModel } from '@vueuse/core'
+import * as ArticleApi from '@/api/mall/promotion/article/index'
+
+// 钀ラ攢鏂囩珷灞炴�ч潰鏉�
+defineOptions({ name: 'PromotionArticleProperty' })
+
+const props = defineProps<{ modelValue: PromotionArticleProperty }>()
+const emit = defineEmits(['update:modelValue'])
+const formData = useVModel(props, 'modelValue', emit)
+// 鏂囩珷鍒楄〃
+const articles = ref<ArticleApi.ArticleVO>([])
+
+// 鍔犺浇涓�
+const loading = ref(false)
+// 鏌ヨ鏂囩珷鍒楄〃
+const queryArticleList = async (title?: string) => {
+ loading.value = true
+ const { list } = await ArticleApi.getArticlePage({ title, pageSize: 10 })
+ articles.value = list
+ loading.value = false
+}
+
+// 鍒濆鍖�
+onMounted(() => {
+ queryArticleList()
+})
+</script>
+
+<style scoped lang="scss"></style>
--
Gitblit v1.8.0