我定了一个组件:
<style lang='sass'>
.current-position {
$height: 36px;
background-color: #fffed9;
border-radius: 2px;
overflow: hidden;
height: $height;
line-height: $height;
padding: 0 10px;
position: relative;
&:before {
@include border($borderColor: #ffda82);
}
strong {
float: left;
}
div {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
color: #fd3846;
}
}
</style>
<template lang='jade'>
aside.current-position
strong(v-text='title')
div(v-text='position')
</template>
<script lang='babel'>
export default {
data() {
return {
title: '猜你在: ',
placeholder: '正在定位中...'
}
}
}
</script>
在这个组件中需要使用border
这个mixin
, 在执行webpack
时报错提示No mixin named border
, 在webpack.config.js
中是有require
的
现在直接
@import
就行了