小编Har*_*ari的帖子

支持 vuejs 中的可选链

我已经使用 @vue/cli-service 4.2 创建了 vue 和电子应用程序,因为我面临着可选链接的问题。

我不能用?用于验证条件,如 (@babel/plugin-proposal-optional-chaining)

例如。a?.b?.c 这意味着它检查天气 a 是否存在然后检查 b 否则返回 false 与 angular 中的模板表达式相同。

任何人都知道如何在 vuejs 中配置可选链。

vue.js electron vue-cli-4 ecmascript-2020

15
推荐指数
3
解决办法
9554
查看次数

Firebase 分析日志事件在电子的生产版本中不起作用

我使用了一个firebase包来使用实时数据库,我想实现 firebase 分析,所以我使用了相同的包并编写了用于分析的代码

import * as firebase from 'firebase'
import 'firebase/analytics'
import { fireBase } from 'configs/config'
const config = {
  apiKey: fireBase.REACT_APP_FIREBASE_API_KEY,
  authDomain: fireBase.REACT_APP_FIREBASE_AUTH_DOMAIN,
  databaseURL: fireBase.REACT_APP_FIREBASE_DATABASE_URL,
  projectId: fireBase.REACT_APP_FIREBASE_PROJECT_ID,
  storageBucket: fireBase.REACT_APP_FIREBASE_STORAGE_BUCKET,
  messagingSenderId: fireBase.REACT_APP_FIREBASE_MESSAGING_SENDER_ID,
  appId: fireBase.REACT_APP_FIREBASE_APP_ID,
  measurementId: fireBase.REACT_APP_MEASUREMENT_ID,
}
firebase.initializeApp(config)
export const defaultAnalytics = firebase.analytics()
export default firebase
Run Code Online (Sandbox Code Playgroud)

之后,我在需要它的文件中导入了defaultAnalytics并将该代码用于记录事件以进行分析

defaultAnalytics.logEvent('profile_update')
Run Code Online (Sandbox Code Playgroud)

它在开发中完美运行,但在生产模式下无法运行

javascript firebase reactjs electron

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

将 base64 字符串绑定到 xamarin 形式的列表视图

首先,我是 Xamarin.Form 的新手。我正在努力从 Google 获得最佳效果,但我什至无法对某些功能进行大量搜索。

我正在创建一个 Xamarin.Form 应用程序。在那个应用程序中,我将图像存储为base64 string格式sql server,我在 sql server 中的数据类型是varchar(Max).

我的问题是,如何将base64 string图像转换为图像并将图像绑定到列表视图。

列表视图代码:

<ListView x:Name="listView" HasUnevenRows="true" SeparatorColor="Gray">
    <ListView.ItemTemplate>
        <DataTemplate>
            <ViewCell>
                <Image Source="{Binding image}"  Grid.Row="0" 
                        Grid.RowSpan="3" Grid.Column="0" 
                        HorizontalOptions="Center" HeightRequest="50" 
                        VerticalOptions="Center">
                    <Image.GestureRecognizers>
                        <TapGestureRecognizer Tapped="OnImageTapped" />
                    </Image.GestureRecognizers>
                </Image>
            </ViewCell>
        </DataTemplate>
    </ListView.ItemTemplate>
</ListView>
Run Code Online (Sandbox Code Playgroud)

C#的代码:

