This commit is contained in:
lyc 2024-07-12 14:40:56 +08:00
parent 631d6d5a04
commit 0a386f277e
3 changed files with 77 additions and 8 deletions

View File

@ -0,0 +1,58 @@
<template>
<el-dialog v-model="dialogValue" width="500">
<div class="create-main">
<el-form>
<el-form-item label="目录">
<div class="create-item">第二章 地球上的大气 / 大气的组成和垂直分层</div>
</el-form-item>
<el-form-item label="文件">
<div class="create-item file-item flex">
<!-- <FileUpload /> -->
<!-- <el-button round size="small" color="#eeeeee" class="add-btn">
<i class="iconfont icon-jiahao"></i>
添加文件
</el-button> -->
<span class="upload-desc">说明一次最多上传5个文件单个文件大小不能大于100M</span>
</div>
</el-form-item>
</el-form>
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="closeDialog">Cancel</el-button>
<el-button type="primary">
Confirm
</el-button>
</div>
</template>
</el-dialog>
</template>
<script setup>
import { ref, defineProps, defineEmits, watch } from 'vue'
const props = defineProps({
modelValue: {
type: Boolean,
default: false
},
})
// emit
const emit = defineEmits(['update:modelValue'])
const dialogValue = ref(false)
watch(() => props.modelValue, (newVal) => {
dialogValue.value = newVal
})
const closeDialog = () => {
emit('update:modelValue', false)
}
</script>
<style lang="scss" scoped></style>

View File

@ -51,9 +51,7 @@ const pageSize = ref(100)
const handleSizeChange = () => { }
const handleCurrentChange = () => { }
const openDrawer = ()=>{
drawer.value = true
}
</script>
<style lang="scss">

View File

@ -12,7 +12,8 @@
</el-row>
<el-row class="resoure-btns">
<el-col :span="24" class="query-row flex">
<div class="flex"> <el-select v-model="sourceStore.curFormat" placeholder="Select" size="small" style="width: 100px">
<div class="flex"> <el-select v-model="sourceStore.curFormat" placeholder="Select" size="small"
style="width: 100px">
<el-option v-for="item in sourceStore.formatList" :key="item.value" :label="item.label"
:value="item.value" />
</el-select>
@ -22,21 +23,30 @@
item.text }}</el-button>
</div>
<div>
<el-button type="primary" round size="small" @click="sourceStore.isCreate = true">
<el-button type="primary" round size="small" @click="openDialog">
<i class="iconfont icon-jiahao"></i>
新建资源</el-button>
</div>
</el-col>
</el-row>
<uploadDialog v-model="isDialogOpen"/>
</div>
</template>
<script setup>
import { ref } from 'vue'
import useResoureStore from '../store'
import uploadDialog from '@/components/upload-dialog/index.vue'
const sourceStore = useResoureStore()
const isDialogOpen = ref(false)
const openDialog = ()=>{
isDialogOpen.value = true
}
</script>
ziy
<style lang="scss" scoped>
.resoure-search {
padding: 20px;
@ -55,16 +65,19 @@ ziy
.resoure-btns {
margin-top: 15px;
justify-content: center;
.query-row{
.query-row {
justify-content: space-between;
}
.line {
width: 1px;
height: 80%;
background-color: #d9dce2;
margin: 0 10px;
}
.icon-jiahao{
.icon-jiahao {
font-size: 12px;
margin-right: 3px;
font-weight: bold;