Skip to content

Commit

Permalink
feat(style): 组件样式抽离
Browse files Browse the repository at this point in the history
- ActionSheet
- Calendar
- Flex
- List
- SwipeAction
- Modal
  • Loading branch information
koppthe committed Dec 23, 2018
1 parent c7915a1 commit 614fd40
Show file tree
Hide file tree
Showing 48 changed files with 489 additions and 564 deletions.
14 changes: 7 additions & 7 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ class App extends Component {
'pages/view/steps/index',
'pages/view/curtain/index',
'pages/action/toast/index',
// 'pages/action/modal/index',
'pages/action/modal/index',
'pages/action/progress/index',
// 'pages/action/action-sheet/index',
// 'pages/action/swipe-action/index',
'pages/action/action-sheet/index',
'pages/action/swipe-action/index',
'pages/action/activity-indicator/index',
'pages/action/message/index',
'pages/navigation/drawer/index',
Expand All @@ -39,11 +39,11 @@ class App extends Component {
'pages/navigation/segmented-control/index',
'pages/navigation/navbar/index',
'pages/navigation/indexes/index',
// 'pages/layout/flex/index',
'pages/layout/flex/index',
'pages/layout/grid/index',
'pages/layout/float-layout/index',
'pages/layout/card/index',
// 'pages/layout/list/index',
'pages/layout/list/index',
'pages/layout/accordion/index',
'pages/form/checkbox/index',
'pages/form/input/index',
Expand All @@ -57,8 +57,8 @@ class App extends Component {
'pages/form/slider/index',
'pages/form/search-bar/index',
'pages/form/image-picker/index',
'pages/form/range/index'
// 'pages/advanced/calendar/index'
'pages/form/range/index',
'pages/advanced/calendar/index'
],
window: {
backgroundTextStyle: 'light',
Expand Down
2 changes: 0 additions & 2 deletions src/components/action-sheet/body/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { View } from '@tarojs/components'

import AtComponent from '../../../common/component'

import './index.scss'

export default class AtActionSheetBody extends AtComponent {
render () {
const rootClass = classNames('at-action-sheet-body', this.props.className)
Expand Down
3 changes: 0 additions & 3 deletions src/components/action-sheet/body/index.scss

This file was deleted.

4 changes: 0 additions & 4 deletions src/components/action-sheet/body/item/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
import Taro from '@tarojs/taro'
import classNames from 'classnames'
import { View } from '@tarojs/components'

import PropTypes from 'prop-types'
import _isFunction from 'lodash/isFunction'

import AtComponent from '../../../../common/component'

import './index.scss'

export default class AtActionSheetItem extends AtComponent {
handleClick = (...args) => {
if (_isFunction(this.props.onClick)) {
Expand Down
10 changes: 0 additions & 10 deletions src/components/action-sheet/body/item/index.scss

This file was deleted.

3 changes: 0 additions & 3 deletions src/components/action-sheet/footer/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import Taro from '@tarojs/taro'
import { View } from '@tarojs/components'

import PropTypes from 'prop-types'
import classNames from 'classnames'
import _isFunction from 'lodash/isFunction'

import AtComponent from '../../../common/component'

import './index.scss'

export default class AtActionSheetFooter extends AtComponent {
handleClick = (...args) => {
if (_isFunction(this.props.onClick)) {
Expand Down
13 changes: 0 additions & 13 deletions src/components/action-sheet/footer/index.scss

This file was deleted.

2 changes: 0 additions & 2 deletions src/components/action-sheet/header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { View, Text } from '@tarojs/components'

import AtComponent from '../../../common/component'

import './index.scss'

export default class AtActionSheetHeader extends AtComponent {
render () {
const rootClass = classNames('at-action-sheet-header', this.props.className)
Expand Down
11 changes: 0 additions & 11 deletions src/components/action-sheet/header/index.scss

This file was deleted.

4 changes: 0 additions & 4 deletions src/components/action-sheet/index.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
import Taro from '@tarojs/taro'
import { View } from '@tarojs/components'

import PropTypes from 'prop-types'
import classNames from 'classnames'
import _isFunction from 'lodash/isFunction'

import AtActionSheetBody from './body/index'
import AtActionSheetHeader from './header/index'
import AtActionSheetFooter from './footer/index'

import AtComponent from '../../common/component'

import './index.scss'

export default class AtActionSheet extends AtComponent {
constructor (props) {
super(...arguments)
Expand Down
50 changes: 0 additions & 50 deletions src/components/action-sheet/index.scss

This file was deleted.

23 changes: 0 additions & 23 deletions src/components/calendar/body/index.scss

This file was deleted.

3 changes: 1 addition & 2 deletions src/components/calendar/body/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import { Props, State, ListGroup } from './interface'

import { delayQuerySelector } from '../../../common/utils'

import './index.scss'

const ANIMTE_DURATION: number = 300

const defaultProps: Partial<Props> = {
Expand All @@ -34,6 +32,7 @@ export default class AtCalendarBody extends Taro.Component<
Props,
Readonly<State>
> {
static options = { addGlobalClass: true }
static defaultProps: Partial<Props> = defaultProps

private changeCount: number = 0
Expand Down
38 changes: 0 additions & 38 deletions src/components/calendar/controller/index.scss

This file was deleted.

6 changes: 2 additions & 4 deletions src/components/calendar/controller/index.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import dayjs, { Dayjs } from 'dayjs'
import classnames from 'classnames'

import Taro from '@tarojs/taro'
import { Text, View, Picker } from '@tarojs/components'

import { Props, State } from './interface'

import './index.scss'

export default class AtCalendarController extends Taro.Component<Props, State> {
static options = { addGlobalClass: true }

render () {
const {
generateDate,
Expand Down
3 changes: 0 additions & 3 deletions src/components/calendar/index.scss

This file was deleted.

3 changes: 1 addition & 2 deletions src/components/calendar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import AtCalendarController from './controller/index'

import { DefaultProps, Props, State, PropsWithDefaults } from './interface'

import './index.scss'

const defaultProps: DefaultProps = {
marks: [],
isSwiper: true,
Expand All @@ -31,6 +29,7 @@ const defaultProps: DefaultProps = {
}

export default class AtCalendar extends Taro.Component<Props, Readonly<State>> {
static options = { addGlobalClass: true }
static defaultProps: DefaultProps = defaultProps

constructor (props: Props) {
Expand Down
Loading

0 comments on commit 614fd40

Please sign in to comment.