google-news 相关问题


嵌套 useFetch 导致 Nuxt 3 中的 Hydration 节点不匹配

在 Nuxt 3 页面内,我通过从 pinia 存储调用操作来获取帖子数据: {{ 发布数据 }} {{ 帖子内容... 在 Nuxt 3 页面内,我通过从 pinia 商店调用操作来获取帖子数据: <template> <div v-if="postData && postContent"> {{ postData }} {{ postContent }} </div> </template> <script setup> const config = useRuntimeConfig() const route = useRoute() const slug = route.params.slug const url = config.public.wpApiUrl const contentStore = useContentStore() await contentStore.fetchPostData({ url, slug }) const postData = contentStore.postData const postContent = contentStore.postContent </script> 那是我的商店: import { defineStore } from 'pinia' export const useContentStore = defineStore('content',{ state: () => ({ postData: null, postContent: null }), actions: { async fetchPostData({ url, slug }) { try { const { data: postData, error } = await useFetch(`${url}/wp/v2/posts`, { query: { slug: slug }, transform(data) { return data.map((post) => ({ id: post.id, title: post.title.rendered, content: post.content.rendered, excerpt: post.excerpt.rendered, date: post.date, slug: post.slug, })); } }) this.postData = postData.value; if (postData && postData.value && postData.value.length && postData.value[0].id) { const {data: postContent} = await useFetch(`${url}/rl/v1/get?id=${postData.value[0].id}`, { method: 'POST', }); this.postContent = postContent.value; } } catch (error) { console.error('Error fetching post data:', error) } } } }); 浏览器中的输出正常,但我在浏览器控制台中收到以下错误: entry.js:54 [Vue warn]: Hydration node mismatch: - rendered on server: <!----> - expected on client: div at <[slug] onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< undefined > > at <Anonymous key="/news/hello-world()" vnode= {__v_isVNode: true, __v_skip: true, type: {…}, props: {…}, key: null, …} route= {fullPath: '/news/hello-world', hash: '', query: {…}, name: 'news-slug', path: '/news/hello-world', …} ... > at <RouterView name=undefined route=undefined > at <NuxtPage> at <Default ref=Ref< undefined > > at <LayoutLoader key="default" layoutProps= {ref: RefImpl} name="default" > at <NuxtLayoutProvider layoutProps= {ref: RefImpl} key="default" name="default" ... > at <NuxtLayout> at <App key=3 > at <NuxtRoot> 如何解决这个问题? 我尝试在 onMounted 中获取帖子数据,但在这种情况下 postData 和 postContent 保持为空 onMounted(async () => { await contentStore.fetchPostData({ url, slug }) }) 您可以使用 ClientOnly 组件来消除该警告。请参阅文档了解更多信息。 该组件仅在客户端渲染其插槽。


如何在 Google Cloud Console 中添加 Google Keep API 范围?

我尝试使用 OAuth 2.0 连接到 Google Keep API,但无法在 Google Cloud Console 中添加所需的范围。我已在“库”部分启用了 Google Keep API,但是当...


10000次请求后会打诚信付费吗?

我将使用“使用 Google Cloud Console”方法在我的 Android 应用程序中实现 Google Play Integrity。我想知道在我从 Google C 启用“Google Play Integrity API”后...


如何将 Google Play Console 和 Google Cloud 项目关联到不同的帐户

标题说明了一切:如果两者不在同一登录名下运行,我可以/如何将我的 Google Play Console 帐户与我的 Google Cloud 帐户关联起来,即: 使用 [email protected] 和 google c 玩控制台...


NodeJS 我当前的 Google Cloud 函数名称是什么?

我想使用当前Google Cloud Function的名称来驱动一些逻辑。如何确定我的 Google Cloud Function 名称是什么?


Google App 脚本无法获取 Google Drive 上托管的 CSS 文件(403 未经授权)

我在 Google App 脚本访问 Google 云端硬盘托管资产时遇到问题。奇怪的是,它一直在工作,几天前才停止工作。 发生了什么:在


谷歌财经股票符号识别

Google 财经不再识别过去的许多股票代码。今天举两个例子,BXSL 和 RC 等。 Google 财经网站以及 Google 表格中的报告要么...


如何在iPhone中集成Google+ API?

iPhone 的 Google API 已经推出了吗? 如果是,我如何集成到我的应用程序中。


使用节点和护照未经谷歌oauth登录身份验证500

我正在使用passport-google-oauth 运行node.js。从我的 package.json 中: "passport-google-oauth": "~1.0.0", 我遵循了本教程:https://scotch.io/tutorials/easy-node-authentication-google 在...


更新 Google Pay 集成

我已在 google pay Business 控制台上成功设置了 android google pay 集成并已获得批准,但是现在我已经对用户界面(付款流程)进行了更改,我该如何


如何访问Google新闻标题链接

我正在对 Google 新闻文章网址进行 axios 调用,例如: 谷歌新闻链接: “https://news.google.com./articles/


需要帮助设置 Google App 脚本的 CI/CD?

我们正在使用 Google App Script 构建一个插件,并希望将其发布到 Google Workspace MarketPlace。我们设法使用 App Sc 的管理部署功能发布版本化部署...


Softr Google 地图集成不起作用

在过去的一个月里,我一直在尝试将 Google Maps API 集成到 Softr 应用程序中。根据文档,我只需在 Google Cloud 上设置一个项目,链接一个计费帐户,


根据给定的 client_id + client_secret 识别 Google API 密钥

我在一个拥有一百万个 Google 项目、服务和帐户的生态系统中工作。我有 Google Calendar API client_id 和 client_secret,并且我想升级该 API 帐户的结算信息。 是...


Google Picker API 自动

我计划有一个网络应用程序供用户将文件上传到我的驱动器。我创建一个服务帐户并获取 Google Picker 的 OAuth 令牌。我确认访问令牌有效。但是,Google Picker API


如何在webview中加载html字符串?

我有一个包含以下内容的html字符串: 我有一个包含以下内容的html字符串: <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=windows-1250"> <meta name="spanish press" content="spain, spanish newspaper, news,economy,politics,sports"> <title></title> </head> <body id="body"> <!-- The following code will render a clickable image ad in the page --> <script src="http://www.myscript.com/a"></script> </body> </html> 我需要将该网站显示到 Android 中的网络视图中。 我尝试过这一切: webView.loadDataWithBaseURL(null, txt, "text/html", "UTF-8", null); webView.loadDataWithBaseURL("x-data://base", txt, "text/html", "UTF-8", null); webView.loadDataWithBaseURL("notreal/", txt, "text/htm", "utf-8",null); 我还尝试删除 DOCTYPE 标签: txt=txt.replace("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">", ""); 这些人都没有工作。我刚刚实现了将字符串显示到 webview(html 代码)中,但不是必须使用该 html 代码创建的网站。 出了什么问题? 在 WebView 中加载数据。调用WebView的loadData()方法 wv.loadData(yourData, "text/html", "UTF-8"); 你可以查看这个例子 http://developer.android.com/reference/android/webkit/WebView.html [编辑1] 您应该在 -- " 之前添加 -- \ -- 例如 --> name=\"spanish press\" 下面的字符串对我有用 String webData = "<!DOCTYPE html><head> <meta http-equiv=\"Content-Type\" " + "content=\"text/html; charset=utf-8\"> <html><head><meta http-equiv=\"content-type\" content=\"text/html; charset=windows-1250\">"+ "<meta name=\"spanish press\" content=\"spain, spanish newspaper, news,economy,politics,sports\"><title></title></head><body id=\"body\">"+ "<script src=\"http://www.myscript.com/a\"></script>şlkasşldkasşdksaşdkaşskdşk</body></html>"; 你也可以试试这个 final WebView webView = new WebView(this); webView.loadDataWithBaseURL(null, content, "text/html", "UTF-8", null); 从资产 html 文件中读取 ViewGroup webGroup; String content = readContent("content/ganji.html"); final WebView webView = new WebView(this); webView.loadDataWithBaseURL(null, content, "text/html", "UTF-8", null); webGroup.addView(webView); 我有同样的要求,我是按照以下方式完成的。你也可以试试这个。 使用loadData方法 web.loadData(""" <p style='text-align:center'> <img class='aligncenter size-full wp-image-1607' title='' src="+movImage+" alt='' width='240px' height='180px' /> </p> <p> <center> <U> <H2>"+movName+"("+movYear+")</H2> </U> </center> </p> <p><strong>Director : </strong>"+movDirector+"</p> <p><strong>Producer : </strong>"+movProducer+"</p> <p><strong>Character : </strong>"+movActedAs+"</p> <p><strong>Summary : </strong>"+movAnecdotes+"</p> <p><strong>Synopsis : </strong>"+movSynopsis+"</p> """, "text/html", "UTF-8" ); movDirector movProducer 都是我的字符串变量。 简而言之,我保留了 URL 的自定义样式。 如果您正在 JetpackCompose 中寻找某些内容,这可以帮助您: @Composable fun HtmlTextVisualizerComponent(textFromData: String) { val mimeType = "text/html" val encoding = "UTF-8" LazyColumn( modifier = Modifier .padding( start = 24.dp, end = 24.dp, top = 16.dp, bottom = 24.dp, ), ) { items(1) { val state = rememberWebViewState( url = "data:$mimeType;$encoding,$textFromData", ) val navigator = rememberWebViewNavigator() WebView( state = state, modifier = Modifier.fillMaxSize(), navigator = navigator, onCreated = { it.settings.javaScriptEnabled = true }, ) } } } 一定不要忘记在你的 gradle 中添加依赖项: implementation "com.google.accompanist:accompanist-webview:0.30.1"


Google Earth Engine Python API - 笔记本身份验证器错误“无效请求”

我想在google colab中使用google Earth引擎python API。当我运行 ee.Authenticate() 命令时,会给出一个链接,并要求我提供验证码。 当我打开链接并单击 Gen...


Google 地图 API 通过 API 发出的路线请求返回 ZERO_RESULTS,但适用于 Google 地图

有问题的呼叫是: https://maps.googleapis.com/maps/api/directions/json?origin=35.73455050,-95.31531510&destination=29.67404860,-95.54087240&waypoints=29.92853940,-95.29782860...


是否可以在 Google Cloud Shell 中使用 Jupyter Notebook?

我尝试过的: 启动 Google Cloud shell 须藤 pip 安装 jupyter jupyter 笔记本 --generate-config 将以下内容添加到 ~/.jupyter/jupyter_notebook_config.py c.NotebookApp.ip = 'localhost' c.


尽管 google 帐户是所有者,但来自 Google 身份验证 Web api 的“错误 403:access_denied”

我在这里使用谷歌提供的默认代码,我不太明白为什么它不起作用。代码输出提示请访问此 URL 以授权此应用程序:[google logi...


将图像从 Google 表单插入 Google 幻灯片

我正在尝试制作一份根据谷歌表单答案生成的报告。我找到了一些方法来填充文本,但问题是我需要在 go 的报告中添加来自 google 表单答案的图像...


带有 Cloud Run CORS 的 Google Api 网关

有没有办法在 Cloud Run 服务的 Google Api 网关配置中启用 Cors? 我在服务中启用了 Cors,但我总是得到 从源“http://


Google Gemini api 使用交易数据、公司员工数据等敏感数据是否安全?

Google Gemini API 对于交易数据、公司员工数据等敏感数据是否安全?这意味着 Google Gemini API 可能会将这些数据用于个人用途或培训目的...


OpenAI 未在 google colab 中导入

我在Google colab中成功安装了open AI;但是,我无法导入它...我安装了最新版本的 OpenAI(和打字扩展)... 这是错误: 导入错误...


在Python中无需API密钥以编程方式搜索google

有没有一种方法可以在没有 API 密钥的情况下向 Google 发出请求? 我已经尝试了几个 Python 包,它们工作得很好,除了当 Google 说未找到结果时它们也会提供链接......


如何在 Google Workspace Marketplace 中部署 google 应用脚本插件

我是 Google App 脚本的新手。我已经在谷歌脚本应用程序中完成了编码。我已经通过谷歌应用程序脚本中提供的部署选项部署了该应用程序。部署后,我无法...


如何使用 Google Earth API 进行彩色屏幕截图?

我正在 Excel VBA 中使用 Google Earth API。屏幕截图是黑白的,而不是彩色的。请建议我哪里做错了? Dim ge As Earthlib.ApplicationGE 设置 ge = 新


Google plus API 还是只读的吗?

我到处都看到 Google Plus API 是只读的,但我看到了这个应用程序屏幕截图: 他们当时表现如何?甚至文档也说它是只读的。


Google Cloud Speech-To-Text API 响应不返回单词

我正在尝试使用 Google Cloud Speech-To-Text API 和 Python 在我的应用程序中实现 Speech-To-Text。我正确地得到了转录,但是响应仅包含转录和


如何增加 Google Sheets v4 API 配额限制

新的 Google Sheets API v4 目前每天拥有无限的读/写配额(这太棒了),但限制为每个帐户每 100 秒 500 次读/写,每个密钥 100 次读/写...


安装 Google Cloud Platform for Eclipse 时出错:缺少 javax.annotation 依赖项

我在尝试安装适用于 Eclipse 的 Google Cloud Platform 插件时遇到问题。安装过程失败并显示以下错误消息: 无法完成安装,因为...


从 Postgres 读取数据并写入 Google BigQuery 时架构不匹配

我创建了一个 pyspark 脚本来通过 Dataproc 将数据从 PG DB 迁移到 Google Bigquery,但是在 dataproc 上运行日志时遇到错误 引起的:java.lang.NullPointerExcepti...


如何将数据从 Google Big Query 导出到 PostgreSQL

我有一个表存储在 BigQuery 中,我想在 PostgreSQL 数据库中创建该表+数据的副本。这个 PostgreSQL 位于 Google Cloud SQL 中。 此导出每天都会发生,即


错误:您不拥有此网站,Google Search Console API

我不断收到错误:“错误:您不拥有此网站,或者检查的 URL 不属于此属性。”当尝试使用 Google Search Console API 检查网址时,尽管我是


npm 我的react-google-login 无法安装

我正在尝试在我的项目中安装包“react-google-login”以进行用户身份验证。 这是错误代码: npm 错误!代码 ERESOLVE npm 错误! ERESOLVE 无法解决依赖性


如何为新电子表格自动生成 Google Apps 脚本代码

我想知道是否有办法自动生成属于新电子表格的 Google Apps 脚本代码? 我每周自动生成新的电子表格,我想...


高灯塔总阻塞时间,尽管没有很长的任务

根据 Google 文档,Google Chrome Lighthouse 工具计算总阻塞时间 (TBT) 的主要标准是一项长期任务。 根据我的理解,长任务是任何 JavaScript


Google 地图如何查看本机 iPhone 应用程序:服务器应用程序还是浏览器应用程序?

我有一个 Google API 控制台高级帐户,我正在为一个应用程序使用地方服务,该应用程序有两个部分:网络应用程序和移动应用程序。 看来 Google API 区分了服务器和


使用 Apple 登录而不使用 Firebase/Flutter

我有一个 firebase 项目,我在其中启用了通过 Google、Microsoft 的身份验证,最近我添加了 Apple。 Google 和 Microsoft 都可以正常工作,但 Apple 登录会抛出错误。我有


Google+按钮背后的逆向工程Javascript

我正在尝试模拟google+按钮。在LINK的部分代码中,它将会话ID转换为某种哈希值。我发现会话ID名称是SAPISID,转换后的哈希名称是SAPISIDH...


将 google-sites 网页连接到 cPanel 域

我想在自定义域中发布我的 google-sites 网页。该域托管在 cPanel 上。我阅读了一些教程和参考文献,下面是我尝试过的总结: 创建新的子主题...


如何有效地输出到 Google Apps 脚本 (GAS) 中的非连续范围

我是 Google 脚本新手,非常感谢您的帮助! 我的数据如下所示(3 个不连续的记录,4 个不连续的字段): https://docs.google.com/spreadsheets/d/


在 Google Cloud Build 期间在 Google Cloud SQL 上运行 node.js 数据库迁移

我想在 Cloud Build 过程中运行用 node.js 编写的数据库迁移。 目前,正在执行数据库迁移命令,但 Cloud Build 进程似乎正在执行...


电影类型数据已提取到 Google 表格中

我想要与 Google 表格中的电影列表关联的类型。我尝试使用 OMDB API 通过 importxml 公式提取此信息。但是我不断收到错误。 这是一个示例...


使用 Google 脚本导出 Chromebook 设备列表

我创建此函数是为了通过 Google 管理门户导出 Chrome 设备列表。它按 PRE_PROVIONED 状态收集设备和过滤器。然而,当尝试运行所有页面(130,000 台设备)时...


Chrome 搜索历史记录未完全清除

我在使用 Google Chrome 时遇到了非常奇怪的行为。 在 Google Chrome 地址栏中(您可以在其中输入搜索词或 URL),它会记住搜索和页面的历史记录。嗬...


Google Apps 脚本:如何设置脚本名称

我对 Google 脚本非常陌生,我已经为电子表格创建了多个函数。现在我正在尝试设置脚本执行时在消息中显示的名称,同样的智慧...


谷歌翻译 v2 C++ api 的示例程序

我在 C++ 客户端中使用 google api,并希望使用 google 翻译 v2 api 构建一个应用程序。我已经下载并安装了相关的库。 我正在寻找一个示例程序...


在 Node.js 中使用谷歌地图距离矩阵 api 时出现错误:“o.map 不是函数”

我正在使用 Google Maps API 节点客户端并调用 distancematrix 函数,但收到一条错误消息,提示 o.map 不是函数。 const {Client} = require("@googlemaps/google-maps-


无法使用 Firebase 的 authUI 登录 Google Auth

我在做什么 我目前正在 Android Studio 中开发一个使用 Firebase 进行登录过程的应用程序。在本例中,我们仅使用 Google 的社交登录。 问题 我完成了实施...


© www.soinside.com 2019 - 2024. All rights reserved.