Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
basic-vue-admin
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-vue-admin
Commits
f1c0e0c5
提交
f1c0e0c5
authored
7月 04, 2021
作者:
无木
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
types: fix CropperAvatar props define
上级
735028c4
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
16 行增加
和
5 行删除
+16
-5
CropperAvatar.vue
src/components/Cropper/src/CropperAvatar.vue
+16
-5
没有找到文件。
src/components/Cropper/src/CropperAvatar.vue
浏览文件 @
f1c0e0c5
...
@@ -29,7 +29,16 @@
...
@@ -29,7 +29,16 @@
</div>
</div>
</
template
>
</
template
>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
defineComponent
,
computed
,
CSSProperties
,
unref
,
ref
,
watchEffect
,
watch
}
from
'vue'
;
import
{
defineComponent
,
computed
,
CSSProperties
,
unref
,
ref
,
watchEffect
,
watch
,
PropType
,
}
from
'vue'
;
import
CopperModal
from
'./CopperModal.vue'
;
import
CopperModal
from
'./CopperModal.vue'
;
import
{
useDesign
}
from
'/@/hooks/web/useDesign'
;
import
{
useDesign
}
from
'/@/hooks/web/useDesign'
;
import
{
useModal
}
from
'/@/components/Modal'
;
import
{
useModal
}
from
'/@/components/Modal'
;
...
@@ -42,7 +51,7 @@
...
@@ -42,7 +51,7 @@
width
:
{
type
:
[
String
,
Number
],
default
:
'200px'
},
width
:
{
type
:
[
String
,
Number
],
default
:
'200px'
},
value
:
{
type
:
String
},
value
:
{
type
:
String
},
showBtn
:
{
type
:
Boolean
,
default
:
true
},
showBtn
:
{
type
:
Boolean
,
default
:
true
},
btnProps
:
{
type
:
Object
as
ButtonProps
},
btnProps
:
{
type
:
Object
as
PropType
<
ButtonProps
>
},
btnText
:
{
type
:
String
,
default
:
''
},
btnText
:
{
type
:
String
,
default
:
''
},
uploadApi
:
{
type
:
Function
as
PropType
<
({
file
:
Blob
,
name
:
string
})
=>
Promise
<
void
>>
},
uploadApi
:
{
type
:
Function
as
PropType
<
({
file
:
Blob
,
name
:
string
})
=>
Promise
<
void
>>
},
};
};
...
@@ -52,10 +61,10 @@
...
@@ -52,10 +61,10 @@
components
:
{
CopperModal
,
Icon
},
components
:
{
CopperModal
,
Icon
},
props
,
props
,
emits
:
[
'update:value'
,
'change'
],
emits
:
[
'update:value'
,
'change'
],
setup
(
props
,
{
emit
})
{
setup
(
props
,
{
emit
,
expose
})
{
const
sourceValue
=
ref
(
props
.
value
||
''
);
const
sourceValue
=
ref
(
props
.
value
||
''
);
const
{
prefixCls
}
=
useDesign
(
'cropper-avatar'
);
const
{
prefixCls
}
=
useDesign
(
'cropper-avatar'
);
const
[
register
,
{
openModal
}]
=
useModal
();
const
[
register
,
{
openModal
,
closeModal
}]
=
useModal
();
const
{
createMessage
}
=
useMessage
();
const
{
createMessage
}
=
useMessage
();
const
{
t
}
=
useI18n
();
const
{
t
}
=
useI18n
();
...
@@ -72,7 +81,7 @@
...
@@ -72,7 +81,7 @@
);
);
watchEffect
(()
=>
{
watchEffect
(()
=>
{
sourceValue
.
value
=
props
.
value
;
sourceValue
.
value
=
props
.
value
||
''
;
});
});
watch
(
watch
(
...
@@ -88,6 +97,8 @@
...
@@ -88,6 +97,8 @@
createMessage
.
success
(
t
(
'component.cropper.uploadSuccess'
));
createMessage
.
success
(
t
(
'component.cropper.uploadSuccess'
));
}
}
expose
({
openModal
:
openModal
.
bind
(
null
,
true
),
closeModal
});
return
{
return
{
t
,
t
,
prefixCls
,
prefixCls
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论