diff --git a/package.json b/package.json index 8a012acd98d1e20bf3ee64dbe340fea8faa88a17..ce4e7ca0d22a786403bdbabcd608fa63e8ad0033 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ }, "devDependencies": { "@babel/preset-env": "^7.14.7", - "@dcloudio/types": "^2.4.6", + "@dcloudio/types": "^2.4.7", "@jest/types": "^27.0.2", "@microsoft/api-extractor": "^7.13.2", "@rollup/plugin-alias": "^3.1.1", diff --git a/packages/uni-app-plus/dist/uni-app-service.es.js b/packages/uni-app-plus/dist/uni-app-service.es.js index 65e7ce575480955ad33ed83e0e5f87f982f263cf..8a9ff7936dab27b606479c61ab9c914237a2c058 100644 --- a/packages/uni-app-plus/dist/uni-app-service.es.js +++ b/packages/uni-app-plus/dist/uni-app-service.es.js @@ -5677,7 +5677,7 @@ var serviceContext = (function (vue) { const openDocument = defineAsyncApi(API_OPEN_DOCUMENT, ({ filePath, fileType }, { resolve, reject }) => { const errorCallback = warpPlusErrorCallback(reject); - plus.runtime.openFile(getRealPath(filePath), undefined, errorCallback, resolve); + plus.runtime.openDocument(getRealPath(filePath), undefined, resolve, errorCallback); }, OpenDocumentProtocol, OpenDocumentOptions); function getFileName(path) { diff --git a/packages/uni-app-plus/src/service/api/file/openDocument.ts b/packages/uni-app-plus/src/service/api/file/openDocument.ts index 4cdadbca9b1a0e6d1a3744c31ccdc7dabf33ea69..9416ae12f3ceb6776249e109423f0074c72a0019 100644 --- a/packages/uni-app-plus/src/service/api/file/openDocument.ts +++ b/packages/uni-app-plus/src/service/api/file/openDocument.ts @@ -12,11 +12,11 @@ export const openDocument = defineAsyncApi( API_OPEN_DOCUMENT, ({ filePath, fileType }, { resolve, reject }) => { const errorCallback = warpPlusErrorCallback(reject) - plus.runtime.openFile( + plus.runtime.openDocument( getRealPath(filePath), undefined, - errorCallback, - resolve + resolve, + errorCallback ) }, OpenDocumentProtocol, diff --git a/yarn.lock b/yarn.lock index 01c111bf9134c672f718325225a30ccaaec7e3ed..104db70b187f9317aad575df4fca4b0784156414 100644 --- a/yarn.lock +++ b/yarn.lock @@ -922,10 +922,10 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@dcloudio/types@^2.4.6": - version "2.4.6" - resolved "https://registry.yarnpkg.com/@dcloudio/types/-/types-2.4.6.tgz#cf4492885b292648e8d3e51c268e5e35376cd9f6" - integrity sha512-wNyfOBEGfAklzDe0BjWDGTZNgI+RIRL+9VfKbYcXNUHJwPfo8B70BHnuP+GwNxppjoDodI3v31eU8xpJEFqeQw== +"@dcloudio/types@^2.4.7": + version "2.4.7" + resolved "https://registry.yarnpkg.com/@dcloudio/types/-/types-2.4.7.tgz#2fcf7098489e75c394a2a7c9f4e537a19269547e" + integrity sha512-qaBuauchKYBxU1XaSXDB81d0vizNiaaFfHGDuOdvIL8CkG0xI9tw0A3KUbmJ/UGEE2gSg3eE7hujdarspyJiXg== "@eslint/eslintrc@^0.4.3": version "0.4.3"