feat(ui): 新增自定义样式和组件

- 添加自定义按钮、对话框样式
- 新增 RenderDialog 组件
- 更新公共样式,引入新的 renderUi 样式
- 在主入口文件中注册 RenderDialog 组件
This commit is contained in:
陈昱达
2025-04-22 17:52:23 +08:00
parent 5a42c3803a
commit 07be1375ec
7 changed files with 215 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
<template>
<el-dialog :visible.sync="visible" :title="title">
<div slot="default">
<div class="render-dialog-body">
<slot></slot>
</div>
</div>
<div slot="footer">
<slot name="footer">
<el-button size="medium" class="render-button" @click="cancel">{{ cancelButtonText }}</el-button>
<el-button size="medium" class="render-button" type="primary" @click="confirm">{{ confirmButtonText }}</el-button>
</slot>
</div>
</el-dialog>
</template>
<script>
export default {
name: 'index',
data() {
return {}
},
props: {
visible: {
type: Boolean,
default: false
},
title: {
type: String,
default: '标题'
},
confirmButtonText: {
type: String,
default: '确定'
},
cancelButtonText: {
type: String,
default: '取消'
}
},
watch: {},
components: {},
filters: {},
methods: {
cancel() {
this.$emit('cancel')
this.$emit('update:visible', false)
},
confirm() {
this.$emit('confirm')
this.$emit('update:visible', false)
}
},
created() {},
mounted() {},
computed: {}
}
</script>
<style scoped lang="scss">
#index-container {
}
</style>