Skip to content
This repository has been archived by the owner on Oct 27, 2021. It is now read-only.

Commit

Permalink
feat: add page navigate
Browse files Browse the repository at this point in the history
  • Loading branch information
pengshanglong committed May 21, 2020
1 parent 0b61c14 commit e9ee800
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 43 deletions.
2 changes: 1 addition & 1 deletion src/app.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export default {
pages: ['pages/demo/index'],
pages: ['pages/demo/index', 'pages/index/index'],
window: {
backgroundTextStyle: 'light',
navigationBarBackgroundColor: '#fff',
Expand Down
16 changes: 12 additions & 4 deletions src/pages/demo/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
<AtTag
type="primary"
circle
:on-click="handleClick"
>
标签
index page
</AtTag>
<!-- <picker
mode="date"
Expand All @@ -28,6 +29,7 @@
</view>
</template>
<script>
import Taro from '@tarojs/taro'
import { AtCalendar } from '../../components'
import { AtIcon, AtTag } from '../../components'
export default {
Expand All @@ -43,9 +45,15 @@ export default {
},
methods: {
bindDateChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.date = e.detail.value
}
console.log('picker发送选择改变,携带值为', e.detail.value)
this.date = e.detail.value
},
handleClick() {
Taro.navigateTo({url: '/pages/index/index'})
.then(() => {
console.log('success')
})
}
}
}
</script>
58 changes: 20 additions & 38 deletions src/pages/index/indexMixins.ts
Original file line number Diff line number Diff line change
@@ -1,37 +1,28 @@
import Taro from '@tarojs/taro'
// import Button from '../../components/button/index.jsx'
// import Button from '../../components/button/index'
import Badge from '../../components/badge/index'
import Icon from '../../components/icon/index'
import Fab from '../../components/fab/index.jsx'
import Avatar from '../../components/avatar/index.jsx'
// import Countdown from '../../components/countdown/index.jsx'
import Curtain from '../../components/curtain/index.jsx'
// import LoadMore from '../../components/load-more/index.jsx'
import Noticebar from '../../components/noticebar/index.jsx'
import Tag from '../../components/tag/index.jsx'
import Timeline from '../../components/timeline/index.jsx'
import Divider from '../../components/divider/index.jsx'
import ActionSheet from '../../components/action-sheet/index.jsx'
import ActionSheetItem from '../../components/action-sheet/body/item/index.jsx'
import Progress from '../../components/progress/index.jsx'
import Modal from '../../components/modal/index.jsx'
import ModalHeader from '../../components/modal/header/index.jsx'
import ModalContent from '../../components/modal/content/index.jsx'
import ModalAction from '../../components/modal/action/index.jsx'
import Toast from '../../components/toast/index.jsx'
import SwipeAction from '../../components/swipe-action/index.jsx'
import Message from '../../components/message/index.jsx'
import Fab from '../../components/fab/index'
import Avatar from '../../components/avatar/index'
// import Countdown from '../../components/countdown/index'
import Curtain from '../../components/curtain/index'
// import LoadMore from '../../components/load-more/index'
import Noticebar from '../../components/noticebar/index'
import Tag from '../../components/tag/index'
import Timeline from '../../components/timeline/index'
import Divider from '../../components/divider/index'
import ActionSheet from '../../components/action-sheet/index'
import ActionSheetItem from '../../components/action-sheet/body/item/index'
import Progress from '../../components/progress/index'
import Modal from '../../components/modal/index'
import ModalHeader from '../../components/modal/header/index'
import ModalContent from '../../components/modal/content/index'
import ModalAction from '../../components/modal/action/index'
import Toast from '../../components/toast/index'
import SwipeAction from '../../components/swipe-action/index'
import Message from '../../components/message/index'
import Demo from './demo'
import {
Grid,
List,
ListItem,
Card,
FloatLayout,
Accordion,
NavBar,
TabBar,
SegmentedControl,
AtTabs,
AtTabsPane,
AtPagination,
Expand Down Expand Up @@ -76,15 +67,6 @@ export default {
Toast,
SwipeAction,
Message,
Grid,
List,
ListItem,
Card,
FloatLayout,
Accordion,
NavBar,
TabBar,
SegmentedControl,
AtTabs,
AtTabsPane,
AtPagination,
Expand Down

0 comments on commit e9ee800

Please sign in to comment.