smartProgram.switchTab解釋:跳轉(zhuǎn)到 tabBar 頁面,并關(guān)閉其他所有非 tabBar 頁面,同 swan.switchTab。smartProgram.switchTab(url: string): Promise<Page> 參數(shù)說明:屬性名類型必填默認(rèn)值說明urlString否-需要跳轉(zhuǎn)的 tabBar 頁面的路徑示例代碼:automat...
http://m.o2fo.com/baiduapp/baiduapp-qger3bag.htmlsmartProgram.currentPage解釋:獲取當(dāng)前頁面。smartProgram.currentPage(): Promise<Page> 示例代碼:automator.launch().then(async smartProgram => { await smartProgram.currentPage(); });
http://m.o2fo.com/baiduapp/baiduapp-joi83bah.htmlsmartProgram.systemInfo解釋:獲取系統(tǒng)信息,同 swan.getSystemInfo。smartProgram.systemInfo(): Promise<Object> 示例代碼:automator.launch().then(async smartProgram => { const systemInfo = await smartProgram.systemInfo(); console.log(systemInfo.platform); });
http://m.o2fo.com/baiduapp/baiduapp-iek53bai.htmlsmartProgram.callSwanMethod解釋:調(diào)用 swan 對象上的指定方法。smartProgram.callSwanMethod(method: string, ...args: any[]): Promise<any> 參數(shù)說明:屬性名類型必填默認(rèn)值說明methodString是-需要調(diào)用的方法名...argsArray否-方法參數(shù)示例代碼:automator.l...
http://m.o2fo.com/baiduapp/baiduapp-iorq3baj.htmlsmartProgram.login解釋:未登錄情況下調(diào)起開發(fā)者工具的登錄,如果已登錄則跳過。smartProgram.login(): Promise<void> 示例代碼:automator.launch().then(async smartProgram => { await smartProgram.login(); // 掃面開發(fā)者工具上的登錄二維碼后繼續(xù)執(zhí)...
http://m.o2fo.com/baiduapp/baiduapp-2ek53bak.htmlpage.path解釋:頁面路徑。page.path: string 示例代碼:automator.launch().then(async smartProgram => { await smartProgram.reLaunch('/pages/api/api'); const page = await smartProgram.currentPage(); console.log(page.path) // pages/api/api });
http://m.o2fo.com/baiduapp/baiduapp-g5md3bao.htmlpage.query解釋:頁面參數(shù)。page.query: Object 示例代碼:automator.launch().then(async smartProgram => { const page = await smartProgram.navigateTo('/pages/icon/icon?foo=bar'); console.log(page.query); // {foo: 'bar'} });
http://m.o2fo.com/baiduapp/baiduapp-hvnm3bap.htmlpage.$解釋:獲取頁面元素。page.$(selector: string): Promise<Element> 參數(shù)說明:屬性名類型必填默認(rèn)值說明selectorString是-選擇器示例代碼:automator.launch().then(async smartProgram => { const page = await smartProgram.reLaunch('/pages/api/api'); con...
http://m.o2fo.com/baiduapp/baiduapp-5yhi3baq.htmlpage.$$解釋:獲取頁面元素數(shù)組。page.$$(selector: string): Promise<Element[]> 參數(shù)說明:屬性名類型必填默認(rèn)值說明selectorString是-選擇器示例代碼:automator.launch().then(async smartProgram => { const page = await smartProgram.reLaunch('/pages/api/api&...
http://m.o2fo.com/baiduapp/baiduapp-l4xe3bar.htmlpage.waitFor解釋:等待直到指定條件成立。page.waitFor(condition: string | number | Function): Promise<void> 參數(shù)說明:屬性名類型必填默認(rèn)值說明conditionString/Number/Function是-等待條件如果條件是 string 類型,那么該參數(shù)會被當(dāng)成選擇器,當(dāng)...
http://m.o2fo.com/baiduapp/baiduapp-o64c3bas.html抱歉,暫時沒有相關(guān)的微課
w3cschool 建議您:
抱歉,暫時沒有相關(guān)的視頻課程
w3cschool 建議您:
抱歉,暫時沒有相關(guān)的教程
w3cschool 建議您:
smartProgram.switchTab解釋:跳轉(zhuǎn)到 tabBar 頁面,并關(guān)閉其他所有非 tabBar 頁面,同 swan.switchTab。smartProgram.switchTab(url: string): Promise<Page> 參數(shù)說明:屬性名類型必填默認(rèn)值說明urlString否-需要跳轉(zhuǎn)的 tabBar 頁面的路徑示例代碼:automat...
http://m.o2fo.com/baiduapp/baiduapp-qger3bag.htmlsmartProgram.currentPage解釋:獲取當(dāng)前頁面。smartProgram.currentPage(): Promise<Page> 示例代碼:automator.launch().then(async smartProgram => { await smartProgram.currentPage(); });
http://m.o2fo.com/baiduapp/baiduapp-joi83bah.htmlsmartProgram.systemInfo解釋:獲取系統(tǒng)信息,同 swan.getSystemInfo。smartProgram.systemInfo(): Promise<Object> 示例代碼:automator.launch().then(async smartProgram => { const systemInfo = await smartProgram.systemInfo(); console.log(systemInfo.platform); });
http://m.o2fo.com/baiduapp/baiduapp-iek53bai.htmlsmartProgram.callSwanMethod解釋:調(diào)用 swan 對象上的指定方法。smartProgram.callSwanMethod(method: string, ...args: any[]): Promise<any> 參數(shù)說明:屬性名類型必填默認(rèn)值說明methodString是-需要調(diào)用的方法名...argsArray否-方法參數(shù)示例代碼:automator.l...
http://m.o2fo.com/baiduapp/baiduapp-iorq3baj.htmlsmartProgram.login解釋:未登錄情況下調(diào)起開發(fā)者工具的登錄,如果已登錄則跳過。smartProgram.login(): Promise<void> 示例代碼:automator.launch().then(async smartProgram => { await smartProgram.login(); // 掃面開發(fā)者工具上的登錄二維碼后繼續(xù)執(zhí)...
http://m.o2fo.com/baiduapp/baiduapp-2ek53bak.htmlpage.path解釋:頁面路徑。page.path: string 示例代碼:automator.launch().then(async smartProgram => { await smartProgram.reLaunch('/pages/api/api'); const page = await smartProgram.currentPage(); console.log(page.path) // pages/api/api });
http://m.o2fo.com/baiduapp/baiduapp-g5md3bao.htmlpage.query解釋:頁面參數(shù)。page.query: Object 示例代碼:automator.launch().then(async smartProgram => { const page = await smartProgram.navigateTo('/pages/icon/icon?foo=bar'); console.log(page.query); // {foo: 'bar'} });
http://m.o2fo.com/baiduapp/baiduapp-hvnm3bap.htmlpage.$解釋:獲取頁面元素。page.$(selector: string): Promise<Element> 參數(shù)說明:屬性名類型必填默認(rèn)值說明selectorString是-選擇器示例代碼:automator.launch().then(async smartProgram => { const page = await smartProgram.reLaunch('/pages/api/api'); con...
http://m.o2fo.com/baiduapp/baiduapp-5yhi3baq.htmlpage.$$解釋:獲取頁面元素數(shù)組。page.$$(selector: string): Promise<Element[]> 參數(shù)說明:屬性名類型必填默認(rèn)值說明selectorString是-選擇器示例代碼:automator.launch().then(async smartProgram => { const page = await smartProgram.reLaunch('/pages/api/api&...
http://m.o2fo.com/baiduapp/baiduapp-l4xe3bar.htmlpage.waitFor解釋:等待直到指定條件成立。page.waitFor(condition: string | number | Function): Promise<void> 參數(shù)說明:屬性名類型必填默認(rèn)值說明conditionString/Number/Function是-等待條件如果條件是 string 類型,那么該參數(shù)會被當(dāng)成選擇器,當(dāng)...
http://m.o2fo.com/baiduapp/baiduapp-o64c3bas.html抱歉,暫時沒有相關(guān)的文章
w3cschool 建議您: