NativeScript-Vue RadList在IOS上无法正常工作

时间:2019-07-24 07:53:21

标签: ios listview nativescript nativescript-vue radlistview

我正在编写nativescript-vue应用程序。 RadList在主页上可以正常工作,但在ios设备上的“详细信息”页面上不能正常工作。

我尝试了GridLayout和StackLayout的不同组合,但是RadList在ios设备上不起作用。在android上运行良好。

Details.vue:

<ScrollView row="0">
  <StackLayout verticalAlignment="top" horizontalAlignment="center">
    <GridLayout columns="*, 2*" rows="2*, 3*" class="text-stack">
        <Label class="label-key" text="Date" row="0" col="0" />
        <Textview editable="false" class="label-value" 
                    :text="doc.r_createDate" row="0" col="1" />
    </GridLayout>
    <GridLayout columns="*, 2*" rows="2*, 3*" class="text-stack">
        <Label class="label-key" text="Status" row="0" col="0" />
        <Textview editable="false" class="label-value" 
                     :text="doc.r_status" row="0" col="1" />
    </GridLayout>
    <GridLayout columns="*, 2*" rows="2*, 3*" class="text-stack">
        <Label class="label-key" text="Theme" row="0" col="0" />
        <Textview editable="false" row="0" col="1"
                    class="label-value":text="doc.r_themeDesc" />
    </GridLayout>
    <GridLayout columns="*, *" rows="*, *" class="text-stack">
        <StackLayout col="0" row="0">
            <Label class="label-key" text="Params" row="0" col="0" />
        </StackLayout>
        <GridLayout rows="*" col="0" row="1" class="label-key"  
             height = "100%">
            <RadListView row="*" height="100%" for="parametr in 
                 parametrs_names" :key="index">
                 <v-template>
                    <StackLayout class="stylelayout">
                        <Textview editable="false" row="0" col="0" 
                            class="label-value-par" :text="parametr" 
                           />
                    </StackLayout>
                </v-template>
            </RadListView>
        </GridLayout>
        <GridLayout rows="*" col="1" row="1" class="label-key" 
            height = "100%">
            <RadListView row="*" height="100%" 
                for="parametr in parametrs" :key="index">
                <v-template>
                    <StackLayout class="stylelayout">
                        <Textview editable="false" row="0" col="1" 
                            class="label-value-par" 
                                 :text="parametr" />
                    </StackLayout>
                </v-template>
              </RadListView>
           </GridLayout>
       </GridLayout>
  </StackLayout>
</ScrollView>

<script>
  import Vue from "nativescript-vue";
  import RadListView from 'nativescript-ui-listview/vue';
  Vue.use(RadListView);
</script>

在android设备上可以,但是在ios上,此StackTrace失败或在屏幕上不显示内容:

