|
|
@@ -31,7 +31,7 @@ export { default as GroupComponent } from "./serial-group.vue";
|
|
|
export { default as Component } from "./serial.vue";
|
|
|
export { default as TempComponent } from "./temp-serial.vue";
|
|
|
|
|
|
-export const defaultTableStyle = installGlobalStyle('serialTable', {
|
|
|
+export const defaultTableStyle = installGlobalStyle("serialTable", {
|
|
|
right: 44,
|
|
|
top: 175,
|
|
|
fontSize: 16,
|
|
|
@@ -42,16 +42,16 @@ export const defaultTableStyle = installGlobalStyle('serialTable', {
|
|
|
repColCount: 1,
|
|
|
tableStrokeWidth: 1,
|
|
|
});
|
|
|
-export const shapeName = ui18n.t('shape.serial.name');
|
|
|
+export const shapeName = ui18n.t("shape.serial.name");
|
|
|
export const addMode = "dot";
|
|
|
-export const defaultStyle = installGlobalStyle('serial', {
|
|
|
+export const defaultStyle = installGlobalStyle("serial", {
|
|
|
...circleDefaultStyle,
|
|
|
strokeWidth: 2,
|
|
|
});
|
|
|
|
|
|
export const fixedStrokeOptions: number[] = [];
|
|
|
export const autoGenTable = ref(true);
|
|
|
-export type SerialData = CircleData & { joinIds?: string[] };
|
|
|
+export type SerialData = CircleData & { joinIds?: string[], hideSerial?: boolean };
|
|
|
|
|
|
export const getSerialFontW = (data: SerialData) => {
|
|
|
const fontSize = data.fontSize || defaultStyle.fontSize;
|
|
|
@@ -163,7 +163,7 @@ export const delItemRaw = (
|
|
|
};
|
|
|
|
|
|
export const joinKey = "serial-table";
|
|
|
-export const tableTitle = ui18n.t('shape.serial.tableTitle');
|
|
|
+export const tableTitle = ui18n.t("shape.serial.tableTitle");
|
|
|
export const delItem = (store: DrawStore, item: SerialData) => {
|
|
|
const table = store
|
|
|
.getTypeItems("table")
|
|
|
@@ -214,7 +214,7 @@ const getTempContents = () => {
|
|
|
tempContents.push(
|
|
|
{
|
|
|
key: "preset-col",
|
|
|
- content: ui18n.t('shape.serial.head1'),
|
|
|
+ content: ui18n.t("shape.serial.head1"),
|
|
|
readonly: true,
|
|
|
notdel: true,
|
|
|
width: defaultTableStyle.nameColWidth,
|
|
|
@@ -224,7 +224,7 @@ const getTempContents = () => {
|
|
|
},
|
|
|
{
|
|
|
key: "preset-col",
|
|
|
- content: ui18n.t('shape.serial.head2'),
|
|
|
+ content: ui18n.t("shape.serial.head2"),
|
|
|
readonly: true,
|
|
|
notdel: true,
|
|
|
width: defaultTableStyle.valueColWidth,
|
|
|
@@ -331,21 +331,23 @@ export const syncTable = (table: TableData, items: SerialData[]) => {
|
|
|
let colNdx = (i % colCount) * 2;
|
|
|
const val = item.desc || oldData[item.id] || "";
|
|
|
if (colNdx) {
|
|
|
- table.content[rowNdx][colNdx].content = item.content!;
|
|
|
+ table.content[rowNdx][colNdx].content = item.hideSerial ? '' : item.content!;
|
|
|
table.content[rowNdx][colNdx + 1].content = val;
|
|
|
table.content[rowNdx][colNdx + 1].joinId = item.id;
|
|
|
} else {
|
|
|
- table.height += tempRow[0].height;
|
|
|
+ table.height += defaultTableStyle.colHeight;
|
|
|
let cols = [
|
|
|
{
|
|
|
...tempRow[0],
|
|
|
- content: item.content!,
|
|
|
+ height: defaultTableStyle.colHeight,
|
|
|
+ content: item.hideSerial ? '' : item.content!,
|
|
|
readonly: false,
|
|
|
hidden: false,
|
|
|
key: "serial-name",
|
|
|
},
|
|
|
{
|
|
|
...tempRow[1],
|
|
|
+ height: defaultTableStyle.colHeight,
|
|
|
content: val,
|
|
|
readonly: false,
|
|
|
hidden: false,
|
|
|
@@ -357,6 +359,7 @@ export const syncTable = (table: TableData, items: SerialData[]) => {
|
|
|
cols.push(
|
|
|
{
|
|
|
...tempRow[2],
|
|
|
+ height: defaultTableStyle.colHeight,
|
|
|
readonly: false,
|
|
|
content: "",
|
|
|
hidden: false,
|
|
|
@@ -364,6 +367,7 @@ export const syncTable = (table: TableData, items: SerialData[]) => {
|
|
|
},
|
|
|
{
|
|
|
...tempRow[3],
|
|
|
+ height: defaultTableStyle.colHeight,
|
|
|
content: "",
|
|
|
readonly: false,
|
|
|
hidden: false,
|