当前位置: 首页 > news >正文

b to b网站建设模式百度推广开户电话

b to b网站建设模式,百度推广开户电话,赣州火车站找服务,外贸那些网站好用吗1、create Project,选择Empty Activity 2、配置项目 project name 为项目名称,建议使用驼峰型命名 Bundle name 为项目包名 Save location 为保存位置 Module name 为模块名称,即运行时需要选择的模块名称,见下图 查看模块名称&…

1、create Project,选择Empty Activity

在这里插入图片描述

2、配置项目

project name 为项目名称,建议使用驼峰型命名
Bundle name 为项目包名
Save location 为保存位置
Module name 为模块名称,即运行时需要选择的模块名称,见下图
在这里插入图片描述
查看模块名称,并选择
在这里插入图片描述

3、创建第一个界面

在这里插入图片描述
第一个界面实现:有一个Hello World的Text 和Button组成,点击button跳转到第二个界面中,button中带有字符串Next

import { router } from '@kit.ArkUI';
import { BusinessError } from '@kit.BasicServicesKit';@Entry
@Component
struct Index {@State message: string = 'Hello World';build() {Row(){Column() {Text(this.message).fontSize(50).fontWeight(FontWeight.Bold)// 添加按钮,以响应用户点击Button() {Text('Next').fontSize(30).fontWeight(FontWeight.Bold)}.type(ButtonType.Capsule).margin({top: 20}).backgroundColor('#0D9FFB').width('40%').height('15%').onClick(() => {console.info(`Succeeded in clicking the 'Next' button.`)// 跳转到第二页router.pushUrl({ url: 'pages/second' }).then(() => {console.info('Succeeded in jumping to the second page.')}).catch((err: BusinessError) => {console.error(`Failed to jump to the second page. Code is ${err.code}, message is ${err.message}`)})})}.width('100%')}}
}

4、创建第二个界面

在resources -> base -> profile目录下的main_pages.jason中添加界面pages/second

{"src": ["pages/Index","pages/second"]
}

在这里插入图片描述

5、第二个界面的代码实现

使用 ‘string’ 表示的是字符串

import { router } from '@kit.ArkUI'
import { BusinessError } from '@kit.BasicServicesKit'// Second.ets
@Entry
@Component
struct Second {@State message: string = 'Hi there'build() {Row() {Column() {Text(this.message).fontSize(50).fontWeight(FontWeight.Bold)Button() {Text('Back').fontSize(30).fontWeight(FontWeight.Bold)}.type(ButtonType.Capsule).margin({top: 20}).backgroundColor('#0D9FFB').width('40%').onClick(() => {console.info(`Succeeded in clicking the 'Back' button.`)// 跳转到第二页router.pushUrl({ url: 'pages/Index' }).then(() => {console.info('Succeeded in jumping to the first page.')}).catch((err: BusinessError) => {console.error(`Failed to jump to the first page. Code is ${err.code}, message is ${err.message}`)})}).height("15%")}.width('100%')}.height('100%')}
}

6、实现效果

第一个界面Index:

在这里插入图片描述

第二个界面second:

在这里插入图片描述

build运行

在Previewer运行时,如果代码出现问题,并不会运行失败,而是界面不重新刷新

解决方案:在Build -> Rebuild Project中重构代码,出现错误会提示

http://www.fp688.cn/news/152724.html

相关文章:

  • 学做网站论坛教程福州网站建设方案外包
  • 手机wap网站html源码电商网站建设教程
  • 用php做动态网站吗怎样进行关键词推广
  • 美食怎么做的小视频网站百度号码认证平台取消标记
  • 西安专业网站建设服务好中国十大搜索引擎排名最新
  • 一般做企业网站多少钱seo站长
  • 网站建设不一定当地专业网站制作
  • 专业的个人网站建设哪家网站结构优化的内容和方法
  • 模板建站适屏河北seo公司
  • 导游网站如何建设的seo培训教程视频
  • 浦江做网站做好网络推广
  • 响应式网站怎么做郑州网络推广厂家
  • 网站建设实训心得体会代运营公司靠谱吗
  • 南京做网站建设有哪些优化公司结构
  • 电子商务与网站建设课程seo外链推广平台
  • 外部调用wordpress 热门文章凌云seo博客
  • 阿丰 做网站seo网站关键词优化软件
  • 专业做律师网站的公司今日北京新闻
  • wordpress换新的电脑简阳seo排名优化培训
  • 日本做暖暖的网站sem网络推广公司
  • 做外汇著名网站seo营销网站的设计标准
  • 筋郑州做网站产品如何做线上推广
  • wordpress伪静态代码滨州网站seo
  • 垂直搜索引擎佛山seo网站排名
  • 深圳网站官网建设头条今日头条
  • 一级做爰片免费网站百度问答首页
  • 我先做个网站怎么做培训机构招生方案范文
  • 做门户网站最重要的是什么意思域名注册入口
  • 大网站整站备份推广普通话的意义50字
  • 网站建设方案书个人怎样推广自己的网站