bxs-tools-ui 2.0.7 → 3.0.0-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.
Files changed (89) hide show
  1. package/README.md +9 -8
  2. package/es/add-and-take/index.css +1 -0
  3. package/es/add-and-take/index.js +2877 -0
  4. package/es/adjust-baoe/index.css +1 -0
  5. package/es/adjust-baoe/index.js +1717 -0
  6. package/es/business-card/index.css +1 -0
  7. package/es/business-card/index.js +616 -0
  8. package/es/canvas-poster/index.css +1 -0
  9. package/es/canvas-poster/index.js +698 -0
  10. package/es/index.css +1 -0
  11. package/es/index.js +39458 -0
  12. package/es/insure-calculate/index.css +1 -0
  13. package/es/insure-calculate/index.js +31180 -0
  14. package/es/person-info/index.css +1 -0
  15. package/es/person-info/index.js +4240 -0
  16. package/es/product-info/index.css +1 -0
  17. package/es/product-info/index.js +4570 -0
  18. package/es/utils/index.js +3160 -0
  19. package/lib/add-and-take/index.css +1 -702
  20. package/lib/add-and-take/index.js +2641 -25431
  21. package/lib/adjust-baoe/index.css +1 -281
  22. package/lib/adjust-baoe/index.js +1534 -27044
  23. package/lib/business-card/index.css +1 -179
  24. package/lib/business-card/index.js +515 -1361
  25. package/lib/canvas-poster/index.css +1 -84
  26. package/lib/canvas-poster/index.js +594 -1414
  27. package/lib/index.css +1 -2538
  28. package/lib/index.js +36329 -40571
  29. package/lib/insure-calculate/index.css +1 -510
  30. package/lib/insure-calculate/index.js +28980 -25191
  31. package/lib/person-info/index.css +1 -562
  32. package/lib/person-info/index.js +3881 -27346
  33. package/lib/product-info/index.css +1 -510
  34. package/lib/product-info/index.js +4235 -34572
  35. package/lib/utils/index.js +3199 -0
  36. package/package.json +47 -18
  37. package/packages/add-and-take/components/interest-form.css +4 -3
  38. package/packages/add-and-take/components/interest-form.vue +11 -36
  39. package/packages/add-and-take/components/interest-items.css +1 -1
  40. package/packages/add-and-take/components/interest-table.css +46 -93
  41. package/packages/add-and-take/components/interest-table.vue +37 -196
  42. package/packages/add-and-take/demo/index.vue +86 -96
  43. package/packages/add-and-take/handler.ts +9 -8
  44. package/packages/add-and-take/index.css +3 -2
  45. package/packages/add-and-take/index.vue +7 -28
  46. package/packages/add-and-take/readme.md +17 -33
  47. package/packages/adjust-baoe/demo/index.vue +63 -66
  48. package/packages/adjust-baoe/index.css +21 -29
  49. package/packages/adjust-baoe/index.vue +41 -54
  50. package/packages/adjust-baoe/readme.md +52 -87
  51. package/packages/business-card/demo/index.vue +2 -11
  52. package/packages/business-card/index.css +1 -0
  53. package/packages/business-card/readme.md +36 -16
  54. package/packages/bxs-utils/index.ts +7 -0
  55. package/packages/bxs-utils/planbook/insurance.ts +5 -5
  56. package/packages/bxs-utils/planbook/product.ts +2 -1
  57. package/packages/canvas-poster/readme.md +86 -66
  58. package/packages/index.ts +52 -0
  59. package/packages/insure-calculate/demo/index.vue +22 -8
  60. package/packages/insure-calculate/index.css +8 -6
  61. package/packages/insure-calculate/index.vue +189 -146
  62. package/packages/insure-calculate/readme.md +1 -1
  63. package/packages/person-info/{crm-person.vue → crm-popup.vue} +117 -108
  64. package/packages/person-info/demo/index.vue +2 -1
  65. package/packages/person-info/index.vue +117 -130
  66. package/packages/person-info/readme.md +5 -8
  67. package/packages/planbook-input/components/product-table.css +2 -0
  68. package/packages/planbook-input/components/product-table.vue +38 -16
  69. package/packages/planbook-input/index.css +4 -1
  70. package/packages/planbook-input/index.vue +12 -9
  71. package/packages/product-info/demo/index.vue +4 -2
  72. package/packages/product-info/index.css +131 -116
  73. package/packages/product-info/index.vue +130 -145
  74. package/packages/product-info/readme.md +1 -2
  75. package/src/components/common/common-age-birthday.vue +205 -0
  76. package/{packages/components/common-popup/index.vue → src/components/common/common-popup.vue} +40 -25
  77. package/src/components/common/common-radio.vue +175 -0
  78. package/src/components/common/common-select.vue +132 -0
  79. package/{packages/components/form-item/title-item.css → src/components/common/common-title.css} +13 -5
  80. package/{packages/components/form-item/title-item.vue → src/components/common/common-title.vue} +6 -21
  81. package/src/js/request.js +3 -3
  82. package/src/style/apply.css +25 -0
  83. package/src/style/base.css +0 -28
  84. package/packages/components/common-radio.vue +0 -142
  85. package/packages/components/form-item/age-birthday-item.vue +0 -183
  86. package/packages/components/form-item/select-item.vue +0 -110
  87. package/packages/person-info/crm-person.css +0 -57
  88. package/packages/person-info/index.css +0 -51
  89. package/src/index.ts +0 -48