Public async Task loadDeveloperList()
{
    try
    {            
        List<employee> employeeDetail = new List<employee>();

        HttpClient client = new HttpClient();
        StringBuilder sb = new StringBuilder();
        client.MaxResponseContentBufferSize = 256000;
        var RestUrl = "http://example.com/Getemployee/"; …
Run Code Online (Sandbox Code Playgroud)

c# windows xaml xamarin.forms

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

如何更改通用Windows平台中CheckBox控件的默认样式?

我不知道如何更改复选框的默认颜色。我为复选框编写了这一行

<CheckBox  x:Name="chkRememberme" Foreground="Gray"  Grid.Row="4" Background="Transparent"   IsChecked="False" TabIndex="3"  HorizontalAlignment="Center" VerticalAlignment="Top" Background="Blue"   Margin="0,2,0,0"  />
Run Code Online (Sandbox Code Playgroud)

在下图中,我提到了我需要的复选框的样式。

在此输入图像描述

xaml win-universal-app windows-10 uwp

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

在 Windows 通用应用程序 (UWP) 中,使用 Tab 和 Alter Tab 时生成“global::System.Diagnostics.Debugger.Break()”错误

我正在开发 Windows 通用应用程序,在这个应用程序中,当我使用 tab 和 alter + tab 时,应用程序会自动终止并显示此错误。我刚刚捕获了一张图片,以便您可以看到。

错误图像:Visual Studio 出现异常

应用程序停止后

xaml windows-10 visual-studio-2015 uwp

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

错误:在Windows通用平台aoo for Windows 10中的模块CommonLanguageRuntimeLibrary中找不到类型System.MarshalByRefObject

您好我正在使用Windows通用平台应用程序在这个应用程序错误发生时,我调试我的Windows通用项目此错误自动出现所以任何人建议我如何解决此错误?

错误: - 在模块CommonLanguageRuntimeLibrary中找不到类型System.MarshalByRefObject

所以建议我如何解决这个错误.

c# asp.net xaml frameworks windows-10

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

减少Xaml中Listview中的底部和顶部空间(UWP-Universal Windows平台)

我正在为windows-10开发通用Windows平台应用程序.我有关于listview的问题.当我点击并悬停在listview项目上时,所选区域背景很大.你可以在我的图片中看到.

码:

<ListView  Height="160" Name="lstconfig_option" BorderThickness="0"   BorderBrush="#FFB0B7BE" ItemClick="lstconfig_option_ItemClick" IsItemClickEnabled="True"   HorizontalAlignment="Stretch">
                                    <ListView.ItemsPanel>
                                        <ItemsPanelTemplate>
                                            <WrapGrid Orientation="Horizontal" MaximumRowsOrColumns="10"/>
                                        </ItemsPanelTemplate>
                                    </ListView.ItemsPanel>
                                    <ListView.ItemContainerStyle>
                                        <Style TargetType="ListViewItem">
                                            <Setter Property="HorizontalContentAlignment" Value="Left" />
                                            <Setter Property="VerticalContentAlignment" Value="Center" />
                                            <Setter Property="Margin" Value="0,0,0,0" />
                                            <Setter Property="Padding" Value="0,0,0,-6" />
                                            <Setter Property="Template">
                                                <Setter.Value>
                                                    <ControlTemplate TargetType="ListViewItem">
                                                        <ListViewItemPresenter          
                                  PointerOverBackground="{ThemeResource SystemControlHighlightListLowBrush}"       
                                  SelectedBackground="{ThemeResource SystemControlHighlightListMediumBrush}"      
                                  SelectedPointerOverBackground="{ThemeResource SystemControlHighlightListMediumBrush}"
                                 PressedBackground="{ThemeResource SystemControlHighlightListMediumBrush}"
                                 SelectedPressedBackground="{ThemeResource SystemControlHighlightListMediumBrush}" />
                                                    </ControlTemplate>
                                                </Setter.Value>
                                            </Setter>


                                        </Style>
                                    </ListView.ItemContainerStyle>

                                    <ListView.ItemTemplate>
                                        <DataTemplate >
                                            <StackPanel Grid.Row="1" Height="auto" HorizontalAlignment="Stretch" PointerEntered="btnFilter_PointerEntered" PointerExited="btnFilter_PointerExited" ToolTipService.ToolTip="{Binding tooltip_text}" ToolTipService.Placement="Bottom">
                                                <Grid Height="auto">
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="*"></ColumnDefinition>
                                                        <ColumnDefinition Width="auto"></ColumnDefinition>
                                                    </Grid.ColumnDefinitions>

                                                    <StackPanel Grid.Column="0" …
Run Code Online (Sandbox Code Playgroud)

windows xaml universal uwp

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