Browse Source

feat:优化 formData 放在 searchPlaceholder 前面,移除 wd-radio-group 错误的 size="medium" 属性

YunaiV 4 tháng trước cách đây
mục cha
commit
3676cd702b

+ 6 - 7
src/pages-infra/apiErrorLog/components/search-form.vue

@@ -42,7 +42,7 @@
         <view class="mb-12rpx text-28rpx text-[#666]">
           处理状态
         </view>
-        <wd-radio-group v-model="formData.processStatus" shape="button" size="medium">
+        <wd-radio-group v-model="formData.processStatus" shape="button">
           <wd-radio :value="-1">
             全部
           </wd-radio>
@@ -89,6 +89,11 @@ const emit = defineEmits<{
 }>()
 
 const visible = ref(false)
+const formData = reactive<SearchFormData>({
+  userId: undefined,
+  applicationName: undefined,
+  processStatus: -1,
+})
 
 /** 搜索条件 placeholder 拼接 */
 const searchPlaceholder = computed(() => {
@@ -106,12 +111,6 @@ const searchPlaceholder = computed(() => {
   return conditions.length > 0 ? conditions.join(' | ') : '搜索日志'
 })
 
-const formData = reactive<SearchFormData>({
-  userId: undefined,
-  applicationName: undefined,
-  processStatus: -1,
-})
-
 /** 监听弹窗打开,同步外部参数 */
 watch(visible, (val) => {
   if (val && props.searchParams) {

+ 5 - 6
src/pages-system/dept/components/search-form.vue

@@ -33,7 +33,7 @@
         <view class="mb-12rpx text-28rpx text-[#666]">
           状态
         </view>
-        <wd-radio-group v-model="formData.status" shape="button" size="medium">
+        <wd-radio-group v-model="formData.status" shape="button">
           <wd-radio :value="-1">
             全部
           </wd-radio>
@@ -79,6 +79,10 @@ const emit = defineEmits<{
 }>()
 
 const visible = ref(false)
+const formData = reactive<SearchFormData>({
+  name: undefined,
+  status: -1,
+})
 
 /** 搜索条件 placeholder 拼接 */
 const searchPlaceholder = computed(() => {
@@ -92,11 +96,6 @@ const searchPlaceholder = computed(() => {
   return conditions.length > 0 ? conditions.join(' | ') : '搜索部门'
 })
 
-const formData = reactive<SearchFormData>({
-  name: undefined,
-  status: -1,
-})
-
 /** 监听弹窗打开,同步外部参数 */
 watch(visible, (val) => {
   if (val && props.searchParams) {

+ 6 - 7
src/pages-system/post/components/search-form.vue

@@ -43,7 +43,7 @@
         <view class="mb-12rpx text-28rpx text-[#666]">
           状态
         </view>
-        <wd-radio-group v-model="formData.status" shape="button" size="medium">
+        <wd-radio-group v-model="formData.status" shape="button">
           <wd-radio :value="-1">
             全部
           </wd-radio>
@@ -90,6 +90,11 @@ const emit = defineEmits<{
 }>()
 
 const visible = ref(false)
+const formData = reactive<SearchFormData>({
+  name: undefined,
+  code: undefined,
+  status: -1,
+})
 
 /** 搜索条件 placeholder 拼接 */
 const searchPlaceholder = computed(() => {
@@ -106,12 +111,6 @@ const searchPlaceholder = computed(() => {
   return conditions.length > 0 ? conditions.join(' | ') : '搜索岗位'
 })
 
-const formData = reactive<SearchFormData>({
-  name: undefined,
-  code: undefined,
-  status: -1,
-})
-
 /** 监听弹窗打开,同步外部参数 */
 watch(visible, (val) => {
   if (val && props.searchParams) {

+ 6 - 7
src/pages-system/role/components/search-form.vue

@@ -43,7 +43,7 @@
         <view class="mb-12rpx text-28rpx text-[#666]">
           状态
         </view>
-        <wd-radio-group v-model="formData.status" shape="button" size="medium">
+        <wd-radio-group v-model="formData.status" shape="button">
           <wd-radio :value="-1">
             全部
           </wd-radio>
@@ -90,6 +90,11 @@ const emit = defineEmits<{
 }>()
 
 const visible = ref(false)
+const formData = reactive<SearchFormData>({
+  name: undefined,
+  code: undefined,
+  status: -1,
+})
 
 /** 搜索条件 placeholder 拼接 */
 const searchPlaceholder = computed(() => {
@@ -106,12 +111,6 @@ const searchPlaceholder = computed(() => {
   return conditions.length > 0 ? conditions.join(' | ') : '搜索角色'
 })
 
-const formData = reactive<SearchFormData>({
-  name: undefined,
-  code: undefined,
-  status: -1,
-})
-
 /** 监听弹窗打开,同步外部参数 */
 watch(visible, (val) => {
   if (val && props.searchParams) {

+ 1 - 1
src/pages-system/user/form/index.vue

@@ -59,7 +59,7 @@
             placeholder="请输入手机号码"
           />
           <wd-cell title="性别" title-width="180rpx" center prop="sex">
-            <wd-radio-group v-model="formData.sex" shape="button" size="medium">
+            <wd-radio-group v-model="formData.sex" shape="button">
               <wd-radio v-for="dict in getIntDictOptions(DICT_TYPE.SYSTEM_USER_SEX)" :key="dict.value" :value="dict.value">
                 {{ dict.label }}
               </wd-radio>

+ 8 - 8
src/pages/bpm/components/done-search-form.vue

@@ -57,7 +57,7 @@
         <view class="mb-12rpx text-28rpx text-[#666]">
           审批状态
         </view>
-        <wd-radio-group v-model="formData.status" shape="button" size="medium">
+        <wd-radio-group v-model="formData.status" shape="button">
           <wd-radio :value="-1">
             全部
           </wd-radio>
@@ -158,6 +158,13 @@ const emit = defineEmits<{
 }>()
 
 const visible = ref(false)
+const formData = reactive<DoneSearchFormData>({
+  name: undefined,
+  processDefinitionKey: undefined,
+  category: undefined,
+  status: -1,
+  createTime: [undefined, undefined],
+})
 
 /** 搜索条件 placeholder 拼接 */
 const searchPlaceholder = computed(() => {
@@ -176,13 +183,6 @@ const searchPlaceholder = computed(() => {
 
 const categoryList = ref<Category[]>([])
 const processDefinitionList = ref<ProcessDefinition[]>([])
-const formData = reactive<DoneSearchFormData>({
-  name: undefined,
-  processDefinitionKey: undefined,
-  category: undefined,
-  status: -1,
-  createTime: [undefined, undefined],
-})
 
 // 时间选择器状态
 const showStartPicker = ref(false)

+ 8 - 8
src/pages/bpm/components/my-search-form.vue

@@ -96,7 +96,7 @@
         <view class="mb-12rpx text-28rpx text-[#666]">
           流程状态
         </view>
-        <wd-radio-group v-model="formData.status" shape="button" size="medium">
+        <wd-radio-group v-model="formData.status" shape="button">
           <wd-radio :value="-1">
             全部
           </wd-radio>
@@ -158,6 +158,13 @@ const emit = defineEmits<{
 }>()
 
 const visible = ref(false)
+const formData = reactive<MySearchFormData>({
+  name: undefined,
+  processDefinitionId: undefined,
+  createTime: [undefined, undefined],
+  status: -1,
+  categoryId: undefined,
+})
 
 /** 搜索条件 placeholder 拼接 */
 const searchPlaceholder = computed(() => {
@@ -176,13 +183,6 @@ const searchPlaceholder = computed(() => {
 
 const categoryList = ref<Category[]>([])
 const processDefinitionList = ref<ProcessDefinition[]>([])
-const formData = reactive<MySearchFormData>({
-  name: undefined,
-  processDefinitionId: undefined,
-  createTime: [undefined, undefined],
-  status: -1,
-  categoryId: undefined,
-})
 
 // 时间选择器状态
 const showStartPicker = ref(false)

+ 8 - 8
src/pages/bpm/components/todo-search-form.vue

@@ -57,7 +57,7 @@
         <view class="mb-12rpx text-28rpx text-[#666]">
           流程状态
         </view>
-        <wd-radio-group v-model="formData.status" shape="button" size="medium">
+        <wd-radio-group v-model="formData.status" shape="button">
           <wd-radio :value="-1">
             全部
           </wd-radio>
@@ -158,6 +158,13 @@ const emit = defineEmits<{
 }>()
 
 const visible = ref(false)
+const formData = reactive<TodoSearchFormData>({
+  name: undefined,
+  processDefinitionKey: undefined,
+  category: undefined,
+  status: -1,
+  createTime: [undefined, undefined],
+})
 
 /** 搜索条件 placeholder 拼接 */
 const searchPlaceholder = computed(() => {
@@ -176,13 +183,6 @@ const searchPlaceholder = computed(() => {
 
 const categoryList = ref<Category[]>([])
 const processDefinitionList = ref<ProcessDefinition[]>([])
-const formData = reactive<TodoSearchFormData>({
-  name: undefined,
-  processDefinitionKey: undefined,
-  category: undefined,
-  status: -1,
-  createTime: [undefined, undefined],
-})
 
 // 时间选择器状态
 const showStartPicker = ref(false)

+ 5 - 6
src/pages/message/components/search-form.vue

@@ -33,7 +33,7 @@
         <view class="mb-12rpx text-28rpx text-[#666]">
           公告状态(0正常 1关闭)
         </view>
-        <wd-radio-group v-model="formData.status" shape="button" size="medium">
+        <wd-radio-group v-model="formData.status" shape="button">
           <wd-radio :value="-1">
             全部
           </wd-radio>
@@ -81,6 +81,10 @@ const emit = defineEmits<{
 }>()
 
 const visible = ref(false)
+const formData = reactive<SearchFormData>({
+  title: undefined,
+  status: -1 as number,
+})
 
 /** 搜索条件 placeholder 拼接 */
 const searchPlaceholder = computed(() => {
@@ -94,11 +98,6 @@ const searchPlaceholder = computed(() => {
   return conditions.length > 0 ? conditions.join(' | ') : '搜索通知公告'
 })
 
-const formData = reactive<SearchFormData>({
-  title: undefined,
-  status: -1 as number,
-})
-
 watch(visible, (val) => {
   if (val && props.searchParams) {
     formData.title = props.searchParams.title