@jx3box/jx3box-common-ui 6.4.1 → 6.4.3

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": "@jx3box/jx3box-common-ui",
3
- "version": "6.4.1",
3
+ "version": "6.4.3",
4
4
  "description": "JX3BOX UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <a class="c-avatar" :href="authorLink(uid)">
2
+ <a class="c-avatar" :href="authorLink(uid)" :class="size">
3
3
  <img :src="showAvatar(url)" class="c-avatar-pic"/>
4
4
  <i class="c-avatar-frame" v-if="frame">
5
5
  <img :src="frameUrl" />
@@ -28,19 +28,18 @@ export default {
28
28
  },
29
29
  size : {
30
30
  type : [Number, String],
31
- default : 88
31
+ default : 'm'
32
32
  }
33
33
  },
34
34
  components: {},
35
35
  data: function() {
36
36
  return {
37
37
  frames: [],
38
- styles : [
39
- {cls:'xs',size:60},
40
- {cls:'s',size:84},
41
- {cls:'m',size:136},
42
- {cls:'l',size:224},
43
- ]
38
+ styles : {
39
+ s : 68,
40
+ m : 88,
41
+ l : 120
42
+ }
44
43
  };
45
44
  },
46
45
  computed: {
@@ -50,7 +49,7 @@ export default {
50
49
  },
51
50
  methods: {
52
51
  showAvatar: function(val) {
53
- return showAvatar(val, this.size*3);
52
+ return showAvatar(val, this.styles[this.size]*3);
54
53
  },
55
54
  authorLink,
56
55
  },
@@ -61,6 +60,42 @@ export default {
61
60
  .c-avatar {
62
61
  .pr;
63
62
  .dbi;
63
+
64
+ &.l{
65
+ @pic:120px;
66
+ @frame:168px;
67
+ .c-avatar-pic{.size(@pic);}
68
+ .c-avatar-frame{
69
+ .size(@frame);
70
+ .lt(@pic / 2);
71
+ margin-left:-@frame / 2;
72
+ margin-top:-@frame / 2;
73
+ }
74
+ }
75
+
76
+ &.m{
77
+ @pic:88px;
78
+ @frame:123px;
79
+ .c-avatar-pic{.size(@pic);}
80
+ .c-avatar-frame{
81
+ .size(@frame);
82
+ .lt(@pic / 2);
83
+ margin-left:-@frame / 2;
84
+ margin-top:-@frame / 2;
85
+ }
86
+ }
87
+
88
+ &.s{
89
+ @pic:68px;
90
+ @frame:88px;
91
+ .c-avatar-pic{.size(@pic);}
92
+ .c-avatar-frame{
93
+ .size(@frame);
94
+ .lt(@pic / 2);
95
+ margin-left:-@frame / 2;
96
+ margin-top:-@frame / 2;
97
+ }
98
+ }
64
99
  }
65
100
  .c-avatar-pic {
66
101
  .db;
@@ -69,9 +104,6 @@ export default {
69
104
  }
70
105
  .c-avatar-frame {
71
106
  .pa;
72
- .lt(-10px);
73
- .size(100%);
74
- padding: 10px;
75
107
  box-sizing: content-box;
76
108
  img {
77
109
  .db;
@@ -79,31 +111,5 @@ export default {
79
111
  .size(100%);
80
112
  .lt(0);
81
113
  }
82
-
83
- &.xs {
84
- left: -6px;
85
- top: -6px;
86
- width: 60px;
87
- height: 60px;
88
- }
89
-
90
- &.s {
91
- left: -8px;
92
- top: -8px;
93
- width: 84px;
94
- height: 84px;
95
- }
96
- &.m {
97
- left: -8px;
98
- top: -8px;
99
- width: 136px;
100
- height: 136px;
101
- }
102
- &.l {
103
- width: 224px;
104
- height: 224px;
105
- left: -22px;
106
- top: -22px;
107
- }
108
114
  }
109
115
  </style>
@@ -38,7 +38,7 @@
38
38
  :maxlength="30"
39
39
  show-word-limit
40
40
  ></el-input>
41
- <el-button @click="insertCurrentRelease">插入当前版本</el-button>
41
+ <el-button :disabled="fetchingCurrentRelease" @click="insertCurrentRelease">插入当前版本</el-button>
42
42
  </div>
43
43
  </div>
44
44
  </div>
@@ -71,6 +71,7 @@ export default {
71
71
  chosen: '', // 被选中的人
72
72
 
73
73
  submitting: false,
74
+ fetchingCurrentRelease: false,
74
75
  };
75
76
  },
76
77
  computed: {
@@ -134,13 +135,16 @@ export default {
134
135
  });
135
136
  },
136
137
  insertCurrentRelease: function() {
137
- getBreadcrumb("current-release").then(res => {
138
+ this.fetchingCurrentRelease = true;
139
+ getBreadcrumb(`current-release-${this.hostClient}`).then(res => {
138
140
  this.remark += res;
139
141
  }).catch(err => {
140
142
  this.$message({
141
143
  message: "获取失败",
142
144
  type: "error",
143
145
  });
146
+ }).finally(() => {
147
+ this.fetchingCurrentRelease = false;
144
148
  });
145
149
  },
146
150
  init: function () {},