jsbox-cview 1.5.13 → 1.5.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@ import { DialogSheet } from "./dialog-sheet";
6
6
  * @param sections 表单分组, 请参考`PreferenceListView`中的`PreferenceSection`
7
7
  * @param title 标题
8
8
  */
9
- export function formDialog({ sections, title }: { sections: PreferenceSection[]; title: string }) {
9
+ export function formDialog({ sections, title }: { sections: PreferenceSection[]; title: string }): Promise<{ [key: string]: any }> {
10
10
  const view = new PreferenceListView({ sections });
11
11
  const sheet = new DialogSheet({
12
12
  title,
@@ -16,7 +16,7 @@ export function listDialog({ items, multiSelectEnabled, value, values = [], titl
16
16
  value?: number;
17
17
  values?: number[];
18
18
  title: string;
19
- }) {
19
+ }): Promise<number | number[]> {
20
20
  if (value) values = [value]
21
21
  const listView = new List({
22
22
  props: {
@@ -13,7 +13,7 @@ export function textDialog({ title, text = "", placeholder = "", editable = true
13
13
  text?: string;
14
14
  placeholder?: string;
15
15
  editable?: boolean;
16
- }) {
16
+ }): Promise<string> {
17
17
  const textView = new Text({
18
18
  props: {
19
19
  text,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsbox-cview",
3
- "version": "1.5.13",
3
+ "version": "1.5.14",
4
4
  "description": "为 JSBox 设计的微型框架",
5
5
  "repository": {
6
6
  "type": "git",