uni.dialogPage 浏览器还是Android运行编译后一堆报错,根本无法运行啊
warning: Property 'openDialogPage' does not exist on type 'Uni'. 14:23:43.709 at pages/dialog-page/dialog-page.uvue:43:12 14:23:43.709 41 | }, 14:23:43.709 42 | openDialog1() { 14:23:43.709 > 43 | uni.openDialogPage({ 14:23:43.709 | ^^^^^^^^^^^^^^ 14:23:43.709 44 | url: '/pages/dialog-page/dialog-1?name=dialog1', 14:23:43.709 45 | success(res) { 14:23:43.709 46 | console.log('openDialogPage1 success', res) 14:23:43.709 warning: Property 'openDialogPage' does not exist on type 'Uni'. 14:23:43.709 at pages/dialog-page/dialog-page.uvue:62:12 14:23:43.709 60 | }, 14:23:43.709 61 | openDialog2() { 14:23:43.709 > 62 | uni.openDialogPage({ 14:23:43.709 | ^^^^^^^^^^^^^^ 14:23:43.709 63 | url: '/pages/dialog-page/dialog-2', 14:23:43.709 64 | disableEscBack: true, 14:23:43.709 65 | success(res) { 14:23:43.709 warning: Property 'openDialogPage' does not exist on type 'Uni'. 14:23:43.709 at pages/dialog-page/dialog-page.uvue:83:12 14:23:43.709 81 | }, 14:23:43.709 82 | openDialog1WrongPath() { 14:23:43.709 > 83 | uni.openDialogPage({ 14:23:43.709 | ^^^^^^^^^^^^^^ 14:23:43.709 84 | url: '/pages/dialog-page/dialog-11?name=dialog1', 14:23:43.709 85 | success(res) { 14:23:43.709 86 | console.log('openDialogPage1 success', res) 14:23:43.709 warning: Property 'openDialogPage' does not exist on type 'Uni'. 14:23:43.709 at pages/dialog-page/dialog-page.uvue:106:18 14:23:43.709 104 | success() { 14:23:43.709 105 | setTimeout(() => { 14:23:43.709 > 106 | uni.openDialogPage({ 14:23:43.709 | ^^^^^^^^^^^^^^ 14:23:43.709 107 | url: '/pages/dialog-page/dialog-1?name=dialog1', 14:23:43.709 108 | success(res) { 14:23:43.709 109 | console.log('openDialogPage1 success', res) 14:23:43.709 warning: Property 'closeDialogPage' does not exist on type 'Uni'. 14:23:43.709 at pages/dialog-page/dialog-page.uvue:129:12 14:23:43.709 127 | }, 14:23:43.709 128 | closeDialog() { 14:23:43.709 > 129 | uni.closeDialogPage({ 14:23:43.709 | ^^^^^^^^^^^^^^^ 14:23:43.709 130 | success(res) { 14:23:43.709 131 | console.log('closeDialog success', res) 14:23:43.709 132 | // 自动化测试 14:23:43.709 warning: Property 'closeDialogPage' does not exist on type 'Uni'. 14:23:43.709 at pages/dialog-page/dialog-page.uvue:149:12 14:23:43.709 147 | closeSpecifiedDialog(index: number) { 14:23:43.709 148 | const dialogPages = this.$page.getDialogPages() 14:23:43.709 > 149 | uni.closeDialogPage({ 14:23:43.709 | ^^^^^^^^^^^^^^^ 14:23:43.709 150 | dialogPage: dialogPages[index], 14:23:43.709 151 | success(res) { 14:23:43.709 152 | console.log('closeSomeOneDialog success', res)
[plugin:uni:app-uts] 编译失败
14:24:01.013 error: Unresolved reference: closeDialogPage
14:24:01.013 at pages/dialog-page/dialog-1.uvue:132:12
14:24:01.013 130| setLifeCycleNum(state.lifeCycleNum - 4)
14:24:01.013 131| },
14:24:01.013 132| complete(res) {
14:24:01.013 | ^
14:24:01.013 133| console.log('closeThisDialog complete', res)
14:24:01.013 134| // 自动化测试
14:24:01.013 error: Unresolved reference: openDialogPage
14:24:01.013 at pages/dialog-page/dialog-1.uvue:46:12
14:24:01.014 44 | setLifeCycleNum(state.lifeCycleNum + 1)
14:24:01.014 45 | const currentPages = getCurrentPages()
14:24:01.014 46 | const parentPage = this.$page.getParentPage()!
14:24:01.014 | ^
14:24:01.014 47 | const grandParentPage = parentPage.getParentPage()
14:24:01.014 48 | const dialogPages = parentPage.getDialogPages()
14:24:01.014 error: Unresolved reference: $page
14:24:01.014 at pages/dialog-page/dialog-1.uvue:46:30
14:24:01.014 44 | setLifeCycleNum(state.lifeCycleNum + 1)
14:24:01.014 45 | const currentPages = getCurrentPages()
14:24:01.014 46 | const parentPage = this.$page.getParentPage()!
14:24:01.014 | ^
14:24:01.014 47 | const grandParentPage = parentPage.getParentPage()
14:24:01.014 48 | const dialogPages = parentPage.getDialogPages()
14:24:01.014 error: Unresolved reference: $page
14:24:01.014 at pages/dialog-page/dialog-1.uvue:49:30
14:24:01.014 47 | const grandParentPage = parentPage.getParentPage()
14:24:01.014 48 | const dialogPages = parentPage.getDialogPages()
14:24:01.014 49 | const dialogPage = this.$page
14:24:01.014 | ^
14:24:01.014 50 | if (
14:24:01.014 51 | currentPages.length == 1 &&
14:24:01.014 error: Unresolved reference: uni_openDialogPage
14:24:01.014 at pages/dialog-page/dialog-1.uvue:80:8
14:24:01.014 78 | },
14:24:01.014 79 | openDialog2() {
14:24:01.014 80 | uni.openDialogPage({
14:24:01.014 | ^
14:24:01.014 81 | url: '/pages/API/dialog-page/dialog-2',
14:24:01.014 82 | disableEscBack: true,