LOG from device iPhone: CONSOLE LOG file:///app/bundle.js:330:18: '\'onDocTapped\''
2019-07-23 16:44:28.347 nsplaydev[19132:7702867] ***** Fatal JavaScript exception - application has been terminated. *****
2019-07-23 16:44:28.347 nsplaydev[19132:7702867] Native stack trace:
1   0x102a72048 NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool)
2   0x102aa4d70 NativeScript::FFICallback<NativeScript::ObjCMethodCallback>::ffiClosureCallback(ffi_cif*, void*, void**, void*)
3   0x10359205c ffi_closure_SYSV_inner
4   0x1035941b4 .Ldo_closure
5   0x18e1be448 <redacted>
6   0x188d77ec8 <redacted>
7   0x188d7bfa8 <redacted>
8   0x188ceaa98 <redacted>
9   0x188d10eb4 <redacted>
10  0x18e423f2c <redacted>
11  0x18eb110f8 <redacted>
12  0x18eb09d04 <redacted>
13  0x184d322e8 <redacted>
14  0x184d32268 <redacted>
15  0x184d31af0 <redacted>
16  0x184d2f6c8 <redacted>
17  0x184c4ffb8 CFRunLoopRunSpecific
18  0x186ae7f84 GSEventRunModal
19  0x18e2242e8 UIApplicationMain
20  0x103594044 ffi_call_SYSV
21  0x103591780 ffi_call_int
22  0x10359127c ffi_call
23  0x102a34f54 NativeScript::FunctionWrapper::call(JSC::ExecState*)
24  0x103590488 llint_entry
25  0x10358e804 llint_entry
26  0x10358e804 llint_entry
27  0x10358e804 llint_entry
28  0x10358e804 llint_entry
29  0x10358e804 llint_entry
30  0x10358e804 llint_entry
31  0x10358e804 llint_entry
2019-07-23 16:44:28.352 nsplaydev[19132:7702867] JavaScript stack trace:
2019-07-23 16:44:28.353 nsplaydev[19132:7702867] 1   addMeasureSpec@file:///app/tns_modules/tns-core-modules/ui/layouts/grid-layout/grid-layout.js:351:41
2   @file:///app/tns_modules/tns-core-modules/ui/layouts/grid-layout/grid-layout.js:113:34
3   eachLayoutChild@file:///app/tns_modules/tns-core-modules/ui/layouts/layout-base-common.js:143:15
4   onMeasure@file:///app/tns_modules/tns-core-modules/ui/layouts/grid-layout/grid-layout.js:107:25
5   measure@file:///app/tns_modules/tns-core-modules/ui/core/view/view.js:55:21
6   measureChild@file:///app/tns_modules/tns-core-modules/ui/core/view/view-common.js:939:20
7   measureChildFixedColumns@file:///app/tns_modules/tns-core-modules/ui/layouts/grid-layout/grid-layout.js:640:59
8   measureFixedColumnsNoStarRows@file:///app/tns_modules/tns-core-modules/ui/layouts/grid-layout/grid-layout.js:489:40
9   measure@file:///app/tns_modules/tns-core-modules/ui/layouts/grid-layout/grid-layout.js:559:41
10  onMeasure@file:///app/tns_modules/tns-core-modules/ui/layouts/grid-layout/grid-layout.js:115:24
11  measure@file:///app/tns_modules/tns-core-modules/ui/core/view/view.js:55:21
12  measureChild@file:///app/tns_modules/tns-core-modules/ui/core/view/view-common.js:939:20
13  @file:///app/tns_modules/tns-core-modules/ui/layouts/stack-layout/stack-layout.js:52:60
14  @file:///app/tns_modules/tns-core-modules/ui/layouts/layout-base-common.js:136:19
15  _eachLayoutView@file:///app/tns_modules/tns-core-modules/ui/core/view/view-common.js:1000:20
16  @file:///app/tns_modules/tns-core-modules/ui/layouts/layout-base-common.js:134:25
17  eachChildView@file:///app/tns_modules/tns-core-modules/ui/layouts/layout-base-common.js:125:28
18  eachLayoutChild@file:///app/tns_modules/tns-core-modules/ui/layouts/layout-base-common.js:133:23
19  onMeasure@file:///app/tns_modules/tns-core-modules/ui/layouts/stack-layout/stack-layout.js:50:25
20  measure@file:///app/tns_modules/tns-core-modules/ui/core/view/view.js:55:21
21  measureChild@file:///app/tns_modules/tns-core-modules/ui/core/view/view-common.js:939:20
22  onMeasure@file:///app/tns_modules/tns-core-modules/ui/scroll-view/scroll-view.js:140:59
23  measure@file:///app/tns_modules/tns-core-modules/ui/core/view/view.js:55:21
24  measureChild@file:///app/tns_modules/tns-core-modules/ui/core/view/view-common.js:939:20
25  measureChildFixedColumnsAndRows@file:///app/tns_modules/tns-core-modules/ui/layouts/grid-layout/grid-layout.js:715:59
26  measure@file:///app/tns_modules/tns-core-modules/ui/layouts/grid-layout/grid-layout.js:572:47
27  onMeasure@file:///app/tns_modules/tns-core-modules/ui/layouts/grid-layout/grid-layout.js:115:24
28  measure@file:///app/tns_modules/tns-core-modules/ui/core/view/view.js:55:21
29  measureChild@file:///app/tns_modules/tns-core-modules/ui/core/view/view-common.js:939:20
30  @file:///app/tns_modules/tns-core-modules/ui/layouts/stack-layout/stack-layout.js:52:60
31  eachLayoutChild@file:///app/tns_modules/tns-core-modules/ui/layouts/layout-base-common.js:143:15
32  onMeasure@file:///app/tns_modules/tns-core-modules/ui/layouts/stack-layout/stack-layout.js:50:25
33  measure@file:///app/tns_modules/tns-core-modules/ui/core/view/view.js:55:21
34  measureChild@file:///app/tns_modules/tns-core-modules/ui/core/view/view-common.js:939:20
35  onMeasure@file:///app/tns_modules/nativescript-ui-sidedrawer/ui-sidedrawer.js:244:42
36  measure@file:///app/tns_modules/tns-core-modules/ui/core/view/view.js:55:21
37  measureChild@file:///app/tns_modules/tns-core-modules/ui/core/view/view-common.js:939:20
38  measureChildFixedColumnsAndRows@file:///app/tns_modules/tns-core-modules/ui/layouts/grid-layout/grid-layout.js:715:59
39  measure@file:///app/tns_modules/tns-core-modules/ui/layouts/grid-layout/grid-layout.js:572:47
40  onMeasure@file:///app/tns_modules/tns-core-modules/ui/layouts/grid-layout/grid-layout.js:115:24
41  measure@file:///app/tns_modules/tns-core-modules/ui/core/view/view.js:55:21
42  measureChild@file:///app/tns_modules/tns-core-modules/ui/core/view/view-common.js:939:20
43  @file:///app/tns_modules/tns-core-modules/ui/layouts/stack-layout/stack-layout.js:52:60
44  eachLayoutChild@file:///app/tns_modules/tns-core-modules/ui/layouts/layout-base-common.js:143:15
45  onMeasure@file:///app/tns_modules/tns-core-modules/ui/layouts/stack-layout/stack-layout.js:50:25
46  measure@file:///app/tns_modules/tns-core-modules/ui/core/view/view.js:55:21
47  measureChild@file:///app/tns_modules/tns-core-modules/ui/core/view/view-common.js:939:20
48  onMeasure@file:///app/tns_modules/tns-core-modules/ui/page/page.js:272:49
49  measure@file:///app/tns_modules/tns-core-modules/ui/core/view/view.js:55:21
50  measureChild@file:///app/tns_modules/tns-core-modules/ui/core/view/view-common.js:939:20
51  layoutView@file:///app/tns_modules/tns-core-modules/ui/core/view/view.js:636:22
52  viewDidLayoutSubviews@file:///app/tns_modules/tns-core-modules/ui/page/page.js:192:28
53  UIApplicationMain@[native code]
54  _start@file:///app/tns_modules/tns-core-modules/application/application.js:277:22
55  run@file:///app/tns_modules/tns-core-modules/application/application.js:305:9
56  $start@file:///app/tns_modules/nativescript-vue/dist/index.js:14093:18
57  @file:///app/bundle.js:1618:10
58  ./app.js@file:///app/bundle.js:1622:34
59  __webpack_require__@file:///app/runtime.js:751:34
60  checkDeferredModules@file:///app/runtime.js:44:42
61  webpackJsonpCallback@file:///app/runtime.js:31:39
62  anonymous@file:///app/bundle.js:2:61
63  evaluate@[native code]
64  moduleEvaluation@[native code]
65  promiseReactionJob@[native code]
66  require@[native code]
67  anonymous@file:///app/starter.js:3:8
68  evaluate@[native code]
69  moduleEvaluation@[native code]
70  promiseReactionJob@[native code]
2019-07-23 16:44:28.353 nsplaydev[19132:7702867] JavaScript error:
file:///app/tns_modules/tns-core-modules/ui/layouts/grid-layout/grid-layout.js:351:41: JS ERROR TypeError: undefined is not an object (evaluating 'this.rows[measureSpec.getRowIndex()].children')
2019-07-23 16:44:28.359 nsplaydev[19132:7702867] PlayLiveSync: Uncaught Exception
2019-07-23 16:44:28.359 nsplaydev[19132:7702867] PlayLiveSync: Sending crash report
2019-07-23 16:44:32.363 nsplaydev[19132:7702867] *** JavaScript call stack:
(
        0   UIApplicationMain@[native code]
        1   _start@file:///app/tns_modules/tns-core-modules/application/application.js:277:22
        2   run@file:///app/tns_modules/tns-core-modules/application/application.js:305:9
        3   $start@file:///app/tns_modules/nativescript-vue/dist/index.js:14093:18
        4   @file:///app/bundle.js:1618:10
        5   ./app.js@file:///app/bundle.js:1622:34
        6   __webpack_require__@file:///app/runtime.js:751:34
        7   checkDeferredModules@file:///app/runtime.js:44:42
        8   webpackJsonpCallback@file:///app/runtime.js:31:39
        9   anonymous@file:///app/bundle.js:2:61
        10  evaluate@[native code]
        11  moduleEvaluation@:1:11
        12  promiseReactionJob@:1:11
        13  require@[native code]
        14  anonymous@file:///app/starter.js:3:8
        15  evaluate@[native code]
        16  moduleEvaluation@:1:11
        17  promiseReactionJob@:1:11
)
2019-07-23 16:44:32.364 nsplaydev[19132:7702867] *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: TypeError: undefined is not an object (evaluating 'this.rows[measureSpec.getRowIndex()].children')
 at
