diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/floating-action-button/config.ts b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/floating-action-button/config.ts
index 22b98581c..d93b1f462 100644
--- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/floating-action-button/config.ts
+++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/floating-action-button/config.ts
@@ -1,28 +1,21 @@
import type { DiyComponent } from '../../../util';
-// 悬浮按钮属性
+/** 悬浮按钮属性 */
export interface FloatingActionButtonProperty {
- // 展开方向
- direction: 'horizontal' | 'vertical';
- // 是否显示文字
- showText: boolean;
- // 按钮列表
- list: FloatingActionButtonItemProperty[];
+ direction: 'horizontal' | 'vertical'; // 展开方向
+ showText: boolean; // 是否显示文字
+ list: FloatingActionButtonItemProperty[]; // 按钮列表
}
-// 悬浮按钮项属性
+/** 悬浮按钮项属性 */
export interface FloatingActionButtonItemProperty {
- // 图片地址
- imgUrl: string;
- // 跳转连接
- url: string;
- // 文字
- text: string;
- // 文字颜色
- textColor: string;
+ imgUrl: string; // 图片地址
+ url: string; // 跳转连接
+ text: string; // 文字
+ textColor: string; // 文字颜色
}
-// 定义组件
+/** 定义组件 */
export const component = {
id: 'FloatingActionButton',
name: '悬浮按钮',
diff --git a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/floating-action-button/index.vue b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/floating-action-button/index.vue
index eb6563766..d0c2ae410 100644
--- a/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/floating-action-button/index.vue
+++ b/apps/web-ele/src/views/mall/promotion/components/diy-editor/components/mobile/floating-action-button/index.vue
@@ -5,23 +5,20 @@ import { ref } from 'vue';
import { IconifyIcon } from '@vben/icons';
-import { ElImage, ElMessage } from 'element-plus';
+import { ElButton, ElImage } from 'element-plus';
/** 悬浮按钮 */
defineOptions({ name: 'FloatingActionButton' });
-// 定义属性
+
+/** 定义属性 */
defineProps<{ property: FloatingActionButtonProperty }>();
-// 是否展开
-const expanded = ref(false);
-// 处理展开/折叠
-const handleToggleFab = () => {
- expanded.value = !expanded.value;
-};
+const expanded = ref(false); // 是否展开
-const handleActive = (index: number) => {
- ElMessage.success(`点击了${index}`);
-};
+/** 处理展开/折叠 */
+function handleToggleFab() {
+ expanded.value = !expanded.value;
+}