cwg-complex-search.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675
  1. <template>
  2. <view class="complex-search">
  3. <!-- PC/平板端:直接显示表单 -->
  4. <cwg-match-media :min-width="991">
  5. <view class="search-bar search-form">
  6. <view v-for="(row, rowIndex) in displayRows" :key="rowIndex" class="form-row">
  7. <view v-for="field in row" :key="field.key" class="form-item">
  8. <view class="search-bar">
  9. <!-- 根据字段类型渲染不同组件 -->
  10. <template v-if="field.type === 'input'">
  11. <uni-easyinput v-model="formData[field.key]" :placeholder="field.placeholder || '请输入'"
  12. clearable />
  13. </template>
  14. <template v-else-if="field.type === 'select'">
  15. <cwg-combox v-model:value="formData[field.key]" :options="field.options"
  16. :placeholder="field.placeholder || '请选择'" :clearable="field.clearable || false"
  17. @change="(e) => field.onChange?.(e) || handleSearch()" />
  18. </template>
  19. <template v-else-if="field.type === 'date'">
  20. <uni-datetime-picker :start="dateLimit.start" :end="dateLimit.end"
  21. v-model="formData[field.key]" type="date"
  22. :placeholder="field.placeholder || '请选择日期'" @change="handleDateChange" />
  23. </template>
  24. <template v-else-if="field.type === 'daterange'">
  25. <uni-datetime-picker class="cursor-pointer" :start="dateLimit.start" :end="dateLimit.end"
  26. v-model="formData[field.key]" type="daterange"
  27. :placeholder="field.placeholder || '请选择日期范围'" @change="handleDateChange" />
  28. </template>
  29. <template v-else-if="field.type === 'picker'">
  30. <uni-data-picker class="cursor-pointer" style="min-width: 100px" v-model="formData[field.key]"
  31. :localdata="field.options" :popup-title="field.popupTitle || t('State.All')"
  32. :map="field.map || { value: 'value', text: 'label' }"
  33. @change="(e) => field.onChange?.(e)"
  34. @nodeclick="(node) => field.onNodeClick?.(node)" />
  35. </template>
  36. <template v-else-if="field.type === 'number'">
  37. <uni-easyinput v-model="formData[field.key]" type="number"
  38. :placeholder="field.placeholder || '请输入数字'" />
  39. </template>
  40. </view>
  41. </view>
  42. </view>
  43. <view class="form-actions">
  44. <button v-if="hasMoreFields" class="search-btn" @click="toggleShowAll">
  45. <text>{{ showAllFields ? t('vu.Btn.Hide') : t('vu.Btn.More') }}</text>
  46. </button>
  47. <button class="search-btn" @click="handleSearch" v-t="'Btn.Search'" />
  48. </view>
  49. </view>
  50. </cwg-match-media>
  51. <cwg-match-media :max-width="991">
  52. <!-- 移动端:只显示筛选按钮,点击弹出底部抽屉 -->
  53. <view class="mobile-filter">
  54. <view v-if="dateField" class="mobile-date-wrapper">
  55. <uni-datetime-picker class="cursor-pointer" :start="dateLimit.start" :end="dateLimit.end" v-model="formData[dateField.key]"
  56. :type="dateField.type === 'daterange' ? 'daterange' : 'date'"
  57. :placeholder="dateField.placeholder || (dateField.type === 'daterange' ? '选择日期范围' : '选择日期')"
  58. @change="handleDateChange" />
  59. </view>
  60. <view v-else class="mobile-date-wrapper"></view>
  61. <button class="filter-chip" @click="openFilterPopup">
  62. <cwg-icon name="cwg-filter" :size="14" color="#141d22" />
  63. <text class="filter-label" v-t="'Documentary.tradingCenter.item3'" />
  64. </button>
  65. </view>
  66. </cwg-match-media>
  67. <cwg-popup v-model:visible="visible" type="center" :mask-click="false" :showFooters="true"
  68. :title="t('Documentary.tradingCenter.item3')" class="search-dialog">
  69. <scroll-view scroll-y class="drawer-content" style="overflow: visible;">
  70. <view v-for="field in nonDateField" :key="field.key" class="filter-item">
  71. <view class="label">{{ field.label }}</view>
  72. <view class="control">
  73. <template v-if="field.type === 'input'">
  74. <uni-easyinput v-model="tempFormData[field.key]" :placeholder="field.placeholder || '请输入'"
  75. clearable />
  76. </template>
  77. <template v-else-if="field.type === 'select'">
  78. <cwg-combox v-model:value="tempFormData[field.key]" :options="field.options"
  79. :placeholder="field.placeholder || '请选择'" :clearable="false" :placement="'bottom'"
  80. v-if="shouldUseSelect(field)" />
  81. <view class="chip-group" v-else>
  82. <view class="chip-list">
  83. <view v-for="opt in field.options" :key="opt.value" class="chip" :class="{
  84. 'chip-filled': tempFormData[field.key] === opt.value,
  85. 'chip-outlined': tempFormData[field.key] !== opt.value
  86. }" @click="selectChip(field.key, opt.value)">
  87. {{ opt.text }}
  88. </view>
  89. </view>
  90. </view>
  91. </template>
  92. <template v-else-if="field.type === 'number'">
  93. <uni-easyinput v-model="tempFormData[field.key]" type="number"
  94. :placeholder="field.placeholder || '请输入数字'" clearable />
  95. </template>
  96. <template v-else-if="field.type === 'picker'">
  97. <uni-data-picker class="cursor-pointer" v-model="tempFormData[field.key]" :localdata="field.options"
  98. :popup-title="field.popupTitle || t('State.All')"
  99. :map="field.map || { value: 'value', text: 'label' }"
  100. @change="(e) => field.onChange?.(e)" @nodeclick="(node) => field.onNodeClick?.(node)" />
  101. </template>
  102. </view>
  103. <view v-if="nonDateField.length == 1" style="height: 25vh;" />
  104. </view>
  105. </scroll-view>
  106. <template #footer>
  107. <!-- <button class="reset-btn" @click="resetTempForm" v-t="'Documentary.tradingCenter.item4'" /> -->
  108. <button class="search-btn" @click="applyFilter" v-t="'Btn.Search'" />
  109. </template>
  110. </cwg-popup>
  111. </view>
  112. </template>
  113. <script setup>
  114. import { ref, computed, watch, onMounted, nextTick, onUnmounted } from 'vue'
  115. import { useI18n } from 'vue-i18n'
  116. import { isRouteOnTop } from '@/utils/pageActive'
  117. const { t } = useI18n()
  118. const props = defineProps({
  119. // 字段配置列表,每个字段包含: key, label, type, options(可选), placeholder(可选)
  120. fields: {
  121. type: Array,
  122. required: true
  123. },
  124. // 每行显示的字段数(PC端),默认3个
  125. columns: {
  126. type: Number,
  127. default: 1
  128. },
  129. // 不设置默认数据
  130. noData: {
  131. type: Boolean,
  132. default: false
  133. },
  134. // 表单初始值 / v-model 绑定值
  135. modelValue: {
  136. type: Object,
  137. default: () => ({})
  138. }
  139. })
  140. const emit = defineEmits(['update:modelValue', 'search', 'reset'])
  141. // 时间选择器限制:今天,近一年
  142. const dateLimit = computed(() => {
  143. const now = new Date()
  144. // 结束日期 = 今天
  145. const endDate = new Date(now)
  146. // 开始日期 = 今天 - 365天
  147. const startDate = new Date(now)
  148. startDate.setDate(startDate.getDate() - 365)
  149. const format = (d) => {
  150. const y = d.getFullYear()
  151. const m = String(d.getMonth() + 1).padStart(2, '0')
  152. const d2 = String(d.getDate()).padStart(2, '0')
  153. return `${y}-${m}-${d2}`
  154. }
  155. return {
  156. start: '',
  157. end: format(endDate)
  158. }
  159. })
  160. // 获取日期字段的默认值(当前月范围:月初 ~ 今天)
  161. const getDefaultDateValue = (field) => {
  162. const now = new Date()
  163. const year = now.getFullYear()
  164. const month = now.getMonth()
  165. // 本月1号
  166. const firstDay = new Date(year, month, 1)
  167. // 今天
  168. const today = new Date()
  169. const formatDate = (date) => {
  170. const y = date.getFullYear()
  171. const m = String(date.getMonth() + 1).padStart(2, '0')
  172. const d = String(date.getDate()).padStart(2, '0')
  173. return `${y}-${m}-${d}`
  174. }
  175. if (field.type === 'daterange') {
  176. return [formatDate(firstDay), formatDate(today)]
  177. } else if (field.type === 'date') {
  178. return formatDate(today)
  179. }
  180. return ''
  181. }
  182. // 表单数据(PC端)
  183. const formData = ref({})
  184. // 移动端临时数据
  185. const tempFormData = ref({})
  186. // 移动端弹窗是否可见
  187. const visible = ref(false)
  188. // 是否显示所有字段
  189. const showAllFields = ref(false)
  190. // 将字段按列数分组(仅用于PC布局)
  191. const formRows = computed(() => {
  192. const rows = []
  193. for (let i = 0; i < props.fields.length; i += props.columns) {
  194. rows.push(props.fields.slice(i, i + props.columns))
  195. }
  196. return rows
  197. })
  198. const winWidth = computed(() => {
  199. console.log(window.innerWidth)
  200. return window.innerWidth
  201. })
  202. // 显示的行(根据 showAllFields 决定)
  203. const displayRows = computed(() => {
  204. if (showAllFields.value) {
  205. return formRows.value
  206. }
  207. // 默认只显示第一行
  208. return winWidth.value>1500 ?formRows.value.slice(0,4):formRows.value.slice(0,3)
  209. })
  210. // 是否有更多字段可以展开
  211. const hasMoreFields = computed(() => {
  212. return formRows.value.length > (winWidth.value > 1500 ? 4 : 3)
  213. })
  214. // 切换显示/隐藏状态
  215. const toggleShowAll = () => {
  216. showAllFields.value = !showAllFields.value
  217. }
  218. const selectChip = (key, value) => {
  219. // 如果点击的是当前已选中的项,可以保持不变,也可以置空(根据需求)
  220. // 此处保持选中该项,不提供取消功能(符合常见筛选行为)
  221. tempFormData.value[key] = value
  222. }
  223. // 初始化表单数据
  224. const initFormData = () => {
  225. const initial = {}
  226. if (!props.noData) {
  227. props.fields.forEach(field => {
  228. // 1. 优先使用外部传入的 modelValue(如果值不为 null 或 undefined)
  229. if (props.modelValue && props.modelValue[field.key] != null) {
  230. initial[field.key] = props.modelValue[field.key]
  231. }
  232. // 2. 其次使用字段配置的 defaultValue
  233. else if (field.defaultValue !== undefined) {
  234. initial[field.key] = field.defaultValue
  235. return
  236. }
  237. // 3. 日期字段特殊处理:默认当前月(即使 modelValue 中存在但为 null/undefined)
  238. else if (field.type === 'date' || field.type === 'daterange') {
  239. initial[field.key] = getDefaultDateValue(field)
  240. }
  241. // 4. select 类型字段如果没有默认值,默认置空,不强制选第一个
  242. else if (field.type === 'select') {
  243. initial[field.key] = null
  244. }
  245. // 5. 其他字段默认为空字符串
  246. else {
  247. initial[field.key] = ''
  248. }
  249. })
  250. }
  251. formData.value = initial
  252. tempFormData.value = JSON.parse(JSON.stringify(initial))
  253. handleSearch()
  254. }
  255. // 获取第一个日期或日期范围字段(用于移动端顶部快捷显示)
  256. const dateField = computed(() => {
  257. return props.fields.find(field => field.type === 'date' || field.type === 'daterange')
  258. })
  259. // 判断字段是否应该使用下拉选择器(用于排序和渲染)
  260. const shouldUseSelect = (field) => {
  261. if (!field.options) return false
  262. return field.options.length > 10 || field.isSelect === true
  263. }
  264. const handleDateChange = (value) => {
  265. formData.value[dateField.value.key] = value
  266. tempFormData.value[dateField.value.key] = value
  267. // 日期变化时自动触发搜索
  268. handleSearch()
  269. }
  270. // 排序:输入框 + 下拉选择器 → 前面;Chip 选择器 → 后面
  271. const nonDateField = computed(() => {
  272. const filtered = props.fields.filter(field => field.type !== 'date' && field.type !== 'daterange')
  273. const priorityFields = []
  274. const otherFields = []
  275. filtered.forEach(field => {
  276. if (field.type === 'input' || field.type === 'number') {
  277. priorityFields.push(field)
  278. }
  279. else if (field.type === 'select') {
  280. if (shouldUseSelect(field)) {
  281. priorityFields.push(field)
  282. } else {
  283. otherFields.push(field)
  284. }
  285. }
  286. else if (field.type === 'picker') {
  287. priorityFields.push(field)
  288. }
  289. else {
  290. otherFields.push(field)
  291. }
  292. })
  293. return [...priorityFields, ...otherFields]
  294. })
  295. const clonePlain = (val) => JSON.parse(JSON.stringify(val ?? {}))
  296. const isEqual = (a, b) => JSON.stringify(a ?? {}) === JSON.stringify(b ?? {})
  297. /** 所属页面 route,离开栈顶后不再 emit search */
  298. const ownerPageRoute = ref('')
  299. /** 仅字段结构变化时重新初始化(语言切换改 label 不触发) */
  300. const getFieldsSignature = (fields) => {
  301. if (!fields?.length) return ''
  302. return JSON.stringify(
  303. fields.filter(Boolean).map((field) => ({
  304. key: field.key,
  305. type: field.type,
  306. defaultValue: field.defaultValue,
  307. optionsLength: Array.isArray(field.options) ? field.options.length : 0,
  308. optionValues: Array.isArray(field.options)
  309. ? field.options.map((o) => o?.value ?? o?.text ?? o)
  310. : undefined,
  311. }))
  312. )
  313. }
  314. let fieldsSignature = ''
  315. // 监听外部 modelValue 变化
  316. watch(() => props.modelValue, (newVal) => {
  317. if (!newVal) return
  318. const incoming = clonePlain(newVal)
  319. const next = { ...formData.value }
  320. props.fields.forEach(field => {
  321. if (incoming[field.key] != null) {
  322. next[field.key] = incoming[field.key]
  323. } else if (field.type === 'date' || field.type === 'daterange') {
  324. next[field.key] = getDefaultDateValue(field)
  325. }
  326. })
  327. if (isEqual(next, formData.value)) return
  328. formData.value = next
  329. tempFormData.value = clonePlain(next)
  330. }, { deep: true, immediate: true })
  331. // 监听内部 formData 变化,同步到外部
  332. watch(formData, (newVal) => {
  333. const outgoing = clonePlain(newVal)
  334. if (isEqual(outgoing, props.modelValue)) return
  335. emit('update:modelValue', outgoing)
  336. }, { deep: true })
  337. // 重置表单(清空所有字段)
  338. const resetForm = () => {
  339. const empty = {}
  340. props.fields.forEach(field => {
  341. // 有默认值 → 用默认值
  342. if (field.defaultValue !== undefined) {
  343. empty[field.key] = field.defaultValue
  344. }
  345. // 日期字段 → 用默认日期
  346. else if (field.type === 'date' || field.type === 'daterange') {
  347. empty[field.key] = getDefaultDateValue(field)
  348. }
  349. // select 类型字段如果没有默认值,置空
  350. else if (field.type === 'select') {
  351. empty[field.key] = null
  352. }
  353. // 无默认值 → 清空
  354. else {
  355. empty[field.key] = ''
  356. }
  357. })
  358. formData.value = empty
  359. tempFormData.value = JSON.parse(JSON.stringify(empty)) // 👈 加这行
  360. nextTick(() => {
  361. tempFormData.value = { ...empty }
  362. formData.value = { ...empty }
  363. nextTick(() => {
  364. if (dateField.value) {
  365. handleDateChange(formData.value[dateField.value.key])
  366. }
  367. })
  368. })
  369. emit('reset', empty)
  370. }
  371. // 触发查询
  372. const handleSearch = () => {
  373. if (!isRouteOnTop(ownerPageRoute.value)) return
  374. emit('search', { ...formData.value })
  375. }
  376. // 移动端:打开弹窗
  377. const openFilterPopup = () => {
  378. // 复制当前表单数据到临时对象
  379. tempFormData.value = JSON.parse(JSON.stringify(formData.value))
  380. visible.value = true
  381. }
  382. const closePopup = () => {
  383. visible.value = false
  384. }
  385. const resetTempForm = () => {
  386. const empty = {}
  387. props.fields.forEach(field => {
  388. // 有默认值 → 用默认值
  389. if (field.defaultValue !== undefined) {
  390. empty[field.key] = field.defaultValue
  391. }
  392. // 日期字段 → 用默认日期
  393. else if (field.type === 'date' || field.type === 'daterange') {
  394. empty[field.key] = getDefaultDateValue(field)
  395. }
  396. // select 类型字段如果没有默认值,置空
  397. else if (field.type === 'select') {
  398. empty[field.key] = null
  399. }
  400. // 无默认值 → 清空
  401. else {
  402. empty[field.key] = ''
  403. }
  404. })
  405. tempFormData.value = empty
  406. formData.value = JSON.parse(JSON.stringify(empty)) // 👈 加这行
  407. // 👇 强制日期组件刷新选中状态
  408. nextTick(() => {
  409. formData.value = { ...empty }
  410. tempFormData.value = { ...empty }
  411. nextTick(() => {
  412. if (dateField.value) {
  413. handleDateChange(formData.value[dateField.value.key])
  414. }
  415. handleSearch()
  416. })
  417. })
  418. }
  419. const applyFilter = () => {
  420. // 将临时数据同步到正式表单
  421. formData.value = JSON.parse(JSON.stringify(tempFormData.value))
  422. closePopup()
  423. handleSearch()
  424. }
  425. // 仅 fields 结构变化时重新初始化
  426. watch(
  427. () => props.fields,
  428. (fields) => {
  429. const nextSig = getFieldsSignature(fields)
  430. if (nextSig === fieldsSignature) return
  431. fieldsSignature = nextSig
  432. initFormData()
  433. },
  434. { deep: false }
  435. )
  436. onMounted(() => {
  437. const pages = getCurrentPages()
  438. ownerPageRoute.value = pages[pages.length - 1]?.route || ''
  439. fieldsSignature = getFieldsSignature(props.fields)
  440. initFormData()
  441. })
  442. </script>
  443. <style lang="scss" scoped>
  444. @import "@/uni.scss";
  445. .complex-search {
  446. width: 100%;
  447. }
  448. .search-bar {
  449. .cwg-combox,
  450. .uni-easyinput{
  451. width: px2rpx(240) !important;
  452. flex: none;
  453. }
  454. :deep(.uni-easyinput__content) {
  455. height: px2rpx(35) !important;
  456. min-height: px2rpx(35) !important;
  457. }
  458. :deep(.uni-easyinput__content-input) {
  459. height: px2rpx(35) !important;
  460. }
  461. .uni-date {
  462. width: px2rpx(250) !important;
  463. flex: none;
  464. }
  465. .form-actions {
  466. display: flex;
  467. justify-content: flex-end;
  468. align-items: center;
  469. gap: px2rpx(10);
  470. .reset-btn,
  471. .search-btn {
  472. background-color: var(--btn-color);
  473. height: px2rpx(35);
  474. min-height: px2rpx(35);
  475. line-height: px2rpx(35);
  476. padding: 0 px2rpx(16);
  477. margin: 0;
  478. box-sizing: border-box;
  479. font-size: px2rpx(14);
  480. }
  481. .toggle-btn {
  482. display: inline-flex;
  483. align-items: center;
  484. gap: px2rpx(4);
  485. background: transparent;
  486. border: none;
  487. color: #666;
  488. font-size: px2rpx(14);
  489. line-height: px2rpx(35);
  490. padding: 0 px2rpx(12);
  491. cursor: pointer;
  492. &::after {
  493. border: none;
  494. }
  495. &:active {
  496. opacity: 0.7;
  497. }
  498. }
  499. }
  500. }
  501. .mobile-filter {
  502. margin-bottom: px2rpx(10);
  503. display: flex;
  504. align-items: center;
  505. justify-content: center;
  506. gap: px2rpx(12);
  507. .mobile-date-wrapper {
  508. flex: 1;
  509. }
  510. .filter-chip {
  511. display: inline-flex;
  512. align-items: center;
  513. justify-content: center;
  514. gap: px2rpx(12);
  515. background-color: #ffffff;
  516. border: 1px solid #e5e5e5;
  517. border-radius: px2rpx(4);
  518. padding: px2rpx(0) px2rpx(8);
  519. font-size: px2rpx(16);
  520. font-weight: 500;
  521. color: var(--bs-emphasis-color);
  522. line-height: px2rpx(35);
  523. transition: all 0.2s ease;
  524. box-shadow: none;
  525. .iconfont,
  526. .uni-icons {
  527. font-size: 32rpx;
  528. color: var(--bs-emphasis-color);
  529. }
  530. /* 按下反馈效果 */
  531. &:active {
  532. transform: scale(0.96);
  533. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  534. /* 轻量点击背景色 */
  535. border-color: #b9bfc7;
  536. }
  537. &::after {
  538. border: none;
  539. }
  540. }
  541. }
  542. /* 弹窗整体优化 */
  543. .drawer-content {
  544. padding: px2rpx(20);
  545. border-radius: px2rpx(16);
  546. //min-height: 40vh;
  547. box-sizing: border-box;
  548. .label {
  549. font-size: px2rpx(18);
  550. font-weight: 600;
  551. color: #2c3e50;
  552. margin-bottom: px2rpx(20);
  553. letter-spacing: px2rpx(1);
  554. }
  555. :deep(.uni-scroll-view) {
  556. //min-height: px2rpx(200);
  557. }
  558. :deep(.uni-scroll-view-content) {
  559. display: flex;
  560. flex-direction: column;
  561. gap: px2rpx(20);
  562. overflow: visible;
  563. }
  564. :deep(uni-button) {
  565. line-height: px2rpx(35);
  566. }
  567. /* ========== Chip 胶囊样式 (移动端筛选弹窗) ========== */
  568. .chip-group {
  569. margin-bottom: px2rpx(20);
  570. .chip-list {
  571. display: flex;
  572. flex-wrap: wrap;
  573. gap: px2rpx(16);
  574. }
  575. .chip {
  576. display: inline-flex;
  577. align-items: center;
  578. justify-content: center;
  579. padding: px2rpx(4) px2rpx(12);
  580. border-radius: px2rpx(64);
  581. font-size: px2rpx(14);
  582. font-weight: 500;
  583. transition: all 0.2s ease;
  584. background-color: #ffffff;
  585. border: px2rpx(1) solid #d1d5db;
  586. color: var(--bs-emphasis-color);
  587. cursor: pointer;
  588. &:active {
  589. transform: scale(0.96);
  590. }
  591. /* 填充样式(选中) */
  592. &.chip-filled {
  593. background-color: #cf1322;
  594. border-color: #cf1322;
  595. color: #ffffff;
  596. }
  597. /* 轮廓样式(未选中) */
  598. &.chip-outlined {
  599. background-color: #ffffff;
  600. border-color: #d1d5db;
  601. color: var(--bs-emphasis-color);
  602. }
  603. }
  604. }
  605. }
  606. .search-dialog{
  607. .search-btn{
  608. color: var(--btn-color);
  609. }
  610. }
  611. </style>