jsbox-cview 1.5.13 → 1.5.15

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,
@@ -17,6 +17,7 @@ import { Base } from "./base";
17
17
  * - maxRows?: number
18
18
  * - fixedHeight?: boolean
19
19
  * - menu?: UiTypes.ContextMenuOptions
20
+ * - bgcolor?: UIColor
20
21
  *
21
22
  * ## 事件
22
23
  * - didSelect: (sender: Flowlayout, index: number, item: FlowlayoutItem) => void
@@ -37,6 +38,7 @@ export class Flowlayout extends Base<UIView, UiTypes.ViewOptions> {
37
38
  fixedRows?: number;
38
39
  fixedHeight?: boolean;
39
40
  menu?: UiTypes.ContextMenuOptions;
41
+ bgcolor?: UIColor;
40
42
  }
41
43
  private _wrappers: WrapperView[];
42
44
  private _events?: {
@@ -53,6 +55,7 @@ export class Flowlayout extends Base<UIView, UiTypes.ViewOptions> {
53
55
  fixedRows?: number;
54
56
  fixedHeight?: boolean;
55
57
  menu?: UiTypes.ContextMenuOptions;
58
+ bgcolor?: UIColor;
56
59
  };
57
60
  layout: (make: MASConstraintMaker, view: UIView) => void;
58
61
  events?: {
@@ -75,7 +78,8 @@ export class Flowlayout extends Base<UIView, UiTypes.ViewOptions> {
75
78
  this._defineView = () => ({
76
79
  type: "view",
77
80
  props: {
78
- id: this.id
81
+ id: this.id,
82
+ bgcolor: props.bgcolor,
79
83
  },
80
84
  layout,
81
85
  events: {
@@ -19,6 +19,7 @@ const base_1 = require("./base");
19
19
  * - maxRows?: number
20
20
  * - fixedHeight?: boolean
21
21
  * - menu?: UiTypes.ContextMenuOptions
22
+ * - bgcolor?: UIColor
22
23
  *
23
24
  * ## 事件
24
25
  * - didSelect: (sender: Flowlayout, index: number, item: FlowlayoutItem) => void
@@ -47,7 +48,8 @@ class Flowlayout extends base_1.Base {
47
48
  this._defineView = () => ({
48
49
  type: "view",
49
50
  props: {
50
- id: this.id
51
+ id: this.id,
52
+ bgcolor: props.bgcolor,
51
53
  },
52
54
  layout,
53
55
  events: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsbox-cview",
3
- "version": "1.5.13",
3
+ "version": "1.5.15",
4
4
  "description": "为 JSBox 设计的微型框架",
5
5
  "repository": {
6
6
  "type": "git",