@ditari/bsui 5.0.30 → 5.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/card/Card.cjs +49 -0
- package/dist/cjs/components/card/Card.cjs.map +1 -0
- package/dist/cjs/components/card/index.cjs +8 -0
- package/dist/cjs/components/card/index.cjs.map +1 -0
- package/dist/cjs/components/card/style.cjs +40 -0
- package/dist/cjs/components/card/style.cjs.map +1 -0
- package/dist/cjs/components/date/RangePicker.vue2.cjs +3 -2
- package/dist/cjs/components/date/RangePicker.vue2.cjs.map +1 -1
- package/dist/cjs/components/index.cjs +11 -0
- package/dist/cjs/components/index.cjs.map +1 -1
- package/dist/cjs/components/layout/AppContext.cjs +7 -0
- package/dist/cjs/components/layout/AppContext.cjs.map +1 -0
- package/dist/cjs/components/layout/Layout.vue2.cjs +8 -14
- package/dist/cjs/components/layout/Layout.vue2.cjs.map +1 -1
- package/dist/cjs/components/layout/Show.cjs +6 -1
- package/dist/cjs/components/layout/Show.cjs.map +1 -1
- package/dist/cjs/components/layout/components/layout/ThemeApp.vue2.cjs +0 -1
- package/dist/cjs/components/layout/components/layout/ThemeApp.vue2.cjs.map +1 -1
- package/dist/cjs/components/layout/components/menu/Menu.cjs +37 -38
- package/dist/cjs/components/layout/components/menu/Menu.cjs.map +1 -1
- package/dist/cjs/components/table-form/TableForm.cjs +109 -0
- package/dist/cjs/components/table-form/TableForm.cjs.map +1 -0
- package/dist/cjs/components/table-form/TableFormItem.cjs +112 -0
- package/dist/cjs/components/table-form/TableFormItem.cjs.map +1 -0
- package/dist/cjs/components/table-form/index.cjs +16 -0
- package/dist/cjs/components/table-form/index.cjs.map +1 -0
- package/dist/cjs/components/table-form/interface.cjs +58 -0
- package/dist/cjs/components/table-form/interface.cjs.map +1 -0
- package/dist/cjs/components/table-form/style.cjs +124 -0
- package/dist/cjs/components/table-form/style.cjs.map +1 -0
- package/dist/cjs/hooks/useDesign.cjs +31 -0
- package/dist/cjs/hooks/useDesign.cjs.map +1 -0
- package/dist/cjs/index.cjs +13 -3
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/utils/withInstall.cjs +18 -0
- package/dist/cjs/utils/withInstall.cjs.map +1 -0
- package/dist/esm/components/card/Card.mjs +47 -0
- package/dist/esm/components/card/Card.mjs.map +1 -0
- package/dist/esm/components/card/index.mjs +4 -0
- package/dist/esm/components/card/index.mjs.map +1 -0
- package/dist/esm/components/card/style.mjs +38 -0
- package/dist/esm/components/card/style.mjs.map +1 -0
- package/dist/esm/components/date/RangePicker.vue2.mjs +4 -3
- package/dist/esm/components/date/RangePicker.vue2.mjs.map +1 -1
- package/dist/esm/components/index.mjs +5 -0
- package/dist/esm/components/index.mjs.map +1 -1
- package/dist/esm/components/layout/AppContext.mjs +5 -0
- package/dist/esm/components/layout/AppContext.mjs.map +1 -0
- package/dist/esm/components/layout/Layout.vue2.mjs +9 -15
- package/dist/esm/components/layout/Layout.vue2.mjs.map +1 -1
- package/dist/esm/components/layout/Show.mjs +7 -2
- package/dist/esm/components/layout/Show.mjs.map +1 -1
- package/dist/esm/components/layout/components/layout/ThemeApp.vue2.mjs +0 -1
- package/dist/esm/components/layout/components/layout/ThemeApp.vue2.mjs.map +1 -1
- package/dist/esm/components/layout/components/menu/Menu.mjs +39 -40
- package/dist/esm/components/layout/components/menu/Menu.mjs.map +1 -1
- package/dist/esm/components/table-form/TableForm.mjs +106 -0
- package/dist/esm/components/table-form/TableForm.mjs.map +1 -0
- package/dist/esm/components/table-form/TableFormItem.mjs +110 -0
- package/dist/esm/components/table-form/TableFormItem.mjs.map +1 -0
- package/dist/esm/components/table-form/index.mjs +10 -0
- package/dist/esm/components/table-form/index.mjs.map +1 -0
- package/dist/esm/components/table-form/interface.mjs +54 -0
- package/dist/esm/components/table-form/interface.mjs.map +1 -0
- package/dist/esm/components/table-form/style.mjs +122 -0
- package/dist/esm/components/table-form/style.mjs.map +1 -0
- package/dist/esm/hooks/useDesign.mjs +28 -0
- package/dist/esm/hooks/useDesign.mjs.map +1 -0
- package/dist/esm/index.mjs +4 -0
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/utils/withInstall.mjs +16 -0
- package/dist/esm/utils/withInstall.mjs.map +1 -0
- package/dist/types/components/card/Card.d.ts +6 -0
- package/dist/types/components/card/Card.d.ts.map +1 -0
- package/dist/types/components/card/index.d.ts +3 -0
- package/dist/types/components/card/index.d.ts.map +1 -0
- package/dist/types/components/card/style.d.ts +9 -0
- package/dist/types/components/card/style.d.ts.map +1 -0
- package/dist/types/components/date/RangePicker.vue.d.ts +3 -0
- package/dist/types/components/date/RangePicker.vue.d.ts.map +1 -1
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/components/layout/AppContext.d.ts +11 -0
- package/dist/types/components/layout/AppContext.d.ts.map +1 -0
- package/dist/types/components/layout/Layout.vue.d.ts +11 -2
- package/dist/types/components/layout/Layout.vue.d.ts.map +1 -1
- package/dist/types/components/layout/Show.d.ts.map +1 -1
- package/dist/types/components/layout/components/layout/ThemeApp.vue.d.ts.map +1 -1
- package/dist/types/components/layout/components/menu/Menu.d.ts.map +1 -1
- package/dist/types/components/table-form/TableForm.d.ts +57 -0
- package/dist/types/components/table-form/TableForm.d.ts.map +1 -0
- package/dist/types/components/table-form/TableFormItem.d.ts +23 -0
- package/dist/types/components/table-form/TableFormItem.d.ts.map +1 -0
- package/dist/types/components/table-form/index.d.ts +9 -0
- package/dist/types/components/table-form/index.d.ts.map +1 -0
- package/dist/types/components/table-form/interface.d.ts +57 -0
- package/dist/types/components/table-form/interface.d.ts.map +1 -0
- package/dist/types/components/table-form/style.d.ts +12 -0
- package/dist/types/components/table-form/style.d.ts.map +1 -0
- package/dist/types/hooks/useDesign.d.ts +8 -0
- package/dist/types/hooks/useDesign.d.ts.map +1 -0
- package/dist/types/utils/withInstall.d.ts +12 -0
- package/dist/types/utils/withInstall.d.ts.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { css } from '@emotion/css';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
const useFormItemStyle = (styles, _token) => {
|
|
5
|
+
const {
|
|
6
|
+
rowHeight,
|
|
7
|
+
labelBgColor,
|
|
8
|
+
borderColor,
|
|
9
|
+
focusBorderColor
|
|
10
|
+
} = styles;
|
|
11
|
+
const boxShadowStyle = `0 0 0 1px ${focusBorderColor}`;
|
|
12
|
+
const inputFocusStyles = `
|
|
13
|
+
&:focus{
|
|
14
|
+
box-shadow: ${boxShadowStyle};
|
|
15
|
+
}
|
|
16
|
+
`;
|
|
17
|
+
return {
|
|
18
|
+
cellBorderStyle: css`
|
|
19
|
+
//min-height: ${rowHeight}px;
|
|
20
|
+
/* 现有单元格边框 */
|
|
21
|
+
border-right: 1px solid ${borderColor};
|
|
22
|
+
border-bottom: 1px solid ${borderColor};
|
|
23
|
+
|
|
24
|
+
.ant-form-item {
|
|
25
|
+
height: 100%;
|
|
26
|
+
margin-bottom: 0 !important;
|
|
27
|
+
|
|
28
|
+
.ant-form-item-row {
|
|
29
|
+
height: 100%;
|
|
30
|
+
|
|
31
|
+
.ant-form-item-label {
|
|
32
|
+
height: 100%;
|
|
33
|
+
border-right: 1px solid ${borderColor};
|
|
34
|
+
background-color: ${labelBgColor};
|
|
35
|
+
|
|
36
|
+
& > label {
|
|
37
|
+
height: ${rowHeight}px;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.ant-form-item-control-input {
|
|
42
|
+
height: 100%;
|
|
43
|
+
|
|
44
|
+
.ant-form-item-control-input-content {
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
height: 100%;
|
|
48
|
+
|
|
49
|
+
.ant-radio-group {
|
|
50
|
+
margin-left: 10px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
input,
|
|
54
|
+
.ant-picker,
|
|
55
|
+
.ant-select {
|
|
56
|
+
width: 100%;
|
|
57
|
+
height: 100%;
|
|
58
|
+
}
|
|
59
|
+
.ant-select-selector {
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
height: 100%;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.ant-input,
|
|
68
|
+
.ant-select-selector,
|
|
69
|
+
.ant-input-number,
|
|
70
|
+
.ant-picker {
|
|
71
|
+
border: 0;
|
|
72
|
+
border-radius: 0;
|
|
73
|
+
|
|
74
|
+
${inputFocusStyles}
|
|
75
|
+
// 数字输入框要单独处理
|
|
76
|
+
.ant-input-number-input {
|
|
77
|
+
border: 0;
|
|
78
|
+
border-radius: 0;
|
|
79
|
+
${inputFocusStyles};
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.ant-picker-focused,
|
|
84
|
+
.ant-select-focused {
|
|
85
|
+
box-shadow: ${boxShadowStyle};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.ant-input[disabled] {
|
|
89
|
+
${inputFocusStyles}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.ant-input-status-error,
|
|
94
|
+
.ant-picker-status-error,
|
|
95
|
+
.ant-select-status-error {
|
|
96
|
+
box-shadow: 0 0 0 1px red;
|
|
97
|
+
border-radius: 0;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
`,
|
|
101
|
+
valueDisplayClass: css`
|
|
102
|
+
width: 100%;
|
|
103
|
+
height: 100%;
|
|
104
|
+
display: flex;
|
|
105
|
+
padding: 0 11px 0 11px;
|
|
106
|
+
align-items: center;
|
|
107
|
+
`,
|
|
108
|
+
// 内部元素:实现文本溢出
|
|
109
|
+
textWrapperClass: css`
|
|
110
|
+
/* ⭐️ 核心修复:确保内部元素可以被压缩,且强制文本在一行 */
|
|
111
|
+
flex-grow: 1; /* 占据可用空间 */
|
|
112
|
+
min-width: 0;
|
|
113
|
+
|
|
114
|
+
white-space: nowrap;
|
|
115
|
+
overflow: hidden;
|
|
116
|
+
text-overflow: ellipsis;
|
|
117
|
+
`
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export { useFormItemStyle };
|
|
122
|
+
//# sourceMappingURL=style.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.mjs","sources":["../../../../src/components/table-form/style.ts"],"sourcesContent":["import { ComputedRef } from \"vue\";\r\n\r\nimport { StylesConfig } from \"./interface\";\r\nimport { css } from \"@emotion/css\";\r\nimport type { GlobalToken } from \"ant-design-vue/es/theme/interface\";\r\n\r\n/**\r\n * 表单项样式\r\n */\r\nexport const useFormItemStyle = (\r\n styles: StylesConfig,\r\n _token: ComputedRef<GlobalToken>\r\n) => {\r\n const {\r\n rowHeight,\r\n labelBgColor,\r\n borderColor,\r\n focusBorderColor\r\n } = styles;\r\n //TODO _token 后续得兼容下主题色\r\n const boxShadowStyle = `0 0 0 1px ${focusBorderColor}`;\r\n const inputFocusStyles = `\r\n &:focus{\r\n box-shadow: ${boxShadowStyle};\r\n }\r\n `;\r\n\r\n return {\r\n cellBorderStyle: css`\r\n //min-height: ${rowHeight}px;\r\n /* 现有单元格边框 */\r\n border-right: 1px solid ${borderColor};\r\n border-bottom: 1px solid ${borderColor};\r\n\r\n .ant-form-item {\r\n height: 100%;\r\n margin-bottom: 0 !important;\r\n\r\n .ant-form-item-row {\r\n height: 100%;\r\n\r\n .ant-form-item-label {\r\n height: 100%;\r\n border-right: 1px solid ${borderColor};\r\n background-color: ${labelBgColor};\r\n\r\n & > label {\r\n height: ${rowHeight}px;\r\n }\r\n }\r\n\r\n .ant-form-item-control-input {\r\n height: 100%;\r\n\r\n .ant-form-item-control-input-content {\r\n display: flex;\r\n align-items: center;\r\n height: 100%;\r\n\r\n .ant-radio-group {\r\n margin-left: 10px;\r\n }\r\n\r\n input,\r\n .ant-picker,\r\n .ant-select {\r\n width: 100%;\r\n height: 100%;\r\n }\r\n .ant-select-selector {\r\n display: flex;\r\n align-items: center;\r\n height: 100%;\r\n }\r\n }\r\n }\r\n\r\n .ant-input,\r\n .ant-select-selector,\r\n .ant-input-number,\r\n .ant-picker {\r\n border: 0;\r\n border-radius: 0;\r\n\r\n ${inputFocusStyles}\r\n // 数字输入框要单独处理\r\n .ant-input-number-input {\r\n border: 0;\r\n border-radius: 0;\r\n ${inputFocusStyles};\r\n }\r\n }\r\n\r\n .ant-picker-focused,\r\n .ant-select-focused {\r\n box-shadow: ${boxShadowStyle};\r\n }\r\n\r\n .ant-input[disabled] {\r\n ${inputFocusStyles}\r\n }\r\n }\r\n\r\n .ant-input-status-error,\r\n .ant-picker-status-error,\r\n .ant-select-status-error {\r\n box-shadow: 0 0 0 1px red;\r\n border-radius: 0;\r\n }\r\n }\r\n `,\r\n valueDisplayClass: css`\r\n width: 100%;\r\n height: 100%;\r\n display: flex;\r\n padding: 0 11px 0 11px;\r\n align-items: center;\r\n `,\r\n // 内部元素:实现文本溢出\r\n textWrapperClass: css`\r\n /* ⭐️ 核心修复:确保内部元素可以被压缩,且强制文本在一行 */\r\n flex-grow: 1; /* 占据可用空间 */\r\n min-width: 0;\r\n\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n `\r\n };\r\n};\r\n"],"names":[],"mappings":";;;AASO,MAAM,gBAAA,GAAmB,CAC9B,MAAA,EACA,MAAA,KACG;AACH,EAAA,MAAM;AAAA,IACJ,SAAA;AAAA,IACA,YAAA;AAAA,IACA,WAAA;AAAA,IACA;AAAA,GACF,GAAI,MAAA;AAEJ,EAAA,MAAM,cAAA,GAAiB,cAAc,gBAAgB,CAAA,CAAA;AACrD,EAAA,MAAM,gBAAA,GAAmB;AAAA;AAAA,kBAAA,EAEP,cAAc,CAAA;AAAA;AAAA,EAAA,CAAA;AAIhC,EAAA,OAAO;AAAA,IACL,eAAA,EAAiB,GAAA;AAAA,oBAAA,EACC,SAAS,CAAA;AAAA;AAAA,8BAAA,EAEC,WAAW,CAAA;AAAA,+BAAA,EACV,WAAW,CAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAAA;AAAA;AAAA,oCAAA,EAWN,WAAW,CAAA;AAAA,8BAAA,EACjB,YAAY,CAAA;;AAAA;AAAA,sBAAA,EAGpB,SAAS,CAAA;AAAA;AAAA;;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA,YAAA,EAqCnB,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA,cAAA,EAKd,gBAAgB,CAAA;AAAA;AAAA;;AAAA;AAAA;AAAA,wBAAA,EAMN,cAAc,CAAA;AAAA;;AAAA;AAAA,YAAA,EAI1B,gBAAgB;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAA,CAAA;AAAA,IAY1B,iBAAA,EAAmB,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAA,CAAA;AAAA;AAAA,IAQnB,gBAAA,EAAkB,GAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA,IAAA;AAAA,GASpB;AACF;;;;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { computed } from 'vue';
|
|
2
|
+
import { theme } from 'ant-design-vue';
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
const defaultPrefixCls = "d";
|
|
6
|
+
function useDesign(scope) {
|
|
7
|
+
const prefixVar = defaultPrefixCls;
|
|
8
|
+
const getPrefixCls = (blockSuffix) => {
|
|
9
|
+
const prefix = `${prefixVar}-${scope}`;
|
|
10
|
+
if (blockSuffix) {
|
|
11
|
+
return `${prefix}-${blockSuffix}`;
|
|
12
|
+
}
|
|
13
|
+
return prefix;
|
|
14
|
+
};
|
|
15
|
+
return {
|
|
16
|
+
prefixCls: computed(() => getPrefixCls()),
|
|
17
|
+
// d-card
|
|
18
|
+
getPrefixCls
|
|
19
|
+
// 函数,用于生成 d-card-header
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function useAntdToken() {
|
|
23
|
+
const { token } = theme.useToken();
|
|
24
|
+
return computed(() => token.value);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { useAntdToken, useDesign };
|
|
28
|
+
//# sourceMappingURL=useDesign.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDesign.mjs","sources":["../../../src/hooks/useDesign.ts"],"sourcesContent":["// hooks/useDesign.ts\r\nimport { computed, ComputedRef } from \"vue\";\r\nimport { theme } from \"ant-design-vue\";\r\n\r\nimport type { GlobalToken } from \"ant-design-vue/es/theme/interface\";\r\n\r\n// 默认前缀,你可以改成 'd' 或者你项目的缩写\r\nconst defaultPrefixCls = \"d\";\r\n\r\nexport function useDesign(scope: string) {\r\n // 实际项目中,这里可以从 inject('CONFIG_PROVIDER') 获取全局配置的前缀\r\n const prefixVar = defaultPrefixCls;\r\n\r\n /**\r\n * 生成 BEM 风格或者 Antd 风格的类名\r\n * @param blockSuffix - 元素后缀,例如 'header' -> 'd-card-header'\r\n */\r\n const getPrefixCls = (blockSuffix?: string) => {\r\n const prefix = `${prefixVar}-${scope}`;\r\n if (blockSuffix) {\r\n return `${prefix}-${blockSuffix}`;\r\n }\r\n return prefix;\r\n };\r\n\r\n return {\r\n prefixCls: computed(() => getPrefixCls()), // d-card\r\n getPrefixCls // 函数,用于生成 d-card-header\r\n };\r\n}\r\n\r\nexport function useAntdToken(): ComputedRef<GlobalToken> {\r\n const { token } = theme.useToken();\r\n // token.value 是 GlobalToken 类型\r\n return computed(() => token.value);\r\n}\r\n"],"names":[],"mappings":";;;;AAOA,MAAM,gBAAA,GAAmB,GAAA;AAElB,SAAS,UAAU,KAAA,EAAe;AAEvC,EAAA,MAAM,SAAA,GAAY,gBAAA;AAMlB,EAAA,MAAM,YAAA,GAAe,CAAC,WAAA,KAAyB;AAC7C,IAAA,MAAM,MAAA,GAAS,CAAA,EAAG,SAAS,CAAA,CAAA,EAAI,KAAK,CAAA,CAAA;AACpC,IAAA,IAAI,WAAA,EAAa;AACf,MAAA,OAAO,CAAA,EAAG,MAAM,CAAA,CAAA,EAAI,WAAW,CAAA,CAAA;AAAA,IACjC;AACA,IAAA,OAAO,MAAA;AAAA,EACT,CAAA;AAEA,EAAA,OAAO;AAAA,IACL,SAAA,EAAW,QAAA,CAAS,MAAM,YAAA,EAAc,CAAA;AAAA;AAAA,IACxC;AAAA;AAAA,GACF;AACF;AAEO,SAAS,YAAA,GAAyC;AACvD,EAAA,MAAM,EAAE,KAAA,EAAM,GAAI,KAAA,CAAM,QAAA,EAAS;AAEjC,EAAA,OAAO,QAAA,CAAS,MAAM,KAAA,CAAM,KAAK,CAAA;AACnC;;;;"}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -3,6 +3,7 @@ export { default as DicRep } from './components/dic/DicReplace.mjs';
|
|
|
3
3
|
export { default as Select } from './components/select/Select.vue2.mjs';
|
|
4
4
|
export { default as Tab } from './components/tab/Tab.vue2.mjs';
|
|
5
5
|
export { default as Table } from './components/table/Table.mjs';
|
|
6
|
+
export { Card } from './components/card/Card.mjs';
|
|
6
7
|
export { default as RangePicker } from './components/date/RangePicker.vue2.mjs';
|
|
7
8
|
export { default as FormLayout } from './components/form/FormLayout.mjs';
|
|
8
9
|
export { default as Moon } from './components/icon/Moon.vue.mjs';
|
|
@@ -13,6 +14,9 @@ export { default as Menu } from './components/layout/components/menu/Menu.mjs';
|
|
|
13
14
|
export { default as Layout } from './components/layout/Layout.vue2.mjs';
|
|
14
15
|
export { default as List } from './components/layout/List.mjs';
|
|
15
16
|
export { default as Show } from './components/layout/Show.mjs';
|
|
17
|
+
export { DEFAULT_STYLES_CONFIG, tableFormItemProps, tableFormProps } from './components/table-form/interface.mjs';
|
|
18
|
+
export { TableForm } from './components/table-form/index.mjs';
|
|
19
|
+
export { TableFormItem } from './components/table-form/TableFormItem.mjs';
|
|
16
20
|
|
|
17
21
|
"use strict";
|
|
18
22
|
const install = (app) => {
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/index.ts"],"sourcesContent":["import * as components from \"./components\";\r\nimport type { App, DefineComponent, Plugin } from \"vue\";\r\n\r\n// import { version } from \"../package.json\";\r\n\r\nexport * from \"./components\";\r\n\r\n// 定义组件类型,确保每个组件都可能具有 `install` 方法\r\ntype ComponentWithInstall = DefineComponent<\r\n never,\r\n never,\r\n never\r\n> & {\r\n install?: (app: App) => void;\r\n};\r\n\r\nexport const install = (app: App) => {\r\n Object.keys(components).forEach(key => {\r\n const component = components[\r\n key as keyof typeof components\r\n ] as ComponentWithInstall;\r\n // 类型断言,告诉 TypeScript component 可能是一个插件\r\n const plugin = component as Plugin;\r\n // 如果组件有 install 方法,则按插件安装\r\n if (plugin.install) {\r\n app.use(plugin);\r\n }\r\n });\r\n};\r\n\r\nexport default {\r\n // version,\r\n install\r\n};\r\n"],"names":["components"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/index.ts"],"sourcesContent":["import * as components from \"./components\";\r\nimport type { App, DefineComponent, Plugin } from \"vue\";\r\n\r\n// import { version } from \"../package.json\";\r\n\r\nexport * from \"./components\";\r\n\r\n// 定义组件类型,确保每个组件都可能具有 `install` 方法\r\ntype ComponentWithInstall = DefineComponent<\r\n never,\r\n never,\r\n never\r\n> & {\r\n install?: (app: App) => void;\r\n};\r\n\r\nexport const install = (app: App) => {\r\n Object.keys(components).forEach(key => {\r\n const component = components[\r\n key as keyof typeof components\r\n ] as ComponentWithInstall;\r\n // 类型断言,告诉 TypeScript component 可能是一个插件\r\n const plugin = component as Plugin;\r\n // 如果组件有 install 方法,则按插件安装\r\n if (plugin.install) {\r\n app.use(plugin);\r\n }\r\n });\r\n};\r\n\r\nexport default {\r\n // version,\r\n install\r\n};\r\n"],"names":["components"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgBO,MAAM,OAAA,GAAU,CAAC,GAAA,KAAa;AACnC,EAAA,MAAA,CAAO,IAAA,CAAKA,OAAU,CAAA,CAAE,OAAA,CAAQ,CAAA,GAAA,KAAO;AACrC,IAAA,MAAM,SAAA,GAAYA,QAChB,GACF,CAAA;AAEA,IAAA,MAAM,MAAA,GAAS,SAAA;AAEf,IAAA,IAAI,OAAO,OAAA,EAAS;AAClB,MAAA,GAAA,CAAI,IAAI,MAAM,CAAA;AAAA,IAChB;AAAA,EACF,CAAC,CAAA;AACH;AAEA,YAAe;AAAA;AAAA,EAEb;AACF,CAAA;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const withInstall = (component) => {
|
|
3
|
+
const comp = component;
|
|
4
|
+
if (!comp.install) {
|
|
5
|
+
comp.install = (app) => {
|
|
6
|
+
const name = comp.name;
|
|
7
|
+
if (name) {
|
|
8
|
+
app.component(name, comp);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
return comp;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { withInstall };
|
|
16
|
+
//# sourceMappingURL=withInstall.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withInstall.mjs","sources":["../../../src/utils/withInstall.ts"],"sourcesContent":["// src/utils/withInstall.ts\r\n\r\nimport type { App, Component, Plugin } from \"vue\";\r\n\r\n// 扩展类型定义,允许组件对象拥有其他静态属性\r\nexport type SFCWithInstall<T> = T &\r\n Plugin & {\r\n [key: string]: T; // 允许任意静态属性\r\n };\r\n\r\n/**\r\n * 优化后的 withInstall 辅助函数\r\n * * 关键修改:\r\n * - 将泛型 T 的约束改为更通用的 Vue Component 类型。\r\n * - 使用 'Component' 或 'ComponentOptionsBase' 来确保兼容性。\r\n */\r\nexport const withInstall = <T extends Component>(component: T) => {\r\n const comp = component as SFCWithInstall<T>;\r\n\r\n if (!comp.install) {\r\n comp.install = (app: App) => {\r\n // 确保能获取到组件名\r\n const name = (comp as Component).name;\r\n if (name) {\r\n app.component(name, comp);\r\n }\r\n };\r\n }\r\n return comp;\r\n};\r\n"],"names":[],"mappings":";AAgBO,MAAM,WAAA,GAAc,CAAsB,SAAA,KAAiB;AAChE,EAAA,MAAM,IAAA,GAAO,SAAA;AAEb,EAAA,IAAI,CAAC,KAAK,OAAA,EAAS;AACjB,IAAA,IAAA,CAAK,OAAA,GAAU,CAAC,GAAA,KAAa;AAE3B,MAAA,MAAM,OAAQ,IAAA,CAAmB,IAAA;AACjC,MAAA,IAAI,IAAA,EAAM;AACR,QAAA,GAAA,CAAI,SAAA,CAAU,MAAM,IAAI,CAAA;AAAA,MAC1B;AAAA,IACF,CAAA;AAAA,EACF;AACA,EAAA,OAAO,IAAA;AACT;;;;"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const Card: import("../../utils/withInstall").SFCWithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
title: StringConstructor;
|
|
3
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
4
|
+
title: StringConstructor;
|
|
5
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
|
|
6
|
+
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../src/components/card/Card.tsx"],"names":[],"mappings":"AAiDA,eAAO,MAAM,IAAI;;;;kGAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../../src/components/card/style.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ;;;;;;;CA+BpB,CAAC"}
|
|
@@ -25,6 +25,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
25
25
|
setNestedValue: <T extends Record<string, unknown>>(obj: T, field: string | string[], value: string | null) => T;
|
|
26
26
|
props: any;
|
|
27
27
|
emits: (event: "update:value" | "change", ...args: any[]) => void;
|
|
28
|
+
attrs: {
|
|
29
|
+
[x: string]: unknown;
|
|
30
|
+
};
|
|
28
31
|
innerValue: import("vue").Ref<any, any>;
|
|
29
32
|
handleChange: (dates: [any, any]) => void;
|
|
30
33
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:value" | "change")[], "update:value" | "change", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RangePicker.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/date/RangePicker.vue.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;2BAwBS,MAAM,GAAG,MAAM,EAAE,KACvB,MAAM,EAAE;qBAKa,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,OAClD,CAAC,SACC,MAAM,GAAG,MAAM,EAAE,KACvB,MAAM,GAAG,IAAI,GAAG,SAAS;qBAmBJ,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,OAClD,CAAC,SACC,MAAM,GAAG,MAAM,EAAE,SACjB,MAAM,GAAG,IAAI,KACnB,CAAC
|
|
1
|
+
{"version":3,"file":"RangePicker.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/date/RangePicker.vue.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;2BAwBS,MAAM,GAAG,MAAM,EAAE,KACvB,MAAM,EAAE;qBAKa,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,OAClD,CAAC,SACC,MAAM,GAAG,MAAM,EAAE,KACvB,MAAM,GAAG,IAAI,GAAG,SAAS;qBAmBJ,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,OAClD,CAAC,SACC,MAAM,GAAG,MAAM,EAAE,SACjB,MAAM,GAAG,IAAI,KACnB,CAAC;;;;;;;0BAmDyB,CAAC,GAAG,EAAE,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA/FvC,wBAwIE"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from "./card";
|
|
1
2
|
export * from "./date";
|
|
2
3
|
export { default as DicRep } from "./dic";
|
|
3
4
|
export * from "./form";
|
|
@@ -6,4 +7,5 @@ export * from "./layout";
|
|
|
6
7
|
export { default as Select } from "./select";
|
|
7
8
|
export { default as Tab } from "./tab";
|
|
8
9
|
export { default as Table } from "./table";
|
|
10
|
+
export * from "./table-form";
|
|
9
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AACA,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1C,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AACA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1C,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ComputedRef, VNode } from "vue";
|
|
2
|
+
export declare const AppContextKey: unique symbol;
|
|
3
|
+
export interface AppContext {
|
|
4
|
+
watermarkContent?: ComputedRef<{
|
|
5
|
+
content: string;
|
|
6
|
+
}>;
|
|
7
|
+
renderMenuIcon?: (item: {
|
|
8
|
+
icon: string;
|
|
9
|
+
}) => VNode | VNode[];
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=AppContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppContext.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/AppContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AAEzC,eAAO,MAAM,aAAa,eAA2B,CAAC;AACtD,MAAM,WAAW,UAAU;IAEzB,gBAAgB,CAAC,EAAE,WAAW,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACpD,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE;QACtB,IAAI,EAAE,MAAM,CAAC;KACd,KAAK,KAAK,GAAG,KAAK,EAAE,CAAC;CACvB"}
|
|
@@ -11,6 +11,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
11
11
|
required: false;
|
|
12
12
|
default: boolean;
|
|
13
13
|
};
|
|
14
|
+
renderMenuIcon: {
|
|
15
|
+
type: FunctionConstructor;
|
|
16
|
+
required: false;
|
|
17
|
+
default: undefined;
|
|
18
|
+
};
|
|
14
19
|
}>, {
|
|
15
20
|
props: any;
|
|
16
21
|
emits: (event: "onMenuClick", ...args: any[]) => void;
|
|
@@ -27,14 +32,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
27
32
|
}>;
|
|
28
33
|
modeConfig: import("vue").Ref<import("@ditari/store/dist/types/modules/useAppStore").Mode, import("@ditari/store/dist/types/modules/useAppStore").Mode>;
|
|
29
34
|
sideTokenStyle: import("vue").Ref<Record<string, string>, Record<string, string>>;
|
|
30
|
-
route: import("vue-router").RouteLocationNormalizedLoadedGeneric;
|
|
31
35
|
onMenuClick: (item: never) => void;
|
|
32
36
|
layoutStyle: string;
|
|
33
37
|
siderStyle: import("vue").ComputedRef<string>;
|
|
34
38
|
rightStyle: import("vue").ComputedRef<string>;
|
|
35
39
|
rightContentStyle: import("vue").ComputedRef<string>;
|
|
36
40
|
useKeepAlive: () => void;
|
|
37
|
-
useWatermark: () => void;
|
|
38
41
|
useStyle: () => {
|
|
39
42
|
layoutStyle: string;
|
|
40
43
|
siderStyle: import("vue").ComputedRef<string>;
|
|
@@ -203,11 +206,17 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
203
206
|
required: false;
|
|
204
207
|
default: boolean;
|
|
205
208
|
};
|
|
209
|
+
renderMenuIcon: {
|
|
210
|
+
type: FunctionConstructor;
|
|
211
|
+
required: false;
|
|
212
|
+
default: undefined;
|
|
213
|
+
};
|
|
206
214
|
}>> & Readonly<{
|
|
207
215
|
onOnMenuClick?: ((...args: any[]) => any) | undefined;
|
|
208
216
|
}>, {
|
|
209
217
|
watermark: Record<string, any>;
|
|
210
218
|
isSettings: boolean;
|
|
219
|
+
renderMenuIcon: Function;
|
|
211
220
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
212
221
|
export default _default;
|
|
213
222
|
//# sourceMappingURL=Layout.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Layout.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/Layout.vue.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Layout.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/Layout.vue.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA4H6B,KAAK;;;;;;;;;;;;;4BAAL,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAtHhC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYT,wBAwHE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Show.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/Show.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Show.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/Show.tsx"],"names":[],"mappings":"AA+BA,QAAA,MAAM,IAAI;;;;;;;;;;;;4EA+IR,CAAC;AAEH,eAAe,IAAI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeApp.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layout/components/layout/ThemeApp.vue.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAc,MAAM,KAAK,CAAC;;;;;;;;;;oBAkBjB;QAAE,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;KAAE;;;;;;;;;;AAX/C,
|
|
1
|
+
{"version":3,"file":"ThemeApp.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layout/components/layout/ThemeApp.vue.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAc,MAAM,KAAK,CAAC;;;;;;;;;;oBAkBjB;QAAE,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;KAAE;;;;;;;;;;AAX/C,wBA0EE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layout/components/menu/Menu.tsx"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layout/components/menu/Menu.tsx"],"names":[],"mappings":";;;AAkBA,wBA4PG"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ComputedRef } from "vue";
|
|
2
|
+
import { StylesConfig } from "./interface";
|
|
3
|
+
export declare const FormContextKey: unique symbol;
|
|
4
|
+
export interface TableFormContext {
|
|
5
|
+
isFormParent: true;
|
|
6
|
+
span: ComputedRef<number>;
|
|
7
|
+
isReadonly: ComputedRef<boolean>;
|
|
8
|
+
fieldErrors: ComputedRef<Record<string, string | undefined>>;
|
|
9
|
+
stylesConfig: ComputedRef<StylesConfig>;
|
|
10
|
+
model: ComputedRef<Record<string, unknown>>;
|
|
11
|
+
}
|
|
12
|
+
export declare const TableForm: import("../../utils/withInstall").SFCWithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
13
|
+
colCount: {
|
|
14
|
+
type: NumberConstructor;
|
|
15
|
+
default: number;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
readonly: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: boolean;
|
|
21
|
+
};
|
|
22
|
+
stylesConfig: {
|
|
23
|
+
type: import("vue").PropType<StylesConfig>;
|
|
24
|
+
default: () => {
|
|
25
|
+
rowHeight?: number;
|
|
26
|
+
borderColor?: string;
|
|
27
|
+
borderWidth?: number;
|
|
28
|
+
labelBgColor?: string;
|
|
29
|
+
focusBorderColor?: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
33
|
+
colCount: {
|
|
34
|
+
type: NumberConstructor;
|
|
35
|
+
default: number;
|
|
36
|
+
required: true;
|
|
37
|
+
};
|
|
38
|
+
readonly: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: boolean;
|
|
41
|
+
};
|
|
42
|
+
stylesConfig: {
|
|
43
|
+
type: import("vue").PropType<StylesConfig>;
|
|
44
|
+
default: () => {
|
|
45
|
+
rowHeight?: number;
|
|
46
|
+
borderColor?: string;
|
|
47
|
+
borderWidth?: number;
|
|
48
|
+
labelBgColor?: string;
|
|
49
|
+
focusBorderColor?: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
}>> & Readonly<{}>, {
|
|
53
|
+
colCount: number;
|
|
54
|
+
readonly: boolean;
|
|
55
|
+
stylesConfig: StylesConfig;
|
|
56
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
|
|
57
|
+
//# sourceMappingURL=TableForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableForm.d.ts","sourceRoot":"","sources":["../../../../src/components/table-form/TableForm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,WAAW,EAMZ,MAAM,KAAK,CAAC;AASb,OAAO,EAEL,YAAY,EAEb,MAAM,aAAa,CAAC;AAYrB,eAAO,MAAM,cAAc,eAE1B,CAAC;AAGF,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,IAAI,CAAC;IACnB,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC1B,UAAU,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IACjC,WAAW,EAAE,WAAW,CACtB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CACnC,CAAC;IACF,YAAY,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC;IACxC,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAC7C;AA0ID,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6EAA0B,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const TableFormItem: import("../../utils/withInstall").SFCWithInstall<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
dicName: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
default: undefined;
|
|
5
|
+
};
|
|
6
|
+
format: {
|
|
7
|
+
type: import("vue").PropType<import("./interface").Formatter> | undefined;
|
|
8
|
+
default: undefined;
|
|
9
|
+
};
|
|
10
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
11
|
+
dicName: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: undefined;
|
|
14
|
+
};
|
|
15
|
+
format: {
|
|
16
|
+
type: import("vue").PropType<import("./interface").Formatter> | undefined;
|
|
17
|
+
default: undefined;
|
|
18
|
+
};
|
|
19
|
+
}>> & Readonly<{}>, {
|
|
20
|
+
format: import("./interface").Formatter;
|
|
21
|
+
dicName: string;
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>>;
|
|
23
|
+
//# sourceMappingURL=TableFormItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableFormItem.d.ts","sourceRoot":"","sources":["../../../../src/components/table-form/TableFormItem.tsx"],"names":[],"mappings":"AA+KA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;6EAA8B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TableForm } from "./TableForm";
|
|
2
|
+
import { TableFormItem } from "./TableFormItem";
|
|
3
|
+
type TableFormWithItem = typeof TableForm & {
|
|
4
|
+
Item: typeof TableFormItem;
|
|
5
|
+
};
|
|
6
|
+
declare const TableFormExport: TableFormWithItem;
|
|
7
|
+
export { TableFormExport as TableForm, TableFormItem };
|
|
8
|
+
export * from "./interface";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table-form/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,KAAK,iBAAiB,GAAG,OAAO,SAAS,GAAG;IAC1C,IAAI,EAAE,OAAO,aAAa,CAAC;CAC5B,CAAC;AAIF,QAAA,MAAM,eAAe,EAAgB,iBAAiB,CAAC;AAMvD,OAAO,EAAE,eAAe,IAAI,SAAS,EAAE,aAAa,EAAE,CAAC;AAEvD,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { ExtractPropTypes, PropType } from "vue";
|
|
2
|
+
export interface DTableFormItemProps {
|
|
3
|
+
name: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
required?: boolean;
|
|
6
|
+
rules?: unknown[];
|
|
7
|
+
colon?: boolean;
|
|
8
|
+
extra?: string;
|
|
9
|
+
}
|
|
10
|
+
export type Formatter = (value: unknown, name: unknown) => unknown;
|
|
11
|
+
export declare const tableFormItemProps: {
|
|
12
|
+
dicName: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: undefined;
|
|
15
|
+
};
|
|
16
|
+
format: {
|
|
17
|
+
type: PropType<Formatter> | undefined;
|
|
18
|
+
default: undefined;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export declare const DEFAULT_STYLES_CONFIG: StylesConfig;
|
|
22
|
+
export interface StylesConfig {
|
|
23
|
+
/**
|
|
24
|
+
* 表格行高度
|
|
25
|
+
*/
|
|
26
|
+
rowHeight?: number;
|
|
27
|
+
borderColor?: string;
|
|
28
|
+
borderWidth?: number;
|
|
29
|
+
labelBgColor?: string;
|
|
30
|
+
focusBorderColor?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare const tableFormProps: {
|
|
33
|
+
colCount: {
|
|
34
|
+
type: NumberConstructor;
|
|
35
|
+
default: number;
|
|
36
|
+
required: true;
|
|
37
|
+
};
|
|
38
|
+
readonly: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: boolean;
|
|
41
|
+
};
|
|
42
|
+
stylesConfig: {
|
|
43
|
+
type: PropType<StylesConfig>;
|
|
44
|
+
default: () => {
|
|
45
|
+
/**
|
|
46
|
+
* 表格行高度
|
|
47
|
+
*/
|
|
48
|
+
rowHeight?: number;
|
|
49
|
+
borderColor?: string;
|
|
50
|
+
borderWidth?: number;
|
|
51
|
+
labelBgColor?: string;
|
|
52
|
+
focusBorderColor?: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
export type TableFormItemProps = Partial<ExtractPropTypes<typeof tableFormItemProps>>;
|
|
57
|
+
//# sourceMappingURL=interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../src/components/table-form/interface.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAGtD,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,SAAS,GAAG,CACtB,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,OAAO,KACV,OAAO,CAAC;AAGb,eAAO,MAAM,kBAAkB;;;;;;cAOT,QAAQ,CAAC,SAAS,CAAC,GAAG,SAAS;;;CAIpD,CAAC;AAGF,eAAO,MAAM,qBAAqB,EAAE,YAMnC,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,eAAO,MAAM,cAAc;;;;;;;;;;;cAWP,QAAQ,CAAC,YAAY,CAAC;;YAzBxC;;eAEG;wBACS,MAAM;0BAEJ,MAAM;0BAEN,MAAM;2BAEL,MAAM;+BAEF,MAAM;;;CAiB1B,CAAC;AAGF,MAAM,MAAM,kBAAkB,GAAG,OAAO,CACtC,gBAAgB,CAAC,OAAO,kBAAkB,CAAC,CAC5C,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComputedRef } from "vue";
|
|
2
|
+
import { StylesConfig } from "./interface";
|
|
3
|
+
import type { GlobalToken } from "ant-design-vue/es/theme/interface";
|
|
4
|
+
/**
|
|
5
|
+
* 表单项样式
|
|
6
|
+
*/
|
|
7
|
+
export declare const useFormItemStyle: (styles: StylesConfig, _token: ComputedRef<GlobalToken>) => {
|
|
8
|
+
cellBorderStyle: string;
|
|
9
|
+
valueDisplayClass: string;
|
|
10
|
+
textWrapperClass: string;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../../src/components/table-form/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAElC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,gBAAgB,WACnB,YAAY,UACZ,WAAW,CAAC,WAAW,CAAC;;;;CAsHjC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComputedRef } from "vue";
|
|
2
|
+
import type { GlobalToken } from "ant-design-vue/es/theme/interface";
|
|
3
|
+
export declare function useDesign(scope: string): {
|
|
4
|
+
prefixCls: ComputedRef<string>;
|
|
5
|
+
getPrefixCls: (blockSuffix?: string) => string;
|
|
6
|
+
};
|
|
7
|
+
export declare function useAntdToken(): ComputedRef<GlobalToken>;
|
|
8
|
+
//# sourceMappingURL=useDesign.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDesign.d.ts","sourceRoot":"","sources":["../../../src/hooks/useDesign.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,WAAW,EAAE,MAAM,KAAK,CAAC;AAG5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAKrE,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM;;iCAQD,MAAM;EAY3C;AAED,wBAAgB,YAAY,IAAI,WAAW,CAAC,WAAW,CAAC,CAIvD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Component, Plugin } from "vue";
|
|
2
|
+
export type SFCWithInstall<T> = T & Plugin & {
|
|
3
|
+
[key: string]: T;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* 优化后的 withInstall 辅助函数
|
|
7
|
+
* * 关键修改:
|
|
8
|
+
* - 将泛型 T 的约束改为更通用的 Vue Component 类型。
|
|
9
|
+
* - 使用 'Component' 或 'ComponentOptionsBase' 来确保兼容性。
|
|
10
|
+
*/
|
|
11
|
+
export declare const withInstall: <T extends Component>(component: T) => SFCWithInstall<T>;
|
|
12
|
+
//# sourceMappingURL=withInstall.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withInstall.d.ts","sourceRoot":"","sources":["../../../src/utils/withInstall.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAO,SAAS,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAGlD,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,GAC/B,MAAM,GAAG;IACP,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;CAClB,CAAC;AAEJ;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,SAAS,aAAa,CAAC,sBAa5D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ditari/bsui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"./theme/*": "./dist/style/*"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@ditari/store": "^5.0
|
|
33
|
-
"@ditari/core": "^5.0
|
|
32
|
+
"@ditari/store": "^5.1.0",
|
|
33
|
+
"@ditari/core": "^5.1.0"
|
|
34
34
|
}
|
|
35
35
|
}
|