@jx3box/jx3box-common-ui 7.1.7 → 7.1.9

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": "7.1.7",
3
+ "version": "7.1.9",
4
4
  "description": "JX3BOX UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -49,7 +49,7 @@
49
49
  </template>
50
50
 
51
51
  <script>
52
- const marks = {
52
+ const default_marks = {
53
53
  newbie: "新手易用",
54
54
  advanced: "进阶推荐",
55
55
  recommended: "编辑精选",
@@ -57,17 +57,29 @@ const marks = {
57
57
  };
58
58
  export default {
59
59
  name: "markBy",
60
- props: ["mode", "placeholder"],
60
+ props: {
61
+ placeholder: {
62
+ type: String,
63
+ default: "",
64
+ },
65
+ mode: {
66
+ type: String,
67
+ default: "",
68
+ },
69
+ marks: {
70
+ type: Object,
71
+ default: () => default_marks,
72
+ },
73
+ },
61
74
  data: function() {
62
75
  return {
63
76
  visible: false,
64
77
  mark: "",
65
- marks,
66
78
  };
67
79
  },
68
80
  computed: {
69
81
  current: function() {
70
- return marks[this.mark];
82
+ return this.marks[this.mark];
71
83
  },
72
84
  deftext: function() {
73
85
  return this.placeholder || "精选";
@@ -46,19 +46,52 @@ import User from "@jx3box/jx3box-common/js/user";
46
46
  import { getPostBoxcoinConfig, getBoxcoinStatus } from "../../service/thx";
47
47
  export default {
48
48
  name: "Thx",
49
- props: [
50
- "type",
51
- "postId",
52
- "postType",
53
- "postTitle",
54
- "userId",
55
- "adminBoxcoinEnable",
56
- "userBoxcoinEnable",
57
- "mode",
58
- "authors",
59
- "client",
60
- "allowGift",
61
- ],
49
+ props: {
50
+ type: {
51
+ type: String,
52
+ default: "normal",
53
+ },
54
+ postId: {
55
+ type: Number,
56
+ default: 0,
57
+ },
58
+ postType: {
59
+ type: String,
60
+ default: "",
61
+ },
62
+ postTitle: {
63
+ type: String,
64
+ default: "",
65
+ },
66
+ userId: {
67
+ type: Number,
68
+ default: 0,
69
+ },
70
+ authors: {
71
+ type: Array,
72
+ default: () => [],
73
+ },
74
+ mode: {
75
+ type: String,
76
+ default: "normal",
77
+ },
78
+ client: {
79
+ type: String,
80
+ default: "origin",
81
+ },
82
+ allowGift: {
83
+ type: Number,
84
+ default: 1,
85
+ },
86
+ adminBoxcoinEnable: {
87
+ type: Boolean,
88
+ default: false,
89
+ },
90
+ userBoxcoinEnable: {
91
+ type: Boolean,
92
+ default: false,
93
+ },
94
+ },
62
95
  components: {
63
96
  Like,
64
97
  Share,