fengmao-ui 1.3.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 fengmao
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,83 @@
1
+ # fengmao-ui
2
+
3
+ ## [Vue2 基于 Element-ui 基础组件传送门]
4
+
5
+ > 基于 Element-ui 二次封装基础组件地址
6
+
7
+ > 基于 ant-design-vue 二次封装基础组件地址(期待中)
8
+
9
+ ## 介绍
10
+
11
+ > 基于 vue3+ ts+ Element-plus 二次封装组件
12
+
13
+ 这是我在学习 Vue3 中基于[Element-plus](https://element-plus.org/zh-CN/) 二次封装基础组件文档,希望对你有用。Table 组件使用方式:
14
+
15
+ ## npm 方式安装使用
16
+
17
+ ```shell
18
+ npm i fengmao-ui
19
+ ```
20
+
21
+ ## 全局注册使用
22
+
23
+ > ### 前提条件:使用项目必须全局注册 Element-plus 组件库
24
+
25
+ ```js
26
+ // 在main.js中按下引入
27
+ import fengmaoUi from 'fengmao-ui'
28
+ import 'fengmao-ui/lib/style.css'
29
+ Vue.use(fengmaoUi)
30
+ ```
31
+
32
+ ## 按需引入
33
+
34
+ ```js
35
+ // 在main.js中按下引入
36
+ import 'fengmao-ui/lib/style.css'
37
+ // 单个.vue文件引入
38
+ ;<script setup lang="ts">
39
+ import {(TDetail, TForm)} from "fengmao-ui"
40
+ </script>
41
+ ```
42
+
43
+ ## fengmao-ui Volar 组件类型提示
44
+
45
+ ```js
46
+ // 需要在使用的项目的tsconfig.json文件中添加以下
47
+ compilerOptions:{
48
+ "types": [
49
+ "fengmao-ui/components.d.ts",
50
+ ],
51
+ }
52
+
53
+ ```
54
+
55
+ ## Vue3 + Vite 项目中安装引入报如下错误的解决方法
56
+
57
+ > #### 把项目的 vite 版本升级到 4+
58
+
59
+ <img src="./README_GIF/error.png">
60
+
61
+ ## 安装依赖
62
+
63
+ > ### 注意: 本地环境版本最好安装 [Node.js 16.x+](https://nodejs.org/en)、[pnpm 7.x+](https://github.com/pnpm/pnpm/)
64
+
65
+ ```shell
66
+ npm install -g pnpm
67
+
68
+ pnpm install
69
+
70
+ ```
71
+
72
+ ## Git 提交规范
73
+
74
+ - `ci`: ci 配置文件和脚本的变动;
75
+ - `chore`: 构建系统或辅助工具的变动;
76
+ - `fix`: 代码 BUG 修复;
77
+ - `feat`: 新功能;
78
+ - `perf`: 性能优化和提升;
79
+ - `refactor`: 仅仅是代码变动,既不是修复 BUG 也不是引入新功能;
80
+ - `style`: 代码格式调整,可能是空格、分号、缩进等等;
81
+ - `docs`: 文档变动;
82
+ - `test`: 补充缺失的测试用例或者修正现有的测试用例;
83
+ - `revert`: 回滚操作;
package/global.d.ts ADDED
@@ -0,0 +1,137 @@
1
+ import TLayoutPage from './lib/layout-page/src/index.vue'
2
+ import TLayoutPageItem from './lib/layout-page-item/src/index.vue'
3
+ import TQueryCondition from './lib/query-condition/src/index.vue'
4
+ import TTable from './lib/table/src/index.vue'
5
+ import TForm from './lib/form/src/index.vue'
6
+ import TSelect from './lib/select/src/index.vue'
7
+ import TSelectTable from './lib/select-table/src/index.vue'
8
+ import TDetail from './lib/detail/src/index.vue'
9
+ import TButton from './lib/button/src/index.vue'
10
+ import TStepWizard from './lib/step-wizard/src/index.vue'
11
+ import TTimerBtn from './lib/timer-btn/src/index.vue'
12
+ import TModuleForm from './lib/module-form/src/index.vue'
13
+ import TAdaptivePage from './lib/adaptive-page/src/index.vue'
14
+ import TDatePicker from './lib/date-picker/src/index.vue'
15
+ // GlobalComponents for Volar
16
+ declare module '@vue/runtime-core' {
17
+ export interface GlobalComponents {
18
+ ElAffix: typeof import('element-plus')['ElAffix']
19
+ ElAlert: typeof import('element-plus')['ElAlert']
20
+ ElAside: typeof import('element-plus')['ElAside']
21
+ ElAutocomplete: typeof import('element-plus')['ElAutocomplete']
22
+ ElAvatar: typeof import('element-plus')['ElAvatar']
23
+ ElBacktop: typeof import('element-plus')['ElBacktop']
24
+ ElBadge: typeof import('element-plus')['ElBadge']
25
+ ElBreadcrumb: typeof import('element-plus')['ElBreadcrumb']
26
+ ElBreadcrumbItem: typeof import('element-plus')['ElBreadcrumbItem']
27
+ ElButton: typeof import('element-plus')['ElButton']
28
+ ElButtonGroup: typeof import('element-plus')['ElButtonGroup']
29
+ ElCalendar: typeof import('element-plus')['ElCalendar']
30
+ ElCard: typeof import('element-plus')['ElCard']
31
+ ElCarousel: typeof import('element-plus')['ElCarousel']
32
+ ElCarouselItem: typeof import('element-plus')['ElCarouselItem']
33
+ ElCascader: typeof import('element-plus')['ElCascader']
34
+ ElCascaderPanel: typeof import('element-plus')['ElCascaderPanel']
35
+ ElCheckbox: typeof import('element-plus')['ElCheckbox']
36
+ ElCheckboxButton: typeof import('element-plus')['ElCheckboxButton']
37
+ ElCheckboxGroup: typeof import('element-plus')['ElCheckboxGroup']
38
+ ElCol: typeof import('element-plus')['ElCol']
39
+ ElCollapse: typeof import('element-plus')['ElCollapse']
40
+ ElCollapseItem: typeof import('element-plus')['ElCollapseItem']
41
+ ElCollapseTransition: typeof import('element-plus')['ElCollapseTransition']
42
+ ElColorPicker: typeof import('element-plus')['ElColorPicker']
43
+ ElContainer: typeof import('element-plus')['ElContainer']
44
+ ElConfigProvider: typeof import('element-plus')['ElConfigProvider']
45
+ ElDatePicker: typeof import('element-plus')['ElDatePicker']
46
+ ElDialog: typeof import('element-plus')['ElDialog']
47
+ ElDivider: typeof import('element-plus')['ElDivider']
48
+ ElDrawer: typeof import('element-plus')['ElDrawer']
49
+ ElDropdown: typeof import('element-plus')['ElDropdown']
50
+ ElDropdownItem: typeof import('element-plus')['ElDropdownItem']
51
+ ElDropdownMenu: typeof import('element-plus')['ElDropdownMenu']
52
+ ElEmpty: typeof import('element-plus')['ElEmpty']
53
+ ElFooter: typeof import('element-plus')['ElFooter']
54
+ ElForm: typeof import('element-plus')['ElForm']
55
+ ElFormItem: typeof import('element-plus')['ElFormItem']
56
+ ElHeader: typeof import('element-plus')['ElHeader']
57
+ ElIcon: typeof import('element-plus')['ElIcon']
58
+ ElImage: typeof import('element-plus')['ElImage']
59
+ ElImageViewer: typeof import('element-plus')['ElImageViewer']
60
+ ElInput: typeof import('element-plus')['ElInput']
61
+ ElInputNumber: typeof import('element-plus')['ElInputNumber']
62
+ ElLink: typeof import('element-plus')['ElLink']
63
+ ElMain: typeof import('element-plus')['ElMain']
64
+ ElMenu: typeof import('element-plus')['ElMenu']
65
+ ElMenuItem: typeof import('element-plus')['ElMenuItem']
66
+ ElMenuItemGroup: typeof import('element-plus')['ElMenuItemGroup']
67
+ ElOption: typeof import('element-plus')['ElOption']
68
+ ElOptionGroup: typeof import('element-plus')['ElOptionGroup']
69
+ ElPageHeader: typeof import('element-plus')['ElPageHeader']
70
+ ElPagination: typeof import('element-plus')['ElPagination']
71
+ ElPopconfirm: typeof import('element-plus')['ElPopconfirm']
72
+ ElPopper: typeof import('element-plus')['ElPopper']
73
+ ElPopover: typeof import('element-plus')['ElPopover']
74
+ ElProgress: typeof import('element-plus')['ElProgress']
75
+ ElRadio: typeof import('element-plus')['ElRadio']
76
+ ElRadioButton: typeof import('element-plus')['ElRadioButton']
77
+ ElRadioGroup: typeof import('element-plus')['ElRadioGroup']
78
+ ElRate: typeof import('element-plus')['ElRate']
79
+ ElRow: typeof import('element-plus')['ElRow']
80
+ ElScrollbar: typeof import('element-plus')['ElScrollbar']
81
+ ElSelect: typeof import('element-plus')['ElSelect']
82
+ ElSlider: typeof import('element-plus')['ElSlider']
83
+ ElStep: typeof import('element-plus')['ElStep']
84
+ ElSteps: typeof import('element-plus')['ElSteps']
85
+ ElSubMenu: typeof import('element-plus')['ElSubMenu']
86
+ ElSwitch: typeof import('element-plus')['ElSwitch']
87
+ ElTabPane: typeof import('element-plus')['ElTabPane']
88
+ ElTable: typeof import('element-plus')['ElTable']
89
+ ElTableColumn: typeof import('element-plus')['ElTableColumn']
90
+ ElTabs: typeof import('element-plus')['ElTabs']
91
+ ElTag: typeof import('element-plus')['ElTag']
92
+ ElTimePicker: typeof import('element-plus')['ElTimePicker']
93
+ ElTimeSelect: typeof import('element-plus')['ElTimeSelect']
94
+ ElTimeline: typeof import('element-plus')['ElTimeline']
95
+ ElTimelineItem: typeof import('element-plus')['ElTimelineItem']
96
+ ElTooltip: typeof import('element-plus')['ElTooltip']
97
+ ElTransfer: typeof import('element-plus')['ElTransfer']
98
+ ElTree: typeof import('element-plus')['ElTree']
99
+ ElTreeV2: typeof import('element-plus')['ElTreeV2']
100
+ ElUpload: typeof import('element-plus')['ElUpload']
101
+ ElSpace: typeof import('element-plus')['ElSpace']
102
+ ElSkeleton: typeof import('element-plus')['ElSkeleton']
103
+ ElSkeletonItem: typeof import('element-plus')['ElSkeletonItem']
104
+ ElCheckTag: typeof import('element-plus')['ElCheckTag']
105
+ ElDescriptions: typeof import('element-plus')['ElDescriptions']
106
+ ElDescriptionsItem: typeof import('element-plus')['ElDescriptionsItem']
107
+ ElResult: typeof import('element-plus')['ElResult']
108
+ ElSelectV2: typeof import('element-plus')['ElSelectV2']
109
+ TLayoutPage: typeof TLayoutPage
110
+ TLayoutPageItem: typeof TLayoutPageItem
111
+ TQueryCondition: typeof TQueryCondition
112
+ TTable: typeof TTable
113
+ TForm: typeof TForm
114
+ TSelect: typeof TSelect
115
+ TSelectTable: typeof TSelectTable
116
+ TDetail: typeof TDetail
117
+ TButton: typeof TButton
118
+ TStepWizard: typeof TStepWizard
119
+ TTimerBtn: typeof TTimerBtn
120
+ TModuleForm: typeof TModuleForm
121
+ TAdaptivePage: typeof TAdaptivePage
122
+ TDatePicker: typeof TDatePicker
123
+ }
124
+
125
+ interface ComponentCustomProperties {
126
+ $message: typeof import('element-plus')['ElMessage']
127
+ $notify: typeof import('element-plus')['ElNotification']
128
+ $msgbox: typeof import('element-plus')['ElMessageBox']
129
+ $messageBox: typeof import('element-plus')['ElMessageBox']
130
+ $alert: typeof import('element-plus')['ElMessageBox']['alert']
131
+ $confirm: typeof import('element-plus')['ElMessageBox']['confirm']
132
+ $prompt: typeof import('element-plus')['ElMessageBox']['prompt']
133
+ $loading: typeof import('element-plus')['ElLoadingService']
134
+ }
135
+ }
136
+
137
+ export {}
Binary file