画布内容储存,pose等入参回显
This commit is contained in:
@@ -635,7 +635,7 @@ function buildContextMenuItems(layer) {
|
||||
contextMenuItems.value = [
|
||||
// 重命名
|
||||
{
|
||||
label: "重命名",
|
||||
label: t('Canvas.Rename'),
|
||||
icon: "CFont",
|
||||
disabled: isMultiple || layer.isBackground || layer.isFixed,
|
||||
action: () => startEditing(layer),
|
||||
@@ -643,14 +643,14 @@ function buildContextMenuItems(layer) {
|
||||
{ type: "divider" },
|
||||
// 复制
|
||||
{
|
||||
label: isMultiple ? `复制 ${selectedLayers.length} 个图层` : "复制图层",
|
||||
label: isMultiple ? `${t('Canvas.Copy')} ${selectedLayers.length} ${t('Canvas.Layers')}` : t('Canvas.copyLayer'),
|
||||
icon: "CPaste",
|
||||
disabled: !canCopyLayers.value,
|
||||
action: () => copySelectedLayers(),
|
||||
},
|
||||
// 删除
|
||||
{
|
||||
label: isMultiple ? `删除 ${selectedLayers.length} 个图层` : "删除图层",
|
||||
label: isMultiple ? `${t('Canvas.delete')} ${selectedLayers.length} ${t('Canvas.Layers')}` : t('Canvas.deleteLayer'),
|
||||
icon: "CDelete",
|
||||
disabled: layer.isBackground || layer.isFixed || !canDeleteLayers(),
|
||||
danger: true,
|
||||
@@ -688,7 +688,7 @@ function buildContextMenuItems(layer) {
|
||||
// },
|
||||
// 组合图层
|
||||
{
|
||||
label: "组合图层",
|
||||
label: t('Canvas.groupLayer'),
|
||||
icon: "CPicture",
|
||||
disabled: layer.isBackground || layer.isFixed || !layerManager?.canRasterizeLayer?.(layer.id),
|
||||
action: () => {
|
||||
@@ -698,7 +698,7 @@ function buildContextMenuItems(layer) {
|
||||
},
|
||||
// 导出图层
|
||||
{
|
||||
label: "导出图层",
|
||||
label: t('Canvas.exportLayer'),
|
||||
icon: "CExport",
|
||||
disabled: layer.isBackground || layer.isFixed || !layerManager?.canRasterizeLayer?.(layer.id),
|
||||
action: () => {
|
||||
@@ -709,11 +709,11 @@ function buildContextMenuItems(layer) {
|
||||
{ type: "divider" },
|
||||
// 分组操作 - 带子菜单
|
||||
{
|
||||
label: "分组操作",
|
||||
label: t('Canvas.groupingOperation'),
|
||||
icon: "CGroup",
|
||||
children: [
|
||||
{
|
||||
label: "创建组",
|
||||
label: t('Canvas.createGroup'),
|
||||
icon: "CCreateGroup",
|
||||
disabled: !canGroupLayers.value,
|
||||
action: () => {
|
||||
@@ -722,7 +722,7 @@ function buildContextMenuItems(layer) {
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "解组",
|
||||
label: t('Canvas.unzipGroup'),
|
||||
icon: "CCancelGroup",
|
||||
disabled: !canUngroupLayers.value,
|
||||
action: () => {
|
||||
@@ -743,7 +743,7 @@ function buildContextMenuItems(layer) {
|
||||
},
|
||||
// 图层操作 - 带子菜单
|
||||
{
|
||||
label: "图层操作",
|
||||
label: t('Canvas.layerOperation'),
|
||||
icon: "CLayout",
|
||||
children: [
|
||||
// // 锁定/解锁
|
||||
@@ -761,7 +761,7 @@ function buildContextMenuItems(layer) {
|
||||
// },
|
||||
// { type: "divider" },
|
||||
{
|
||||
label: "置顶",
|
||||
label: t('Canvas.sticekToTop'),
|
||||
icon: "CBottom",
|
||||
inverIcon: true, // 倒置图标
|
||||
disabled: layer.isBackground || layer.isFixed || !layerManager?.canMoveToTop?.(layer.id),
|
||||
@@ -771,7 +771,7 @@ function buildContextMenuItems(layer) {
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "向上移动",
|
||||
label: t('Canvas.MoveUpOneLayer'),
|
||||
icon: "CUp",
|
||||
disabled: layer.isBackground || layer.isFixed || !layerManager?.canMoveToTop?.(layer.id),
|
||||
action: () => {
|
||||
@@ -780,7 +780,7 @@ function buildContextMenuItems(layer) {
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "向下移动",
|
||||
label: t('Canvas.MoveDownOneLayer'),
|
||||
icon: "CDown",
|
||||
disabled:
|
||||
layer.isBackground || layer.isFixed || !layerManager?.canMoveToBottom?.(layer.id),
|
||||
@@ -790,7 +790,7 @@ function buildContextMenuItems(layer) {
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "置底",
|
||||
label: t('Canvas.SinkToBottom'),
|
||||
icon: "CBottom",
|
||||
disabled:
|
||||
layer.isBackground || layer.isFixed || !layerManager?.canMoveToBottom?.(layer.id),
|
||||
|
||||
Reference in New Issue
Block a user