修改关于海威格式
parent
2943b05cd7
commit
fe8db66f46
@ -0,0 +1,13 @@
|
|||||||
|
import Vue from 'vue'
|
||||||
|
|
||||||
|
const components = require.context('./', false, /\.vue$/)
|
||||||
|
|
||||||
|
components.keys().forEach(fileName => {
|
||||||
|
const componentConfig = components(fileName)
|
||||||
|
const componentName = fileName
|
||||||
|
.replace(/^\.\//, '')
|
||||||
|
.replace(/\.\w+$/, '')
|
||||||
|
.replace(/(^|-)(\w)/g, (match, separator, char) => char.toUpperCase())
|
||||||
|
|
||||||
|
Vue.component(componentName, componentConfig.default || componentConfig)
|
||||||
|
})
|
||||||
@ -0,0 +1,37 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div class="title">{{ title }}</div>
|
||||||
|
<div class="divider"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'Title',
|
||||||
|
props: {
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: '标题'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped lang="less">
|
||||||
|
|
||||||
|
.title {
|
||||||
|
margin-top: 4.2vw;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 2.2vw;
|
||||||
|
font-weight: 600;
|
||||||
|
letter-spacing: 2px;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.divider {
|
||||||
|
width: 4vw;
|
||||||
|
height: 4px;
|
||||||
|
background: #3372FE;
|
||||||
|
border-radius: 999px;
|
||||||
|
margin: 10px auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
Reference in New Issue