表单开发
This commit is contained in:
@@ -15,11 +15,11 @@
|
||||
|
||||
<view class="form-wrapper">
|
||||
<view class="require">您的招工需求</view>
|
||||
<u--textarea v-model="value2" height="140" placeholder="请输入内容" count ></u--textarea>
|
||||
<!-- <u--textarea v-model="value2" height="140" placeholder="请输入内容" count ></u--textarea>
|
||||
<u-cell-group style="margin: 20rpx 0;">
|
||||
<u-cell title="技能要求" :isLink="true"></u-cell>
|
||||
<u-cell title="任务区域" :isLink="true" value=""></u-cell>
|
||||
</u-cell-group>
|
||||
</u-cell-group> -->
|
||||
</view>
|
||||
<view style="font-size: 36rpx;color: #000;font-weight: bold;padding: 0 20rpx;">招工指引</view>
|
||||
<view class="zhiyin">
|
||||
|
||||
@@ -17,11 +17,48 @@
|
||||
|
||||
<view class="form-wrapper">
|
||||
<view class="require">您的招工需求</view>
|
||||
<u--textarea v-model="value2" height="140" placeholder="请输入内容" count ></u--textarea>
|
||||
<!-- <u--textarea v-model="value2" height="140" placeholder="请输入内容" count ></u--textarea>
|
||||
<u-cell-group style="margin: 20rpx 0;">
|
||||
<u-cell title="技能要求" :isLink="true"></u-cell>
|
||||
<u-cell title="任务区域" :isLink="true" value=""></u-cell>
|
||||
</u-cell-group>
|
||||
</u-cell-group> -->
|
||||
<u--form
|
||||
labelPosition="left"
|
||||
:model="model1"
|
||||
:rules="rules"
|
||||
ref="uForm"
|
||||
>
|
||||
<u-form-item
|
||||
label="名称"
|
||||
prop="userInfo.name"
|
||||
borderBottom
|
||||
ref="item1"
|
||||
>
|
||||
<u--input
|
||||
v-model="model1.userInfo.name"
|
||||
border="none"
|
||||
></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item
|
||||
label="性别"
|
||||
prop="userInfo.sex"
|
||||
borderBottom
|
||||
@click="showSex = true; hideKeyboard()"
|
||||
ref="item1"
|
||||
>
|
||||
<u--input
|
||||
v-model="model1.userInfo.sex"
|
||||
disabled
|
||||
disabledColor="#ffffff"
|
||||
placeholder="请选择性别"
|
||||
border="none"
|
||||
></u--input>
|
||||
<u-icon
|
||||
slot="right"
|
||||
name="arrow-right"
|
||||
></u-icon>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
</view>
|
||||
<view style="font-size: 36rpx;color: #000;font-weight: bold;padding: 0 20rpx;">招工指引</view>
|
||||
<view class="zhiyin">
|
||||
@@ -44,6 +81,15 @@
|
||||
<view class="btn">提交</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-action-sheet
|
||||
:show="showSex"
|
||||
:actions="actions"
|
||||
title="请选择性别"
|
||||
description="如果选择保密会报错"
|
||||
@close="showSex = false"
|
||||
@select="sexSelect"
|
||||
>
|
||||
</u-action-sheet>
|
||||
<CustomTabbar :currentpage="1"></CustomTabbar>
|
||||
</view>
|
||||
</template>
|
||||
@@ -55,7 +101,41 @@
|
||||
components: {CustomTabbar, CustomNavbar},
|
||||
data() {
|
||||
return {
|
||||
value2: '招工内容'
|
||||
value2: '招工内容',
|
||||
showSex: false,
|
||||
model1: {
|
||||
userInfo: {
|
||||
name: 'uView UI',
|
||||
sex: '',
|
||||
},
|
||||
},
|
||||
actions: [{
|
||||
name: '男',
|
||||
},
|
||||
{
|
||||
name: '女',
|
||||
},
|
||||
{
|
||||
name: '保密',
|
||||
},
|
||||
],
|
||||
rules: {
|
||||
'userInfo.name': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '请填写姓名',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
'userInfo.sex': {
|
||||
type: 'string',
|
||||
max: 1,
|
||||
required: true,
|
||||
message: '请选择男或女',
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
},
|
||||
radio: '',
|
||||
switchVal: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
Reference in New Issue
Block a user