fast-crud-ui3 0.0.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/README.md ADDED
@@ -0,0 +1,106 @@
1
+ # fast-crud-ui3
2
+
3
+ > [fast-crud-ui](https://github.com/pengxianggui/fast-crud-ui)的vue3升级支持版本
4
+ >
5
+ > 后端: [传送门](https://github.com/pengxianggui/fast-crud)
6
+
7
+ ## 说明:
8
+
9
+ **fast-crud-ui3基于vue@^3.4.0 + element-plus@^2.3.12, fast-crud-ui3打包不会包含这两个组件,你必须在项目里单独安装并正确注册。
10
+ **
11
+
12
+ 如果针对element-ui你采用的是按需部分引入,请确保以下element-ui组件正确注册, 否则fast-crud-ui中部分内容将无法正常展示:
13
+
14
+ Table, TableColumn, Input, InputNumber, Checkbox, CheckboxGroup, Select, Option, DatePicker, Switch, TimePicker, Radio,
15
+ Upload, Row, Col, Button, Empty, Popover, Form, FormItem, Dropdown, DropdownMenu, DropdownItem, Pagination, Link
16
+
17
+ > node=18.16.0
18
+ > npm=9.5.1
19
+
20
+ ## 组件列表
21
+
22
+ - FastTable: 核心组件
23
+ - FastTableColumn: 只读列组件
24
+ - FastTableColumnInput: 文本输入框列组件
25
+ - FastTableColumnNumber: 数字输入框列组件
26
+ - FastTableColumnTextarea: 文本域输入框列组件
27
+ - FastTableColumnSelect: 下拉框列组件
28
+ - FastTableColumnSwitch: switch列组件
29
+ - FastTableColumnDatePicker: 日期选择列组件
30
+ - FastTableColumnTimePicker: 时间选择列组件
31
+ - FastTableColumnImg: 图片列组件
32
+ - FastTableColumnFile: 文件列组件
33
+ - FastTableColumnObject: 对象选择组件
34
+ > 你也可以直接使用原生的el-table-column,但是需要注意的是由于行数据被封装, 所以需要解构一下: {row, editRow},使用row来做单元格数据展示
35
+
36
+ ## 快速开始
37
+
38
+ 安装
39
+
40
+ ```bash
41
+ npm install fast-crud-ui3
42
+ ```
43
+
44
+ 配置
45
+
46
+ ```js
47
+ import {createApp} from 'vue'
48
+ import ElementPlus from 'element-plus'
49
+ import * as ElementPlusIconsVue from '@element-plus/icons-vue'
50
+ import 'element-plus/theme-chalk/index.css'
51
+ import App from './App.vue'
52
+ import '@/assets/index.scss'
53
+ import '@/../packages/assets/fonts/iconfont.css'
54
+ import FastCrudUI from 'fast-crud-ui3'
55
+ import http from "@/http";
56
+
57
+ const app = createApp(App)
58
+ app.use(ElementPlus, {
59
+ // element-plus 配置项
60
+ })
61
+ app.use(FastCrudUI, {
62
+ $http: http,
63
+ // fast-crud-ui3配置项
64
+ })
65
+ // 注册element-plus图标
66
+ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
67
+ app.component(key, component)
68
+ }
69
+ app.mount('#app')
70
+
71
+
72
+ ```
73
+
74
+ 使用
75
+
76
+ ```vue
77
+
78
+ <template>
79
+ <fast-table :option="tableOption">
80
+ <fast-table-column-img prop="avatarUrl" label="头像"/>
81
+ <fast-table-column-input prop="name" label="姓名"/>
82
+ <fast-table-column-number prop="age" label="年龄"/>
83
+ <fast-table-column-select prop="sex" label="性别"
84
+ :options="[{label: '男', value: '1'}, {label: '女', value: '0'}]"/>
85
+ <fast-table-column-date-picker prop="createTime" label="创建时间" type="datetime" :editable="false"/>
86
+ </fast-table>
87
+ </template>
88
+
89
+ <script>
90
+ import {FastTableOption} from "fast-crud-ui3";
91
+
92
+ export default {
93
+ name: "EasyDemo",
94
+ data() {
95
+ return {
96
+ tableOption: new FastTableOption({
97
+ module: 'student',
98
+ // 更多配置参考文档或者完整示例(./src/example/full/FullDemo.vue)
99
+ })
100
+ }
101
+ }
102
+ }
103
+ </script>
104
+ ```
105
+
106
+ 更多使用文档参见: [这里](http://pengxg.cc/tags/fast-crud-ui), 版本迭代参见[这里](https://github.com/pengxianggui/fast-crud/blob/main/ChangeLog.md)