jsbox-cview 1.5.12 → 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,
@@ -33,7 +33,8 @@ export class PresentedPageController extends BaseController {
33
33
  } = {}) {
34
34
  super({
35
35
  props: {
36
- id: props?.id
36
+ id: props?.id,
37
+ bgcolor: props?.bgcolor
37
38
  }, layout, events
38
39
  });
39
40
  this._sheet = new Sheet<ControllerRootView, UIView, UiTypes.ViewOptions>({
@@ -25,7 +25,8 @@ class PresentedPageController extends base_controller_1.BaseController {
25
25
  var _a, _b;
26
26
  super({
27
27
  props: {
28
- id: props === null || props === void 0 ? void 0 : props.id
28
+ id: props === null || props === void 0 ? void 0 : props.id,
29
+ bgcolor: props === null || props === void 0 ? void 0 : props.bgcolor
29
30
  }, layout, events
30
31
  });
31
32
  this._sheet = new sheet_1.Sheet({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsbox-cview",
3
- "version": "1.5.12",
3
+ "version": "1.5.14",
4
4
  "description": "为 JSBox 设计的微型框架",
5
5
  "repository": {
6
6
  "type": "git",