-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
qwertyyb
committed
Jun 28, 2022
1 parent
7a575fb
commit a220063
Showing
3 changed files
with
60 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// | ||
// PunctutionPane.swift | ||
// Fire | ||
// | ||
// Created by 虚幻 on 2022/6/27. | ||
// Copyright © 2022 qwertyyb. All rights reserved. | ||
// | ||
|
||
import SwiftUI | ||
import Preferences | ||
|
||
struct PunctutionItem: Identifiable { | ||
let id = UUID() | ||
let input: String | ||
let output: String | ||
} | ||
|
||
struct PunctutionPane: View { | ||
let data = [ | ||
PunctutionItem(input: "+", output: "+"), | ||
PunctutionItem(input: "-", output: "-") | ||
] | ||
@State private var selected = "b" | ||
var body: some View { | ||
Preferences.Container(contentWidth: 450) { | ||
Preferences.Section(title: "") { | ||
GroupBox(label: Text("标点符号")) { | ||
HStack { | ||
Text("按键") | ||
.frame(width: 200, alignment: .center) | ||
Text("输出") | ||
.frame(width: 200, alignment: .center) | ||
} | ||
List(data) { item in | ||
VStack { | ||
HStack(spacing: 0) { | ||
Text(item.input) | ||
.frame(width: 200, alignment: .center) | ||
Text(item.output) | ||
.frame(width: 200, alignment: .center) | ||
} | ||
Divider() | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
struct PunctutionPane_Previews: PreviewProvider { | ||
static var previews: some View { | ||
PunctutionPane() | ||
} | ||
} |