|
@@ -5,41 +5,37 @@
|
|
|
aria-label aria-description="You've reached search box under the Exhibitions page; please use the tab key to go through the content."
|
|
|
>
|
|
|
<div class="left">
|
|
|
- <el-input
|
|
|
- style="margin-right: 30px"
|
|
|
- suffix-icon="el-icon-search"
|
|
|
- v-model="txt"
|
|
|
- tabindex="0"
|
|
|
- :aria-description="txt || 'Input search keyword'"
|
|
|
- >
|
|
|
- </el-input>
|
|
|
- <!-- 点击放大镜 -->
|
|
|
<div
|
|
|
- class="clickSearch"
|
|
|
- @click="search"
|
|
|
+ class="text-input-wrapper"
|
|
|
@keydown.enter.passive="search"
|
|
|
- tabindex="0"
|
|
|
- aria-label="Button"
|
|
|
- aria-description="Search"
|
|
|
- ></div>
|
|
|
- <!-- 使用这个组件无法在选择年份过程中得到选项的无障碍信息,所以改用原生元素 -->
|
|
|
- <!-- <el-select
|
|
|
- v-model="year"
|
|
|
- clearable
|
|
|
- placeholder="Select Year"
|
|
|
- @change="elSelectChange"
|
|
|
- tabindex="0"
|
|
|
- aria-label="Select"
|
|
|
- aria-description="Select Year"
|
|
|
>
|
|
|
- <el-option value="2021" label="2021"></el-option>
|
|
|
- <el-option value="2020" label="2020"></el-option>
|
|
|
- <el-option value="2019" label="2019"></el-option>
|
|
|
- <el-option value="2018" label="2018"></el-option>
|
|
|
- <el-option value="2017" label="2017"></el-option>
|
|
|
- <el-option value="2016" label="2016"></el-option>
|
|
|
- <el-option value="2015" label="2015"></el-option>
|
|
|
- </el-select> -->
|
|
|
+ <input
|
|
|
+ type="text"
|
|
|
+ autocomplete="off"
|
|
|
+ v-model="txt"
|
|
|
+ tabindex="0"
|
|
|
+ :aria-description="txt || 'search'"
|
|
|
+ />
|
|
|
+ <img v-if="themeIdx === 0" :src="require('@/assets/images/search-default-color.svg')" alt=""
|
|
|
+ @click="search"
|
|
|
+ tabindex="0"
|
|
|
+ aria-label="Link"
|
|
|
+ aria-description="search"
|
|
|
+ >
|
|
|
+ <img v-if="[1, 3].includes(themeIdx)" :src="require('@/assets/images/search-black.svg')" alt=""
|
|
|
+ @click="search"
|
|
|
+ tabindex="0"
|
|
|
+ aria-label="Link"
|
|
|
+ aria-description="search"
|
|
|
+ >
|
|
|
+ <img v-if="[2, 4].includes(themeIdx)" :src="require('@/assets/images/search-yellow.svg')" alt=""
|
|
|
+ @click="search"
|
|
|
+ tabindex="0"
|
|
|
+ aria-label="Link"
|
|
|
+ aria-description="search"
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ <!-- 使用el-select组件会无法在选择年份过程中得到选项的无障碍信息,所以改用原生元素 -->
|
|
|
<select
|
|
|
id="year-selector"
|
|
|
v-model="year"
|
|
@@ -140,10 +136,12 @@
|
|
|
|
|
|
<script>
|
|
|
import { dataAll } from "@/views/dataAll.js";
|
|
|
+import accessibilityMixin from "/src/views/accessibilityMixin.js"
|
|
|
|
|
|
export default {
|
|
|
name: "ExhibitionsList",
|
|
|
components: {},
|
|
|
+ mixins: [accessibilityMixin],
|
|
|
data() {
|
|
|
//这里存放数据
|
|
|
return {
|
|
@@ -266,38 +264,39 @@ export default {
|
|
|
.search {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
.left {
|
|
|
position: relative;
|
|
|
display: flex;
|
|
|
width: 820px;
|
|
|
height: 48px;
|
|
|
- /deep/.el-input {
|
|
|
+ .text-input-wrapper {
|
|
|
height: 48px;
|
|
|
- }
|
|
|
- /deep/.el-input__inner {
|
|
|
- height: 48px;
|
|
|
- border-radius: 24px;
|
|
|
- }
|
|
|
- /deep/.el-input__suffix {
|
|
|
- right: 10px;
|
|
|
- font-size: 24px;
|
|
|
- }
|
|
|
- /deep/.el-input__icon {
|
|
|
- line-height: 48px;
|
|
|
- color: black;
|
|
|
- }
|
|
|
- .clickSearch {
|
|
|
- cursor: pointer;
|
|
|
- z-index: 999;
|
|
|
- position: absolute;
|
|
|
- width: 48px;
|
|
|
- height: 48px;
|
|
|
- border-radius: 50%;
|
|
|
- right: 174px;
|
|
|
- top: 0;
|
|
|
+ background: white;
|
|
|
+ border: 1px solid #c7c7c7;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ margin-right: 30px;
|
|
|
+ > input {
|
|
|
+ height: 100%;
|
|
|
+ font-size: 24px;
|
|
|
+ border: none;
|
|
|
+ padding: 0px 10px;
|
|
|
+ width: 500px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ border: none;
|
|
|
+ margin: 0;
|
|
|
+ outline: none;
|
|
|
+ }
|
|
|
+ > img {
|
|
|
+ height: 30px;
|
|
|
+ width: 30px;
|
|
|
+ margin-left: 10px;
|
|
|
+ margin-right: 10px;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
}
|
|
|
.yearSelector {
|
|
|
- border-radius: 10px;
|
|
|
border-color: #c0c4cc;
|
|
|
width: 180px;
|
|
|
padding-left: 10px;
|