gi-component 0.0.41 → 0.0.43
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/components/flex/src/type.d.ts +2 -0
- package/dist/components/table-pro/index.d.ts +4 -0
- package/dist/components/table-pro/src/table-pro-column-setting.vue.d.ts +13 -0
- package/dist/components/table-pro/src/type.d.ts +5 -0
- package/dist/components/tag/src/tag.vue.d.ts +10 -6
- package/dist/components/tag/src/type.d.ts +16 -5
- package/dist/gi.css +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.es.js +2191 -178
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/packages/components/card/src/card.vue +19 -19
- package/packages/components/flex/src/flex.vue +3 -3
- package/packages/components/flex/src/type.ts +4 -2
- package/packages/components.d.ts +33 -33
package/package.json
CHANGED
|
@@ -51,10 +51,10 @@ const getCardClass = computed(() => {
|
|
|
51
51
|
if (props.bordered) {
|
|
52
52
|
arr.push(b('card--bordered'))
|
|
53
53
|
}
|
|
54
|
+
arr.push(b(`card--${props.size}`))
|
|
54
55
|
if (props.inner) {
|
|
55
56
|
arr.push(b('card--inner'))
|
|
56
57
|
}
|
|
57
|
-
arr.push(b(`card--${props.size}`))
|
|
58
58
|
return arr.join(' ')
|
|
59
59
|
})
|
|
60
60
|
|
|
@@ -132,24 +132,6 @@ const getHeaderClass = computed(() => {
|
|
|
132
132
|
box-sizing: border-box;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
.#{a.$prefix}-card--full {
|
|
136
|
-
.#{a.$prefix}-card-body {
|
|
137
|
-
flex: 1;
|
|
138
|
-
display: flex;
|
|
139
|
-
flex-direction: column;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.#{a.$prefix}-card--inner {
|
|
144
|
-
|
|
145
|
-
.#{a.$prefix}-card-header,
|
|
146
|
-
.#{a.$prefix}-card-body,
|
|
147
|
-
.#{a.$prefix}-card-footer {
|
|
148
|
-
padding-left: 0;
|
|
149
|
-
padding-right: 0;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
135
|
.#{a.$prefix}-card--small {
|
|
154
136
|
.#{a.$prefix}-card-header {
|
|
155
137
|
height: 36px;
|
|
@@ -168,4 +150,22 @@ const getHeaderClass = computed(() => {
|
|
|
168
150
|
padding: var(--card-padding-y-small) var(--card-padding-x-small);
|
|
169
151
|
}
|
|
170
152
|
}
|
|
153
|
+
|
|
154
|
+
.#{a.$prefix}-card--full {
|
|
155
|
+
.#{a.$prefix}-card-body {
|
|
156
|
+
flex: 1;
|
|
157
|
+
display: flex;
|
|
158
|
+
flex-direction: column;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.#{a.$prefix}-card--inner {
|
|
163
|
+
|
|
164
|
+
.#{a.$prefix}-card-header,
|
|
165
|
+
.#{a.$prefix}-card-body,
|
|
166
|
+
.#{a.$prefix}-card-footer {
|
|
167
|
+
padding-left: 0;
|
|
168
|
+
padding-right: 0;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
171
|
</style>
|
|
@@ -24,8 +24,8 @@ const classNames = computed(() => [b('flex')])
|
|
|
24
24
|
|
|
25
25
|
const gapMap: Record<string, string> = {
|
|
26
26
|
small: '8px',
|
|
27
|
-
middle: '
|
|
28
|
-
large: '
|
|
27
|
+
middle: '12px',
|
|
28
|
+
large: '16px'
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
const resolvedGap = computed(() => {
|
|
@@ -50,7 +50,7 @@ const resolvedWrap = computed(() => {
|
|
|
50
50
|
const style = computed<CSSProperties>(() => {
|
|
51
51
|
const obj: CSSProperties = {
|
|
52
52
|
display: 'flex',
|
|
53
|
-
flexDirection: props.vertical ? 'column' : 'row',
|
|
53
|
+
flexDirection: props.column || props.vertical ? 'column' : 'row',
|
|
54
54
|
flexWrap: resolvedWrap.value,
|
|
55
55
|
justifyContent: props.justify,
|
|
56
56
|
alignItems: props.align
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
export interface FlexProps {
|
|
2
2
|
/** Flex 主轴的方向是否垂直,使用 flex-direction: column */
|
|
3
|
+
column?: boolean
|
|
4
|
+
/** 与 column 同义,保留用于兼容旧版 API */
|
|
3
5
|
vertical?: boolean
|
|
4
6
|
/** 设置元素单行显示还是多行显示,参考 flex-wrap;支持布尔值,true 为 wrap,false 为 nowrap */
|
|
5
7
|
wrap?: 'nowrap' | 'wrap' | 'wrap-reverse' | boolean | ''
|
|
6
8
|
/** 设置元素在主轴方向上的对齐方式,参考 justify-content */
|
|
7
|
-
justify?: 'normal' | 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly'
|
|
9
|
+
justify?: 'normal' | 'start' | 'end' | 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly'
|
|
8
10
|
/** 设置元素在交叉轴方向上的对齐方式,参考 align-items */
|
|
9
|
-
align?: 'normal' | 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline'
|
|
11
|
+
align?: 'normal' | 'start' | 'end' | 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline'
|
|
10
12
|
/** flex CSS 简写属性 */
|
|
11
13
|
flex?: string
|
|
12
14
|
/** 设置网格之间的间隙,可选预设 small / middle / large 或 string / number */
|
package/packages/components.d.ts
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
// Generated by unplugin-vue-components
|
|
4
|
-
// Read more: https://github.com/vuejs/core/pull/3399
|
|
5
|
-
// biome-ignore lint: disable
|
|
6
|
-
export {}
|
|
7
|
-
|
|
8
|
-
/* prettier-ignore */
|
|
9
|
-
declare module 'vue' {
|
|
10
|
-
export interface GlobalComponents {
|
|
11
|
-
GiButton: typeof import('./components/button/src/button.vue')['default']
|
|
12
|
-
GiCard: typeof import('./components/card/src/card.vue')['default']
|
|
13
|
-
GiDescriptions: typeof import('./components/descriptions/src/descriptions.vue')['default']
|
|
14
|
-
GiDialog: typeof import('./components/dialog/src/dialog.vue')['default']
|
|
15
|
-
GiDialogContent: typeof import('./components/dialog/src/dialog-content.vue')['default']
|
|
16
|
-
GiDot: typeof import('./components/dot/src/dot.vue')['default']
|
|
17
|
-
GiDrawer: typeof import('./components/drawer/src/drawer.vue')['default']
|
|
18
|
-
GiEditTable: typeof import('./components/edit-table/src/edit-table.vue')['default']
|
|
19
|
-
GiFlex: typeof import('./components/flex/src/flex.vue')['default']
|
|
20
|
-
GiForm: typeof import('./components/form/src/form.vue')['default']
|
|
21
|
-
GiGrid: typeof import('./components/grid/src/grid.vue')['default']
|
|
22
|
-
GiGridItem: typeof import('./components/grid/src/grid-item.vue')['default']
|
|
23
|
-
GiInputGroup: typeof import('./components/input-group/src/input-group.vue')['default']
|
|
24
|
-
GiInputSearch: typeof import('./components/input-search/src/input-search.vue')['default']
|
|
25
|
-
GiPageLayout: typeof import('./components/page-layout/src/page-layout.vue')['default']
|
|
26
|
-
GiSplitButton: typeof import('./components/page-layout/src/split-button.vue')['default']
|
|
27
|
-
GiTable: typeof import('./components/table/src/table.vue')['default']
|
|
28
|
-
GiTableColumn: typeof import('./components/table/src/TableColumn.vue')['default']
|
|
29
|
-
GiTabs: typeof import('./components/tabs/src/tabs.vue')['default']
|
|
30
|
-
GiTag: typeof import('./components/tag/src/tag.vue')['default']
|
|
31
|
-
GiTreeTransfer: typeof import('./components/tree-transfer/src/tree-transfer.vue')['default']
|
|
32
|
-
}
|
|
33
|
-
}
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
// Generated by unplugin-vue-components
|
|
4
|
+
// Read more: https://github.com/vuejs/core/pull/3399
|
|
5
|
+
// biome-ignore lint: disable
|
|
6
|
+
export {}
|
|
7
|
+
|
|
8
|
+
/* prettier-ignore */
|
|
9
|
+
declare module 'vue' {
|
|
10
|
+
export interface GlobalComponents {
|
|
11
|
+
GiButton: typeof import('./components/button/src/button.vue')['default']
|
|
12
|
+
GiCard: typeof import('./components/card/src/card.vue')['default']
|
|
13
|
+
GiDescriptions: typeof import('./components/descriptions/src/descriptions.vue')['default']
|
|
14
|
+
GiDialog: typeof import('./components/dialog/src/dialog.vue')['default']
|
|
15
|
+
GiDialogContent: typeof import('./components/dialog/src/dialog-content.vue')['default']
|
|
16
|
+
GiDot: typeof import('./components/dot/src/dot.vue')['default']
|
|
17
|
+
GiDrawer: typeof import('./components/drawer/src/drawer.vue')['default']
|
|
18
|
+
GiEditTable: typeof import('./components/edit-table/src/edit-table.vue')['default']
|
|
19
|
+
GiFlex: typeof import('./components/flex/src/flex.vue')['default']
|
|
20
|
+
GiForm: typeof import('./components/form/src/form.vue')['default']
|
|
21
|
+
GiGrid: typeof import('./components/grid/src/grid.vue')['default']
|
|
22
|
+
GiGridItem: typeof import('./components/grid/src/grid-item.vue')['default']
|
|
23
|
+
GiInputGroup: typeof import('./components/input-group/src/input-group.vue')['default']
|
|
24
|
+
GiInputSearch: typeof import('./components/input-search/src/input-search.vue')['default']
|
|
25
|
+
GiPageLayout: typeof import('./components/page-layout/src/page-layout.vue')['default']
|
|
26
|
+
GiSplitButton: typeof import('./components/page-layout/src/split-button.vue')['default']
|
|
27
|
+
GiTable: typeof import('./components/table/src/table.vue')['default']
|
|
28
|
+
GiTableColumn: typeof import('./components/table/src/TableColumn.vue')['default']
|
|
29
|
+
GiTabs: typeof import('./components/tabs/src/tabs.vue')['default']
|
|
30
|
+
GiTag: typeof import('./components/tag/src/tag.vue')['default']
|
|
31
|
+
GiTreeTransfer: typeof import('./components/tree-transfer/src/tree-transfer.vue')['default']
|
|
32
|
+
}
|
|
33
|
+
}
|