@tongfun/tf-widget 0.1.14 → 0.1.15

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.
@@ -1419,6 +1419,20 @@ fixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNa
1419
1419
  }, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);
1420
1420
 
1421
1421
 
1422
+ /***/ }),
1423
+
1424
+ /***/ "129f":
1425
+ /***/ (function(module, exports) {
1426
+
1427
+ // `SameValue` abstract operation
1428
+ // https://tc39.es/ecma262/#sec-samevalue
1429
+ // eslint-disable-next-line es/no-object-is -- safe
1430
+ module.exports = Object.is || function is(x, y) {
1431
+ // eslint-disable-next-line no-self-compare -- NaN check
1432
+ return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
1433
+ };
1434
+
1435
+
1422
1436
  /***/ }),
1423
1437
 
1424
1438
  /***/ "12f2":
@@ -65299,6 +65313,51 @@ module.exports = function (object, key, value) {
65299
65313
  };
65300
65314
 
65301
65315
 
65316
+ /***/ }),
65317
+
65318
+ /***/ "841c":
65319
+ /***/ (function(module, exports, __webpack_require__) {
65320
+
65321
+ "use strict";
65322
+
65323
+ var call = __webpack_require__("c65b");
65324
+ var fixRegExpWellKnownSymbolLogic = __webpack_require__("d784");
65325
+ var anObject = __webpack_require__("825a");
65326
+ var requireObjectCoercible = __webpack_require__("1d80");
65327
+ var sameValue = __webpack_require__("129f");
65328
+ var toString = __webpack_require__("577e");
65329
+ var getMethod = __webpack_require__("dc4a");
65330
+ var regExpExec = __webpack_require__("14c3");
65331
+
65332
+ // @@search logic
65333
+ fixRegExpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCallNative) {
65334
+ return [
65335
+ // `String.prototype.search` method
65336
+ // https://tc39.es/ecma262/#sec-string.prototype.search
65337
+ function search(regexp) {
65338
+ var O = requireObjectCoercible(this);
65339
+ var searcher = regexp == undefined ? undefined : getMethod(regexp, SEARCH);
65340
+ return searcher ? call(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString(O));
65341
+ },
65342
+ // `RegExp.prototype[@@search]` method
65343
+ // https://tc39.es/ecma262/#sec-regexp.prototype-@@search
65344
+ function (string) {
65345
+ var rx = anObject(this);
65346
+ var S = toString(string);
65347
+ var res = maybeCallNative(nativeSearch, rx, S);
65348
+
65349
+ if (res.done) return res.value;
65350
+
65351
+ var previousLastIndex = rx.lastIndex;
65352
+ if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
65353
+ var result = regExpExec(rx, S);
65354
+ if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
65355
+ return result === null ? -1 : result.index;
65356
+ }
65357
+ ];
65358
+ });
65359
+
65360
+
65302
65361
  /***/ }),
65303
65362
 
65304
65363
  /***/ "845f":
@@ -70743,6 +70802,13 @@ var isDefined = exports.isDefined = function isDefined(val) {
70743
70802
 
70744
70803
  /***/ }),
70745
70804
 
70805
+ /***/ "a88e":
70806
+ /***/ (function(module, exports, __webpack_require__) {
70807
+
70808
+ // extracted by mini-css-extract-plugin
70809
+
70810
+ /***/ }),
70811
+
70746
70812
  /***/ "a907":
70747
70813
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
70748
70814
 
@@ -76347,6 +76413,17 @@ function _createForOfIteratorHelper(o, allowArrayLike) {
76347
76413
 
76348
76414
  // extracted by mini-css-extract-plugin
76349
76415
 
76416
+ /***/ }),
76417
+
76418
+ /***/ "b967":
76419
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
76420
+
76421
+ "use strict";
76422
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tf_icon_picker_vue_vue_type_style_index_0_id_248a1fd3_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a88e");
76423
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tf_icon_picker_vue_vue_type_style_index_0_id_248a1fd3_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_tf_icon_picker_vue_vue_type_style_index_0_id_248a1fd3_lang_less_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
76424
+ /* unused harmony reexport * */
76425
+
76426
+
76350
76427
  /***/ }),
76351
76428
 
76352
76429
  /***/ "b9c7":
@@ -106421,6 +106498,264 @@ t_input.install = function (Vue) {
106421
106498
  };
