From b89a982e64ecc6a7018b0c879118c8df44d9a888 Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Mon, 16 Jan 2017 12:29:03 +0800 Subject: [PATCH] fixed #205 --- src/components/date-picker/picker.vue | 2 +- src/components/input/input.vue | 23 +++++++++++++---------- src/components/select/dropdown.vue | 2 +- src/components/table/cell.vue | 2 +- src/styles/components/date-picker.less | 5 ++++- test/routers/input.vue | 2 ++ test/routers/table.vue | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------- 7 files changed, 111 insertions(+), 23 deletions(-) diff --git a/src/components/date-picker/picker.vue b/src/components/date-picker/picker.vue index 8fcb4b4..b386eea 100644 --- a/src/components/date-picker/picker.vue +++ b/src/components/date-picker/picker.vue @@ -2,7 +2,7 @@
-
+
this.init()); } }; diff --git a/src/components/select/dropdown.vue b/src/components/select/dropdown.vue index 3be1a45..27e02b2 100644 --- a/src/components/select/dropdown.vue +++ b/src/components/select/dropdown.vue @@ -66,7 +66,7 @@ popper._popper.style.transformOrigin = `center ${ origin }`; } }, - ready () { + compiled () { this.$on('on-update-popper', this.update); this.$on('on-destroy-popper', this.destroy); }, diff --git a/src/components/table/cell.vue b/src/components/table/cell.vue index cbe7959..6e91625 100644 --- a/src/components/table/cell.vue +++ b/src/components/table/cell.vue @@ -50,7 +50,7 @@ const cell = document.createElement('div'); cell.innerHTML = template; const _oldParentChildLen = $parent.$children.length; - $parent.$compile(cell); + $parent.$compile(cell); // todo 这里无法触发 ready 钩子 const _newParentChildLen = $parent.$children.length; if (_oldParentChildLen !== _newParentChildLen) { // if render normal html node, do not tag diff --git a/src/styles/components/date-picker.less b/src/styles/components/date-picker.less index fa28d9c..4455dbf 100644 --- a/src/styles/components/date-picker.less +++ b/src/styles/components/date-picker.less @@ -4,8 +4,11 @@ @date-picker-cells-width: 196px; .@{date-picker-prefix-cls} { - position: relative; + //position: relative; line-height: normal; + &-rel{ + position: relative; + } .@{select-dropdown-prefix-cls} { width: auto; padding: 0; diff --git a/test/routers/input.vue b/test/routers/input.vue index 37fee9a..efbfdd0 100644 --- a/test/routers/input.vue +++ b/test/routers/input.vue @@ -1,4 +1,6 @@