英文:
SW6.5 App Administration extend Javascript, not shown
问题
我正在从插件开发转向应用程序开发。我在Resources/app/administration/src文件夹中的main.js中有以下内容:
import './module/sw-product/page/sw-product-list-override';
我的更改在index.js文件中如下:
import template from './sw-product-list.html.twig';
const { Component } = Shopware;
const { Criteria } = Shopware.Data;
Component.override('sw-product-list', {
template, ..............
twig文件及其内容...
在Resources/public/administration/js中的旧的压缩js文件
我尝试了build-administration.sh,但插件缺少我想要在产品列表中显示的扩展,就好像JavaScript没有被包含进来一样,从插件到应用程序系统发生了什么变化,导致应用程序不会像这样对JavaScript更改产生作用。
英文:
I'm moving over from Plugin to App development. I have the main.js in the Resources/app/administration/src
folder pointing to import './module/sw-product/page/sw-product-list-override';
my changes in the index.js file there:
import template from './sw-product-list.html.twig';
const { Component } = Shopware;
const { Criteria } = Shopware.Data;
Component.override('sw-product-list', {
template, ..............
the twig file and it's content...
the old minified js file in Resources/public/administration/js
I tried build-administration.sh but the plugin lack the extension I'd like to display in the product list, it is like the Javascript is not included somehow, what changed from Plugin to App system, so that the app is not working with Javascript changes like that
答案1
得分: 2
你不能像插件一样在管理中引入/扩展/覆盖组件。您必须使用admin-extension-sdk
和应用程序的管理自定义模块模式。
英文:
You can't introduce/extend/override components in the administration with apps as you did with plugins. You have to use the admin-extension-sdk
and
the admin custom modules schema of apps.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论