morghulis 1.0.33 → 1.0.35
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/README.md +25 -1
- package/dist/index.js +12904 -12299
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
@@ -5,9 +5,12 @@ Morghulis是一个基于Vue 3的UI组件和工具函数库,提供了常用的U
|
|
5
5
|
## 安装
|
6
6
|
|
7
7
|
```bash
|
8
|
+
# 安装Morghulis库
|
8
9
|
npm install morghulis
|
9
10
|
```
|
10
11
|
|
12
|
+
> **注意**:Morghulis已内置Element Plus依赖,无需单独安装。Element Plus组件可直接使用。
|
13
|
+
|
11
14
|
## 使用方法
|
12
15
|
|
13
16
|
### 作为Vue插件使用
|
@@ -17,6 +20,8 @@ import { createApp } from 'vue'
|
|
17
20
|
import App from './App.vue'
|
18
21
|
import { createMorghulis } from 'morghulis'
|
19
22
|
|
23
|
+
// Element Plus样式已在库中导入,无需手动导入
|
24
|
+
|
20
25
|
const app = createApp(App)
|
21
26
|
|
22
27
|
// 使用默认配置
|
@@ -96,10 +101,29 @@ const customMessage: MMsg = {
|
|
96
101
|
<!-- FontAwesome图标使用 -->
|
97
102
|
<fa icon="user" />
|
98
103
|
|
99
|
-
<!-- Element Plus
|
104
|
+
<!-- Element Plus组件可以直接使用,无需额外导入 -->
|
100
105
|
<el-button type="primary">按钮</el-button>
|
106
|
+
<el-space>
|
107
|
+
<el-tag>标签一</el-tag>
|
108
|
+
<el-tag>标签二</el-tag>
|
109
|
+
</el-space>
|
110
|
+
<el-date-picker v-model="date" type="date" placeholder="选择日期" />
|
101
111
|
</div>
|
102
112
|
</template>
|
113
|
+
|
114
|
+
<script setup>
|
115
|
+
import { ref } from 'vue'
|
116
|
+
|
117
|
+
const date = ref('')
|
118
|
+
</script>
|
119
|
+
```
|
120
|
+
|
121
|
+
如果需要手动导入特定组件,也可以从morghulis导入:
|
122
|
+
|
123
|
+
```js
|
124
|
+
import { ElementPlusComponents } from 'morghulis'
|
125
|
+
|
126
|
+
const { ElButton, ElSpace, ElTag } = ElementPlusComponents
|
103
127
|
```
|
104
128
|
|
105
129
|
## Recommended IDE Setup
|