我想对复选框使用 bootstrap 4 自定义控件,在阅读了我写的文档后,但未显示复选框,我做错了什么?
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet"/>
<div class="card-body"><label>Add Productc Varian for </label>
<div class="form-group"><label for="formGroupExampleInput">Code</label><input type="text" class="form-control" placeholder="Enter Name"></div>
<div class="form-group"><label for="formGroupExampleInput">Name</label><input type="text" class="form-control" placeholder="Enter Name"></div>
<div class="form-group"><label for="formGroupExampleInput2">Description</label><textarea class="form-control" placeholder="Description"></textarea></div>
<div class="form-group">
<div class="custom-control custom-checkbox"><label for="formGroupExampleInput2">Default</label><input type="checkbox" class="custom-control-input" id="customControlValidation1"></div>
</div>
<hr>
<div class="form-group">
<div class="col-12"><button type="button" class="btn btn-default float-right">Add</button><button type="button" class="btn btn-danger float-right">Cancel</button></div>
</div>
</div>Run Code Online (Sandbox Code Playgroud)
我想覆盖禁用复选框的语义 ui css,因为我不擅长 css,所以我不知道应该覆盖哪个角色。
<link href="https://semantic-ui.com/dist/semantic.min.css" rel="stylesheet"/>
<div class="ui disabled checkbox">
<input type="checkbox" disabled="disabled">
<label>Disabled</label>
</div>
<div class="ui disabled checkbox">
<input type="checkbox" disabled="disabled">
<label></label>
</div>Run Code Online (Sandbox Code Playgroud)
从上面的片段来看,他们似乎正在设计标签的样式。如何将复选框颜色设置为灰色或任何较暗的颜色?
我的目标很简单,在反应日期选择器中显示数据库中的日期。从我的数据库中,我得到了 string "2019/10/26 15:05",但是当selected它返回时设置它,
从 v2.0.0-beta.1 date-fns 开始,不接受字符串作为参数。请使用
parseISO解析字符串
<DatePicker
dateFormat="dd-MM-yyyy HH:mm"
showTimeSelect
timeFormat="HH:mm"
timeIntervals={1}
selectsEnd
startDate={this.state.beginDate}
endDate={this.state.endDate}
selected={this.state.endDate}
onChange={this.selectEndDate} />
Run Code Online (Sandbox Code Playgroud)
我也尝试过date-fns,parseISO但仍然不起作用。我应该怎么办?
我正在使用unplugin-icon创建一个图标组件,通常情况下我可以导入
//script
import IconCopy from '~icons/prime/copy'
//template
<IconCopy/>
Run Code Online (Sandbox Code Playgroud)
它可以工作,但是如果我们想使用另一个图标,那么逐个导入感觉不方便,所以我创建了一个名为 Eunoicon.vue 的动态组件
<script setup>
const props = defineProps({
icon : {type:String}
})
const from = `~icons/prime/${props.icon}`
const TheIcon = await import(/* @vite-ignore */from)
console.log('ti',TheIcon)
</script>
<template>
<TheIcon/>
</template>
Run Code Online (Sandbox Code Playgroud)
但是当我尝试将其导入到组件时,它会抛出错误Uncaught (in promise) TypeError: Failed to resolve module specifier '~icons/prime/copy'.
对于这种方法或任何提供简单方法的图标库有什么建议吗?我已经尝试过 vue font Awesome 但它仍然没有我想要的那么简单。
我已经用 bootstrap 4 创建了一个像这样的表,但似乎当我们将“collapse”类放在表行上时,它的行为与我们放置 div 元素时的行为不同。正如你所看到的,如果我们点击 animate div,目标 div 将平滑地动画化,但是当我们点击 animate tr 时,tr 不是动画的,我怎样才能使 tr 动画化呢?
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" rel="stylesheet"/>
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
<div class="card-body justify-content-center">
<p><a class="btn btn-primary collapsed" data-toggle="collapse" href="#collapseProduct" role="button" aria-expanded="false" aria-controls="collapseProduct">Animate div</a><button class="btn btn-primary collapsed" type="button" data-toggle="collapse" data-target="#collapseProduct0"
aria-expanded="false" aria-controls="collapseProduct0">Animate tr</button></p>
<div class="collapse" id="collapseProduct" style="">
<div class="card card-body">Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente …Run Code Online (Sandbox Code Playgroud)在 javascript 中我们可以做这样的事情
function putritanjungsari(data){
console.log(data.name)
}
let data = {
name:"putri",
div:"m4th"
}
putritanjungsari(data)Run Code Online (Sandbox Code Playgroud)
在 kotlin 中,我正在创建一个函数,该函数接受一个对象作为参数,然后稍后读取它的属性,如何在针对 JVM 的 kotlin 中做到这一点?
我正在尝试在本地使用 CKEditor 和 vue 3 组合 api,但此处页面上未显示的编辑器可能是组件
<template>
<PageWrapper title="Post">
<CKEditor :editor="editor"></CKEditor>
</PageWrapper>
</template>
<script setup>
import PageWrapper from '@/components/PageWrapper.vue'
import CKEditor from '@ckeditor/ckeditor5-vue'
import ClassicEditor from '@ckeditor/ckeditor5-build-classic'
const editor = ClassicEditor
</script>
Run Code Online (Sandbox Code Playgroud)
怎么了?
我试图创建像这样的简单服务
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
import com.dolphithronelab.siastar.response.AuthResponse;
public interface SIAStarService {
@POST("auth");
@FormUrlEncoded;
Call<AuthResponse>login(@Field("username") String username, @Field("password") String password);
}
Run Code Online (Sandbox Code Playgroud)
但我的Android工作室显示错误说:@POST不适用于类型,如何处理这个?这是我的AuthResponse类导入com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName;
public class AuthResponse {
@SerializedName("login")
@Expose
private Boolean login;
@SerializedName("user")
@Expose
private User user;
@SerializedName("pesan")
@Expose
private String pesan;
@SerializedName("token")
@Expose
private String token;
public Boolean getLogin() {
return login;
}
public void setLogin(Boolean login) {
this.login = login;
}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user …Run Code Online (Sandbox Code Playgroud) 我正在使用Bootstrap 4.3 Spinner,一切正常,但是我想在Spinner下添加其他文本。这是我的HTML
<div class="d-flex justify-content-center">
<div class="row">
<div class="spinner-border" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
<div class="row">
<strong>Collecting data</strong>
</div>
</div>Run Code Online (Sandbox Code Playgroud)
但是文本“收集数据”附加在微调框上,我该如何解决?
css ×4
bootstrap-4 ×3
javascript ×2
vue.js ×2
android ×1
ckeditor ×1
icons ×1
kotlin ×1
reactjs ×1
retrofit ×1
semantic-ui ×1
vite ×1