Skip to content

Commit

Permalink
fix(uts): mutiple class instance
Browse files Browse the repository at this point in the history
  • Loading branch information
fxy060608 committed Jul 6, 2023
1 parent 515f9b2 commit 2a758a0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/platforms/app-plus/service/api/plugin/uts.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ function initUTSProxyClass(options) {
let constructorParams = [];
let staticMethods = {};
let staticProps = [];
let isProxyInterface = false;
if (isProxyInterfaceOptions(options)) {
isProxyInterface = true;
instanceId = options.instanceId;
}
else {
Expand All @@ -194,8 +196,8 @@ function initUTSProxyClass(options) {
}
const target = {};
// 初始化实例 ID
if (isUndefined(instanceId)) {
// 未指定instanceId
if (!isProxyInterface) {
// 初始化未指定时,每次都要创建instanceId
instanceId = initProxyFunction(false, extend({ name: 'constructor', params: constructorParams }, baseOptions), 0).apply(null, params);
}
if (!instanceId) {
Expand Down

0 comments on commit 2a758a0

Please sign in to comment.