Files
element-plus/website/docs/en-US/border.md
zazzaz f12000f9c2 feat: add website (#135)
* feat: add website

* chore: fix
2020-08-13 15:18:26 +08:00

3.1 KiB

<script> import bus from '../../bus'; const varMap = { '$--box-shadow-light': 'boxShadowLight', '$--box-shadow-base': 'boxShadowBase', '$--border-radius-base': 'borderRadiusBase', '$--border-radius-small': 'borderRadiusSmall' }; const original = { boxShadowLight: '0 2px 12px 0 rgba(0, 0, 0, 0.1)', boxShadowBase: '0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04)', borderRadiusBase: '4px', borderRadiusSmall: '2px' } export default { mounted() { this.setGlobal(); }, methods: { setGlobal() { if (window.userThemeConfig) { this.global = window.userThemeConfig.global; } } }, data() { return { global: {}, boxShadowLight: '', boxShadowBase: '', borderRadiusBase: '', borderRadiusSmall: '' } }, watch: { global: { immediate: true, handler(value) { Object.keys(varMap).forEach((c) => { if (value[c]) { this[varMap[c]] = value[c] } else { this[varMap[c]] = original[varMap[c]] } }); } } } } </script>

Border

We standardize the borders that can be used in buttons, cards, pop-ups and other components.

Border

There are few border styles to choose.

Name Thickness Demo
Solid 1px
Dashed 2px

Radius

There are few radius styles to choose.

No Radius
border-radius: 0px
Small Radius
border-radius: {{borderRadiusSmall}}
Large Radius
border-radius: {{borderRadiusBase}}
Round Radius
border-radius: 30px

Shadow

There are few shadow styles to choose.

Basic Shadow box-shadow: {{boxShadowBase}}
Light Shadow box-shadow: {{boxShadowLight}}