cwg-complex-search.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677
  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" :data-tooltip="field.placeholder" data-placement="top"/>
  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)" :data-tooltip="field.placeholder" data-placement="top"/>
  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. console.log(fields)
  303. if (!fields?.length) return ''
  304. return JSON.stringify(
  305. fields.filter(Boolean).map((field) => ({
  306. key: field.key,
  307. type: field.type,
  308. defaultValue: field.defaultValue,
  309. optionsLength: Array.isArray(field.options) ? field.options.length : 0,
  310. optionValues: Array.isArray(field.options)
  311. ? field.options.map((o) => o?.value ?? o?.text ?? o)
  312. : undefined,
  313. }))
  314. )
  315. }
  316. let fieldsSignature = ''
  317. // 监听外部 modelValue 变化
  318. watch(() => props.modelValue, (newVal) => {
  319. if (!newVal) return
  320. const incoming = clonePlain(newVal)
  321. const next = { ...formData.value }
  322. props.fields.forEach(field => {
  323. if (incoming[field.key] != null) {
  324. next[field.key] = incoming[field.key]
  325. } else if (field.type === 'date' || field.type === 'daterange') {
  326. next[field.key] = getDefaultDateValue(field)
  327. }
  328. })
  329. if (isEqual(next, formData.value)) return
  330. formData.value = next
  331. tempFormData.value = clonePlain(next)
  332. }, { deep: true, immediate: true })
  333. // 监听内部 formData 变化,同步到外部
  334. watch(formData, (newVal) => {
  335. const outgoing = clonePlain(newVal)
  336. if (isEqual(outgoing, props.modelValue)) return
  337. emit('update:modelValue', outgoing)
  338. }, { deep: true })
  339. // 重置表单(清空所有字段)
  340. const resetForm = () => {
  341. const empty = {}
  342. props.fields.forEach(field => {
  343. // 有默认值 → 用默认值
  344. if (field.defaultValue !== undefined) {
  345. empty[field.key] = field.defaultValue
  346. }
  347. // 日期字段 → 用默认日期
  348. else if (field.type === 'date' || field.type === 'daterange') {
  349. empty[field.key] = getDefaultDateValue(field)
  350. }
  351. // select 类型字段如果没有默认值,置空
  352. else if (field.type === 'select') {
  353. empty[field.key] = null
  354. }
  355. // 无默认值 → 清空
  356. else {
  357. empty[field.key] = ''
  358. }
  359. })
  360. formData.value = empty
  361. tempFormData.value = JSON.parse(JSON.stringify(empty)) // 👈 加这行
  362. nextTick(() => {
  363. tempFormData.value = { ...empty }
  364. formData.value = { ...empty }
  365. nextTick(() => {
  366. if (dateField.value) {
  367. handleDateChange(formData.value[dateField.value.key])
  368. }
  369. })
  370. })
  371. emit('reset', empty)
  372. }
  373. // 触发查询
  374. const handleSearch = () => {
  375. if (!isRouteOnTop(ownerPageRoute.value)) return
  376. emit('search', { ...formData.value })
  377. }
  378. // 移动端:打开弹窗
  379. const openFilterPopup = () => {
  380. // 复制当前表单数据到临时对象
  381. tempFormData.value = JSON.parse(JSON.stringify(formData.value))
  382. visible.value = true
  383. }
  384. const closePopup = () => {
  385. visible.value = false
  386. }
  387. const resetTempForm = () => {
  388. const empty = {}
  389. props.fields.forEach(field => {
  390. // 有默认值 → 用默认值
  391. if (field.defaultValue !== undefined) {
  392. empty[field.key] = field.defaultValue
  393. }
  394. // 日期字段 → 用默认日期
  395. else if (field.type === 'date' || field.type === 'daterange') {
  396. empty[field.key] = getDefaultDateValue(field)
  397. }
  398. // select 类型字段如果没有默认值,置空
  399. else if (field.type === 'select') {
  400. empty[field.key] = null
  401. }
  402. // 无默认值 → 清空
  403. else {
  404. empty[field.key] = ''
  405. }
  406. })
  407. tempFormData.value = empty
  408. formData.value = JSON.parse(JSON.stringify(empty)) // 👈 加这行
  409. // 👇 强制日期组件刷新选中状态
  410. nextTick(() => {
  411. formData.value = { ...empty }
  412. tempFormData.value = { ...empty }
  413. nextTick(() => {
  414. if (dateField.value) {
  415. handleDateChange(formData.value[dateField.value.key])
  416. }
  417. handleSearch()
  418. })
  419. })
  420. }
  421. const applyFilter = () => {
  422. // 将临时数据同步到正式表单
  423. formData.value = JSON.parse(JSON.stringify(tempFormData.value))
  424. closePopup()
  425. handleSearch()
  426. }
  427. // 仅 fields 结构变化时重新初始化
  428. watch(
  429. () => props.fields,
  430. (fields) => {
  431. const nextSig = getFieldsSignature(fields)
  432. if (nextSig === fieldsSignature) return
  433. fieldsSignature = nextSig
  434. initFormData()
  435. },
  436. { deep: false }
  437. )
  438. onMounted(() => {
  439. const pages = getCurrentPages()
  440. ownerPageRoute.value = pages[pages.length - 1]?.route || ''
  441. fieldsSignature = getFieldsSignature(props.fields)
  442. initFormData()
  443. })
  444. </script>
  445. <style lang="scss" scoped>
  446. @import "@/uni.scss";
  447. .complex-search {
  448. width: 100%;
  449. }
  450. .search-bar {
  451. .cwg-combox,
  452. .uni-easyinput{
  453. width: px2rpx(240) !important;
  454. flex: none;
  455. }
  456. :deep(.uni-easyinput__content) {
  457. height: px2rpx(35) !important;
  458. min-height: px2rpx(35) !important;
  459. }
  460. :deep(.uni-easyinput__content-input) {
  461. height: px2rpx(35) !important;
  462. }
  463. .uni-date {
  464. width: px2rpx(250) !important;
  465. flex: none;
  466. }
  467. .form-actions {
  468. display: flex;
  469. justify-content: flex-end;
  470. align-items: center;
  471. gap: px2rpx(10);
  472. .reset-btn,
  473. .search-btn {
  474. background-color: var(--btn-color);
  475. height: px2rpx(35);
  476. min-height: px2rpx(35);
  477. line-height: px2rpx(35);
  478. padding: 0 px2rpx(16);
  479. margin: 0;
  480. box-sizing: border-box;
  481. font-size: px2rpx(14);
  482. }
  483. .toggle-btn {
  484. display: inline-flex;
  485. align-items: center;
  486. gap: px2rpx(4);
  487. background: transparent;
  488. border: none;
  489. color: #666;
  490. font-size: px2rpx(14);
  491. line-height: px2rpx(35);
  492. padding: 0 px2rpx(12);
  493. cursor: pointer;
  494. &::after {
  495. border: none;
  496. }
  497. &:active {
  498. opacity: 0.7;
  499. }
  500. }
  501. }
  502. }
  503. .mobile-filter {
  504. margin-bottom: px2rpx(10);
  505. display: flex;
  506. align-items: center;
  507. justify-content: center;
  508. gap: px2rpx(12);
  509. .mobile-date-wrapper {
  510. flex: 1;
  511. }
  512. .filter-chip {
  513. display: inline-flex;
  514. align-items: center;
  515. justify-content: center;
  516. gap: px2rpx(12);
  517. background-color: #ffffff;
  518. border: 1px solid #e5e5e5;
  519. border-radius: px2rpx(4);
  520. padding: px2rpx(0) px2rpx(8);
  521. font-size: px2rpx(16);
  522. font-weight: 500;
  523. color: var(--bs-emphasis-color);
  524. line-height: px2rpx(35);
  525. transition: all 0.2s ease;
  526. box-shadow: none;
  527. .iconfont,
  528. .uni-icons {
  529. font-size: 32rpx;
  530. color: var(--bs-emphasis-color);
  531. }
  532. /* 按下反馈效果 */
  533. &:active {
  534. transform: scale(0.96);
  535. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  536. /* 轻量点击背景色 */
  537. border-color: #b9bfc7;
  538. }
  539. &::after {
  540. border: none;
  541. }
  542. }
  543. }
  544. /* 弹窗整体优化 */
  545. .drawer-content {
  546. padding: px2rpx(20);
  547. border-radius: px2rpx(16);
  548. //min-height: 40vh;
  549. box-sizing: border-box;
  550. .label {
  551. font-size: px2rpx(18);
  552. font-weight: 600;
  553. color: #2c3e50;
  554. margin-bottom: px2rpx(20);
  555. letter-spacing: px2rpx(1);
  556. }
  557. :deep(.uni-scroll-view) {
  558. //min-height: px2rpx(200);
  559. }
  560. :deep(.uni-scroll-view-content) {
  561. display: flex;
  562. flex-direction: column;
  563. gap: px2rpx(20);
  564. overflow: visible;
  565. }
  566. :deep(uni-button) {
  567. line-height: px2rpx(35);
  568. }
  569. /* ========== Chip 胶囊样式 (移动端筛选弹窗) ========== */
  570. .chip-group {
  571. margin-bottom: px2rpx(20);
  572. .chip-list {
  573. display: flex;
  574. flex-wrap: wrap;
  575. gap: px2rpx(16);
  576. }
  577. .chip {
  578. display: inline-flex;
  579. align-items: center;
  580. justify-content: center;
  581. padding: px2rpx(4) px2rpx(12);
  582. border-radius: px2rpx(64);
  583. font-size: px2rpx(14);
  584. font-weight: 500;
  585. transition: all 0.2s ease;
  586. background-color: #ffffff;
  587. border: px2rpx(1) solid #d1d5db;
  588. color: var(--bs-emphasis-color);
  589. cursor: pointer;
  590. &:active {
  591. transform: scale(0.96);
  592. }
  593. /* 填充样式(选中) */
  594. &.chip-filled {
  595. background-color: #cf1322;
  596. border-color: #cf1322;
  597. color: #ffffff;
  598. }
  599. /* 轮廓样式(未选中) */
  600. &.chip-outlined {
  601. background-color: #ffffff;
  602. border-color: #d1d5db;
  603. color: var(--bs-emphasis-color);
  604. }
  605. }
  606. }
  607. }
  608. .search-dialog{
  609. .search-btn{
  610. color: var(--btn-color);
  611. }
  612. }
  613. </style>