我有一个包含 20 个字段的结构:
struct StructA {
value1: i32,
value2: i32,
// ...
value19: i32,
day: chrono::NaiveDate,
}
Run Code Online (Sandbox Code Playgroud)
I'd like to impl Default trait for StructA. I tried to add #[derive(Default)] to the struct, but chrono::NaiveDate doesn't implement Default.
I then tried to implement Default for StructA:
impl Default for StructA {
fn default() -> Self {
Self {
value1: Default::default(),
value2: Default::default(),
// ...
value19: Default::default(),
day: chrono::NaiveDate::from_ymd(2021, 1, 1),
}
}
}
Run Code Online (Sandbox Code Playgroud)
This code works fine, …
我将v-text-field和v-select与vue-loader一起使用。
我试图更改字体大小,但不能。如何更改字体大小?
我的代码是这样的。
<template lang="pug">
p label-1
v-text-field(...)
p label-1
v-text-field(...)
</template>
<stylelang="sass">
.input-group .input-group__input
font-size: 12px !important
</style>
<stylelang="sass"scoped>
.p
font-size: 12px
</style>
Run Code Online (Sandbox Code Playgroud)
sub_dir/Cargo.toml
(Cargo.toml 不在存储库根目录中)rust-analyzer.linkedProjects所以我需要根据每个环境我想避免通过机器进行配置。你知道有什么解决方法吗?