cwg-complex-search.vue 23 KB

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