我已经使用 @vue/cli-service 4.2 创建了 vue 和电子应用程序,因为我面临着可选链接的问题。
我不能用?用于验证条件,如 (@babel/plugin-proposal-optional-chaining)
例如。a?.b?.c 这意味着它检查天气 a 是否存在然后检查 b 否则返回 false 与 angular 中的模板表达式相同。
任何人都知道如何在 vuejs 中配置可选链。
我使用了一个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)
它在开发中完美运行,但在生产模式下无法运行
首先,我是 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) 我不知道如何更改复选框的默认颜色。我为复选框编写了这一行
<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)
在下图中,我提到了我需要的复选框的样式。
您好我正在使用Windows通用平台应用程序在这个应用程序错误发生时,我调试我的Windows通用项目此错误自动出现所以任何人建议我如何解决此错误?
错误: - 在模块CommonLanguageRuntimeLibrary中找不到类型System.MarshalByRefObject
所以建议我如何解决这个错误.
我正在为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) xaml ×5
uwp ×3
windows-10 ×3
c# ×2
electron ×2
windows ×2
asp.net ×1
firebase ×1
frameworks ×1
javascript ×1
reactjs ×1
universal ×1
vue-cli-4 ×1
vue.js ×1