diff --git a/src/components/attribute.vue b/src/components/attribute.vue index 082751c4..9a37bc05 100644 --- a/src/components/attribute.vue +++ b/src/components/attribute.vue @@ -276,6 +276,29 @@ + +
+
+ {{ $t('attributes.linkData') }} +
+ + +
+
+
@@ -328,6 +351,7 @@ const baseAttr = reactive({ offsetY: 0, }, points: {}, + linkData: null, }); // 字体属性 const fontAttr = reactive({ @@ -453,6 +477,7 @@ const getObjectAttr = (e) => { baseAttr.shadow = activeObject.get('shadow') || {}; baseAttr.angle = activeObject.get('angle') || 0; baseAttr.points = activeObject.get('points') || {}; + baseAttr.linkData = activeObject.get('linkData') || null; const textTypes = ['i-text', 'text', 'textbox']; if (textTypes.includes(activeObject.type)) { diff --git a/src/core/ServersPlugin.ts b/src/core/ServersPlugin.ts index 4aab6591..7c0d23ea 100644 --- a/src/core/ServersPlugin.ts +++ b/src/core/ServersPlugin.ts @@ -2,7 +2,7 @@ * @Author: 秦少卫 * @Date: 2023-06-20 12:52:09 * @LastEditors: 秦少卫 - * @LastEditTime: 2024-02-06 18:46:28 + * @LastEditTime: 2024-03-05 22:02:19 * @Description: 内部插件 */ import { v4 as uuid } from 'uuid'; @@ -81,7 +81,7 @@ class ServersPlugin { } getJson() { - return this.canvas.toJSON(['id', 'gradientAngle', 'selectable', 'hasControls']); + return this.canvas.toJSON(['id', 'gradientAngle', 'selectable', 'hasControls', 'linkData']); } /** diff --git a/src/language/en.json b/src/language/en.json index e37a6e93..4a951256 100644 --- a/src/language/en.json +++ b/src/language/en.json @@ -37,17 +37,17 @@ "text": "WaterMark", "modalTitle": "WaterMark Setting", "setting": { - "name": "Mark Name", - "size": "MarK Size", - "angle": "Mark Angle", - "position": { - "label": "Mark Position", - "lt": "Left Top", - "rt": "Right Top", - "lb": "Left Bottom", - "rb": "Right Bottom", - "full": "Full" - } + "name": "Mark Name", + "size": "MarK Size", + "angle": "Mark Angle", + "position": { + "label": "Mark Position", + "lt": "Left Top", + "rt": "Right Top", + "lb": "Left Bottom", + "rb": "Right Bottom", + "full": "Full" + } } }, "material": { @@ -158,6 +158,7 @@ "phone_wallpaper": "Phone Wallpaper", "attributes": { "id": "ID", + "linkData": "linkData", "font": "Font", "align": "Align", "bold": "Bold:", @@ -183,4 +184,4 @@ "replaceTip": "Are you sure you want to add to the canvas?", "ok": "ok", "cancel": "cancel" -} +} \ No newline at end of file diff --git a/src/language/zh.json b/src/language/zh.json index 2ba0ab10..51852b01 100644 --- a/src/language/zh.json +++ b/src/language/zh.json @@ -37,17 +37,17 @@ "text": "水印", "modalTitle": "配置水印", "setting": { - "name": "水印名称", - "size": "水印大小", - "angle": "水印角度", - "position": { - "label": "水印位置", - "lt": "左上角", - "rt": "右上角", - "lb": "左下角", - "rb": "右下角", - "full": "平铺" - } + "name": "水印名称", + "size": "水印大小", + "angle": "水印角度", + "position": { + "label": "水印位置", + "lt": "左上角", + "rt": "右上角", + "lb": "左下角", + "rb": "右下角", + "full": "平铺" + } } }, "material": { @@ -147,6 +147,7 @@ "phone_wallpaper": "手机壁纸", "attributes": { "id": "标识", + "linkData": "关联数据", "font": "字体", "align": "对齐", "bold": "加粗:", @@ -172,4 +173,4 @@ "replaceTip": "确定要添加到画布中吗?", "ok": "确认", "cancel": "取消" -} +} \ No newline at end of file