dev01 1 yıl önce
ebeveyn
işleme
2cb2dabf50
2 değiştirilmiş dosya ile 3 ekleme ve 11 silme
  1. 3 4
      src/pages/project/index.jsx
  2. 0 7
      src/utils/tools/config.js

+ 3 - 4
src/pages/project/index.jsx

@@ -9,8 +9,6 @@ import {
   AtTabsPane,
   AtIcon,
 } from 'taro-ui';
-import { dateList } from '../../utils/tools/config';
-
 import './index.less';
 
 import "taro-ui/dist/style/components/search-bar.scss";
@@ -207,10 +205,11 @@ class Project extends Component {
               <View className='searchItem' style={{ paddingLeft: '5px' }}>
                 <Picker
                   value={this.state.starts}
-                  range={dateList} mode='selector'
+                  mode='date'
+                  fields="year"
                   onChange={(e) => {
                     this.setState({
-                      starts: dateList[e.detail.value],
+                      starts: e.detail.value,
                     }, () => {
                       this.getProjectList();
                     })

+ 0 - 7
src/utils/tools/config.js

@@ -65,10 +65,3 @@ export const stageList = [
     value: 3,
   },
 ];
-
-export const dateList = [
-  "2016","2017","2018","2019","2020",
-  "2021","2022","2023","2024","2025",
-  "2026","2027","2028","2029","2030",
-  "2031","2032","2033","2034","2035",
-]