问题标签 [vuejs3]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
javascript - 无法在 Vuejs 中设置属性
我面临一个奇怪的问题。问题是我正在尝试更新属性,但收到错误消息。错误如下:
我的 App.vue 看起来像这样。
我确实使用created
生命周期事件检查了消息属性。我能够访问生命周期this.message
中的created
事件。但是当我在方法中使用它时就会出现问题recognize
。在这里找不到我声明的变量。
任何帮助或指导将不胜感激。
谢谢你。
axios - VueJs - 使用 Axios.post 创建记录时需要增加进度条的百分比
当使用 VueJs 保存记录时,我需要显示进度条。我带来了圆形进度条。现在,我不知道如何计算保存记录的百分比。我正在使用 Axios.post 来保存记录。
为进度条添加代码:
邮寄方式:
vue.js - VueJS 对 v-for 中的每个项目进行 API 调用并将它们返回到正确的位置
先感谢您。
所以我通过获取博客类别API
列表并使用v-for
.
我还需要获取每个类别中的博客数量并将它们放在类别旁边。
但问题是我正在调用一个调用api
.
你知道它已经显示的例子是Animals [Object Promise]
处理这种事情的最佳方法是什么?
javascript - Vue 3 innerHTML attr 不呈现任何内容
我有以下 Vue 3 组件。
我想拥有 HTML 实体×
,因为它是innerHTML
. 但是,由于innerHTML
某种原因,总是为空。
javascript - 在 VueJS3 中创建多个应用程序的正确方法是什么?
新的 VueJS 即将到来。我玩过它,但我有一个问题。
第一个实例创建得很好,但第二个不是。如何在同一页面上创建多个 vue3 应用程序?
javascript - 为什么在 Vue Composition API 设置函数中未定义“this”?
我有一个使用 v3 组合 API 的 Vue 组件:
当 watchEvent 运行时,我收到错误消息Cannot read property "$emit" of undefined
。看起来我没有使用错误类型的函数(箭头与正常函数)。
无论是函数还是箭头函数,它似乎this
始终是未定义的。setup()
vue.js - Vue排序表(从高到低排序)
嗨,我是 vuejs 的新手。我想按从最高到最低对表格进行排序。但是我安装了 vue-sorted-table 库。但是当我尝试运行代码时,数据总是从最低到最高返回。谁能帮我?谢谢..
这是代码:
代码可以在这里访问:
vuetify.js - VueJs - 需要根据每个生命周期挂钩增加循环进度条百分比
我需要根据 vuejs 生命周期钩子BeforeCreate和Created更新循环进度条百分比。当记录完全创建时,此进度条必须停止。
javascript - 在 VeeValidate3 和 VueJS 中添加自定义错误消息
我正在尝试为自定义验证器添加新的错误消息。首先,我以这种方式更改了验证错误的默认语言:
这是扩展验证器(在另一个文件中):
当日期格式不正确时,如何显示自定义消息?谢谢
symfony - Load Vue 3 Component inside mounted div and pass PHP data
I'm currently working on a new project where I have to integrate Vue 3 in a large Symfony/Drupal project. The project already contains a lot of PHP code and actually I don't want to refactor too much to begin with.
Well I tried setting up a very small piece of Vue code to see how I could start working on the rest of the code. Actually I just want some PHP code to be transferred from index.html.twig
to the sidebar.vue
file. I also work with Webpack Encore by the way from Symfony. I read that I could use Vue components to achieve this but my components are not loaded inside my <div id="app"></div>
. Or atleast not how I want them to load.
webpack.config.js (Webpack Encore)
main.js
sidebar.vue
index.html.twig
So how can I make <sidebar></sidebar>
to load inside the HTML/Twig file? In the next step I would like to pass some PHP data on the <sidebar>
component so I can read it inside the sidebar.vue
file. Something like: <sidebar :item="{{ $item }}"></sidebar>
I'm not entirely sure if this is possible with my current setup but I would love to see it work like this or in a similar way.