fix 格式化

This commit is contained in:
wangxueliang 2018-02-01 18:32:17 +08:00
parent 2518078359
commit e41981a95c
8 changed files with 54 additions and 65 deletions

View File

@ -3,24 +3,13 @@ import PropTypes from '../_util/vue-types'
import animation from '../_util/openAnimation'
import { getOptionProps } from '../_util/props-util'
import RcCollapse from './src'
import { collapseProps } from './src/commonProps'
export default {
props: {
prefixCls: PropTypes.string.def('ant-collapse'),
...collapseProps,
bordered: PropTypes.bool.def(true),
openAnimation: PropTypes.any.def({ ...animation, appear () { } }),
activeKey: PropTypes.oneOfType([
PropTypes.string,
PropTypes.arrayOf(PropTypes.string),
]),
defaultValue: PropTypes.oneOfType([
PropTypes.string,
PropTypes.arrayOf(PropTypes.string),
]),
value: PropTypes.oneOfType([
PropTypes.string,
PropTypes.arrayOf(PropTypes.string),
]),
change: PropTypes.func.def(() => {}),
accordion: PropTypes.bool,
},

View File

@ -26,11 +26,11 @@ Accordion mode, only one panel can be expanded at a time. The first panel will b
</template>
<script>
export default {
data () {
return {
text: `A dog is a type of domesticated animal.Known for its loyalty and faithfulness,it can be found as a welcome guest in many households across the world.`,
}
},
}
data () {
return {
text: `A dog is a type of domesticated animal.Known for its loyalty and faithfulness,it can be found as a welcome guest in many households across the world.`,
}
},
}
</script>
```

View File

@ -26,17 +26,17 @@ More than one panel can be expanded at a time, the first panel is initialized to
</template>
<script>
export default {
data () {
return {
text: `A dog is a type of domesticated animal.Known for its loyalty and faithfulness,it can be found as a welcome guest in many households across the world.`,
value: ['1']
}
},
methods: {
changeActivekey (key) {
console.log(key)
data () {
return {
text: `A dog is a type of domesticated animal.Known for its loyalty and faithfulness,it can be found as a welcome guest in many households across the world.`,
value: ['1']
}
},
},
}
methods: {
changeActivekey (key) {
console.log(key)
},
},
}
</script>
```

View File

@ -26,11 +26,11 @@ A borderless style of Collapse.
</template>
<script>
export default {
data () {
return {
text: `A dog is a type of domesticated animal.Known for its loyalty and faithfulness,it can be found as a welcome guest in many households across the world.`,
}
},
}
data () {
return {
text: `A dog is a type of domesticated animal.Known for its loyalty and faithfulness,it can be found as a welcome guest in many households across the world.`,
}
},
}
</script>
```

View File

@ -26,12 +26,12 @@ Customize the background, border and margin styles for each panel.
</template>
<script>
export default {
data () {
return {
text: `A dog is a type of domesticated animal.Known for its loyalty and faithfulness,it can be found as a welcome guest in many households across the world.`,
customStyle: 'background: #f7f7f7;border-radius: 4px;margin-bottom: 24px;border: 0;overflow: hidden'
}
},
}
data () {
return {
text: `A dog is a type of domesticated animal.Known for its loyalty and faithfulness,it can be found as a welcome guest in many households across the world.`,
customStyle: 'background: #f7f7f7;border-radius: 4px;margin-bottom: 24px;border: 0;overflow: hidden'
}
},
}
</script>
```

View File

@ -30,16 +30,16 @@
</template>
<script>
export default {
data () {
return {
text: `A dog is a type of domesticated animal.Known for its loyalty and faithfulness,it can be found as a welcome guest in many households across the world.`,
}
},
methods: {
changeActivekey (key) {
console.log(key)
data () {
return {
text: `A dog is a type of domesticated animal.Known for its loyalty and faithfulness,it can be found as a welcome guest in many households across the world.`,
}
},
},
}
methods: {
changeActivekey (key) {
console.log(key)
},
},
}
</script>
```

View File

@ -23,16 +23,16 @@ You can disable showing arrow icon by passing `:showArrow="false"` to `a-collaps
</template>
<script>
export default {
data () {
return {
text: `A dog is a type of domesticated animal.Known for its loyalty and faithfulness,it can be found as a welcome guest in many households across the world.`,
}
},
methods: {
changeActivekey (key) {
console.log(key)
data () {
return {
text: `A dog is a type of domesticated animal.Known for its loyalty and faithfulness,it can be found as a welcome guest in many households across the world.`,
}
},
},
}
methods: {
changeActivekey (key) {
console.log(key)
},
},
}
</script>
```

View File

@ -1,7 +1,7 @@
import PropTypes from '../../_util/vue-types'
const collapseProps = {
prefixCls: PropTypes.string,
prefixCls: PropTypes.string.def('ant-collapse'),
value: PropTypes.oneOfType([
PropTypes.string,
PropTypes.arrayOf(PropTypes.string),
@ -16,7 +16,7 @@ const collapseProps = {
const panelProps = {
openAnimation: PropTypes.object,
prefixCls: PropTypes.string,
prefixCls: PropTypes.string.def('ant-collapse'),
header: PropTypes.oneOfType([
PropTypes.string,
PropTypes.number,