Commit 91312517 authored by zhengke's avatar zhengke

修改

parent 939b7f57
......@@ -10,5 +10,5 @@ export default defineComponent({
</script>
<style lang="sass">
@import url('./css/font.sass')
@import url('//at.alicdn.com/t/font_2930340_ymozcida88.css')
@import url('//at.alicdn.com/t/font_2930340_cjbyphc00i6.css')
</style>
import { boot } from 'quasar/wrappers'
import axios, { AxiosInstance } from 'axios'
import {UploadSelfFile} from '@/utils/common'
declare module '@vue/runtime-core' {
interface ComponentCustomProperties {
$axios: AxiosInstance
......@@ -24,6 +24,8 @@ export default boot(({ app }) => {
* @deprecated 弃用的方法
*/
app.config.globalProperties.$api = api
app.config.globalProperties.$UploadSelfFile = UploadSelfFile
// ^ ^ ^ this will allow you to use this.$api (for Vue Options API form)
// so you can easily perform requests against your app's API
})
......
......@@ -801,7 +801,7 @@
background-color: #f6f6f6;
border-radius: 5px;
}
.q-textarea .q-field__native {
padding-top: 0;
......
......@@ -10,16 +10,16 @@
<div class="file_Space">
<div style="display:flex;align-items:center;">
<div>
<a-upload v-model:file-list="data.imageList" name="file" :multiple="true"
action="https://www.mocky.io/v2/5cc8019d300000980a055e76" @change="handleChange">
<a-upload v-model:file-list="data.imageList" name="file" :multiple="true"
action="https://www.mocky.io/v2/5cc8019d300000980a055e76" @change="uploadImg">
<i style="font-size:25px;cursor:pointer;" class="iconfont icon-picture"></i>
</a-upload>
</a-upload>
</div>
<div style="margin-left:8px;">
<a-upload v-model:file-list="data.fileList" name="file" :multiple="true"
<a-upload v-model:file-list="data.fileList" name="file" :multiple="true"
action="https://www.mocky.io/v2/5cc8019d300000980a055e76" @change="handleChange">
<i style="font-size:20px;cursor:pointer;" class="iconfont icon-paperclip"></i>
</a-upload>
</a-upload>
</div>
</div>
<div>
......@@ -44,16 +44,39 @@
interface dataParam {
[key: string]: any
}
interface FileItem {
uid: string;
name?: string;
status?: string;
response?: string;
url?: string;
}
interface FileInfo {
file: FileItem;
fileList: FileItem[];
}
const data = reactive < dataParam > ({
isShowEdit: false,
fileList: [],
imageList: []
})
const uploadImg = (info: FileInfo) => {
if (info.file.status !== 'uploading') {
console.log(info.file, info.fileList);
}
console.log(info,'info');
// if (info.file.status === 'done') {
// message.success(`${info.file.name} file uploaded successfully`);
// } else if (info.file.status === 'error') {
// message.error(`${info.file.name} file upload failed.`);
// }
};
onMounted(() => {
})
return {
data
data,
uploadImg
}
}
}
......@@ -71,13 +94,16 @@
.file_Space {
display: flex;
justify-content: space-between;
margin-top:10px;
margin-top: 10px;
align-items: center;
}
.q-field__control{
background-color: #f6f6f6!important;
.q-field__control {
background-color: #f6f6f6 !important;
}
.q-field--filled .q-field__control:hover:before{
.q-field--filled .q-field__control:hover:before {
opacity: 0;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment