lyc-dev #16

Merged
lyc merged 3 commits from lyc-dev into main 2024-07-12 17:57:09 +08:00
3 changed files with 77 additions and 8 deletions
Showing only changes of commit 0a386f277e - Show all commits

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 handleSizeChange = () => { }
const handleCurrentChange = () => { } const handleCurrentChange = () => { }
const openDrawer = ()=>{
drawer.value = true
}
</script> </script>
<style lang="scss"> <style lang="scss">

View File

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