表单开发

This commit is contained in:
zxy
2024-03-08 19:51:27 +08:00
parent d6cb4f1f68
commit 65cc77cf06
3 changed files with 87 additions and 7 deletions

View File

@@ -15,11 +15,11 @@
<view class="form-wrapper"> <view class="form-wrapper">
<view class="require">您的招工需求</view> <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-group style="margin: 20rpx 0;">
<u-cell title="技能要求" :isLink="true"></u-cell> <u-cell title="技能要求" :isLink="true"></u-cell>
<u-cell title="任务区域" :isLink="true" value=""></u-cell> <u-cell title="任务区域" :isLink="true" value=""></u-cell>
</u-cell-group> </u-cell-group> -->
</view> </view>
<view style="font-size: 36rpx;color: #000;font-weight: bold;padding: 0 20rpx;">招工指引</view> <view style="font-size: 36rpx;color: #000;font-weight: bold;padding: 0 20rpx;">招工指引</view>
<view class="zhiyin"> <view class="zhiyin">

View File

@@ -17,11 +17,48 @@
<view class="form-wrapper"> <view class="form-wrapper">
<view class="require">您的招工需求</view> <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-group style="margin: 20rpx 0;">
<u-cell title="技能要求" :isLink="true"></u-cell> <u-cell title="技能要求" :isLink="true"></u-cell>
<u-cell title="任务区域" :isLink="true" value=""></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>
<view style="font-size: 36rpx;color: #000;font-weight: bold;padding: 0 20rpx;">招工指引</view> <view style="font-size: 36rpx;color: #000;font-weight: bold;padding: 0 20rpx;">招工指引</view>
<view class="zhiyin"> <view class="zhiyin">
@@ -44,6 +81,15 @@
<view class="btn">提交</view> <view class="btn">提交</view>
</view> </view>
</view> </view>
<u-action-sheet
:show="showSex"
:actions="actions"
title="请选择性别"
description="如果选择保密会报错"
@close="showSex = false"
@select="sexSelect"
>
</u-action-sheet>
<CustomTabbar :currentpage="1"></CustomTabbar> <CustomTabbar :currentpage="1"></CustomTabbar>
</view> </view>
</template> </template>
@@ -55,7 +101,41 @@
components: {CustomTabbar, CustomNavbar}, components: {CustomTabbar, CustomNavbar},
data() { data() {
return { 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: { methods: {

View File

@@ -3,8 +3,8 @@ module.exports = {
port: 1887, port: 1887,
proxy: { proxy: {
'/api': { '/api': {
// target: 'http://192.168.3.104:8000', // 本地服务接口地址 target: 'http://192.168.3.108:8000', // 本地服务接口地址
target: "http://39.98.184.58:8000", // 阿里云后台地址 // target: "http://39.98.184.58:8000", // 阿里云后台地址
// target: "http://192.168.0.101:8000", // 本地网关 // target: "http://192.168.0.101:8000", // 本地网关
// target: 'http://192.168.3.111:8000', // 本地服务接口地址 // target: 'http://192.168.3.111:8000', // 本地服务接口地址
ws: true, ws: true,