zhangjie 1 年之前
父節點
當前提交
d1cd5960df
共有 2 個文件被更改,包括 17 次插入13 次删除
  1. 16 13
      card/elements/card-head/CardHeadBodyAutoResize.vue
  2. 1 0
      src/modules/base/components/RuleSign.vue

+ 16 - 13
card/elements/card-head/CardHeadBodyAutoResize.vue

@@ -72,19 +72,6 @@ export default {
   },
   methods: {
     initStyles() {
-      const containers = ["stdinfo", "notice", "stdno", "dynamic"];
-      containers.forEach((container) => {
-        const dom =
-          this.$refs[`${container}Container`] &&
-          this.$refs[`${container}Container`].firstChild;
-        this.orgHeights[container] = dom ? dom.offsetHeight : 0;
-      });
-      Object.keys(this.orgHeights).map((key) => {
-        this.heights[key] = this.orgHeights[key] + 2;
-      });
-      this.resizeRect();
-    },
-    resizeRect() {
       // width size
       const fillNumber = this.data.fillNumber || 13;
       if (fillNumber <= 10) {
@@ -95,6 +82,22 @@ export default {
       }
       this.leftColWidth = 100 - this.rightColWidth;
 
+      this.$nextTick(() => {
+        const containers = ["stdinfo", "notice", "stdno", "dynamic"];
+        containers.forEach((container) => {
+          const dom =
+            this.$refs[`${container}Container`] &&
+            this.$refs[`${container}Container`].firstChild;
+          this.orgHeights[container] = dom ? dom.offsetHeight : 0;
+        });
+        Object.keys(this.orgHeights).map((key) => {
+          this.heights[key] = this.orgHeights[key] + 2;
+        });
+
+        this.resizeRect();
+      });
+    },
+    resizeRect() {
       // height size
       let col1 = this.orgHeights.stdinfo + this.orgHeights.notice;
       let col2 = this.orgHeights.stdno + this.orgHeights.dynamic;

+ 1 - 0
src/modules/base/components/RuleSign.vue

@@ -60,6 +60,7 @@ export default {
         "clazzName",
         "ticketNumber",
         "courseName",
+        "teachClazzName",
       ],
       rules: {
         basic: [