byt-ui 0.1.29 → 1.2.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 +131 -101
- package/lib/byt-ui.common.js +89407 -90448
- package/lib/byt-ui.css +1 -1
- package/lib/byt-ui.umd.js +110299 -111340
- package/lib/byt-ui.umd.min.js +125 -125
- package/package.json +4 -3
- package/packages/index.js +3 -2
- package/packages/plugins/index.js +2 -2
- package/packages/plugins/vxe-table.js +29 -8
- package/packages/common/modules/sentry.js +0 -186
package/README.md
CHANGED
|
@@ -1,154 +1,181 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
* @Description:
|
|
2
|
+
* @Description:
|
|
3
3
|
* @Author: 王国火
|
|
4
4
|
* @Date: 2022-09-15 16:57:23
|
|
5
|
-
* @LastEditTime:
|
|
5
|
+
* @LastEditTime: 2025-03-26 12:40:27
|
|
6
6
|
* @LastEditors: 王国火
|
|
7
7
|
-->
|
|
8
|
+
|
|
8
9
|
# byt-ui
|
|
9
10
|
|
|
10
11
|
## 安装
|
|
12
|
+
|
|
11
13
|
```
|
|
12
14
|
yarn add byt-ui -S
|
|
13
15
|
```
|
|
14
16
|
|
|
15
17
|
## 全局引入
|
|
18
|
+
|
|
16
19
|
```
|
|
17
20
|
import BytUI from "byt-ui"
|
|
18
21
|
import 'byt-ui/lib/byt-ui.css'
|
|
19
|
-
Vue.use(BytUI
|
|
22
|
+
Vue.use(BytUI, {
|
|
23
|
+
size: 'small',
|
|
24
|
+
//国际化配置
|
|
25
|
+
i18n: (key, value) => i18n.t(key, value)
|
|
26
|
+
})
|
|
20
27
|
```
|
|
21
28
|
|
|
22
|
-
## 按需引入公用方法 也可全局使用this.$byt
|
|
29
|
+
## 按需引入公用方法 也可全局使用 this.$byt
|
|
30
|
+
|
|
23
31
|
```
|
|
24
32
|
import {utils} from "byt-ui"
|
|
25
33
|
```
|
|
26
34
|
|
|
27
35
|
## 组件调用示例
|
|
36
|
+
|
|
28
37
|
```html
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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>
|
|
48
61
|
```
|
|
49
62
|
|
|
50
63
|
```javascript
|
|
51
64
|
export default {
|
|
52
|
-
name:
|
|
53
|
-
data(){
|
|
54
|
-
return{
|
|
65
|
+
name: "App",
|
|
66
|
+
data() {
|
|
67
|
+
return {
|
|
55
68
|
searchList: [
|
|
56
69
|
{
|
|
57
|
-
label:
|
|
58
|
-
key:
|
|
59
|
-
type:
|
|
60
|
-
default:"abc"
|
|
70
|
+
label: "输入框",
|
|
71
|
+
key: "input",
|
|
72
|
+
type: "input",
|
|
73
|
+
default: "abc",
|
|
61
74
|
},
|
|
62
75
|
{
|
|
63
|
-
label:
|
|
64
|
-
key:
|
|
65
|
-
type:
|
|
66
|
-
default:1,
|
|
67
|
-
options:[
|
|
68
|
-
{label:"a",value:1},
|
|
69
|
-
{label:"b",value:2},
|
|
70
|
-
{label:"c",value:3},
|
|
71
|
-
{label:"d",value:4}
|
|
72
|
-
]
|
|
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
|
+
],
|
|
73
86
|
},
|
|
74
87
|
{
|
|
75
|
-
label:
|
|
76
|
-
key:
|
|
77
|
-
type:
|
|
78
|
-
default:"yizhi",
|
|
79
|
-
options:[
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
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
|
+
],
|
|
100
122
|
},
|
|
101
123
|
{
|
|
102
|
-
label:
|
|
103
|
-
key:
|
|
104
|
-
type:
|
|
105
|
-
default:moment().format("YYYY-MM-DD")
|
|
124
|
+
label: "年月日",
|
|
125
|
+
key: "date",
|
|
126
|
+
type: "datepicker",
|
|
127
|
+
default: moment().format("YYYY-MM-DD"),
|
|
106
128
|
},
|
|
107
129
|
{
|
|
108
|
-
label:
|
|
109
|
-
key:
|
|
110
|
-
type:
|
|
111
|
-
fields:"month",
|
|
112
|
-
default:moment().format("YYYY-MM")
|
|
130
|
+
label: "年月",
|
|
131
|
+
key: "month",
|
|
132
|
+
type: "datepicker",
|
|
133
|
+
fields: "month",
|
|
134
|
+
default: moment().format("YYYY-MM"),
|
|
113
135
|
},
|
|
114
136
|
{
|
|
115
|
-
label:
|
|
116
|
-
key:
|
|
117
|
-
type:
|
|
118
|
-
fields:"year",
|
|
119
|
-
default:moment().format("YYYY")
|
|
137
|
+
label: "年",
|
|
138
|
+
key: "year",
|
|
139
|
+
type: "datepicker",
|
|
140
|
+
fields: "year",
|
|
141
|
+
default: moment().format("YYYY"),
|
|
120
142
|
},
|
|
121
143
|
{
|
|
122
|
-
label:
|
|
123
|
-
key:
|
|
124
|
-
type:
|
|
125
|
-
default:["2023-06-05","2023-06-07"]
|
|
126
|
-
}
|
|
144
|
+
label: "日期区间",
|
|
145
|
+
key: "daterange",
|
|
146
|
+
type: "daterange",
|
|
147
|
+
default: ["2023-06-05", "2023-06-07"],
|
|
148
|
+
},
|
|
127
149
|
],
|
|
128
150
|
tableData: [],
|
|
129
151
|
columns: [
|
|
130
|
-
{ label:
|
|
131
|
-
{ label:
|
|
132
|
-
{ label:
|
|
133
|
-
{ label:
|
|
134
|
-
{ label:
|
|
135
|
-
{ label:
|
|
136
|
-
{ label:
|
|
137
|
-
{ label:
|
|
138
|
-
{
|
|
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
|
+
},
|
|
139
167
|
],
|
|
140
168
|
loading: false,
|
|
141
169
|
pagination: {
|
|
142
|
-
total: 0
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
170
|
+
total: 0,
|
|
171
|
+
},
|
|
172
|
+
};
|
|
173
|
+
},
|
|
174
|
+
};
|
|
147
175
|
```
|
|
148
176
|
|
|
149
|
-
|
|
150
|
-
|
|
151
177
|
## npm 发布执行顺序
|
|
178
|
+
|
|
152
179
|
```
|
|
153
180
|
1. yarn lib
|
|
154
181
|
2. 修改package.json version 版本号
|
|
@@ -156,15 +183,18 @@ export default {
|
|
|
156
183
|
```
|
|
157
184
|
|
|
158
185
|
## 手动刷新淘宝镜像包:
|
|
186
|
+
|
|
159
187
|
https://npmmirror.com/sync/byt-ui
|
|
160
188
|
|
|
161
189
|
## 升级依赖包
|
|
190
|
+
|
|
162
191
|
```
|
|
163
192
|
yarn upgrade byt-ui --latest
|
|
164
193
|
|
|
165
194
|
```
|
|
166
195
|
|
|
167
|
-
## 删除已发版本,非必要情况,不允许删除包,删除后24小时内无法上传
|
|
196
|
+
## 删除已发版本,非必要情况,不允许删除包,删除后 24 小时内无法上传
|
|
197
|
+
|
|
168
198
|
```
|
|
169
199
|
运行 npm unpublish 包名 --force 命令,即可从npm删除已发布的包。
|
|
170
200
|
|