标签: nativescript-vue

在 $navigateBack 中传递更改的道具

我有一个概览页面,人们可以在其中查看结果。他们可以选择通过单击编辑按钮来更改该值。通过单击编辑按钮,您将导航到另一个页面,您可以在其中更改值。如果您更改了值,您将返回概览页面。但我的问题是我传递的道具this.$navigateBack()在概览页面中没有改变。

概览页面

<template>
<Page class="confirmPage" actionBarHidden="true">
    <StackLayout>
        <Button class="back fas btn btn-db" :text="'\uf060 Route Details' | unescape" @tap="$navigateBack"></Button>
        <GridLayout columns="2*, 2*, 1*" rows="*, *, *" class="routeDetails">
            <Label row="0" col="0" class="centerIt" text="Ziekenhuis"></Label>
            <Label row="0" col="1" :text="$props.hospital"></Label>
            <Label row="0" col="2" class="fas btn btn-t-d btn-cr-sm" :text="'\uf303' | unescape" @tap="onEditHospital"></Label>

            <Label row="1" col="0" class="centerIt" text="Startpunt"></Label>
            <Label row="1" col="1" :text="$props.startpoint"></Label>
            <Label row="1" col="2" class="fas btn btn-t-d btn-cr-sm" :text="'\uf303' | unescape" @tap="onEditStartpoint"></Label>

            <Label row="2" col="0" class="centerIt" text="Bestemming"></Label>
            <Label row="2" col="1" :text="$props.endpoint"></Label>
            <Label row="2" col="2" …
Run Code Online (Sandbox Code Playgroud)

vue.js nativescript nativescript-vue

2
推荐指数
1
解决办法
1230
查看次数

具有nativescript-vue的轮播

如何使用nativescript-vue创建轮播?我可以使用按钮和动画创建几个单独的组件,例如welcome1.vue,welcome2.vue,但是我不知道如何添加点使其成为真正的轮播/介绍流程。我知道有一个NS插件,但是我不确定如何将其集成到vue项目中。

任何帮助,将不胜感激!

carousel nativescript nativescript-vue

1
推荐指数
1
解决办法
815
查看次数

geolocation.enableLocationRequest() 上的 nativescript-geolocation 崩溃

在模拟器nativescript-vue使用Android 10.0 (Pixel 3a)作为我的堆栈。

每当我调用geolocation.enableLocationRequest()onmounted()或 on button click 时,应用程序都会崩溃。

不过它在 iOS 上运行良好。

有任何想法吗?

更新 1 - 更多信息

清单文件:

<?xml version="1.0" encoding="utf-8"?>
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android" package="__PACKAGE__" android:versionCode="10003" android:versionName="0.0.3">
    <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" />
    <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="__APILEVEL__" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.FLASHLIGHT" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-feature android:name="android.hardware.camera"/>
    <uses-feature android:name="android.hardware.camera.flash"/>
    <application android:name="com.tns.NativeScriptApplication" android:allowBackup="true" android:icon="@drawable/icon" android:label="@string/app_name" android:usesCleartextTraffic="true" android:theme="@style/AppTheme">
        <activity android:name="com.tns.NativeScriptActivity"
                  android:label="@string/title_activity_kimera"
                  android:configChanges="keyboardHidden|orientation|screenSize" …
Run Code Online (Sandbox Code Playgroud)

android nativescript nativescript-vue

1
推荐指数
1
解决办法
723
查看次数

如何将自定义nativescript-Vue组件传递给自定义子组件

我想使用 Nativescript-Vue 将动态子组件添加到父组件。例如:

<template>
    <MyParentComponent>
        <MyChildComponent :foo="foo"></MyChildComponent>
    </MyParentComponent>
<template>

<script>
    import MyParentComponent from './components/MyParentComponent';
    import MyChildComponent from './components/MyChildComponent';

    export default {
        components: {
            MyParentComponent,
            MyChildComponent
        },
        data: function(){
            return {
                foo: ''
            }
        }
    }
</script>
Run Code Online (Sandbox Code Playgroud)

我想我需要在父组件中定义一个插槽,在其中插入子组件,但我不知道应该如何完成。

有任何想法吗?

nativescript nativescript-vue

0
推荐指数
1
解决办法
2449
查看次数

如何使用Nativescript-Vue为动画分配元素?

查看此文档:

https://docs.nativescript.org/ui/animation

我正在尝试添加这个元素的类或ID <Label>来动画任何东西,但我不确定应该view通过直接用代码而不是CSS动画调用动画方法来分配一个元素来完全控制任何动画. Vue模板.

javascript nativescript nativescript-vue

0
推荐指数
1
解决办法
1087
查看次数