41 lines
978 B
TypeScript
41 lines
978 B
TypeScript
/**
|
|
* 预览页底部悬浮操作条:左为次级操作(分享,toy-button type=secondary),右为主操作(保存等,primary)。
|
|
*/
|
|
Component({
|
|
options: {
|
|
styleIsolation: 'apply-shared',
|
|
addGlobalClass: true,
|
|
},
|
|
properties: {
|
|
primaryText: {
|
|
type: String,
|
|
value: '保存到作品库',
|
|
},
|
|
secondaryText: {
|
|
type: String,
|
|
value: '分享',
|
|
},
|
|
disabled: {
|
|
type: Boolean,
|
|
value: false,
|
|
},
|
|
loading: {
|
|
type: Boolean,
|
|
value: false,
|
|
},
|
|
shareOpenType: {
|
|
type: String,
|
|
value: 'share',
|
|
},
|
|
},
|
|
methods: {
|
|
onPrimaryTap() {
|
|
if (this.data.disabled || this.data.loading) return;
|
|
this.triggerEvent('primary');
|
|
},
|
|
onSecondaryTap() {
|
|
this.triggerEvent('secondary');
|
|
},
|
|
},
|
|
});
|