Browse Source

修改dialog宽度参数

noob 3 years ago
parent
commit
183cbdfa55
1 changed files with 19 additions and 21 deletions
  1. 19 21
      src/pages/main/performance/components/dialog.vue

+ 19 - 21
src/pages/main/performance/components/dialog.vue

@@ -1,23 +1,21 @@
 <template>
-    <div>
-        <el-dialog
-            :title="title"
-            :visible.sync="visible"
-            :key="reload"
-            :before-close="handleCancel"
-            :width="width"
-        >
-            <!-- 表格主体部分 -->
-            <slot></slot>
-            <!-- 表格底部 -->
-            <div slot="footer">
-                <el-button @click="handleCancel" size="small">取消</el-button>
-                <el-button @click="handleConfirm" type="primary" size="small"
-                    >确定</el-button
-                >
-            </div>
-        </el-dialog>
-    </div>
+    <el-dialog
+        :title="title"
+        :visible.sync="visible"
+        :key="reload"
+        :before-close="handleCancel"
+        :width="width"
+    >
+        <!-- 表格主体部分 -->
+        <slot></slot>
+        <!-- 表格底部 -->
+        <div slot="footer">
+            <el-button @click="handleCancel" size="small">取消</el-button>
+            <el-button @click="handleConfirm" type="primary" size="small"
+                >确定</el-button
+            >
+        </div>
+    </el-dialog>
 </template>
 
 <script>
@@ -36,8 +34,8 @@ export default {
             default: 0,
         },
         width: {
-            type: Number,
-            default: 500,
+            type: String,
+            default: "500px",
         },
     },
     mounted() {