跳轉到

建置號碼 2.128.x

⚠️ 若專案使用取得登入者資訊的物件,請務必升級外掛模組,以避免相容性問題。

新功能介紹

外掛模組支援多語系

💡 請參考 使用方式

升級注意事項(2025R4.123.1 → 2026R1.128.1)

套件版本更新

套件名稱 版本
@uofx/web-components 4.28.8
@uofx/app-components 3.27.3
@uofx/core 3.18.1
@uofx/error-code 2.22.0
@uofx/icon 2.12.0
@uofx/plugin 4.6.1

直接安裝指令如下:

npm install @uofx/web-components@4.28.8 @uofx/app-components@3.27.3 @uofx/core@3.18.1 @uofx/error-code@2.22.0 @uofx/icon@2.12.0 @uofx/plugin@4.6.1

更新後需要額外安裝套件:

npm i @uofx/plugin-schematics@1.0.3

外掛欄位升級注意事項

舊用法將於 2025R4、2026R1 版本起正式移除,為避免未來相容性問題,請務必升級至新寫法:

以下方法將於 2025R4 版本起正式移除:

舊用法 新用法
this.addFormControl this.fieldUtils.addFormControl
this.initPluginSettings this.pluginUtils.initPluginSettings
this.getTargetFieldValue this.pluginUtils.getTargetFieldValue

以下方法將於 2026R1 版本起正式移除:

舊用法 新用法
this.parentFormBinding this.fieldUtils.syncParentFormStatusToInnerForm

🛠️ 說明:上述新方法皆整合於 fieldUtilspluginUtils 工具中,提供更一致的欄位操作方式。

若您仍使用舊寫法,建議立即進行調整,以確保後續版本升級不受影響。

以下標示出各檔案有差異的內容,供升級比對參考。

Ede.Uofx.Customize.Web
├─ Ede.Uofx.Customize.Web.csproj
├─ appsettings.Development.json
├─ Core
│  ├─ Middlewares
│  │  └─ ✨ DevProxyMiddleware.cs
│  └─ Services
│     └─ ✨ AngularDevServerService.cs
├─ Properties
│  └─ launchSettings.json
└─ ClientApp
   └─ webpack.config.js

說明:

  • ✨ 新增檔案

1) Ede.Uofx.Customize.Web/ClientApp/webpack.config.js

調整前(左) 調整後(右)
const initUofxPluginWebpack = require('@uofx/plugin/scripts/initial-webpack');
module.exports = initUofxPluginWebpack({
        production: false,
        usePort: 40001
});
const proxyUrl = process.env.ANGULAR_SPA_PROXY_URL;
let port = 40001;
if (proxyUrl) {
        try {
                const url = new URL(proxyUrl);
                port = parseInt(url.port, 10) || 40001;
        } catch (e) {
                console.warn('Invalid ANGULAR_SPA_PROXY_URL, using default port 40001');
        }
}
console.log('Webpack dev server port:', port);

const initUofxPluginWebpack = require('@uofx/plugin/scripts/initial-webpack');
module.exports = initUofxPluginWebpack({
production: false,
usePort: port
});

2) Ede.Uofx.Customize.Web/Ede.Uofx.Customize.Web.csproj

調整前 調整後
<SpaProxyServerUrl>http://localhost:40001</SpaProxyServerUrl>
<SpaProxyLaunchCommand>npm start</SpaProxyLaunchCommand>
<PackageReference Include="Microsoft.AspNetCore.SpaProxy" Version="8.0.6" />
<Exec WorkingDirectory="$(SpaRoot)" Command="npm install" />
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build --prod" />
<PackageReference Include="EDE.UOFX.PubApi.Sdk.NetStd" Version="2.2.8" />
<Exec WorkingDirectory="$(SpaRoot)" Command="npm.cmd install" />
<Exec WorkingDirectory="$(SpaRoot)" Command="npm.cmd run build --prod" />

3) Ede.Uofx.Customize.Web/Properties/launchSettings.json

調整前 調整後
"launchBrowser": true,
"ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.SpaProxy"
"launchBrowser": false,
"ANGULAR_SPA_PROXY_URL": "http://localhost:40002"

4) Ede.Uofx.Customize.Web/appsettings.Development.json

調整前 調整後
"Microsoft.AspNetCore.SpaProxy": "Information"
(已移除)

5) Ede.Uofx.Customize.Web/Core/Middlewares/DevProxyMiddleware.cs(新增)

請參考

6) Ede.Uofx.Customize.Web/Core/Services/AngularDevServerService.cs(新增)

請參考

這版本開始本機開發注意事項

  • 本機開發不須再開啟 nginx。
  • 請調整 Ede.Uofx.Customize.Web\Properties\launchSettings.json
  profiles {
    Ede.Uofx.Customize.Web {
      applicationUrl:  localhost 改為 `yourip:port`。
    }
  }
例如
"applicationUrl": "http://172.1.1.2:8899"