Commit 91312517 authored by zhengke's avatar zhengke

修改

parent 939b7f57
...@@ -10,5 +10,5 @@ export default defineComponent({ ...@@ -10,5 +10,5 @@ export default defineComponent({
</script> </script>
<style lang="sass"> <style lang="sass">
@import url('./css/font.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> </style>
import { boot } from 'quasar/wrappers' import { boot } from 'quasar/wrappers'
import axios, { AxiosInstance } from 'axios' import axios, { AxiosInstance } from 'axios'
import {UploadSelfFile} from '@/utils/common'
declare module '@vue/runtime-core' { declare module '@vue/runtime-core' {
interface ComponentCustomProperties { interface ComponentCustomProperties {
$axios: AxiosInstance $axios: AxiosInstance
...@@ -24,6 +24,8 @@ export default boot(({ app }) => { ...@@ -24,6 +24,8 @@ export default boot(({ app }) => {
* @deprecated 弃用的方法 * @deprecated 弃用的方法
*/ */
app.config.globalProperties.$api = api app.config.globalProperties.$api = api
app.config.globalProperties.$UploadSelfFile = UploadSelfFile
// ^ ^ ^ this will allow you to use this.$api (for Vue Options API form) // ^ ^ ^ this will allow you to use this.$api (for Vue Options API form)
// so you can easily perform requests against your app's API // so you can easily perform requests against your app's API
}) })
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<div style="display:flex;align-items:center;"> <div style="display:flex;align-items:center;">
<div> <div>
<a-upload v-model:file-list="data.imageList" name="file" :multiple="true" <a-upload v-model:file-list="data.imageList" name="file" :multiple="true"
action="https://www.mocky.io/v2/5cc8019d300000980a055e76" @change="handleChange"> action="https://www.mocky.io/v2/5cc8019d300000980a055e76" @change="uploadImg">
<i style="font-size:25px;cursor:pointer;" class="iconfont icon-picture"></i> <i style="font-size:25px;cursor:pointer;" class="iconfont icon-picture"></i>
</a-upload> </a-upload>
</div> </div>
...@@ -44,16 +44,39 @@ ...@@ -44,16 +44,39 @@
interface dataParam { interface dataParam {
[key: string]: any [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 > ({ const data = reactive < dataParam > ({
isShowEdit: false, isShowEdit: false,
fileList: [], fileList: [],
imageList: [] 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(() => { onMounted(() => {
}) })
return { return {
data data,
uploadImg
} }
} }
} }
...@@ -71,13 +94,16 @@ ...@@ -71,13 +94,16 @@
.file_Space { .file_Space {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-top:10px; margin-top: 10px;
align-items: center; 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; opacity: 0;
} }
</style> </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