mirror of
https://github.com/YunaiV/ruoyi-vue-pro.git
synced 2026-03-30 03:13:04 +00:00
fix:【infra】代码生成器:微信小程序 search-form.vue 无法点击的问题,因为没 @click 事件
fix:【infra】代码生成器:search-form.vue 的 popup 距离高度不对的问题 feat:【infra】代码生成器:移除 search-form.vue 的 title,简化交互
This commit is contained in:
@@ -1,24 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 搜索框入口 -->
|
<!-- 搜索框入口 -->
|
||||||
<wd-search
|
<view @click="visible = true">
|
||||||
:placeholder="placeholder"
|
<wd-search :placeholder="placeholder" hide-cancel disabled />
|
||||||
:hide-cancel="true"
|
</view>
|
||||||
disabled
|
|
||||||
@click="visible = true"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 搜索弹窗 -->
|
<!-- 搜索弹窗 -->
|
||||||
<wd-popup
|
<wd-popup v-model="visible" position="top" @close="visible = false">
|
||||||
v-model="visible"
|
<view class="yd-search-form-container" :style="{ paddingTop: `#[[${]]#getNavbarHeight()#[[}]]#px` }">
|
||||||
position="top"
|
|
||||||
custom-style="border-radius: 0 0 24rpx 24rpx;"
|
|
||||||
safe-area-inset-top
|
|
||||||
@close="visible = false"
|
|
||||||
>
|
|
||||||
<view class="p-32rpx">
|
|
||||||
<view class="mb-24rpx text-32rpx text-[#333] font-semibold">
|
|
||||||
搜索${table.classComment}
|
|
||||||
</view>
|
|
||||||
#set ($hasDict = 0)
|
#set ($hasDict = 0)
|
||||||
#foreach ($column in $columns)
|
#foreach ($column in $columns)
|
||||||
#if ($hasDict == 0 && $column.listOperation && $column.dictType && "" != $column.dictType)
|
#if ($hasDict == 0 && $column.listOperation && $column.dictType && "" != $column.dictType)
|
||||||
@@ -41,8 +29,8 @@
|
|||||||
#set ($dictMethod = "getBoolDictOptions")
|
#set ($dictMethod = "getBoolDictOptions")
|
||||||
#end
|
#end
|
||||||
#if ($column.htmlType == "input")
|
#if ($column.htmlType == "input")
|
||||||
<view class="mb-24rpx">
|
<view class="yd-search-form-item">
|
||||||
<view class="mb-12rpx text-28rpx text-[#666]">
|
<view class="yd-search-form-label">
|
||||||
${comment}
|
${comment}
|
||||||
</view>
|
</view>
|
||||||
<wd-input
|
<wd-input
|
||||||
@@ -53,49 +41,35 @@
|
|||||||
</view>
|
</view>
|
||||||
#elseif ($column.htmlType == "datetime" && $listOperationCondition == "BETWEEN")
|
#elseif ($column.htmlType == "datetime" && $listOperationCondition == "BETWEEN")
|
||||||
#set ($AttrName = $javaField.substring(0,1).toUpperCase() + ${javaField.substring(1)})
|
#set ($AttrName = $javaField.substring(0,1).toUpperCase() + ${javaField.substring(1)})
|
||||||
<view class="mb-32rpx">
|
<view class="yd-search-form-item">
|
||||||
<view class="mb-12rpx text-28rpx text-[#666]">
|
<view class="yd-search-form-label">
|
||||||
${comment}
|
${comment}
|
||||||
</view>
|
</view>
|
||||||
<view class="flex items-center gap-16rpx">
|
<view class="yd-search-form-date-range-container">
|
||||||
<view class="flex-1" @click="visible${AttrName}[0] = true">
|
<view @click="visible${AttrName}[0] = true">
|
||||||
<view
|
<view class="yd-search-form-date-range-picker">
|
||||||
class="h-72rpx flex items-center justify-center rounded-8rpx bg-[#f5f5f5] px-24rpx text-28rpx"
|
|
||||||
>
|
|
||||||
{{ formatDate(formData.${javaField}?.[0]) || '开始日期' }}
|
{{ formatDate(formData.${javaField}?.[0]) || '开始日期' }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<text class="text-28rpx text-[#999]">至</text>
|
-
|
||||||
<view class="flex-1" @click="visible${AttrName}[1] = true">
|
<view @click="visible${AttrName}[1] = true">
|
||||||
<view
|
<view class="yd-search-form-date-range-picker">
|
||||||
class="h-72rpx flex items-center justify-center rounded-8rpx bg-[#f5f5f5] px-24rpx text-28rpx"
|
|
||||||
>
|
|
||||||
{{ formatDate(formData.${javaField}?.[1]) || '结束日期' }}
|
{{ formatDate(formData.${javaField}?.[1]) || '结束日期' }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<wd-datetime-picker-view
|
<wd-datetime-picker-view v-if="visible${AttrName}[0]" v-model="temp${AttrName}[0]" type="date" />
|
||||||
v-if="visible${AttrName}[0]"
|
<view v-if="visible${AttrName}[0]" class="yd-search-form-date-range-actions">
|
||||||
v-model="temp${AttrName}[0]"
|
<wd-button size="small" plain @click="visible${AttrName}[0] = false">
|
||||||
type="date"
|
|
||||||
:columns-height="200"
|
|
||||||
/>
|
|
||||||
<view v-if="visible${AttrName}[0]" class="mt-16rpx flex justify-end gap-16rpx">
|
|
||||||
<wd-button size="small" plain @click="handle${AttrName}0Cancel">
|
|
||||||
取消
|
取消
|
||||||
</wd-button>
|
</wd-button>
|
||||||
<wd-button size="small" type="primary" @click="handle${AttrName}0Confirm">
|
<wd-button size="small" type="primary" @click="handle${AttrName}0Confirm">
|
||||||
确定
|
确定
|
||||||
</wd-button>
|
</wd-button>
|
||||||
</view>
|
</view>
|
||||||
<wd-datetime-picker-view
|
<wd-datetime-picker-view v-if="visible${AttrName}[1]" v-model="temp${AttrName}[1]" type="date" />
|
||||||
v-if="visible${AttrName}[1]"
|
<view v-if="visible${AttrName}[1]" class="yd-search-form-date-range-actions">
|
||||||
v-model="temp${AttrName}[1]"
|
<wd-button size="small" plain @click="visible${AttrName}[1] = false">
|
||||||
type="date"
|
|
||||||
:columns-height="200"
|
|
||||||
/>
|
|
||||||
<view v-if="visible${AttrName}[1]" class="mt-16rpx flex justify-end gap-16rpx">
|
|
||||||
<wd-button size="small" plain @click="handle${AttrName}1Cancel">
|
|
||||||
取消
|
取消
|
||||||
</wd-button>
|
</wd-button>
|
||||||
<wd-button size="small" type="primary" @click="handle${AttrName}1Confirm">
|
<wd-button size="small" type="primary" @click="handle${AttrName}1Confirm">
|
||||||
@@ -104,8 +78,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
#elseif (($column.htmlType == "select" || $column.htmlType == "radio") && $dictType && "" != $dictType)
|
#elseif (($column.htmlType == "select" || $column.htmlType == "radio") && $dictType && "" != $dictType)
|
||||||
<view class="mb-32rpx">
|
<view class="yd-search-form-item">
|
||||||
<view class="mb-12rpx text-28rpx text-[#666]">
|
<view class="yd-search-form-label">
|
||||||
${comment}
|
${comment}
|
||||||
</view>
|
</view>
|
||||||
<wd-radio-group v-model="formData.${javaField}" shape="button">
|
<wd-radio-group v-model="formData.${javaField}" shape="button">
|
||||||
@@ -122,8 +96,8 @@
|
|||||||
</wd-radio-group>
|
</wd-radio-group>
|
||||||
</view>
|
</view>
|
||||||
#else
|
#else
|
||||||
<view class="mb-24rpx">
|
<view class="yd-search-form-item">
|
||||||
<view class="mb-12rpx text-28rpx text-[#666]">
|
<view class="yd-search-form-label">
|
||||||
${comment}
|
${comment}
|
||||||
</view>
|
</view>
|
||||||
<wd-input
|
<wd-input
|
||||||
@@ -135,7 +109,7 @@
|
|||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
<view class="w-full flex justify-center gap-24rpx">
|
<view class="yd-search-form-actions">
|
||||||
<wd-button class="flex-1" plain @click="handleReset">
|
<wd-button class="flex-1" plain @click="handleReset">
|
||||||
重置
|
重置
|
||||||
</wd-button>
|
</wd-button>
|
||||||
@@ -174,6 +148,7 @@
|
|||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
import { computed, reactive, ref } from 'vue'
|
import { computed, reactive, ref } from 'vue'
|
||||||
|
import { getNavbarHeight } from '@/utils'
|
||||||
#if ($hasDateTimeBetween == 1)
|
#if ($hasDateTimeBetween == 1)
|
||||||
import { formatDate, formatDateRange } from '@/utils/date'
|
import { formatDate, formatDateRange } from '@/utils/date'
|
||||||
#end
|
#end
|
||||||
@@ -276,21 +251,11 @@ function handle${AttrName}0Confirm() {
|
|||||||
visible${AttrName}.value[0] = false
|
visible${AttrName}.value[0] = false
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ${column.columnComment}[0]取消 */
|
|
||||||
function handle${AttrName}0Cancel() {
|
|
||||||
visible${AttrName}.value[0] = false
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ${column.columnComment}[1]确认 */
|
/** ${column.columnComment}[1]确认 */
|
||||||
function handle${AttrName}1Confirm() {
|
function handle${AttrName}1Confirm() {
|
||||||
formData.${javaField} = [formData.${javaField}?.[0], temp${AttrName}.value[1]]
|
formData.${javaField} = [formData.${javaField}?.[0], temp${AttrName}.value[1]]
|
||||||
visible${AttrName}.value[1] = false
|
visible${AttrName}.value[1] = false
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ${column.columnComment}[1]取消 */
|
|
||||||
function handle${AttrName}1Cancel() {
|
|
||||||
visible${AttrName}.value[1] = false
|
|
||||||
}
|
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="page-container">
|
<view class="yd-page-container">
|
||||||
<!-- 顶部导航栏 -->
|
<!-- 顶部导航栏 -->
|
||||||
<wd-navbar
|
<wd-navbar
|
||||||
title="${table.classComment}详情"
|
title="${table.classComment}详情"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="page-container">
|
<view class="yd-page-container">
|
||||||
<!-- 顶部导航栏 -->
|
<!-- 顶部导航栏 -->
|
||||||
<wd-navbar
|
<wd-navbar
|
||||||
:title="getTitle"
|
:title="getTitle"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="page-container">
|
<view class="yd-page-container">
|
||||||
<!-- 顶部导航栏 -->
|
<!-- 顶部导航栏 -->
|
||||||
<wd-navbar
|
<wd-navbar
|
||||||
title="${table.classComment}管理"
|
title="${table.classComment}管理"
|
||||||
|
|||||||
Reference in New Issue
Block a user