Compare commits

...

3 Commits

Author SHA1 Message Date
3b4d6faf35 update version to 2.9.9 2020-08-25 18:26:21 +08:00
58e538b0bd update change log 2020-08-25 18:26:10 +08:00
c8fb3596ee Add exception prompt 2020-08-25 18:23:14 +08:00
3 changed files with 18 additions and 3 deletions

View File

@ -1,3 +1,10 @@
# 2.9.9-alpha (2020-08-25)
### Optmization
- **borderBox:** Canonical class name.
- **autoResize(mixin):** Add exception prompt.
# 2.9.8-alpha (2020-08-20)
### Optmization

View File

@ -1,6 +1,6 @@
{
"name": "@jiaminghi/data-view",
"version": "2.9.8",
"version": "2.9.9",
"author": "JiaMing <743192023@qq.com>",
"description": "Vue Large screen data display component library",
"main": "lib/index.js",

View File

@ -32,8 +32,14 @@ export default {
$nextTick(e => {
const dom = this.dom = $refs[ref]
this.width = dom.clientWidth
this.height = dom.clientHeight
this.width = dom ? dom.clientWidth : 0
this.height = dom ? dom.clientHeight : 0
if (!dom) {
console.warn('DataV: Failed to get dom node, component rendering may be abnormal!')
} else if (!this.width || !this.height) {
console.warn('DataV: Component width or height is 0px, rendering abnormality may occur!')
}
if (typeof onResize === 'function' && resize) onResize()
@ -56,6 +62,8 @@ export default {
unbindDomResizeCallback () {
let { domObserver, debounceInitWHFun } = this
if (!domObserver) return
domObserver.disconnect()
domObserver.takeRecords()
domObserver = null