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