更新记录
1.0.2(2025-11-10) 下载此版本
1.0.2
1.0.1(2025-11-10) 下载此版本
处理说明
1.0.0(2025-11-10) 下载此版本
1.0.0
查看更多平台兼容性
uni-app(4.13)
| Vue2 | Vue3 | Chrome | Safari | app-vue | app-nvue | Android | iOS | 鸿蒙 |
|---|---|---|---|---|---|---|---|---|
| √ | √ | √ | √ | √ | √ | √ | √ | √ |
| 微信小程序 | 支付宝小程序 | 抖音小程序 | 百度小程序 | 快手小程序 | 京东小程序 | 鸿蒙元服务 | QQ小程序 | 飞书小程序 | 快应用-华为 | 快应用-联盟 |
|---|---|---|---|---|---|---|---|---|---|---|
| √ | √ | √ | √ | √ | √ | √ | √ | √ | √ | √ |
uni-app x(4.16)
| Chrome | Safari | Android | iOS | 鸿蒙 | 微信小程序 |
|---|---|---|---|---|---|
| - | - | - | - | - | - |
其他
| 多语言 | 暗黑模式 | 宽屏模式 |
|---|---|---|
| × | × | √ |
binForm-Plugin 使用方式
<view class="content">
<binForm-Plugin ref="qFrom" v-model:modelValue="model" v-model:formInfo="formInfo"></binForm-Plugin>
<button type="primary" @click="submit('baseForm')">提交</button>
</view>
export default {
data() {
return {
title: 'Hello',
model:{
name:'',
age:'',
like:'',
introduction:'',
datetimesingle:'',
city:''
},
formInfo:[
{
name: "name",
label: "姓名",
type: "input",
required: true,
},
{
name: "age",
label: "年龄",
type: "input",
required: true,
},
{
name: "sex",
label: "性别",
type: "radio",
multiple: false,
required: true,
options: () => {
return new Promise((resolve, reject) => {
//模拟ajax
resolve(
[
{
text: "男",
value: 1,
},
{
text: "女",
value: 2,
}
]
);
// getSex().then(res => {
// console.log("resres",res.list)
// resolve(
// res.list
// );
// })
});
}
},
{
name: "like",
label: "爱好",
type: "checkbox",
options: [
{
text: "跑步",
value: 0,
},
{
text: "游泳",
value: 1,
},
{
text: "绘画",
value: 2,
},
{
text: "足球",
value: 3,
},
{
text: "篮球",
value: 4,
},
{
text: "其他",
value: 5,
},
],
},
{
name: "introduction",
label: "自我介绍",
type: "textarea",
required: false,
},
{
name: "datetimesingle",
label: "时间",
type: "datetime",
required: false,
},
{
name: "city",
label: "城市",
type: "dataPicker",
options: [
{
text: "北京",
value: "10001",
},
{
text: "上海",
value: "10002",
},
{
text: "深圳",
value: "10004",
}
],
},
]
}
},
onLoad() {
// this.formInfo= this.getData();
// console.log(" this.formInfo", this.formInfo)
},
methods: {
submit(){
this.$refs.qFrom.validate()
}
}
}
<style>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #8f8f94;
}
</style>
binForm-Plugin
export default {
data() {
return {
title: 'Hello',
model:{
name:'',
age:'',
like:'',
introduction:'',
datetimesingle:'',
city:''
},
formInfo:[
{
name: "name",
label: "姓名",
type: "input",
required: true,
},
{
name: "age",
label: "年龄",
type: "input",
required: true,
},
{
name: "sex",
label: "性别",
type: "radio",
multiple: false,
required: true,
options: () => {
return new Promise((resolve, reject) => {
//模拟ajax
resolve(
[
{
text: "男",
value: 1,
},
{
text: "女",
value: 2,
}
]
);
// getSex().then(res => {
// console.log("resres",res.list)
// resolve(
// res.list
// );
// })
});
}
},
{
name: "like",
label: "爱好",
type: "checkbox",
options: [
{
text: "跑步",
value: 0,
},
{
text: "游泳",
value: 1,
},
{
text: "绘画",
value: 2,
},
{
text: "足球",
value: 3,
},
{
text: "篮球",
value: 4,
},
{
text: "其他",
value: 5,
},
],
},
{
name: "introduction",
label: "自我介绍",
type: "textarea",
required: false,
},
{
name: "datetimesingle",
label: "时间",
type: "datetime",
required: false,
},
{
name: "city",
label: "城市",
type: "dataPicker",
options: [
{
text: "北京",
value: "10001",
},
{
text: "上海",
value: "10002",
},
{
text: "深圳",
value: "10004",
}
],
},
]
}
},
onLoad() {
// this.formInfo= this.getData();
// console.log(" this.formInfo", this.formInfo)
},
methods: {
submit(){
this.$refs.qFrom.validate()
}
}
}.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #8f8f94;
}
收藏人数:
下载插件并导入HBuilderX
赞赏(0)
下载 1
赞赏 0
下载 10860281
赞赏 1799
赞赏
京公网安备:11010802035340号