no message
Former-commit-id: 4c38f2bd200ccd90eb4dc0f3367d67d7cb47d1b1 [formerly 4c38f2bd200ccd90eb4dc0f3367d67d7cb47d1b1 [formerly 4c38f2bd200ccd90eb4dc0f3367d67d7cb47d1b1 [formerly 4c38f2bd200ccd90eb4dc0f3367d67d7cb47d1b1 [formerly d8e1aaf4c26758680dc4cd5b51db886ffd86739e [formerly d0781c0d13d71384cd307e564a6176e64e49e7a0]]]]] Former-commit-id: 26b2872a282b3ccb01e328b200411719aaf176fd Former-commit-id: 143fdba770bf4ca1e72fb274470539ac7b6137dd Former-commit-id: 63cee2802670283c503adb7e81084dc675523d55 [formerly f77bebb96c5377ade8f8adbd0bb0c7c30cf5b7c0] Former-commit-id: 48161dd47c512e4036d37d658a2b166c2934e493 Former-commit-id: dd9be6e4aa02bd20895f2afdaf1a4b7e33af2539 Former-commit-id: 5be876509b54638f6e4e7ec60beddcbda54d8d1f Former-commit-id: 9a6fd0bf985b7090c23f1a3364137a1b2155af32 Former-commit-id: 70ca09c855926f74e60451e5b60581a29a708abd
This commit is contained in:
@@ -9,6 +9,12 @@
|
|||||||
| type | 容器类型 | 非 | String | card ghost full | card |
|
| type | 容器类型 | 非 | String | card ghost full | card |
|
||||||
| responsive | 响应式宽度 | 非 | Boolean | | false |
|
| responsive | 响应式宽度 | 非 | Boolean | | false |
|
||||||
|
|
||||||
|
## 事件
|
||||||
|
|
||||||
|
| 事件名 | 介绍 | 回调参数 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| resized | type 为 full 时页面完成尺寸计算会触发此事件 | |
|
||||||
|
|
||||||
::: tip
|
::: tip
|
||||||
`responsive` 参数设置只在 `type` 等于 `card` 或 `ghost` 时生效
|
`responsive` 参数设置只在 `type` 等于 `card` 或 `ghost` 时生效
|
||||||
:::
|
:::
|
||||||
|
|||||||
@@ -47,6 +47,9 @@ export default {
|
|||||||
mounted () {
|
mounted () {
|
||||||
this.headerHeight = this.$slots.header ? this.$refs.header.offsetHeight : 0
|
this.headerHeight = this.$slots.header ? this.$refs.header.offsetHeight : 0
|
||||||
this.footerHeight = this.$slots.footer ? this.$refs.footer.offsetHeight : 0
|
this.footerHeight = this.$slots.footer ? this.$refs.footer.offsetHeight : 0
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$emit('resized')
|
||||||
|
})
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
cardStyle () {
|
cardStyle () {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<slot/>
|
<slot/>
|
||||||
</div>
|
</div>
|
||||||
<!-- [container-full] 撑满 -->
|
<!-- [container-full] 撑满 -->
|
||||||
<d2-container-full v-if="type === 'full'" :right="20" :bottom="0">
|
<d2-container-full v-if="type === 'full'" :right="20" :bottom="0" @resized="$emit('resized')">
|
||||||
<slot v-if="$slots.header" name="header" slot="header"/>
|
<slot v-if="$slots.header" name="header" slot="header"/>
|
||||||
<slot/>
|
<slot/>
|
||||||
<slot v-if="$slots.footer" name="footer" slot="footer"/>
|
<slot v-if="$slots.footer" name="footer" slot="footer"/>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<d2-container type="full">
|
<d2-container type="full" @resized="handleResize">
|
||||||
<template slot="header">滚动定位</template>
|
<template slot="header">滚动定位</template>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<div ref="wrapper" class="demo-bs-wrapper d2-mb">
|
<div ref="wrapper" class="demo-bs-wrapper">
|
||||||
<div>
|
<div>
|
||||||
<div v-for="n in 100" :key="n" class="demo-bs-item" :id="`demo-bs-item-${n}`">n : {{n}}</div>
|
<div v-for="n in 100" :key="n" class="demo-bs-item" :id="`demo-bs-item-${n}`">n : {{n}}</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -35,6 +35,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<template slot="footer">
|
||||||
|
<d2-demo-link-btn title="相关文档" link="http://ustbhuangyi.github.io/better-scroll/doc/zh-hans/"/>
|
||||||
|
</template>
|
||||||
</d2-container>
|
</d2-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -54,8 +57,15 @@ export default {
|
|||||||
fade: true
|
fade: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
const a = 'abc'
|
||||||
|
const b = 'abc'
|
||||||
|
console.log(a == b)
|
||||||
|
console.log(a === b)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleResize () {
|
||||||
|
this.BS.refresh()
|
||||||
|
},
|
||||||
handleScrollTo (y) {
|
handleScrollTo (y) {
|
||||||
this.BS.scrollTo(0, -y, this.time)
|
this.BS.scrollTo(0, -y, this.time)
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user