Skip to content

Commit

Permalink
Merge branch 'main' of github.com:ashuicoder/naive-ui-components
Browse files Browse the repository at this point in the history
  • Loading branch information
autumnLeaves-lady committed Mar 18, 2024
2 parents 8d03e2f + 8bb4389 commit 52f5cf9
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 14 deletions.
12 changes: 10 additions & 2 deletions app/src/views/Form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,16 @@ const schemas: FormSchema[] = [
required: true,
requiredType: 'array',
componentProps: {
accept: '.png,.jpg'
}
accept: '.png,.jpg',
listType: 'text'
},
defaultValue: [
{
id: '1',
url: 'https://eibp-frontend.oss-cn-hangzhou.aliyuncs.com/portal-website/images1/46.png',
name: '自定义上传的'
}
]
}
// {
// label: '姓名',
Expand Down
8 changes: 2 additions & 6 deletions app/src/views/Upload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
multiple
accept=".Mp4 , .Png"
:requestFunc="handleUpload"
list-type="image-card"
:cropper="{
autoCrop: true
}"
list-type="text"
></naive-ui-upload>
</template>

Expand All @@ -21,8 +18,7 @@ const fileList = ref<FileInfo[]>([
{
id: '1',
url: 'https://eibp-frontend.oss-cn-hangzhou.aliyuncs.com/portal-website/images1/46.png',
name: '自定义上传的',
status: 'finished'
name: '自定义上传的'
}
])
Expand Down
2 changes: 1 addition & 1 deletion components/naive-ui-form/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "naive-ui-form",
"version": "3.0.12",
"version": "3.0.13",
"private": false,
"main": "index.ts",
"type": "module",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
is="naive-ui-upload"
v-else-if="schema.type === 'upload'"
list-type="image-card"
style="width: 100%"
:style="schema?.style"
v-bind="schema.componentProps"
v-model:value="record[schema.field]"
Expand Down
2 changes: 1 addition & 1 deletion components/naive-ui-table/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "naive-ui-table",
"version": "1.0.27",
"version": "1.0.28",
"private": false,
"description": "基于naive-ui封装的表格组件",
"main": "index.ts",
Expand Down
2 changes: 1 addition & 1 deletion components/naive-ui-upload/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "naive-ui-upload",
"version": "2.0.8",
"version": "2.0.9",
"private": false,
"main": "index.ts",
"type": "module",
Expand Down
6 changes: 3 additions & 3 deletions components/naive-ui-upload/src/NaiveUiUpload.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div style="width: 100%">
<div>
<NUpload
style="width: 100%"
v-bind="getProps()"
Expand All @@ -17,10 +17,10 @@
<div v-if="accept || size" style="margin-top: 8px">
<template v-if="accept"
>支持<NText type="info">{{ accept }}</NText
>格式</template
>格式</template
>
<template v-if="size"
>单个文件不超过<NText type="info">{{ size }}M</NText></template
>单个文件不超过<NText type="info">{{ size }}M</NText></template
>
</div>
<NModal
Expand Down

0 comments on commit 52f5cf9

Please sign in to comment.