mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-16 11:44:01 +08:00
Slider: add marks attribute (#15133)
This commit is contained in:
18
packages/slider/src/marker.js
Normal file
18
packages/slider/src/marker.js
Normal file
@@ -0,0 +1,18 @@
|
||||
export default {
|
||||
name: 'ElMarker',
|
||||
|
||||
props: {
|
||||
mark: {
|
||||
type: [String, Object]
|
||||
}
|
||||
},
|
||||
render() {
|
||||
let label = typeof this.mark === 'string' ? this.mark : this.mark.label;
|
||||
|
||||
return (
|
||||
<div class="el-slider__marks-text" style={ this.mark.style || {} }>
|
||||
{ label }
|
||||
</div>
|
||||
);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user