You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
1.5 KiB
76 lines
1.5 KiB
<!--本文件由FirstUI授权予内蒙古晟誉网络科技有限责任公司(手机号:151482 2 8108,身份证尾号:1R6T39)专用,请尊重知识产权,勿私下传播,违者追究法律责任。-->
|
|
<template>
|
|
<view class="fui-timeaxis__wrap"
|
|
:style="{paddingTop:padding[0] || 0,paddingRight:padding[1]||0,paddingBottom:padding[2] || padding[0]||0,paddingLeft:padding[3] || padding[1]||0,background:background}">
|
|
<slot></slot>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: "fui-timeaxis",
|
|
props: {
|
|
padding: {
|
|
type: Array,
|
|
default () {
|
|
return []
|
|
}
|
|
},
|
|
background: {
|
|
type: String,
|
|
default: 'transparent'
|
|
},
|
|
leftWidth: {
|
|
type: [Number, String],
|
|
default: 0
|
|
},
|
|
width: {
|
|
type: [Number, String],
|
|
default: 48
|
|
},
|
|
lineWidth: {
|
|
type: [Number, String],
|
|
// #ifdef APP-NVUE
|
|
default: 0.5
|
|
// #endif
|
|
// #ifndef APP-NVUE
|
|
default: 1
|
|
// #endif
|
|
}
|
|
},
|
|
provide() {
|
|
return {
|
|
timeaxis: this
|
|
}
|
|
},
|
|
created() {
|
|
this.children = []
|
|
},
|
|
watch: {
|
|
width(val) {
|
|
this.children.forEach(item => {
|
|
item.width = val
|
|
})
|
|
},
|
|
lineWidth(val) {
|
|
this.children.forEach(item => {
|
|
item.lineWidth = val
|
|
})
|
|
},
|
|
leftWidth(val) {
|
|
this.children.forEach(item => {
|
|
item.leftWidth = val
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.fui-timeaxis__wrap {
|
|
/* #ifndef APP-NVUE */
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
/* #endif */
|
|
}
|
|
</style>
|