浏览代码

feat: 提取 le-drawer 公用样式

lanceJiang 8 月之前
父节点
当前提交
55cfd114f0
共有 2 个文件被更改,包括 46 次插入27 次删除
  1. 43 1
      src/styles/lance-element-vue.scss
  2. 3 26
      src/views/approve/launch/ItemDrawer.vue

+ 43 - 1
src/styles/lance-element-vue.scss

@@ -138,6 +138,48 @@
 		opacity: 0;
 	}
 }
-
+// 公用风格 drawer
+.#{$prefix}drawer {
+	.el-drawer__header {
+		display: flex;
+		padding: 16px 24px;
+		align-items: center;
+		justify-content: space-between;
+		background-color: var(--el-color-info-light-9);
+		text-align: left;
+		/* margin-right: 0; */
+		margin-bottom: 0;
+	}
+	.el-drawer__close-btn {
+		padding: 0;
+		margin-right: -12px;
+	}
+	.el-drawer__body {
+		position: relative;
+		display: flex;
+		flex-direction: column;
+	}
+	.el-drawer__footer {
+		border-top: 1px solid var(--el-border-color-lighter);
+		padding: 12px 24px;
+	}
+	// loading 固定样式
+	.local_loading {
+		position: absolute;
+		left: 0;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 100%;
+		height: 100%;
+		z-index: 999;
+		background: rgba(0, 0, 0, 0.05);
+	}
+}
+@media (max-width: 750px) {
+	.#{$prefix}drawer {
+		max-width: 100vw;
+	}
+}
 .#{$prefix}test {}
 /* --------引用 lance-element-ui 根据ui/产品 用于项目的默认样式 End-------- */

+ 3 - 26
src/views/approve/launch/ItemDrawer.vue

@@ -1,7 +1,7 @@
 <template>
 	<el-drawer
 		:close-on-click-modal="false"
-		class="local-launch_drawer-wrap"
+		class="le-drawer local-launch_drawer-wrap"
 		:title="record.processName"
 		:model-value="modelValue"
 		size="760px"
@@ -337,30 +337,7 @@ Promise.all([
 </script>
 <style lang="scss">
 .local-launch_drawer-wrap {
-	.el-drawer__header {
-		display: flex;
-		padding: 16px 24px;
-		align-items: center;
-		justify-content: space-between;
-		background-color: var(--el-color-info-light-9);
-		text-align: left;
-		/* margin-right: 0; */
-		margin-bottom: 0;
-	}
-	.el-drawer__close-btn {
-		padding: 0;
-		margin-right: -12px;
-	}
-	.el-drawer__body {
-		position: relative;
-		display: flex;
-		flex-direction: column;
-	}
-	.el-drawer__footer {
-		border-top: 1px solid var(--el-border-color-lighter);
-		padding: 12px 24px;
-	}
-	.local_loading {
+	/*.local_loading {
 		position: absolute;
 		left: 0;
 		display: flex;
@@ -370,7 +347,7 @@ Promise.all([
 		height: 100%;
 		z-index: 999;
 		background: rgba(0, 0, 0, 0.05);
-	}
+	}*/
 }
 @media (max-width: 750px) {
 	.local-launch_drawer-wrap {