1   addMeasureSpec@file:///app/tns_modules/tns-core-modules/ui/layouts/grid-layout/grid-layout.js:351:41
2   @file:///app/tns_modules/tns-core-modules/ui/layouts/grid-layout/grid-layout.js:113:34
3   eachLayoutChild@file:///app/tns_modules/tns-core-modules/ui/layouts/layout-base-common.js:143:15
4   onMeasure@file:///app/tns_modules/tns-core-modules/ui/layouts/grid-layout/grid-layout.js:107:25
5   measure@file:///app/tns_modules/tns-core-modules/ui/core/view/view.js:55:21
6   measureChild@file:///app/tns_modules/tns-core-modules/ui/core/view/view-common.js:939:20
7   measureChildFixedColumns@file:///app/tns_modules/tns-core-modules/ui/layouts/grid-layout/grid-layout.js:640:59
8   measureFixedColumnsNoStarRows@file:///app/tns_modules/tns-core-modules/ui/layouts/grid-layout/grid-layout.js:489:40
9   measure@file:///app/tns_modules/tns-core-modules/ui/layouts/grid-layout/grid-layout.js:559:41
10  onMeasure@file:///app/tns_modules/tns-core-modules/ui/layouts/grid-layout/grid-layout.js:115:24
11  measure@file:///app/tns_modules/tns-core-modules/ui/core/view/view.js:55:21
12  measureChild@file:///app/tns_modules/tns-core-modules/ui/core/view/view-common.js:939:20
13  @file:///app/tns_modules/tns-core-modules/ui/layouts/stack-layout/stack-layout.js:52:60
14  @file:///app/tns_modules/tns-core-modules/ui/layouts/layout-base-common.js:136:19
15  _eachLayoutView@file:///app/tns_modules/tns-core-modules/ui/core/view/view-common.js:1000:20
16  @file:///app/tns_modules/tns-core-modules/ui/layouts/layout-base-common.js:134:25
17  eachChildView@file:///app/tns_modules/tns-core-modules/ui/layouts/layout-base-common.js:125:28
18  eachLayoutChild@file:///app/tns_modules/tns-core-modules/ui/layouts/layout-base-common.js:133:23
19  onMeasure@file:///app/tns_modules/tns-core-modules/ui/layouts/stack-layout/stack-layout.js:50:25
20  measure@file:///app/tns_modules/tns-core-modules/ui/core/view/view.js:55:21
21  measureChild@file:///app/tns_modules/tns-core-modules/ui/core/view/view-common.js:939:20
22  onMeasure@file:///app/tns_modules/tns-core-modules/ui/scroll-view/scroll-view.js:140:59
23  measure@file:///app/tns_modules/tns-core-modules/ui/core/view/view.js:55:21
24  measureChild@file:///app/tns_modules/tns-core-modules/ui/core/view/view-common.js:939:20
25  measureChildFixedColumnsAndRows@file:///app/tns_modules/tns-core-modules/ui/layouts/grid-layout/grid-layout.js:715:59
26  measure@file:///app/tns_modules/tns-core-modules/ui/layouts/grid-layout/grid-layout.js:572:47
27  onMeasure@file:///app/tns_modules/tns-core-modules/ui/layouts/grid-layout/grid-layout.js:115:24
28  measure@file:///app/tns_modules/tns-core-modules/ui/core/view/view.js:55:21
29  measureChild@file:///app/tns_modules/tns-core-modules/ui/core/view/view-common.js:939:20
30  @file:///app/tns_modules/tns-core-modules/ui/layouts/stack-layout/stack-layout.js:52:60
31  eachLayoutChild@file:///app/tns_modules/tns-core-modules/ui/layouts/layout-base-common.js:143:15
32  onMeasure@file:///app/tns_modules/tns-core-modules/ui/layouts/stack-layout/stack-layout.js:50:25
33  measure@file:///app/tns_modules/tns-core-modules/ui/core/view/view.js:55:21
34  measureChild@file:///app/tns_modules/tns-core-modules/ui/core/view/view-common.js:939:20
35  onMeasure@file:///app/tns_modules/nativescript-ui-sidedrawer/ui-sidedrawer.js:244:42
36  measure@file:///app/tns_modules/tns-core-modules/ui/core/view/view.js:55:21
37  measureChild@file:///app/tns_modules/tns-core-modules/ui/core/view/view-common.js:939:20
38  measureChildFixedColumnsAndRows@file:///app/tns_modules/tns-core-modules/ui/layouts/grid-layout/grid-layout.js:715:59
39  measure@file:///app/tns_modules/tns-core-modules/ui/layouts/grid-layout/grid-layout.js:572:47
40  onMeasure@file:///app/tns_modules/tns-core-modules/ui/layouts/grid-layout/grid-layout.js:115:24
41  measure@file:///app/tns_modules/tns-core-modules/ui/core/view/view.js:55:21
42  measureChild@file:///app/tns_modules/tns-core-modules/ui/core/view/view-common.js:939:20
43  @file:///app/tns_modules/tns-core-modules/ui/layouts/stack-layout/stack-layout.js:52:60
44  eachLayoutChild@file:///app/tns_modules/tns-core-modules/ui/layouts/layout-base-common.js:143:15
45  onMeasure@file:///app/tns_modules/tns-core-modules/ui/layouts/stack-layout/stack-layout.js:50:25
46  measure@file:///app/tns_modules/tns-core-modules/ui/core/view/view.js:55:21
47  measureChild@file:///app/tns_modules/tns-core-modules/ui/core/view/view-common.js:939:20
48  onMeasure@file:///app/tns_modules/tns-core-modules/ui/page/page.js:272:49
49  measure@file:///app/tns_modules/tns-core-modules/ui/core/view/view.js:55:21
50  measureChild@file:///app/tns_modules/tns-core-modules/ui/core/view/view-common.js:939:20
51  layoutView@file:///app/tns_modules/tns-core-modules/ui/core/view/view.js:636:22
52  viewDidLayoutSubviews@file:///app/tns_modules/tns-core-modules/ui/page/page.js:192:28
53  UIApplicationMain@[native code]
54  _start@file:///app/tns_modules/tns-core-modules/application/application.js:277:22
55  run@file:///app/tns_modules/tns-core-modules/application/application.js:305:9
56  $start@file:///app/tns_modules/nativescript-vue/dist/index.js:14093:18
57  @file:///app/bundle.js:1618:10
58  ./app.js@file:///app/bundle.js:1622:34
59  __webpack_require__@file:///app/runtime.js:751:34
60  checkDeferredModules@file:///app/runtime.js:44:42
61  webpackJsonpCallback@file:///app/runtime.js:31:39
62  anonymous@file:///app/bundle.js:2:61
63  evaluate@[native code]
64  moduleEvaluation@[native code]
65  promiseReactionJob@[native code]
66  require@[native code]
67  anonymous@file:///app/starter.js:3:8
68  evaluate@[native code]
69  moduleEvaluation@[native code]
70  promiseReactionJob@[native code]
', reason: '(null)'
*** First throw call stack:
(0x184d89d04 0x183fd8528 0x102a7248c 0x102aa4d70 0x10359205c 0x1035941b4 0x18e1be448 0x188d77ec8 0x188d7bfa8 0x188ceaa98 0x188d10eb4 0x18e423f2c 0x18eb110f8 0x18eb09d04 0x184d322e8 0x184d32268 0x184d31af0 0x184d2f6c8 0x184c4ffb8 0x186ae7f84 0x18e2242e8 0x103594044 0x103591780 0x10359127c 0x102a34f54 0x103590488 0x10358e804 0x10358e804 0x10358e804 0x10358e804 0x10358e804 0x10358e804 0x10358e804 0x10358e764 0x10358e804 0x10357a2ac 0x103207ebc 0x1033dcf98 0x102a4cec8 0x102bac9a0 0x1035901ec 0x10358e764 0x10358e804 0x10357a2ac 0x103207ebc 0x1033dd164 0x102ba5d0c 0x102a43d88 0x102a49464 0x1035901ec 0x10358e804 0x10357a2ac 0x103207ebc 0x1033dcf98 0x102a4cec8 0x102bac9a0 0x1035901ec 0x10358e804 0x10358e804 0x10357a2ac 0x103207ebc 0x1033dd164 0x102ba5d0c 0x102a43d88 0x102ab1f50 0x102805b14 0x102123428 0x18477256c)
libc++abi.dylib: terminating with uncaught exception of type NSException
2019-07-23 16:44:32.365 nsplaydev[19132:7702867] PlayLiveSync: Uncaught Exception

0 个答案:

没有答案