vue-2024-ui 0.0.5 → 0.0.6

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 CHANGED
@@ -1,29 +1,48 @@
1
- # vue-ele-ui
1
+ # vue-2024-ui
2
2
 
3
- This template should help get you started developing with Vue 3 in Vite.
3
+ vue + element-plus
4
4
 
5
- ## Recommended IDE Setup
5
+ ```
6
+ npm i vue-2024-ui
7
+ ```
6
8
 
7
- [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
9
+ # API 说明
10
+ ### 所有属性和方法都在element-plus 基础上扩展,只显示增加的属性和方法,安装前必须安装element-plus,其他原有属性和方法请查询 [官方文档](https://element-plus.org/zh-CN/component/overview.html)
8
11
 
9
- ## Customize configuration
12
+ # form 表单增加的属性
10
13
 
11
- See [Vite Configuration Reference](https://vitejs.dev/config/).
14
+ | 属性 | 说明 | 类型 | 默认值 |
15
+ | --------- | ------------------------------------------------------------------- | ------ | -------------------------------------------------------------------------------------------- |
16
+ | columns | 表单列数 | number | 2 |
17
+ | footer | 控制表单底部按钮是否显示和样式设置,hidden默认是false,style控制样式 | object | ```{hidden: false, style:{ display:"flex","align-items":"center",justifyContent:"center"}``` |
18
+ | submit | 表单提交按钮,增加了submitText,hidden 属性和submit方法 | object | ``` {type: "primary",submitText: "提交",hidden: false,submit: async (model) => {...}, } ``` |
19
+ | reset | 表单重置按钮,增加了restText,hidden 属性和reset方法 | object | ``` {type: "primary",resetText: "重置",hidden: false,reset: () => {...}, } ``` |
20
+ | formItems | 通过style属性设置所有items的样式 | object | ``` style:{width:100%} ``` |
12
21
 
13
- ## Project Setup
14
22
 
15
- ```sh
16
- npm install
17
- ```
23
+ # form 增加的事件
18
24
 
19
- ### Compile and Hot-Reload for Development
25
+ | 事件名 | 说明 | 类型 | 参数 |
26
+ | ------ | ------------ | -------- | -------------------------------------------------------------------------------------- |
27
+ | submit | 表单提交事件 | function | formData:表单要提交的数据 |
28
+ | reset | 表单重置事件 | function | callback(isCustReset=false) 默认已处理了重置事件,如要重写事件则回调时传入true后再处理 |
20
29
 
21
- ```sh
22
- npm run dev
23
- ```
24
30
 
25
- ### Compile and Minify for Production
26
31
 
27
- ```sh
28
- npm run build
29
- ```
32
+ # form 重写 slots 增加的插槽
33
+
34
+ | 插槽名 | 说明 |
35
+ | ------------ | ---------------------- |
36
+ | footer | 重写表单footer功能按钮 |
37
+ | footer-left | 表单左边增加按钮 |
38
+ | footer-right | 表单右边增加按钮 |
39
+
40
+ # formItem 重写 slots
41
+
42
+ | 插槽名 | 说明 |
43
+ | --------------------- | -------------------------------- |
44
+ | item.key | 重写表单项item |
45
+ | item.key-label | 重写表单项标题 |
46
+ | item.key-ctrl | 重写表单控件 |
47
+ | item.key-ctrl-options | 重写表单控件有options的字项items |
48
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-2024-ui",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "src/components/index.js",
@@ -84,7 +84,6 @@ model.value.form = {
84
84
  plain: true,
85
85
  hidden: false,
86
86
  submit: async (model) => {
87
- console.log(model);
88
87
  if (!gform.value) return
89
88
  await gform.value.validate((valid, fields) => {
90
89
  if (valid) {