106422
106499
 
106423
106500
  /* harmony default export */ var package_t_input = (t_input);
106501
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"c0bba838-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./package/tf-icon-picker/src/tf-icon-picker.vue?vue&type=template&id=248a1fd3&scoped=true&
106502
+ var tf_icon_pickervue_type_template_id_248a1fd3_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('el-popover',{attrs:{"placement":_vm.placement,"width":_vm.width,"trigger":"manual"},model:{value:(_vm.visible),callback:function ($$v) {_vm.visible=$$v},expression:"visible"}},[_c('div',{staticClass:"content-view"},[_c('div',{staticClass:"search-box"},[(_vm.selectIconClass)?_c('svg-icon',{attrs:{"icon-class":_vm.selectIconClass.font_class}}):_vm._e(),(_vm.selectIconClass)?_c('span',[_vm._v(_vm._s(_vm.selectIconClass.name))]):_vm._e(),_c('el-input',{staticStyle:{"width":"50%"},attrs:{"size":"mini","clearable":""},on:{"clear":_vm.cleanSearch},model:{value:(_vm.search),callback:function ($$v) {_vm.search=$$v},expression:"search"}}),_c('el-button',{attrs:{"size":"mini"},on:{"click":_vm.searchInfo}},[_vm._v("搜索")])],1),(!_vm.iconList || _vm.iconList.length === 0)?_c('el-empty',{staticStyle:{"height":"270px","width":"100%"},attrs:{"description":"暂无数据!"}}):_vm._e(),_vm._l((_vm.iconList),function(item){return _c('div',{key:item.unicode_decimal,staticClass:"icon-item",on:{"click":function($event){return _vm.selectIcon(item)}}},[_c('el-tooltip',{attrs:{"placement":"top"}},[_c('div',{attrs:{"slot":"content"},slot:"content"},[_c('span',[_vm._v("图标名称: "+_vm._s(item.name))]),_c('br'),_c('br'),_c('span',[_vm._v("class: "+_vm._s(item.font_class))])]),_c('div',{staticClass:"icon-box"},[_c('svg-icon',{attrs:{"icon-class":item.font_class}}),_c('span',{attrs:{"title":item.name}},[_vm._v(_vm._s(item.name))])],1)])],1)}),_c('div',{staticClass:"paging"},[_c('span',[_vm._v("第 "+_vm._s(_vm.pagination + 1)+" 页")]),_c('el-pagination',{attrs:{"small":"","background":"","layout":"total, prev, next","total":_vm.total},on:{"current-change":_vm.handleCurrentChange}}),_c('el-button',{attrs:{"type":"info","size":"mini"},on:{"click":function($event){_vm.visible = false}}},[_vm._v("取消")]),_c('el-button',{staticClass:"button",attrs:{"size":"mini"},on:{"click":_vm.select}},[_vm._v("确定")])],1)],2),_c('el-button',{staticClass:"button",attrs:{"slot":"reference","size":_vm.bottomSize},on:{"click":function($event){_vm.visible = !_vm.visible; _vm.selectIconClass = null}},slot:"reference"},[_vm._v(_vm._s(_vm.hint))])],1)],1)}
106503
+ var tf_icon_pickervue_type_template_id_248a1fd3_scoped_true_staticRenderFns = []
106504
+
106505
+
106506
+ // CONCATENATED MODULE: ./package/tf-icon-picker/src/tf-icon-picker.vue?vue&type=template&id=248a1fd3&scoped=true&
106507
+
106508
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.search.js
106509
+ var es_string_search = __webpack_require__("841c");
106510
+
106511
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./package/tf-icon-picker/src/tf-icon-picker.vue?vue&type=script&lang=js&
106512
+
106513
+
106514
+
106515
+
106516
+
106517
+
106518
+
106519
+
106520
+
106521
+
106522
+ //
106523
+ //
106524
+ //
106525
+ //
106526
+ //
106527
+ //
106528
+ //
106529
+ //
106530
+ //
106531
+ //
106532
+ //
106533
+ //
106534
+ //
106535
+ //
106536
+ //
106537
+ //
106538
+ //
106539
+ //
106540
+ //
106541
+ //
106542
+ //
106543
+ //
106544
+ //
106545
+ //
106546
+ //
106547
+ //
106548
+ //
106549
+ //
106550
+ //
106551
+ //
106552
+ //
106553
+ //
106554
+ //
106555
+ //
106556
+ //
106557
+ //
106558
+ //
106559
+ //
106560
+ //
106561
+ //
106562
+ //
106563
+ //
106564
+ //
106565
+ //
106566
+ //
106567
+ //
106568
+ //
106569
+ //
106570
+ //
106571
+ //
106572
+ //
106573
+ //
106574
+ //
106575
+ //
106576
+ //
106577
+ //
106578
+ //
106579
+ //
106580
+ //
106581
+ //
106582
+ //
106583
+ //
106584
+ //
106585
+ //
106586
+ //
106587
+ //
106588
+ //
106589
+ //
106590
+ //
106591
+ //
106592
+ //
106593
+ //
106594
+ //
106595
+ //
106596
+ //
106597
+ //
106598
+ //
106599
+ //
106600
+ //
106601
+ //
106602
+ //
106603
+ //
106604
+ //
106605
+ //
106606
+ //
106607
+ //
106608
+ //
106609
+ //
106610
+
106611
+ /* harmony default export */ var tf_icon_pickervue_type_script_lang_js_ = ({
106612
+ name: 'TfIconPicker',
106613
+ props: {
106614
+ width: {
106615
+ default: 400,
106616
+ type: Number
106617
+ },
106618
+ placement: {
106619
+ default: 'bottom',
106620
+ type: String
106621
+ },
106622
+ bottomSize: {
106623
+ default: 'small',
106624
+ type: String
106625
+ },
106626
+ hint: {
106627
+ default: '选择图标',
106628
+ type: String
106629
+ }
106630
+ },
106631
+ data: function data() {
106632
+ return {
106633
+ glyphsList: null,
106634
+ allIconList: null,
106635
+ pagination: 0,
106636
+ iconList: null,
106637
+ total: 0,
106638
+ selectIconClass: null,
106639
+ visible: false,
106640
+ search: null
106641
+ };
106642
+ },
106643
+ watch: {
106644
+ pagination: {
106645
+ handler: function handler(newValue) {
106646
+ if (!this.glyphsList) return;
106647
+ this.iconList = this.allIconList.slice(newValue * 20, (newValue + 1) * 20);
106648
+ },
106649
+ immediate: true
106650
+ }
106651
+ },
106652
+ created: function created() {
106653
+ var _this = this;
106654
+
106655
+ axios_default.a.get('/icon-list.json').then(function (res) {
106656
+ if (res.status === 200) {
106657
+ var _this$allIconList;
106658
+
106659
+ var glyphsList = res.data.glyphs;
106660
+ _this.glyphsList = glyphsList.sort(function (a, b) {
106661
+ return a.font_class - b.font_class;
106662
+ });
106663
+ _this.allIconList = JSON.parse(JSON.stringify(_this.glyphsList));
106664
+ _this.total = (_this$allIconList = _this.allIconList) === null || _this$allIconList === void 0 ? void 0 : _this$allIconList.length;
106665
+ _this.iconList = _this.allIconList.slice(_this.pagination * 20, (_this.pagination + 1) * 20);
106666
+ }
106667
+ });
106668
+ },
106669
+ methods: {
106670
+ handleCurrentChange: function handleCurrentChange(val) {
106671
+ if (val - 1 > this.total / 20) return;
106672
+ this.pagination = val - 1;
106673
+ },
106674
+ selectIcon: function selectIcon(params) {
106675
+ this.selectIconClass = params;
106676
+ },
106677
+ searchInfo: function searchInfo() {
106678
+ var _this2 = this;
106679
+
106680
+ this.pagination = 0;
106681
+ var glyphs = JSON.parse(JSON.stringify(this.glyphsList));
106682
+ var iconArr = [];
106683
+ glyphs.forEach(function (item) {
106684
+ var str = "".concat(item.font_class, "+").concat(item.name).toLowerCase();
106685
+
106686
+ if (str.indexOf(_this2.search.toLowerCase()) !== -1) {
106687
+ iconArr.push(item);
106688
+ }
106689
+ });
106690
+ this.allIconList = iconArr;
106691
+ this.total = this.allIconList.length;
106692
+
106693
+ if (iconArr.length > 20) {
106694
+ this.iconList = this.allIconList.slice(this.pagination * 20, (this.pagination + 1) * 20).sort(function (a, b) {
106695
+ return a.font_class - b.font_class;
106696
+ });
106697
+ } else {
106698
+ this.iconList = iconArr.sort(function (a, b) {
106699
+ return a.font_class - b.font_class;
106700
+ });
106701
+ }
106702
+ },
106703
+ cleanSearch: function cleanSearch() {
106704
+ var _this$allIconList2;
106705
+
106706
+ this.pagination = 0;
106707
+ this.allIconList = JSON.parse(JSON.stringify(this.glyphsList));
106708
+ this.total = (_this$allIconList2 = this.allIconList) === null || _this$allIconList2 === void 0 ? void 0 : _this$allIconList2.length;
106709
+ this.iconList = this.allIconList.slice(this.pagination * 20, (this.pagination + 1) * 20);
106710
+ },
106711
+ select: function select() {
106712
+ if (this.selectIconClass) {
106713
+ this.$emit('selectIcon', JSON.parse(JSON.stringify(this.selectIconClass)));
106714
+ } else {
106715
+ this.$message.error('未选择图标');
106716
+ }
106717
+
106718
+ this.selectIconClass = null;
106719
+ this.visible = false;
106720
+ }
106721
+ }
106722
+ });
106723
+ // CONCATENATED MODULE: ./package/tf-icon-picker/src/tf-icon-picker.vue?vue&type=script&lang=js&
106724
+ /* harmony default export */ var src_tf_icon_pickervue_type_script_lang_js_ = (tf_icon_pickervue_type_script_lang_js_);
106725
+ // EXTERNAL MODULE: ./package/tf-icon-picker/src/tf-icon-picker.vue?vue&type=style&index=0&id=248a1fd3&lang=less&scoped=true&
106726
+ var tf_icon_pickervue_type_style_index_0_id_248a1fd3_lang_less_scoped_true_ = __webpack_require__("b967");
106727
+
106728
+ // CONCATENATED MODULE: ./package/tf-icon-picker/src/tf-icon-picker.vue
106729
+
106730
+
106731
+
106732
+
106733
+
106734
+
106735
+ /* normalize component */
106736
+
106737
+ var tf_icon_picker_component = Object(componentNormalizer["a" /* default */])(
106738
+ src_tf_icon_pickervue_type_script_lang_js_,
106739
+ tf_icon_pickervue_type_template_id_248a1fd3_scoped_true_render,
106740
+ tf_icon_pickervue_type_template_id_248a1fd3_scoped_true_staticRenderFns,
106741
+ false,
106742
+ null,
106743
+ "248a1fd3",
106744
+ null
106745
+
106746
+ )
106747
+
106748
+ /* harmony default export */ var tf_icon_picker = (tf_icon_picker_component.exports);
106749
+ // CONCATENATED MODULE: ./package/tf-icon-picker/index.js
106750
+
106751
+
106752
+ /* istanbul ignore next */
106753
+
106754
+ tf_icon_picker.install = function (Vue) {
106755
+ Vue.component(tf_icon_picker.name, tf_icon_picker);
106756
+ };
106757
+
106758
+ /* harmony default export */ var package_tf_icon_picker = (tf_icon_picker);
106424
106759
  // CONCATENATED MODULE: ./src/index.js
106425
106760
 
106426
106761
 
@@ -106430,7 +106765,8 @@ t_input.install = function (Vue) {
106430
106765
 
106431
106766
 
106432
106767
 
106433
- var components = [package_tf_widget, svg_icon, package_tf_layout, t_data_list, package_t_input];
106768
+
106769
+ var components = [package_tf_widget, svg_icon, package_tf_layout, t_data_list, package_t_input, package_tf_icon_picker];
106434
106770
 
106435
106771
  var install = function install(Vue) {
106436
106772
  components.forEach(function (component) {
@@ -106444,7 +106780,8 @@ var install = function install(Vue) {
106444
106780
  SvgIcon: svg_icon,
106445
106781
  TfLayout: package_tf_layout,
106446
106782
  TDataList: t_data_list,
106447
- Tinput: package_t_input
106783
+ Tinput: package_t_input,
106784
+ TfIconPicker: package_tf_icon_picker
106448
106785
  });
106449
106786
  // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
106450
106787