@jx3box/jx3box-common-ui 5.5.5 → 5.5.6

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.
@@ -45,7 +45,7 @@
45
45
  <ul class="u-menu" v-show="!fold">
46
46
  <li>
47
47
  <a class="u-me" :href="url.homepage">
48
- <b>{{ user.name | showUserName }}</b>
48
+ <b>{{ showUserName(user.name) }}</b>
49
49
  <img
50
50
  v-if="isSuperAuthor"
51
51
  :src="super_author_icon"
@@ -265,12 +265,7 @@ export default {
265
265
  this.checkSuperAuthor();
266
266
  }
267
267
  },
268
- },
269
- created: function () {
270
- this.closeExpandList();
271
- this.init();
272
- },
273
- filters: {
268
+
274
269
  showUserName: function (val) {
275
270
  if (val) {
276
271
  if (val.length < 5) {
@@ -283,6 +278,10 @@ export default {
283
278
  }
284
279
  },
285
280
  },
281
+ created: function () {
282
+ this.closeExpandList();
283
+ this.init();
284
+ },
286
285
  components: {},
287
286
  };
288
287
  </script>
@@ -27,7 +27,6 @@ export default {
27
27
 
28
28
  }
29
29
  },
30
- filters: {},
31
30
  created: function () {},
32
31
  mounted: function () {},
33
32
  };
@@ -115,7 +115,6 @@ export default {
115
115
  },
116
116
  init: function () {},
117
117
  },
118
- filters: {},
119
118
  created: function () {},
120
119
  mounted: function () {},
121
120
  };
@@ -22,10 +22,10 @@
22
22
  </span>
23
23
  <a
24
24
  class="u-meta u-user"
25
- :href="item.operate_user_id | authorLink"
25
+ :href="authorLink(item.operate_user_id)"
26
26
  target="_blank"
27
27
  >
28
- <img class="u-user-avatar" :src="item.ext_operate_user_info.avatar | showAvatar" alt />
28
+ <img class="u-user-avatar" :src="showAvatar(item.ext_operate_user_info.avatar)" alt />
29
29
  <span>{{item.ext_operate_user_info.display_name}}</span>
30
30
  </a>
31
31
  <span class="u-meta u-count">
@@ -33,7 +33,7 @@
33
33
  <b>{{item.count}}</b>
34
34
  </span>
35
35
  <span class="u-meta u-remark">{{item.remark}}</span>
36
- <time class="u-meta u-time">{{item.created_at | showTime}}</time>
36
+ <time class="u-meta u-time">{{showTime(item.created_at)}}</time>
37
37
  <span class="u-delete" v-if="isSuperAdmin && !item.is_user_gift" @click="recovery(item,i)">
38
38
  <i class="el-icon-delete"></i>撤销
39
39
  </span>
@@ -137,8 +137,6 @@ export default {
137
137
  },
138
138
  });
139
139
  },
140
- },
141
- filters: {
142
140
  authorLink,
143
141
  showTime,
144
142
  showAvatar: function (val) {
@@ -117,7 +117,6 @@ export default {
117
117
  },
118
118
  init: function () {},
119
119
  },
120
- filters: {},
121
120
  created: function () {},
122
121
  mounted: function () {},
123
122
  };
@@ -2,13 +2,13 @@
2
2
  <div class="w-collection" v-if="list && list.length">
3
3
  <div class="w-collection-title" @click="handleShow" :class="{ on: visible }">
4
4
  <span> <i class="el-icon-notebook-1"></i> 该作品已被收录至作者的剑三小册 </span>
5
- <a @click.stop :href="id | collectionLink" target="_blank">《{{ title }}》</a>
5
+ <a @click.stop :href="collectionLink(id)" target="_blank">《{{ title }}》</a>
6
6
  </div>
7
7
  <transition name="fade">
8
8
  <div class="w-collection-list" v-if="visible">
9
9
  <ol v-if="list && list.length" class="u-list" :style="{ display: visible ? 'block' : 'none' }">
10
10
  <li v-for="(item, i) in list" :key="i" class="u-item">
11
- <a v-if="item" :href="item | showLink" target="_blank">
11
+ <a v-if="item" :href="showLink(item)" target="_blank">
12
12
  <!-- <i class="el-icon-link"></i> -->
13
13
  {{ item.title }}
14
14
  </a>
@@ -72,8 +72,6 @@ export default {
72
72
  this.$emit('collectionUpdate',this.data)
73
73
  });
74
74
  },
