售货机:扩展突变和页面组件状态

发布于 2025-02-07 17:26:02 字数 119 浏览 3 评论 0原文

是否可以扩展任何页面的Vuex状态(突变和Getters)?我正在尝试为产品扩展(product.extension.mycustomentity)添加突变,但是到目前为止,我还没有发现任何涵盖此主题的文档或其他行为的组件。

Can the vuex state(mutations and getters) of any page such as sw-product-detail be extended? I'm trying to add mutation for product extensions(product.extension.myCustomEntity) but so far I have not found any docs covering this topic or other components doing a similar behavior.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

怪我闹别瞎闹 2025-02-14 17:26:02

我们没有实施扩展Vuex国家的方法。造成这种情况的原因有几个,但是最重要的是,只有一个来源应确定状态的外观。如果您想像您现在正在做的那样,您想像了多个扩展,那就是您现在正在做的那样,事情就会破裂。

We did not implement a way to extend vuex states. There are several reasons for this, but the most important one is that only one source should determine how the state looks. If you imagine multiple extensions fiddling around with the state like you mentioned you are doing now, things will break.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文