gi-component 0.0.31 → 0.0.33

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "gi-component",
3
3
  "type": "module",
4
- "version": "0.0.31",
4
+ "version": "0.0.33",
5
5
  "description": "Vue3中基于Element Plus二次封装基础组件库",
6
6
  "author": "lin",
7
7
  "license": "MIT",
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="el-message-box__container">
2
+ <div class="el-message-box__container" :class="b('dialog-content')">
3
3
  <el-icon class="el-message-box__status" :class="`el-message-box-icon--${props.type}`">
4
4
  <InfoFilled v-if="props.type === 'info'" />
5
5
  <SuccessFilled v-else-if="props.type === 'success'" />
@@ -14,6 +14,7 @@
14
14
 
15
15
  <script setup lang="ts">
16
16
  import { CircleCloseFilled, InfoFilled, SuccessFilled, WarningFilled } from '@element-plus/icons-vue'
17
+ import { useBemClass } from '../../../hooks'
17
18
 
18
19
  interface Props {
19
20
  type?: 'info' | 'success' | 'warning' | 'error'
@@ -24,4 +25,21 @@ const props = withDefaults(defineProps<Props>(), {
24
25
  type: 'info',
25
26
  content: ''
26
27
  })
28
+
29
+ const { b } = useBemClass()
27
30
  </script>
31
+
32
+ <style lang="scss" scoped>
33
+ @use '../../../styles/var.scss' as a;
34
+
35
+ .#{a.$prefix}-dialog-content {
36
+ .el-message-box__status {
37
+ width: 24px;
38
+ height: 24px;
39
+ }
40
+
41
+ .el-message-box__message {
42
+ font-size: 15px;
43
+ }
44
+ }
45
+ </style>
@@ -126,3 +126,6 @@ export function createDialog() {
126
126
 
127
127
  // 默认导出实例
128
128
  export const Dialog = createDialog()
129
+
130
+ // 防止打包时 tree-shake 掉 info/success/warning/error(此处引用保证被打包)
131
+ void [Dialog.info, Dialog.success, Dialog.warning, Dialog.error]
@@ -8,7 +8,7 @@
8
8
  <div v-if="slots.left && props.collapse" :class="b('page-layout__split')">
9
9
  <SplitButton :collapsed="Number(size) === 0" @click="handleClick"></SplitButton>
10
10
  </div>
11
- <ElSplitterPanel>
11
+ <ElSplitterPanel :resizable="props.collapse">
12
12
  <div :class="b('page-layout__right')">
13
13
  <div v-if="slots.header" :class="b('page-layout__header')" :style="props.headerStyle">
14
14
  <slot name="header"></slot>
@@ -3,7 +3,7 @@
3
3
  // Generated by unplugin-vue-components
4
4
  // Read more: https://github.com/vuejs/core/pull/3399
5
5
  // biome-ignore lint: disable
6
- export { }
6
+ export {}
7
7
 
8
8
  /* prettier-ignore */
9
9
  declare module 'vue' {
@@ -11,8 +11,9 @@ declare module 'vue' {
11
11
  GiButton: typeof import('./components/button/src/button.vue')['default']
12
12
  GiCard: typeof import('./components/card/src/card.vue')['default']
13
13
  GiDialog: typeof import('./components/dialog/src/dialog.vue')['default']
14
- GiDrawer: typeof import('./components/drawer/src/drawer.vue')['default']
14
+ GiDialogContent: typeof import('./components/dialog/src/dialog-content.vue')['default']
15
15
  GiDot: typeof import('./components/dot/src/dot.vue')['default']
16
+ GiDrawer: typeof import('./components/drawer/src/drawer.vue')['default']
16
17
  GiEditTable: typeof import('./components/edit-table/src/edit-table.vue')['default']
17
18
  GiForm: typeof import('./components/form/src/form.vue')['default']
18
19
  GiGrid: typeof import('./components/grid/src/grid.vue')['default']