Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
jump_hm_warehouse
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
毛勇泽
jump_hm_warehouse
Commits
b5cfd81b
Commit
b5cfd81b
authored
Jan 16, 2024
by
huangqy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自定义弹窗
parent
5f959268
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
63 行增加
和
5 行删除
+63
-5
General.ets
entry/src/main/ets/pages/sub_systemMaintenance/General.ets
+29
-1
Unit.ets
entry/src/main/ets/pages/sub_systemMaintenance/Unit.ets
+0
-1
BasicDialog.ets
entry/src/main/ets/view/BasicDialog/BasicDialog.ets
+31
-0
UniInitList.ets
features/SystemMaintenance/src/main/ets/model/UniInitList.ets
+3
-3
没有找到文件。
entry/src/main/ets/pages/sub_systemMaintenance/General.ets
View file @
b5cfd81b
import { generalInitList, UniListItem } from '@ohos/system/src/main/ets/model/UniInitList'
import { generalInitList, UniListItem } from '@ohos/system/src/main/ets/model/UniInitList'
import { TitleBar } from '../../view/title/TitleBar'
import { TitleBar } from '../../view/title/TitleBar'
import { BasicDialog } from '../../view/BasicDialog/BasicDialog'
@Extend(Button) function CommonButtonStyle() {
@Extend(Button) function CommonButtonStyle() {
.borderWidth(2)
.borderWidth(2)
...
@@ -15,6 +16,31 @@ import { TitleBar } from '../../view/title/TitleBar'
...
@@ -15,6 +16,31 @@ import { TitleBar } from '../../view/title/TitleBar'
@Component
@Component
export struct General {
export struct General {
dialogController: CustomDialogController = new CustomDialogController({
builder: BasicDialog({
cancel: this.onCancel,
confirm: this.onSubmit,
}),
cancel: this.existApp,
autoCancel: true,
alignment: DialogAlignment.Default,
offset: { dx: 0, dy: -20 },
gridCount: 4,
customStyle: false
})
onCancel() {
console.info('------取消------')
}
onSubmit() {
console.info('------确认------')
}
existApp() {
console.info('Click the callback in the blank area')
}
build() {
build() {
Column() {
Column() {
Flex({ direction: FlexDirection.Column, justifyContent: FlexAlign.SpaceBetween}) {
Flex({ direction: FlexDirection.Column, justifyContent: FlexAlign.SpaceBetween}) {
...
@@ -46,7 +72,9 @@ export struct General {
...
@@ -46,7 +72,9 @@ export struct General {
}
}
.height('8%')
.height('8%')
.onClick(() => {
.onClick(() => {
if (this.dialogController != undefined) {
this.dialogController.open()
}
})
})
})
})
}
}
...
...
entry/src/main/ets/pages/sub_systemMaintenance/Unit.ets
View file @
b5cfd81b
import { BasicTable } from '../../view/BasicTable/BasicTable'
import { TitleBar } from '../../view/title/TitleBar'
import { TitleBar } from '../../view/title/TitleBar'
@Entry
@Entry
...
...
entry/src/main/ets/view/BasicDialog/BasicDialog.ets
0 → 100644
View file @
b5cfd81b
@CustomDialog
@Component
export struct BasicDialog {
controller: CustomDialogController
cancel: () => void
confirm: () => void
build() {
Column() {
Row() {
Text().fontSize(20).textAlign(TextAlign.Start)
}.margin({ top: 10, bottom: 10 })
Flex({ justifyContent: FlexAlign.SpaceAround }) {
Button('确认')
.onClick(() => {
this.controller.close()
this.confirm()
}).backgroundColor('#0fa983').fontColor(Color.Black)
Button('取消')
.onClick(() => {
this.controller.close()
this.cancel()
}).backgroundColor('#0fa983').fontColor(Color.Red)
}.margin({ bottom: 10 })
}
}
}
\ No newline at end of file
features/SystemMaintenance/src/main/ets/model/UniInitList.ets
View file @
b5cfd81b
...
@@ -103,7 +103,7 @@ export const generalInitList: UniListItem[] = [
...
@@ -103,7 +103,7 @@ export const generalInitList: UniListItem[] = [
showExtraIcon: true,
showExtraIcon: true,
showArrow: true,
showArrow: true,
//extraIcon: '',
//extraIcon: '',
targetValue: '',
targetValue: '
网络传输
',
description: '数据传输方式'
description: '数据传输方式'
},
},
{
{
...
@@ -111,7 +111,7 @@ export const generalInitList: UniListItem[] = [
...
@@ -111,7 +111,7 @@ export const generalInitList: UniListItem[] = [
showExtraIcon: true,
showExtraIcon: true,
showArrow: true,
showArrow: true,
//extraIcon: '',
//extraIcon: '',
targetValue: '',
targetValue: '
自动5S重连
',
description: '模式连接方式'
description: '模式连接方式'
},
},
{
{
...
@@ -119,7 +119,7 @@ export const generalInitList: UniListItem[] = [
...
@@ -119,7 +119,7 @@ export const generalInitList: UniListItem[] = [
showExtraIcon: true,
showExtraIcon: true,
showArrow: true,
showArrow: true,
//extraIcon: '',
//extraIcon: '',
targetValue: '',
targetValue: '
自动推送
',
description: '模式推送方式'
description: '模式推送方式'
},
},
]
]
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论