75
- },
76
- filters: {
77
75
  collectionLink: function(id) {
78
76
  return getLink("collection", id);
79
77
  },
@@ -4,10 +4,10 @@
4
4
  <a
5
5
  class="w-creators-super w-creators-item"
6
6
  v-if="super_author"
7
- :href="super_author.ID | authorLink"
7
+ :href="authorLink(super_author.ID)"
8
8
  target="_blank"
9
9
  >
10
- <img class="u-avatar" :src="super_author.user_avatar | showAvatar" />
10
+ <img class="u-avatar" :src="showAvatar(super_author.user_avatar)" />
11
11
  <span class="u-name">{{super_author.display_name}}</span>
12
12
  <i class="u-up">UP</i>
13
13
  </a>
@@ -16,13 +16,13 @@
16
16
  class="w-creators-author w-creators-item"
17
17
  v-for="(item,i) in other_authors"
18
18
  :key="i"
19
- :href="item.post_author_info.ID | authorLink"
19
+ :href="authorLink(item.post_author_info.ID)"
20
20
  target="_blank"
21
21
  v-show="item.status"
22
22
  >
23
- <img class="u-avatar" :src="item.post_author_info.user_avatar | showAvatar" />
23
+ <img class="u-avatar" :src="showAvatar(item.post_author_info.user_avatar)" />
24
24
  <span class="u-name">{{item.post_author_info.display_name}}</span>
25
- <i class="u-label">{{item.label | formatLabel}}</i>
25
+ <i class="u-label">{{formatLabel(item.label)}}</i>
26
26
  </a>
27
27
  </div>
28
28
  <a class="w-creators-edit" :href="editLink" v-if="isCreator">
@@ -86,8 +86,6 @@ export default {
86
86
  this.other_authors = res.data?.data.other_authors;
87
87
  });
88
88
  },
89
- },
90
- filters: {
91
89
  showAvatar: function (val) {
92
90
  return showAvatar(val, 48);
93
91
  },
@@ -4,7 +4,7 @@
4
4
  <ul class="u-list">
5
5
  <li v-for="(item, i) in list" :key="i">
6
6
  <el-tooltip class="item" effect="dark" :content="item.title" placement="left">
7
- <a :href="item | showLink" target="_blank">
7
+ <a :href="showLink(item)" target="_blank">
8
8
  <i class="el-icon-link"></i>
9
9
  {{ item.title }}
10
10
  </a>
@@ -48,8 +48,6 @@ export default {
48
48
  this.data = res.data?.data?.collection;
49
49
  });
50
50
  },
51
- },
52
- filters: {
53
51
  showLink: function(item) {
54
52
  if (item.type == "custom") {
55
53
  return item.url;
@@ -17,7 +17,6 @@ export default {
17
17
  computed:{},
18
18
  watch:{},
19
19
  methods:{},
20
- filters:{},
21
20
  created:function(){},
22
21
  mounted:function(){},
23
22
  }
@@ -15,7 +15,6 @@ export default {
15
15
  computed:{},
16
16
  watch:{},
17
17
  methods:{},
18
- filters:{},
19
18
  created:function(){},
20
19
  mounted:function(){},
21
20
  }
@@ -34,7 +34,7 @@
34
34
  <!-- 客户端 -->
35
35
  <div class="u-meta u-sub-block">
36
36
  <em class="u-label">适用客户端</em>
37
- <span class="u-value u-client" :class="client">{{ client | showClientLabel }}</span>
37
+ <span class="u-value u-client" :class="client">{{ showClientLabel(client) }}</span>
38
38
  </div>
39
39
 
40
40
  <!-- 发布日期 -->
@@ -121,13 +121,12 @@ export default {
121
121
  return this.post?.client || "std";
122
122
  },
123
123
  },
124
- methods: {},
125
- mounted: function() {},
126
- filters: {
124
+ methods: {
127
125
  showClientLabel: function(val) {
128
126
  return client_map[val];
129
127
  },
130
128
  },
129
+ mounted: function() {},
131
130
  };
132
131
  </script>
133
132
 
@@ -93,7 +93,6 @@ export default {
93
93
  }
94
94
  },
95
95
  },
96
- filters: {},
97
96
  created: function () {},
98
97
  };
99
98
  </script>
@@ -34,7 +34,7 @@
34
34
  :href="user.id ? author_url(user.id) : null"
35
35
  >
36
36
  <img
37
- :src="user.avatar | thumbnail_url"
37
+ :src="thumbnail_url(user.avatar)"
38
38
  :alt="user.nickname"
39
39
  :title="user.nickname"
40
40
  />
@@ -110,8 +110,6 @@ export default {
110
110
  methods: {
111
111
  author_url: authorLink,
112
112
  ts2str,
113
- },
114
- filters: {
115
113
  thumbnail_url: function(val) {
116
114
  return getThumbnail(val, 24, true);
117
115
  },