-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
652 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
browser: true, | ||
node: true | ||
}, | ||
parserOptions: { | ||
parser: 'babel-eslint' | ||
}, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:vue/recommended', | ||
'plugin:prettier/recommended', | ||
'prettier/vue' | ||
], | ||
plugins: ['vue', 'prettier'], | ||
rules: { | ||
'no-console': [ | ||
'error', | ||
{ | ||
allow: ['warn', 'error'] | ||
} | ||
], | ||
'no-debugger': 'error', | ||
'prettier/prettier': 'error' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
可以自定义如何处理文件大小超出的情况(默认是alert警告) | ||
|
||
```vue | ||
<template> | ||
<upload-to-ali v-model="url" :onOversize="onOversize" /> | ||
</template> | ||
<script> | ||
export default { | ||
data() { | ||
return { | ||
url: '' | ||
} | ||
}, | ||
methods: { | ||
onOversize() { | ||
alert('所选文件大小溢出') | ||
}, | ||
} | ||
} | ||
</script> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.