diff --git a/src/views/mp/components/wx-material-select/main.vue b/src/views/mp/components/wx-material-select/main.vue index 4c477078..ab353974 100644 --- a/src/views/mp/components/wx-material-select/main.vue +++ b/src/views/mp/components/wx-material-select/main.vue @@ -5,127 +5,130 @@ ① 移除 avue 组件,使用 ElementUI 原生组件 --> @@ -173,7 +176,7 @@ export default defineComponent({ const newsTypeRef = ref(props.newsType) const selectMaterialFun = (item) => { - ctx.emit('selectMaterial', item) + ctx.emit('select-material', item) } /** 搜索按钮操作 */ const handleQuery = () => { @@ -203,9 +206,10 @@ export default defineComponent({ total.value = data.total loading.value = false } + const getFreePublishPageFun = async () => { let data = await getFreePublishPage(queryParams) - data.list.foreach((item) => { + data.list.forEach((item) => { const newsItem = item.content.newsItem newsItem.forEach((article) => { article.picUrl = article.thumbUrl @@ -232,6 +236,7 @@ export default defineComponent({ onMounted(async () => { getPage() }) + return { handleQuery, dateFormatter,