@@ -0,0 +1 @@
1
+ *{margin:0;padding:0}body{color:#333}dl,ul{list-style:none}img{max-width:100%}a{color:#333;display:block;text-decoration:none}em{font-style:normal}article,aside,footer,header,nav,section{display:block}.bxt-business-card{background:#f8f8f8;bottom:0;-webkit-box-shadow:0 0 10px 0 rgba(0,0,0,.1);box-shadow:0 0 10px 0 rgba(0,0,0,.1);-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;left:0;padding-bottom:env(safe-area-inset-bottom);position:fixed;width:100%;z-index:100}.bxt-business-card .bxt-business-card-ul{padding:10px 15px;position:relative;white-space:nowrap}.bxt-business-card .bxt-business-card-ul .bxt-business-card-li{display:inline-block;line-height:100%;vertical-align:middle}.bxt-business-card .bxt-business-card-ul .bxt-business-card-li .bxt-business-card-avatar{border-radius:100px;display:block;height:100%;overflow:hidden;width:100%}.bxt-business-card .bxt-business-card-ul .bxt-business-card-li .bxt-business-card-container{line-height:40px;margin-left:9px}.bxt-business-card .bxt-business-card-ul .bxt-business-card-li .bxt-business-card-container .bxt-business-card-name,.bxt-business-card .bxt-business-card-ul .bxt-business-card-li .bxt-business-card-container .bxt-business-card-rank{display:inline-block;display:block;font-size:16px;font-weight:700;line-height:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.bxt-business-card .bxt-business-card-ul .bxt-business-card-li .bxt-business-card-container .bxt-business-card-rank{font-size:12px;margin-top:2px;-webkit-transform:scale(.8333);transform:scale(.8333);-webkit-transform-origin:0 50%;transform-origin:0 50%}.bxt-business-card .bxt-business-card-ul .bxt-business-card-li .bxt-business-card-container .bxt-business-card-diamond{vertical-align:top;width:15px}.bxt-business-card .bxt-business-card-ul .bxt-business-card-li .bxt-business-card-mobile{color:inherit;display:inline-block;display:block;font-size:14px;line-height:40px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.bxt-business-card .bxt-business-card-ul .bxt-business-card-li .bxt-business-card-button{border-radius:2px;display:inline-block;font-size:13px;line-height:35px;margin-top:3px;padding:0 12px}.bxt-business-card .bxt-business-card-ul .bxt-business-card-li:first-child{height:40px;width:40px}.bxt-business-card .bxt-business-card-ul .bxt-business-card-li:nth-child(2){min-width:25%}.bxt-business-card .bxt-business-card-ul .bxt-business-card-li:nth-child(3){margin-left:9px;text-align:center;width:32%}.bxt-business-card .bxt-business-card-ul .bxt-business-card-li:nth-child(4){position:absolute;right:15px;top:10px}
@@ -0,0 +1,616 @@
1
+ import Vue from 'vue';
2
+
3
+ function _initializerDefineProperty(e, i, r, l) {
4
+ r && Object.defineProperty(e, i, {
5
+ enumerable: r.enumerable,
6
+ configurable: r.configurable,
7
+ writable: r.writable,
8
+ value: r.initializer ? r.initializer.call(l) : void 0
9
+ });
10
+ }
11
+
12
+ function _classCallCheck(a, n) {
13
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
14
+ }
15
+
16
+ function _typeof$1(o) {
17
+ "@babel/helpers - typeof";
18
+
19
+ return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
20
+ return typeof o;
21
+ } : function (o) {
22
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
23
+ }, _typeof$1(o);
24
+ }
25
+
26
+ function toPrimitive(t, r) {
27
+ if ("object" != _typeof$1(t) || !t) return t;
28
+ var e = t[Symbol.toPrimitive];
29
+ if (void 0 !== e) {
30
+ var i = e.call(t, r);
31
+ if ("object" != _typeof$1(i)) return i;
32
+ throw new TypeError("@@toPrimitive must return a primitive value.");
33
+ }
34
+ return (String )(t);
35
+ }
36
+
37
+ function toPropertyKey(t) {
38
+ var i = toPrimitive(t, "string");
39
+ return "symbol" == _typeof$1(i) ? i : i + "";
40
+ }
41
+
42
+ function _defineProperties(e, r) {
43
+ for (var t = 0; t < r.length; t++) {
44
+ var o = r[t];
45
+ o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, toPropertyKey(o.key), o);
46
+ }
47
+ }
48
+ function _createClass(e, r, t) {
49
+ return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", {
50
+ writable: false
51
+ }), e;
52
+ }
53
+
54
+ function _assertThisInitialized(e) {
55
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
56
+ return e;
57
+ }
58
+
59
+ function _possibleConstructorReturn(t, e) {
60
+ if (e && ("object" == _typeof$1(e) || "function" == typeof e)) return e;
61
+ if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
62
+ return _assertThisInitialized(t);
63
+ }
64
+
65
+ function _getPrototypeOf(t) {
66
+ return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
67
+ return t.__proto__ || Object.getPrototypeOf(t);
68
+ }, _getPrototypeOf(t);
69
+ }
70
+
71
+ function _setPrototypeOf(t, e) {
72
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
73
+ return t.__proto__ = e, t;
74
+ }, _setPrototypeOf(t, e);
75
+ }
76
+
77
+ function _inherits(t, e) {
78
+ if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
79
+ t.prototype = Object.create(e && e.prototype, {
80
+ constructor: {
81
+ value: t,
82
+ writable: true,
83
+ configurable: true
84
+ }
85
+ }), Object.defineProperty(t, "prototype", {
86
+ writable: false
87
+ }), e && _setPrototypeOf(t, e);
88
+ }
89
+
90
+ function _defineProperty$1(e, r, t) {
91
+ return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
92
+ value: t,
93
+ enumerable: true,
94
+ configurable: true,
95
+ writable: true
96
+ }) : e[r] = t, e;
97
+ }
98
+
99
+ function _applyDecoratedDescriptor(i, e, r, n, l) {
100
+ var a = {};
101
+ return Object.keys(n).forEach(function (i) {
102
+ a[i] = n[i];
103
+ }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, ("value" in a || a.initializer) && (a.writable = true), a = r.slice().reverse().reduce(function (r, n) {
104
+ return n(i, e, r) || r;
105
+ }, a), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a;
106
+ }
107
+
108
+ /**
109
+ * vue-class-component v7.2.6
110
+ * (c) 2015-present Evan You
111
+ * @license MIT
112
+ */
113
+
114
+ function _typeof(obj) {
115
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
116
+ _typeof = function (obj) {
117
+ return typeof obj;
118
+ };
119
+ } else {
120
+ _typeof = function (obj) {
121
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
122
+ };
123
+ }
124
+
125
+ return _typeof(obj);
126
+ }
127
+
128
+ function _defineProperty(obj, key, value) {
129
+ if (key in obj) {
130
+ Object.defineProperty(obj, key, {
131
+ value: value,
132
+ enumerable: true,
133
+ configurable: true,
134
+ writable: true
135
+ });
136
+ } else {
137
+ obj[key] = value;
138
+ }
139
+
140
+ return obj;
141
+ }
142
+
143
+ function _toConsumableArray(arr) {
144
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
145
+ }
146
+
147
+ function _arrayWithoutHoles(arr) {
148
+ if (Array.isArray(arr)) {
149
+ for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
150
+
151
+ return arr2;
152
+ }
153
+ }
154
+
155
+ function _iterableToArray(iter) {
156
+ if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
157
+ }
158
+
159
+ function _nonIterableSpread() {
160
+ throw new TypeError("Invalid attempt to spread non-iterable instance");
161
+ }
162
+
163
+ // The rational behind the verbose Reflect-feature check below is the fact that there are polyfills
164
+ // which add an implementation for Reflect.defineMetadata but not for Reflect.getOwnMetadataKeys.
165
+ // Without this check consumers will encounter hard to track down runtime errors.
166
+ function reflectionIsSupported() {
167
+ return typeof Reflect !== 'undefined' && Reflect.defineMetadata && Reflect.getOwnMetadataKeys;
168
+ }
169
+ function copyReflectionMetadata(to, from) {
170
+ forwardMetadata(to, from);
171
+ Object.getOwnPropertyNames(from.prototype).forEach(function (key) {
172
+ forwardMetadata(to.prototype, from.prototype, key);
173
+ });
174
+ Object.getOwnPropertyNames(from).forEach(function (key) {
175
+ forwardMetadata(to, from, key);
176
+ });
177
+ }
178
+
179
+ function forwardMetadata(to, from, propertyKey) {
180
+ var metaKeys = propertyKey ? Reflect.getOwnMetadataKeys(from, propertyKey) : Reflect.getOwnMetadataKeys(from);
181
+ metaKeys.forEach(function (metaKey) {
182
+ var metadata = propertyKey ? Reflect.getOwnMetadata(metaKey, from, propertyKey) : Reflect.getOwnMetadata(metaKey, from);
183
+
184
+ if (propertyKey) {
185
+ Reflect.defineMetadata(metaKey, metadata, to, propertyKey);
186
+ } else {
187
+ Reflect.defineMetadata(metaKey, metadata, to);
188
+ }
189
+ });
190
+ }
191
+
192
+ var fakeArray = {
193
+ __proto__: []
194
+ };
195
+ var hasProto = fakeArray instanceof Array;
196
+ function createDecorator(factory) {
197
+ return function (target, key, index) {
198
+ var Ctor = typeof target === 'function' ? target : target.constructor;
199
+
200
+ if (!Ctor.__decorators__) {
201
+ Ctor.__decorators__ = [];
202
+ }
203
+
204
+ if (typeof index !== 'number') {
205
+ index = undefined;
206
+ }
207
+
208
+ Ctor.__decorators__.push(function (options) {
209
+ return factory(options, key, index);
210
+ });
211
+ };
212
+ }
213
+ function isPrimitive(value) {
214
+ var type = _typeof(value);
215
+
216
+ return value == null || type !== 'object' && type !== 'function';
217
+ }
218
+ function warn(message) {
219
+ if (typeof console !== 'undefined') {
220
+ console.warn('[vue-class-component] ' + message);
221
+ }
222
+ }
223
+
224
+ function collectDataFromConstructor(vm, Component) {
225
+ // override _init to prevent to init as Vue instance
226
+ var originalInit = Component.prototype._init;
227
+
228
+ Component.prototype._init = function () {
229
+ var _this = this;
230
+
231
+ // proxy to actual vm
232
+ var keys = Object.getOwnPropertyNames(vm); // 2.2.0 compat (props are no longer exposed as self properties)
233
+
234
+ if (vm.$options.props) {
235
+ for (var key in vm.$options.props) {
236
+ if (!vm.hasOwnProperty(key)) {
237
+ keys.push(key);
238
+ }
239
+ }
240
+ }
241
+
242
+ keys.forEach(function (key) {
243
+ Object.defineProperty(_this, key, {
244
+ get: function get() {
245
+ return vm[key];
246
+ },
247
+ set: function set(value) {
248
+ vm[key] = value;
249
+ },
250
+ configurable: true
251
+ });
252
+ });
253
+ }; // should be acquired class property values
254
+
255
+
256
+ var data = new Component(); // restore original _init to avoid memory leak (#209)
257
+
258
+ Component.prototype._init = originalInit; // create plain data object
259
+
260
+ var plainData = {};
261
+ Object.keys(data).forEach(function (key) {
262
+ if (data[key] !== undefined) {
263
+ plainData[key] = data[key];
264
+ }
265
+ });
266
+
267
+ if (process.env.NODE_ENV !== 'production') {
268
+ if (!(Component.prototype instanceof Vue) && Object.keys(plainData).length > 0) {
269
+ warn('Component class must inherit Vue or its descendant class ' + 'when class property is used.');
270
+ }
271
+ }
272
+
273
+ return plainData;
274
+ }
275
+
276
+ var $internalHooks = ['data', 'beforeCreate', 'created', 'beforeMount', 'mounted', 'beforeDestroy', 'destroyed', 'beforeUpdate', 'updated', 'activated', 'deactivated', 'render', 'errorCaptured', 'serverPrefetch' // 2.6
277
+ ];
278
+ function componentFactory(Component) {
279
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
280
+ options.name = options.name || Component._componentTag || Component.name; // prototype props.
281
+
282
+ var proto = Component.prototype;
283
+ Object.getOwnPropertyNames(proto).forEach(function (key) {
284
+ if (key === 'constructor') {
285
+ return;
286
+ } // hooks
287
+
288
+
289
+ if ($internalHooks.indexOf(key) > -1) {
290
+ options[key] = proto[key];
291
+ return;
292
+ }
293
+
294
+ var descriptor = Object.getOwnPropertyDescriptor(proto, key);
295
+
296
+ if (descriptor.value !== void 0) {
297
+ // methods
298
+ if (typeof descriptor.value === 'function') {
299
+ (options.methods || (options.methods = {}))[key] = descriptor.value;
300
+ } else {
301
+ // typescript decorated data
302
+ (options.mixins || (options.mixins = [])).push({
303
+ data: function data() {
304
+ return _defineProperty({}, key, descriptor.value);
305
+ }
306
+ });
307
+ }
308
+ } else if (descriptor.get || descriptor.set) {
309
+ // computed properties
310
+ (options.computed || (options.computed = {}))[key] = {
311
+ get: descriptor.get,
312
+ set: descriptor.set
313
+ };
314
+ }
315
+ });
316
+ (options.mixins || (options.mixins = [])).push({
317
+ data: function data() {
318
+ return collectDataFromConstructor(this, Component);
319
+ }
320
+ }); // decorate options
321
+
322
+ var decorators = Component.__decorators__;
323
+
324
+ if (decorators) {
325
+ decorators.forEach(function (fn) {
326
+ return fn(options);
327
+ });
328
+ delete Component.__decorators__;
329
+ } // find super
330
+
331
+
332
+ var superProto = Object.getPrototypeOf(Component.prototype);
333
+ var Super = superProto instanceof Vue ? superProto.constructor : Vue;
334
+ var Extended = Super.extend(options);
335
+ forwardStaticMembers(Extended, Component, Super);
336
+
337
+ if (reflectionIsSupported()) {
338
+ copyReflectionMetadata(Extended, Component);
339
+ }
340
+
341
+ return Extended;
342
+ }
343
+ var reservedPropertyNames = [// Unique id
344
+ 'cid', // Super Vue constructor
345
+ 'super', // Component options that will be used by the component
346
+ 'options', 'superOptions', 'extendOptions', 'sealedOptions', // Private assets
347
+ 'component', 'directive', 'filter'];
348
+ var shouldIgnore = {
349
+ prototype: true,
350
+ arguments: true,
351
+ callee: true,
352
+ caller: true
353
+ };
354
+
355
+ function forwardStaticMembers(Extended, Original, Super) {
356
+ // We have to use getOwnPropertyNames since Babel registers methods as non-enumerable
357
+ Object.getOwnPropertyNames(Original).forEach(function (key) {
358
+ // Skip the properties that should not be overwritten
359
+ if (shouldIgnore[key]) {
360
+ return;
361
+ } // Some browsers does not allow reconfigure built-in properties
362
+
363
+
364
+ var extendedDescriptor = Object.getOwnPropertyDescriptor(Extended, key);
365
+
366
+ if (extendedDescriptor && !extendedDescriptor.configurable) {
367
+ return;
368
+ }
369
+
370
+ var descriptor = Object.getOwnPropertyDescriptor(Original, key); // If the user agent does not support `__proto__` or its family (IE <= 10),
371
+ // the sub class properties may be inherited properties from the super class in TypeScript.
372
+ // We need to exclude such properties to prevent to overwrite
373
+ // the component options object which stored on the extended constructor (See #192).
374
+ // If the value is a referenced value (object or function),
375
+ // we can check equality of them and exclude it if they have the same reference.
376
+ // If it is a primitive value, it will be forwarded for safety.
377
+
378
+ if (!hasProto) {
379
+ // Only `cid` is explicitly exluded from property forwarding
380
+ // because we cannot detect whether it is a inherited property or not
381
+ // on the no `__proto__` environment even though the property is reserved.
382
+ if (key === 'cid') {
383
+ return;
384
+ }
385
+
386
+ var superDescriptor = Object.getOwnPropertyDescriptor(Super, key);
387
+
388
+ if (!isPrimitive(descriptor.value) && superDescriptor && superDescriptor.value === descriptor.value) {
389
+ return;
390
+ }
391
+ } // Warn if the users manually declare reserved properties
392
+
393
+
394
+ if (process.env.NODE_ENV !== 'production' && reservedPropertyNames.indexOf(key) >= 0) {
395
+ warn("Static property name '".concat(key, "' declared on class '").concat(Original.name, "' ") + 'conflicts with reserved property name of Vue internal. ' + 'It may cause unexpected behavior of the component. Consider renaming the property.');
396
+ }
397
+
398
+ Object.defineProperty(Extended, key, descriptor);
399
+ });
400
+ }
401
+
402
+ function Component(options) {
403
+ if (typeof options === 'function') {
404
+ return componentFactory(options);
405
+ }
406
+
407
+ return function (Component) {
408
+ return componentFactory(Component, options);
409
+ };
410
+ }
411
+
412
+ Component.registerHooks = function registerHooks(keys) {
413
+ $internalHooks.push.apply($internalHooks, _toConsumableArray(keys));
414
+ };
415
+
416
+ /** vue-property-decorator verson 8.5.1 MIT LICENSE copyright 2020 kaorun343 */
417
+ /// <reference types='reflect-metadata'/>
418
+ /** @see {@link https://github.com/vuejs/vue-class-component/blob/master/src/reflect.ts} */
419
+ var reflectMetadataIsSupported = typeof Reflect !== 'undefined' && typeof Reflect.getMetadata !== 'undefined';
420
+ function applyMetadata(options, target, key) {
421
+ if (reflectMetadataIsSupported) {
422
+ if (!Array.isArray(options) &&
423
+ typeof options !== 'function' &&
424
+ typeof options.type === 'undefined') {
425
+ var type = Reflect.getMetadata('design:type', target, key);
426
+ if (type !== Object) {
427
+ options.type = type;
428
+ }
429
+ }
430
+ }
431
+ }
432
+ /**
433
+ * decorator of a prop
434
+ * @param options the options for the prop
435
+ * @return PropertyDecorator | void
436
+ */
437
+ function Prop(options) {
438
+ if (options === void 0) { options = {}; }
439
+ return function (target, key) {
440
+ applyMetadata(options, target, key);
441
+ createDecorator(function (componentOptions, k) {
442
+ (componentOptions.props || (componentOptions.props = {}))[k] = options;
443
+ })(target, key);
444
+ };
445
+ }
446
+
447
+ var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
448
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
449
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
450
+ var defaultCardData = {
451
+ avatar: '',
452
+ name: '',
453
+ rank: '',
454
+ rankIcon: '',
455
+ mobile: ''
456
+ };
457
+ var defaultButtonData = {
458
+ tx: '编辑名片',
459
+ bg: '#ED9E14',
460
+ color: '#fff'
461
+ };
462
+ var BusinessCard = (_dec = Component({}), _dec2 = Prop({
463
+ default: function _default() {
464
+ return defaultCardData;
465
+ }
466
+ }), _dec3 = Prop({
467
+ default: function _default() {
468
+ return defaultButtonData;
469
+ }
470
+ }), _dec(_class = (_class2 = /*#__PURE__*/function (_Vue) {
471
+ function BusinessCard() {
472
+ var _this;
473
+ _classCallCheck(this, BusinessCard);
474
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
475
+ args[_key] = arguments[_key];
476
+ }
477
+ _this = _callSuper(this, BusinessCard, [].concat(args));
478
+ _defineProperty$1(_this, "rankStyle", {
479
+ color: '#999'
480
+ });
481
+ _defineProperty$1(_this, "buttonStyle", {});
482
+ _initializerDefineProperty(_this, "cardData", _descriptor, _this);
483
+ _initializerDefineProperty(_this, "buttonData", _descriptor2, _this);
484
+ return _this;
485
+ }
486
+ _inherits(BusinessCard, _Vue);
487
+ return _createClass(BusinessCard, [{
488
+ key: "created",
489
+ value: function created() {
490
+ //默认头像
491
+ if (!this.cardData.avatar) {
492
+ this.cardData.avatar = defaultCardData.avatar;
493
+ }
494
+
495
+ //按钮样式
496
+ if (this.buttonData) {
497
+ this.buttonStyle.background = this.buttonData.bg || defaultButtonData.bg;
498
+ this.buttonStyle.color = this.buttonData.color || defaultButtonData.color;
499
+ }
500
+ }
501
+ }, {
502
+ key: "mounted",
503
+ value: function mounted() {
504
+ //职级样式
505
+ var thisEl = this.$el;
506
+ if (thisEl.style.color) {
507
+ this.rankStyle.color = thisEl.style.color;
508
+ }
509
+ }
510
+ }, {
511
+ key: "avatarHandler",
512
+ value: function avatarHandler() {
513
+ this.$emit('click');
514
+ }
515
+ }, {
516
+ key: "buttonHandler",
517
+ value: function buttonHandler() {
518
+ this.$emit('clickBtn');
519
+ }
520
+ }]);
521
+ }(Vue), _descriptor = _applyDecoratedDescriptor(_class2.prototype, "cardData", [_dec2], {
522
+ configurable: true,
523
+ enumerable: true,
524
+ writable: true,
525
+ initializer: null
526
+ }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "buttonData", [_dec3], {
527
+ configurable: true,
528
+ enumerable: true,
529
+ writable: true,
530
+ initializer: null
531
+ }), _class2)) || _class);
532
+
533
+ function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
534
+ // Vue.extend constructor export interop.
535
+ const options = typeof script === 'function' ? script.options : script;
536
+ // render functions
537
+ if (template && template.render) {
538
+ options.render = template.render;
539
+ options.staticRenderFns = template.staticRenderFns;
540
+ options._compiled = true;
541
+ }
542
+ return script;
543
+ }
544
+
545
+ /* script */
546
+ var __vue_script__ = BusinessCard;
547
+ /* template */
548
+ var __vue_render__ = function __vue_render__() {
549
+ var _vm = this;
550
+ var _h = _vm.$createElement;
551
+ var _c = _vm._self._c || _h;
552
+ return _c('div', {
553
+ staticClass: "bxt-business-card"
554
+ }, [_c('ul', {
555
+ staticClass: "bxt-business-card-ul"
556
+ }, [_c('li', {
557
+ staticClass: "bxt-business-card-li",
558
+ on: {
559
+ "click": _vm.avatarHandler
560
+ }
561
+ }, [_c('img', {
562
+ staticClass: "bxt-business-card-avatar",
563
+ attrs: {
564
+ "src": _vm.cardData.avatar,
565
+ "alt": "头像"
566
+ }
567
+ })]), _c('li', {
568
+ staticClass: "bxt-business-card-li",
569
+ on: {
570
+ "click": _vm.avatarHandler
571
+ }
572
+ }, [_c('div', {
573
+ staticClass: "bxt-business-card-container"
574
+ }, [_c('span', {
575
+ staticClass: "bxt-business-card-name"
576
+ }, [_vm._v("\n " + _vm._s(_vm.cardData.name) + "\n "), _vm.cardData.rankIcon ? _c('img', {
577
+ staticClass: "bxt-business-card-diamond",
578
+ attrs: {
579
+ "src": _vm.cardData.rankIcon
580
+ }
581
+ }) : _vm._e()]), _vm.cardData.rank ? _c('span', {
582
+ staticClass: "bxt-business-card-rank",
583
+ style: _vm.rankStyle
584
+ }, [_vm._v("\n " + _vm._s(_vm.cardData.rank) + "\n ")]) : _vm._e()])]), _c('li', {
585
+ staticClass: "bxt-business-card-li"
586
+ }, [_vm.cardData.mobile ? _c('a', {
587
+ staticClass: "bxt-business-card-mobile",
588
+ attrs: {
589
+ "href": "tel:" + _vm.cardData.mobile
590
+ }
591
+ }, [_vm._v("\n " + _vm._s(_vm.cardData.mobile) + "\n ")]) : _vm._e()]), _vm.buttonData && _vm.buttonData.tx ? _c('li', {
592
+ staticClass: "bxt-business-card-li",
593
+ on: {
594
+ "click": _vm.buttonHandler
595
+ }
596
+ }, [_c('span', {
597
+ staticClass: "bxt-business-card-button",
598
+ style: _vm.buttonStyle
599
+ }, [_vm._v(_vm._s(_vm.buttonData.tx))])]) : _vm._e()])]);
600
+ };
601
+ var __vue_staticRenderFns__ = [];
602
+
603
+ /* style */
604
+ var __vue_inject_styles__ = undefined;
605
+ /* style inject */
606
+
607
+ /* style inject SSR */
608
+
609
+ /* style inject shadow dom */
610
+
611
+ var __vue_component__ = /*#__PURE__*/normalizeComponent({
612
+ render: __vue_render__,
613
+ staticRenderFns: __vue_staticRenderFns__
614
+ }, __vue_inject_styles__, __vue_script__);
615
+
616
+ export { __vue_component__ as default };
@@ -0,0 +1 @@
1
+ *{margin:0;padding:0}body{color:#333}dl,ul{list-style:none}img{max-width:100%}a{color:#333;display:block;text-decoration:none}em{font-style:normal}.bxt-canvas-poster .bxt-canvas,article,aside,footer,header,nav,section{display:block}