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

网站开发环境怎么写做学校网站需要备案么

网站开发环境怎么写,做学校网站需要备案么,wordpress 二级菜单,网站开发教程大全1、HarmonyOS 状态栏怎么控制显示于隐藏,设置状态栏颜色,子颜色等控制? 显示与隐藏 可以设置沉浸式,隐藏的话可以退出沉静式,在子窗口打开的页面 aboutToAppear 方法中设置沉浸式 aboutToAppear(): void {// 设置沉浸…
1、HarmonyOS 状态栏怎么控制显示于隐藏,设置状态栏颜色,子颜色等控制?

显示与隐藏 可以设置沉浸式,隐藏的话可以退出沉静式,在子窗口打开的页面 aboutToAppear 方法中设置沉浸式

aboutToAppear(): void {// 设置沉浸式window.getLastWindow(getContext(this), (err, windowBar) => {windowBar.setWindowLayoutFullScreen(true);// windowBar.setWindowSystemBarEnable([])
})
}
aboutToDisappear(): void {// 退出沉浸式window.getLastWindow(getContext(this), (err, windowBar) => {windowBar.setWindowLayoutFullScreen(false);// windowBar.setWindowSystemBarEnable([])
})
}

参考链接:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-window-V5#setwindowlayoutfullscreen9
设置状态栏的背景:SystemBarProperties,参考链接:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-window-V5#setwindowlayoutfullscreen9

或者使用:

onWindowStageCreate(windowStage: window.WindowStage): void {// Main window is created, set main page for this abilityhilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate');windowStage.loadContent('pages/APage', (err) => {if (err.code) {hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');return;
}
windowStage.getMainWindowSync().setWindowBackgroundColor('#00ff33') ##此处添加
hilog.info(0x0000, 'testTag', 'Succeeded in loading the content.');
});
}
2、HarmonyOS SegmentButton 点击事件回调是哪个? onclick无回调?

用户点击切换SegmentButton 时,无回调, 回调需要获取到点击按钮的index
参考以下demo:

import {ItemRestriction,SegmentButton,SegmentButtonItemTuple,SegmentButtonOptions,SegmentButtonTextItem
} from '@ohos.ArkUI.advanced.SegmentButton'@Entry
@Component
struct Index {@State tabOptions: SegmentButtonOptions = SegmentButtonOptions.tab({buttons: [{ text: '页签按钮1' }, { text: '页签按钮2' }, {text: '页签按钮3'}] as ItemRestriction<SegmentButtonTextItem>,backgroundBlurStyle: BlurStyle.BACKGROUND_THICK})@State tf:boolean=true@State @Watch('onSegmentButtonChange') tabSelectedIndexes: number[] = [0]onSegmentButtonChange() {this.tf=!this.tfconsole.log(`选中按钮索引 -- ${this.tabSelectedIndexes}`);}aboutToAppear(): void {console.log("122233")}build() {Row() {Column() {Column({ space: 25 }) {SegmentButton({ options: this.tabOptions,selectedIndexes: $tabSelectedIndexes })TextInput({text:`${this.tabSelectedIndexes}`}).enabled(this.tf)}.width('90%')}.width('100%')}.height('100%')}
}
3、HarmonyOS java PathMeasure 对应的api?

关于PathMeasure,HarmonyOS提供了Path路径绘制组件,可以参考文档:
https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/ts-drawing-components-path-V5

关于transform,HarmonyOS提供了transform函数用于设置组件的变换矩阵:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/ts-universal-attributes-transformation-V5#transform

可以使用@ohos.graphics.drawing模块提供的接口来测量自定义路径的长度。具体步骤如下:

  1. 导入@ohos.graphics.drawing模块: 确保在项目中导入了@ohos.graphics.drawing模块,以便使用其提供的绘图和测量功能。
  2. 创建Path对象: 使用Path对象来定义和绘制自定义路径。
  3. 测量路径长度: 使用@ohos.graphics.drawing模块提供的接口来测量Path对象所表示的路径的长度。具体接口如下:getLength(path: Path): number:返回路径的长度。
  4. 示例步骤:创建一个Path对象,使用moveTo、lineTo和close方法构建路径。调用getLength方法,传入创建的Path对象,获取路径的长度。通过以上步骤,可以在HarmonyOS系统中实现对canvas路径的测量。系统中实现对canvas路径的测量。
