SW6.5 App Administration扩展Javascript,未显示

huangapple go评论46阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2023年7月12日 21:59:25
  • 转载请务必保留本文链接:https://go.coder-hub.com/76671409.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定