fix: 修正Q2方案标签并添加导出功能
修复Q2方案的标签显示不一致问题,将"Q Scheme 2"改为"Q2 Scheme" 在Q2方案页面添加导出功能组件
This commit is contained in:
parent
e327885545
commit
4119a1ab64
@ -47,7 +47,7 @@ export type SchemeTypeOption = {
|
|||||||
};
|
};
|
||||||
export const SchemeTypeOptions: SchemeTypeOption[] = [
|
export const SchemeTypeOptions: SchemeTypeOption[] = [
|
||||||
{ label: 'Q Scheme', short: 'Q', value: 'q_scheme' },
|
{ label: 'Q Scheme', short: 'Q', value: 'q_scheme' },
|
||||||
{ label: 'Q Scheme 2', short: 'Q2', value: 'q_2_scheme' },
|
{ label: 'Q2 Scheme', short: 'Q2', value: 'q_2_scheme' },
|
||||||
{ label: 'Swatch Scheme', short: 'Swatch', value: 'swatch_scheme' },
|
{ label: 'Swatch Scheme', short: 'Swatch', value: 'swatch_scheme' },
|
||||||
{ label: 'Material Design 2 Scheme', short: 'M2', value: 'material_2' },
|
{ label: 'Material Design 2 Scheme', short: 'M2', value: 'material_2' },
|
||||||
{ label: 'Material Design 3 Scheme', short: 'M3', value: 'material_3' },
|
{ label: 'Material Design 3 Scheme', short: 'M3', value: 'material_3' },
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
|
import { isEqual, isNil } from 'lodash-es';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { Tab } from '../../components/Tab';
|
import { Tab } from '../../components/Tab';
|
||||||
import { SchemeContent } from '../../models';
|
import { SchemeContent } from '../../models';
|
||||||
import { Q2SchemeStorage } from '../../q-2-scheme';
|
import { Q2SchemeStorage } from '../../q-2-scheme';
|
||||||
import { isNilOrEmpty } from '../../utls';
|
import { isNilOrEmpty } from '../../utls';
|
||||||
|
import { SchemeExport } from './Export';
|
||||||
|
|
||||||
const tabOptions = [
|
const tabOptions = [
|
||||||
{ title: 'Overview', id: 'overview' },
|
{ title: 'Overview', id: 'overview' },
|
||||||
@ -30,6 +32,7 @@ export function Q2Scheme({ scheme }: Q2SchemeProps) {
|
|||||||
export: isNilOrEmpty(scheme.schemeStorage?.cssVariables),
|
export: isNilOrEmpty(scheme.schemeStorage?.cssVariables),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
{isEqual(activeTab, 'export') && <SchemeExport scheme={scheme} />}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user