byt-ui 0.1.28 → 0.1.31
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 +205 -175
- package/lib/byt-ui.common.js +118861 -244916
- package/lib/byt-ui.umd.js +98815 -224870
- package/lib/byt-ui.umd.min.js +183 -206
- package/lib/locale/format.js +1 -1
- package/lib/locale/index.js +1 -1
- package/package.json +90 -82
- package/packages/common/modules/request.js +167 -167
- package/packages/components/basic-view/index.vue +346 -346
- package/packages/index.js +42 -42
- package/packages/locale/index.js +2 -2
- package/packages/plugins/index.js +9 -9
- package/packages/plugins/vxe-table.js +32 -32
- package/packages/common/modules/minio.js +0 -135
- package/packages/common/modules/sentry.js +0 -186
package/README.md
CHANGED
|
@@ -1,175 +1,205 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Description:
|
|
3
|
-
* @Author: 王国火
|
|
4
|
-
* @Date: 2022-09-15 16:57:23
|
|
5
|
-
* @LastEditTime:
|
|
6
|
-
* @LastEditors: 王国火
|
|
7
|
-
-->
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
label:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
{
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
```
|
|
1
|
+
<!--
|
|
2
|
+
* @Description:
|
|
3
|
+
* @Author: 王国火
|
|
4
|
+
* @Date: 2022-09-15 16:57:23
|
|
5
|
+
* @LastEditTime: 2025-03-26 12:40:27
|
|
6
|
+
* @LastEditors: 王国火
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
# byt-ui
|
|
10
|
+
|
|
11
|
+
## 安装
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
yarn add byt-ui -S
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## 全局引入
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
import BytUI from "byt-ui"
|
|
21
|
+
import 'byt-ui/lib/byt-ui.css'
|
|
22
|
+
Vue.use(BytUI, {
|
|
23
|
+
size: 'small',
|
|
24
|
+
//国际化配置
|
|
25
|
+
i18n: (key, value) => i18n.t(key, value)
|
|
26
|
+
})
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## 按需引入公用方法 也可全局使用 this.$byt
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
import {utils} from "byt-ui"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## 组件调用示例
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<byt-base-view
|
|
39
|
+
:label-width="100"
|
|
40
|
+
:search-list="searchList"
|
|
41
|
+
:fetch="getTableData"
|
|
42
|
+
:table-data="tableData"
|
|
43
|
+
:columns="columns"
|
|
44
|
+
:pagination="pagination"
|
|
45
|
+
ref="baseView"
|
|
46
|
+
>
|
|
47
|
+
<template #btns>
|
|
48
|
+
<el-button type="primary" icon="el-icon-plus">新增</el-button>
|
|
49
|
+
<el-button type="primary" icon="el-icon-plus" @click="onClear"
|
|
50
|
+
>初始化表单</el-button
|
|
51
|
+
>
|
|
52
|
+
</template>
|
|
53
|
+
|
|
54
|
+
<template #actions>
|
|
55
|
+
<el-button type="text" icon="el-icon-edit">编辑</el-button>
|
|
56
|
+
<el-button type="text" class="el-button-delete" icon="el-icon-delete"
|
|
57
|
+
>删除</el-button
|
|
58
|
+
>
|
|
59
|
+
</template>
|
|
60
|
+
</byt-base-view>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
```javascript
|
|
64
|
+
export default {
|
|
65
|
+
name: "App",
|
|
66
|
+
data() {
|
|
67
|
+
return {
|
|
68
|
+
searchList: [
|
|
69
|
+
{
|
|
70
|
+
label: "输入框",
|
|
71
|
+
key: "input",
|
|
72
|
+
type: "input",
|
|
73
|
+
default: "abc",
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
label: "下拉框",
|
|
77
|
+
key: "select",
|
|
78
|
+
type: "select",
|
|
79
|
+
default: 1,
|
|
80
|
+
options: [
|
|
81
|
+
{ label: "a", value: 1 },
|
|
82
|
+
{ label: "b", value: 2 },
|
|
83
|
+
{ label: "c", value: 3 },
|
|
84
|
+
{ label: "d", value: 4 },
|
|
85
|
+
],
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
label: "级联选择",
|
|
89
|
+
key: "cascader",
|
|
90
|
+
type: "cascader",
|
|
91
|
+
default: "yizhi",
|
|
92
|
+
options: [
|
|
93
|
+
{
|
|
94
|
+
value: "zhinan",
|
|
95
|
+
label: "指南",
|
|
96
|
+
children: [
|
|
97
|
+
{
|
|
98
|
+
value: "shejiyuanze",
|
|
99
|
+
label: "设计原则",
|
|
100
|
+
children: [
|
|
101
|
+
{
|
|
102
|
+
value: "yizhi",
|
|
103
|
+
label: "一致",
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
value: "fankui",
|
|
107
|
+
label: "反馈",
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
value: "xiaolv",
|
|
111
|
+
label: "效率",
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
value: "kekong",
|
|
115
|
+
label: "可控",
|
|
116
|
+
},
|
|
117
|
+
],
|
|
118
|
+
},
|
|
119
|
+
],
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
label: "年月日",
|
|
125
|
+
key: "date",
|
|
126
|
+
type: "datepicker",
|
|
127
|
+
default: moment().format("YYYY-MM-DD"),
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
label: "年月",
|
|
131
|
+
key: "month",
|
|
132
|
+
type: "datepicker",
|
|
133
|
+
fields: "month",
|
|
134
|
+
default: moment().format("YYYY-MM"),
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
label: "年",
|
|
138
|
+
key: "year",
|
|
139
|
+
type: "datepicker",
|
|
140
|
+
fields: "year",
|
|
141
|
+
default: moment().format("YYYY"),
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
label: "日期区间",
|
|
145
|
+
key: "daterange",
|
|
146
|
+
type: "daterange",
|
|
147
|
+
default: ["2023-06-05", "2023-06-07"],
|
|
148
|
+
},
|
|
149
|
+
],
|
|
150
|
+
tableData: [],
|
|
151
|
+
columns: [
|
|
152
|
+
{ label: "头像", slot: "avatar", fixed: "left" },
|
|
153
|
+
{ label: "用户名", key: "username", fixed: "left" },
|
|
154
|
+
{ label: "姓名", key: "name" },
|
|
155
|
+
{ label: "手机号", key: "phone" },
|
|
156
|
+
{ label: "昵称", key: "nickname" },
|
|
157
|
+
{ label: "邮箱", key: "email" },
|
|
158
|
+
{ label: "状态", slot: "lockFlag" },
|
|
159
|
+
{ label: "创建时间", key: "createTime" },
|
|
160
|
+
{
|
|
161
|
+
label: "操作",
|
|
162
|
+
key: "actions",
|
|
163
|
+
slot: "actions",
|
|
164
|
+
width: 160,
|
|
165
|
+
fixed: "right",
|
|
166
|
+
},
|
|
167
|
+
],
|
|
168
|
+
loading: false,
|
|
169
|
+
pagination: {
|
|
170
|
+
total: 0,
|
|
171
|
+
},
|
|
172
|
+
};
|
|
173
|
+
},
|
|
174
|
+
};
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## npm 发布执行顺序
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
1. yarn lib
|
|
181
|
+
2. 修改package.json version 版本号
|
|
182
|
+
3. npm publish
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## 手动刷新淘宝镜像包:
|
|
186
|
+
|
|
187
|
+
https://npmmirror.com/sync/byt-ui
|
|
188
|
+
|
|
189
|
+
## 升级依赖包
|
|
190
|
+
|
|
191
|
+
```
|
|
192
|
+
yarn upgrade byt-ui --latest
|
|
193
|
+
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## 删除已发版本,非必要情况,不允许删除包,删除后 24 小时内无法上传
|
|
197
|
+
|
|
198
|
+
```
|
|
199
|
+
运行 npm unpublish 包名 --force 命令,即可从npm删除已发布的包。
|
|
200
|
+
|
|
201
|
+
1、npm unpublish 命令只能删除72小时以内发布的包
|
|
202
|
+
|
|
203
|
+
2、npm unpublish 删除的包,在24小时内不允许重复发布
|
|
204
|
+
|
|
205
|
+
```
|