feat(all): 修改tsconfig
This commit is contained in:
parent
1654c9c685
commit
b42ae38eb2
@ -3,6 +3,9 @@
|
||||
"version": "0.0.1",
|
||||
"description": "zhst 工具库合集",
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"main": "src/index.ts",
|
||||
"module": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
@ -19,7 +19,9 @@
|
||||
"module": "es/index.js",
|
||||
"typings": "es/index.d.ts",
|
||||
"exports": {
|
||||
"./package.json": "./package.json"
|
||||
".": {
|
||||
"import": "./src/index.ts"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"es",
|
||||
|
@ -20,7 +20,9 @@
|
||||
"module": "es/index.js",
|
||||
"typings": "es/index.d.ts",
|
||||
"exports": {
|
||||
"./package.json": "./package.json"
|
||||
".": {
|
||||
"import": "./src/index.ts"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"es",
|
||||
|
@ -17,7 +17,9 @@
|
||||
"module": "es/index.js",
|
||||
"typings": "es/index.d.ts",
|
||||
"exports": {
|
||||
"./*": "./*",
|
||||
".": {
|
||||
"import": "./src/index.ts"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"files": [
|
||||
|
@ -17,6 +17,9 @@
|
||||
"module": "es/index.js",
|
||||
"typings": "es/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./src/index.ts"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"files": [
|
||||
|
@ -14,16 +14,16 @@
|
||||
"lib/**/style/*",
|
||||
"*.less"
|
||||
],
|
||||
"type": "module",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
"typings": "es/index.d.ts",
|
||||
"module": "es/index.ts",
|
||||
"typings": "src/index.ts",
|
||||
"exports": {
|
||||
"./package.json": "./package.json"
|
||||
".": {
|
||||
"import": "./src/index.ts"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"es",
|
||||
"lib",
|
||||
"dist"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "father build"
|
||||
@ -47,6 +47,7 @@
|
||||
"@types/downloadjs": "^1.4.6",
|
||||
"@zhst/func": "workspace:^",
|
||||
"@zhst/hooks": "workspace:^",
|
||||
"@zhst/meta": "workspace:^",
|
||||
"antd": "^5.12.5",
|
||||
"antd-style": "^3.6.1",
|
||||
"classnames": "^2.5.1",
|
||||
|
@ -100,13 +100,14 @@ const App: React.FC = () => {
|
||||
theme={{
|
||||
components: {
|
||||
Descriptions: {
|
||||
labelBg: 'red',
|
||||
titleColor: 'red',
|
||||
labelBg: '#f6f6f6',
|
||||
titleColor: 'rgba(0,0,0,0.88)',
|
||||
colorTextLabel: 'rgba(0,0,0,0.88)',
|
||||
titleMarginBottom: 2,
|
||||
itemPaddingBottom: 8,
|
||||
colonMarginRight: 10,
|
||||
colonMarginLeft: 20,
|
||||
contentColor: 'green',
|
||||
contentColor: 'rgba(0,0,0,0.88)',
|
||||
extraColor: 'blue',
|
||||
},
|
||||
},
|
||||
|
@ -2,9 +2,7 @@
|
||||
category: Components
|
||||
subtitle: 描述列表
|
||||
group: 数据展示
|
||||
title: Descriptions
|
||||
cover: https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*fHdlTpif6XQAAAAAAAAAAAAADrJ8AQ/original
|
||||
coverDark: https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*d27AQJrowGAAAAAAAAAAAAAADrJ8AQ/original
|
||||
title: Descriptions 描述列表
|
||||
---
|
||||
|
||||
成组展示多个只读字段。
|
||||
@ -102,7 +100,3 @@ const items: DescriptionsProps['items'] = [
|
||||
| span | 包含列的数量 | number \| [Screens](/components/grid#col) | 1 | `screens: 5.9.0` |
|
||||
|
||||
> span 是 Description.Item 的数量。 span={2} 会占用两个 DescriptionItem 的宽度。当同时配置 `style` 和 `labelStyle`(或 `contentStyle`)时,两者会同时作用。样式冲突时,后者会覆盖前者。
|
||||
|
||||
## 主题变量(Design Token)
|
||||
|
||||
<ComponentTokenTable component="Descriptions"></ComponentTokenTable>
|
||||
|
@ -1,19 +1,38 @@
|
||||
import React from 'react';
|
||||
import { Tabs } from '@zhst/meta';
|
||||
import { Tabs, ConfigProvider } from '@zhst/meta';
|
||||
import type { TabsProps } from '@zhst/meta';
|
||||
|
||||
const App: React.FC = () => (
|
||||
const items: TabsProps['items'] = [
|
||||
{
|
||||
key: '1',
|
||||
label: '场景图',
|
||||
},
|
||||
{
|
||||
key: '2',
|
||||
label: '对比图',
|
||||
}
|
||||
];
|
||||
|
||||
const App: React.FC = () => {
|
||||
return (
|
||||
<ConfigProvider
|
||||
theme={{
|
||||
components: {
|
||||
Tabs: {
|
||||
itemActiveColor: '#333',
|
||||
titleFontSize: 18,
|
||||
itemSelectedColor: '#333'
|
||||
},
|
||||
},
|
||||
}}
|
||||
>
|
||||
<Tabs
|
||||
defaultActiveKey="1"
|
||||
centered
|
||||
items={new Array(3).fill(null).map((_, i) => {
|
||||
const id = String(i + 1);
|
||||
return {
|
||||
label: `Tab ${id}`,
|
||||
key: id,
|
||||
children: `Content of Tab Pane ${id}`,
|
||||
};
|
||||
})}
|
||||
items={items}
|
||||
/>
|
||||
);
|
||||
</ConfigProvider>
|
||||
)
|
||||
};
|
||||
|
||||
export default App;
|
||||
|
@ -56,7 +56,6 @@ const Tabs: React.FC<TabsProps> & { TabPane: typeof TabPane } = (props) => {
|
||||
const { direction, tabs, getPrefixCls, getPopupContainer } = React.useContext(ConfigContext);
|
||||
const prefixCls = getPrefixCls('tabs', customizePrefixCls);
|
||||
const rootCls = useCSSVarCls(prefixCls);
|
||||
console.log(prefixCls)
|
||||
const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls, rootCls);
|
||||
|
||||
let editable: EditableConfig | undefined;
|
||||
@ -82,7 +81,10 @@ const Tabs: React.FC<TabsProps> & { TabPane: typeof TabPane } = (props) => {
|
||||
);
|
||||
}
|
||||
|
||||
const mergedItems = useLegacyItems(items, children);
|
||||
/**
|
||||
* 合并并且校验传递值
|
||||
*/
|
||||
let mergedItems = useLegacyItems(items, children)
|
||||
|
||||
const mergedAnimated = useAnimateConfig(prefixCls, animated);
|
||||
|
||||
|
9
packages/meta/tsconfig.json
Normal file
9
packages/meta/tsconfig.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"references": [{ "path": "../../tsconfig.json" }],
|
||||
"compilerOptions": {
|
||||
"paths": {
|
||||
"@zhst/meta": ["./src"]
|
||||
}
|
||||
},
|
||||
"exclude": ["src/**/demo"]
|
||||
}
|
@ -18,6 +18,9 @@
|
||||
"module": "es/index.js",
|
||||
"typings": "es/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./src/index.ts"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"files": [
|
||||
|
@ -211,6 +211,9 @@ importers:
|
||||
'@zhst/hooks':
|
||||
specifier: workspace:^
|
||||
version: link:../hooks
|
||||
'@zhst/meta':
|
||||
specifier: workspace:^
|
||||
version: 'link:'
|
||||
antd:
|
||||
specifier: ^5.12.5
|
||||
version: 5.12.5(react-dom@18.2.0)(react@18.2.0)
|
||||
|
@ -4,11 +4,12 @@
|
||||
"declaration": true,
|
||||
"skipLibCheck": true,
|
||||
"esModuleInterop": true,
|
||||
"composite": true,
|
||||
"jsx": "react",
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"@@/*": [".dumi/tmp/*"],
|
||||
"@zhst/*": ["components/*", "*"]
|
||||
"@zhst/*": ["packages/*", "*"]
|
||||
},
|
||||
"strictNullChecks": true,
|
||||
"module": "esnext",
|
||||
@ -19,6 +20,7 @@
|
||||
"noUnusedParameters": true,
|
||||
"noUnusedLocals": true,
|
||||
"noImplicitAny": true,
|
||||
"isolatedModules": false,
|
||||
"target": "es6",
|
||||
"lib": ["dom", "es2017"],
|
||||
"stripInternal": true,
|
||||
|
Loading…
Reference in New Issue
Block a user