byt-ui 0.1.17 → 0.1.19

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "byt-ui",
3
- "version": "0.1.17",
3
+ "version": "0.1.19",
4
4
  "private": false,
5
5
  "description": "byt组件库",
6
6
  "author": {
@@ -16,7 +16,7 @@ class Sentry {
16
16
  this.project = project;
17
17
  this.router = router;
18
18
  this.options = options;
19
-
19
+ this.sentryModule = sentry
20
20
  // 注册调用获取dsn;
21
21
  this.register();
22
22
  }
@@ -92,9 +92,19 @@ class Sentry {
92
92
  },
93
93
  beforeSendTransaction: (e) => {
94
94
  // 请求发送前添加用户信息,修改transaction为title
95
- e.transaction = document.title
96
- e.user = this.getUserInfo();
97
- return e
95
+ const spans = e.spans;
96
+ const spanTemp = spans.find(
97
+ (item) => item.getSpanJSON().description == e.tags.transaction
98
+ );
99
+ if (spanTemp) {
100
+ e.user = JSON.parse(spanTemp.getSpanJSON().data.user);
101
+ } else {
102
+ e.user = this.getUserInfo();
103
+ }
104
+ e.transaction = spanTemp
105
+ ? spanTemp.getSpanJSON().description
106
+ : document.title;
107
+ return e;
98
108
  },
99
109
  // 任何请求都会调用的函数,处理请求status_code不是200时,或者code=1,自定义上报错误信息
100
110
  beforeBreadcrumb: (scope, hint) => {
@@ -2,10 +2,9 @@
2
2
  * @Description:
3
3
  * @Author: 王国火
4
4
  * @Date: 2022-07-13 08:46:34
5
- * @LastEditTime: 2024-04-19 13:57:45
6
- * @LastEditors: 王国火
5
+ * @LastEditTime: 2024-11-08 10:20:28
6
+ * @LastEditors: hcm
7
7
  -->
8
- <!-- -->
9
8
  <template>
10
9
  <el-form ref="form" :model="form" :inline="inline" :label-width="`${labelWidth}px`" @submit.native.prevent>
11
10
  <el-form-item :label="item.label" :key="index" v-for="(item,index) in searchList">
@@ -123,22 +122,22 @@ export default {
123
122
  shortcuts: [{
124
123
  text: '最近一周',
125
124
  onClick(picker) {
126
- const end = moment().subtract(7, 'day').toDate();
127
- const start = new Date();
125
+ const start = moment().subtract(7, 'day').toDate();
126
+ const end = new Date();
128
127
  picker.$emit('pick', [start, end]);
129
128
  }
130
129
  }, {
131
130
  text: '最近一个月',
132
131
  onClick(picker) {
133
- const end = moment().subtract(1, 'month').toDate();
134
- const start = new Date();
132
+ const start = moment().subtract(1, 'month').toDate();
133
+ const end = new Date();
135
134
  picker.$emit('pick', [start, end]);
136
135
  }
137
136
  }, {
138
137
  text: '最近三个月',
139
138
  onClick(picker) {
140
- const end = moment().subtract(3, 'month').toDate();
141
- const start = new Date();
139
+ const start = moment().subtract(3, 'month').toDate();
140
+ const end = new Date();
142
141
  picker.$emit('pick', [start, end]);
143
142
  }
144
143
  }]
@@ -1,103 +1,4 @@
1
1
  import Vue from 'vue'
2
- import {
3
- Pagination,
4
- Dialog,
5
- Autocomplete,
6
- Input,
7
- InputNumber,
8
- Radio,
9
- RadioGroup,
10
- RadioButton,
11
- Checkbox,
12
- CheckboxButton,
13
- CheckboxGroup,
14
- Switch,
15
- Select,
16
- Option,
17
- OptionGroup,
18
- Button,
19
- ButtonGroup,
20
- Table,
21
- TableColumn,
22
- DatePicker,
23
- Popover,
24
- Tooltip,
25
- Form,
26
- FormItem,
27
- Tabs,
28
- TabPane,
29
- Tag,
30
- Tree,
31
- Icon,
32
- Row,
33
- Col,
34
- Upload,
35
- Cascader,
36
- Transfer,
37
- Link,
38
- Divider,
39
- Image,
40
- Loading,
41
- MessageBox,
42
- Message,
43
- Empty
44
- } from 'element-ui';
45
- import langZHCN from 'element-ui/lib/locale/lang/zh-CN'
46
- import locale from 'element-ui/lib/locale'
47
- // import 'element-ui/lib/theme-chalk/index.css';
48
- // Vue.use(ElementUI, {
49
- // size: 'small',
50
- // menuType: 'text'
51
- // })
52
- locale.use(langZHCN)
53
- Vue.prototype.$ELEMENT = {
54
- size: 'small',
55
- menuType: 'text'
56
- }
57
- Vue.use(Pagination);
58
- Vue.use(Dialog);
59
- Vue.use(Autocomplete);
60
- Vue.use(Input);
61
- Vue.use(InputNumber);
62
- Vue.use(Radio);
63
- Vue.use(RadioGroup);
64
- Vue.use(RadioButton);
65
- Vue.use(Checkbox);
66
- Vue.use(CheckboxButton);
67
- Vue.use(CheckboxGroup);
68
- Vue.use(Switch);
69
- Vue.use(Select);
70
- Vue.use(Option);
71
- Vue.use(OptionGroup);
72
- Vue.use(Button);
73
- Vue.use(ButtonGroup);
74
- Vue.use(Table);
75
- Vue.use(TableColumn);
76
- Vue.use(DatePicker);
77
- Vue.use(Popover);
78
- Vue.use(Tooltip);
79
- Vue.use(Form);
80
- Vue.use(FormItem);
81
- Vue.use(Tabs);
82
- Vue.use(TabPane);
83
- Vue.use(Tag);
84
- Vue.use(Tree);
85
- Vue.use(Icon);
86
- Vue.use(Row);
87
- Vue.use(Col);
88
- Vue.use(Upload);
89
- Vue.use(Cascader);
90
- Vue.use(Transfer);
91
- Vue.use(Link);
92
- Vue.use(Divider);
93
- Vue.use(Image);
94
- Vue.use(Empty)
95
- Vue.use(Loading.directive);
96
-
97
- Vue.prototype.$loading = Loading.service;
98
- Vue.prototype.$msgbox = MessageBox;
99
- Vue.prototype.$alert = MessageBox.alert;
100
- Vue.prototype.$confirm = MessageBox.confirm;
101
- Vue.prototype.$prompt = MessageBox.prompt;
102
- Vue.prototype.$notify = Notification;
103
- Vue.prototype.$message = Message;
2
+ import ElementUI from 'element-ui';
3
+ import 'element-ui/lib/theme-chalk/index.css';
4
+ Vue.use(ElementUI);
@@ -2,7 +2,7 @@
2
2
  * @Description:
3
3
  * @Author: 王国火
4
4
  * @Date: 2024-06-26 11:20:33
5
- * @LastEditTime: 2024-06-26 12:02:26
5
+ * @LastEditTime: 2025-01-07 09:57:30
6
6
  * @LastEditors: 王国火
7
7
  */
8
8
  import Vue from 'vue'