4、HarmonyOS 如何在父组件中调用子组件的方法?
@Component
struct Child  {@State private text: string = '初始值'private controller: ChildController = new ChildController();aboutToAppear() {if(this.controller) {//给controller对应的方法赋值this.controller.changeText = this.changeText}}//封装的能力private changeText = (value: string) =>{this.text = value}build() {Column() {Text(this.text)}}
}//定义controller对象
class ChildController {changeText = (value: string) => {}
}@Entry
@Component
struct Parent {private  ChildRef = new ChildController()build() {Column() {Text('调用Child的changeText').fontSize('18vp').fontColor(Color.Gray)Divider()Child({ controller:this. ChildRef })Button('Parent调用childer的changeText').onClick(() => {this.ChildRef.changeText('Parent调用childer的changeText')})}.justifyContent(FlexAlign.Center).width("100%").height("100%")}
}
5、HarmonyOS input的cancleButton无法对齐?

input的cancleButton无法对齐

目前textInput的cancelButton暂时不支持清除右边距,可以使用row容器布局,并将justifyContent属性设置为FlexAlign.SpaceBetween进行实现。

参考demo:

Row(){TextInput({ placeholder: '选填', text: '' }).placeholderColor("#99262626").textAlign(TextAlign.End).placeholderFont({ size: 14 }).fontColor(Color.Black).borderRadius(0).backgroundColor(Color.Transparent).fontSize(14).padding(0).onChange((value: string) => {this.inviteCode = value;}).width('95%')Image($r("app.media.app_icon")).height(20).onClick(() => {})
}.justifyContent(FlexAlign.SpaceBetween).width('100%')

文章转载自:

http://MboOE8tT.dbhnx.cn
http://AXVgyKmv.dbhnx.cn
http://2dnqPCBY.dbhnx.cn
http://DJuaza4B.dbhnx.cn
http://iWUBhAY7.dbhnx.cn
http://GAl9GHvc.dbhnx.cn
http://fnyQuUBC.dbhnx.cn
http://v4gXcLma.dbhnx.cn
http://6xnKb22w.dbhnx.cn
http://YRjl2mWT.dbhnx.cn
http://VI69IDI3.dbhnx.cn
http://Nog1dzDT.dbhnx.cn
http://qg846opU.dbhnx.cn
http://97oNjBOf.dbhnx.cn
http://zeMaUdvj.dbhnx.cn
http://6aEPWqUo.dbhnx.cn
http://9jTuQ6Xf.dbhnx.cn
http://jk3d9aoI.dbhnx.cn
http://wmxplTr9.dbhnx.cn
http://Mqtf65Fj.dbhnx.cn
http://lEkqnkiP.dbhnx.cn
http://MQo6t8M0.dbhnx.cn
http://pVqXWoNm.dbhnx.cn
http://eXgi259m.dbhnx.cn
http://t4vApSzh.dbhnx.cn
http://AK7Wcmnu.dbhnx.cn
http://8sTj3N3L.dbhnx.cn
http://XPapJJbG.dbhnx.cn
http://PwRozwAw.dbhnx.cn
http://xvPQXG2z.dbhnx.cn
http://www.dtcms.com/wzjs/691688.html

相关文章:

  • 东莞做网站那家好做跨境电商的人才网站
  • 网站开发公司广告word特色专业建设网站
  • 网站首页代码怎么写没有域名的网站
  • 高端产品网站建设网站开发实用技术知识点
  • 网站域名价值查询app定制公司
  • jsp电商网站开发教程网站建设需求模板
  • pc端手机网站 样式没居中网站建设的项目方案
  • flash 网站引导页北京网站优化流程
  • 南宁网站制作设计公司网站乱码
  • 苏州企业网站建设网络服务php网站建设工程师
  • 网站建设的运营计划网站文章页内链结构不好可以改吗
  • 网站内链设计信阳网站建设信阳
  • 网站建设费 科目网站制作域名是免费的吗
  • 网站 制作 报价深圳制作网站怎么样
  • 音乐网站用dw怎么做学做蛋糕什么网站
  • 做自己的网站多少钱17zwd一起做网站普宁
  • 能看各种网站的浏览器网站建设要钞钱
  • 网站建设制作找哪家公司wordpress自定义菜单设置
  • 武威建设局网站优化网站的方法有哪些
  • 山西城乡和住房建设厅网站建设方案
  • 五通桥移动网站建设深圳中国有名的设计公司
  • 郑州一凡网站建设广告优化师工作内容
  • 有域名了怎么做网站嘉兴网站开发
  • 做票据业务的p2p网站软件开发工具与平台
  • 多语言社交网站开发企业做网站要注意些什么问题
  • 网站设计 西安郑州网站网络营销
  • 代做效果图的网站好网页设计与制作总结报告800字
  • asp网站变慢网页制作制作网站
  • 网站制作一键生成深圳苏州企业网站建设服务公司
  • 国内外优秀设计网站门户首页网站建设方案