@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.
@@ -1428,6 +1428,20 @@ fixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNa
1428
1428
  }, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);
1429
1429
 
1430
1430
 
1431
+ /***/ }),
1432
+
1433
+ /***/ "129f":
1434
+ /***/ (function(module, exports) {
1435
+
1436
+ // `SameValue` abstract operation
1437
+ // https://tc39.es/ecma262/#sec-samevalue
1438
+ // eslint-disable-next-line es/no-object-is -- safe
1439
+ module.exports = Object.is || function is(x, y) {
1440
+ // eslint-disable-next-line no-self-compare -- NaN check
1441
+ return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
1442
+ };
1443
+
1444
+
1431
1445
  /***/ }),
1432
1446
 
1433
1447
  /***/ "12f2":
@@ -65308,6 +65322,51 @@ module.exports = function (object, key, value) {
65308
65322
  };
65309
65323
 
65310
65324
 
65325
+ /***/ }),
65326
+
65327
+ /***/ "841c":
65328
+ /***/ (function(module, exports, __webpack_require__) {
65329
+
65330
+ "use strict";
65331
+
65332
+ var call = __webpack_require__("c65b");
65333
+ var fixRegExpWellKnownSymbolLogic = __webpack_require__("d784");
65334
+ var anObject = __webpack_require__("825a");
65335
+ var requireObjectCoercible = __webpack_require__("1d80");
65336
+ var sameValue = __webpack_require__("129f");
65337
+ var toString = __webpack_require__("577e");
65338
+ var getMethod = __webpack_require__("dc4a");
65339
+ var regExpExec = __webpack_require__("14c3");
65340
+
65341
+ // @@search logic
65342
+ fixRegExpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCallNative) {
65343
+ return [
65344
+ // `String.prototype.search` method
65345
+ // https://tc39.es/ecma262/#sec-string.prototype.search
65346
+ function search(regexp) {
65347
+ var O = requireObjectCoercible(this);
65348
+ var searcher = regexp == undefined ? undefined : getMethod(regexp, SEARCH);
65349
+ return searcher ? call(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString(O));
65350
+ },
65351
+ // `RegExp.prototype[@@search]` method
65352
+ // https://tc39.es/ecma262/#sec-regexp.prototype-@@search
65353
+ function (string) {
65354
+ var rx = anObject(this);
65355
+ var S = toString(string);
65356
+ var res = maybeCallNative(nativeSearch, rx, S);
65357
+
65358
+ if (res.done) return res.value;
65359
+
65360
+ var previousLastIndex = rx.lastIndex;
65361
+ if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
65362
+ var result = regExpExec(rx, S);
65363
+ if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
65364
+ return result === null ? -1 : result.index;
65365
+ }
65366
+ ];
65367
+ });
65368
+
65369
+
65311
65370
  /***/ }),
65312
65371
 
65313
65372
  /***/ "845f":
@@ -70752,6 +70811,13 @@ var isDefined = exports.isDefined = function isDefined(val) {
70752
70811
 
70753
70812
  /***/ }),
70754
70813
 
70814
+ /***/ "a88e":
70815
+ /***/ (function(module, exports, __webpack_require__) {
70816
+
70817
+ // extracted by mini-css-extract-plugin
70818
+
70819
+ /***/ }),
70820
+
70755
70821
  /***/ "a907":
70756
70822
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
70757
70823
 
@@ -76356,6 +76422,17 @@ function _createForOfIteratorHelper(o, allowArrayLike) {
76356
76422
 
76357
76423
  // extracted by mini-css-extract-plugin
76358
76424
 
76425
+ /***/ }),
76426
+
76427
+ /***/ "b967":
76428
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
76429
+
76430
+ "use strict";
76431
+ /* 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");
76432
+ /* 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__);
76433
+ /* unused harmony reexport * */
76434
+
76435
+
76359
76436
  /***/ }),
76360
76437
 
76361
76438
  /***/ "b9c7":
@@ -106430,6 +106507,264 @@ t_input.install = function (Vue) {
106430
106507
  };
106431
106508
 
106432
106509
  /* harmony default export */ var package_t_input = (t_input);
106510
+ // 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&
106511
+ 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)}
106512
+ var tf_icon_pickervue_type_template_id_248a1fd3_scoped_true_staticRenderFns = []
106513
+
106514
+
106515
+ // CONCATENATED MODULE: ./package/tf-icon-picker/src/tf-icon-picker.vue?vue&type=template&id=248a1fd3&scoped=true&
106516
+
106517
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.search.js
106518
+ var es_string_search = __webpack_require__("841c");
106519
+
106520
+ // 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&
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
+ //
106612
+ //
106613
+ //
106614
+ //
106615
+ //
106616
+ //
106617
+ //
106618
+ //
106619
+
106620
+ /* harmony default export */ var tf_icon_pickervue_type_script_lang_js_ = ({
106621
+ name: 'TfIconPicker',
106622
+ props: {
106623
+ width: {
106624
+ default: 400,
106625
+ type: Number
106626
+ },
106627
+ placement: {
106628
+ default: 'bottom',
106629
+ type: String
106630
+ },
106631
+ bottomSize: {
106632
+ default: 'small',
106633
+ type: String
106634
+ },
106635
+ hint: {
106636
+ default: '选择图标',
106637
+ type: String
106638
+ }
106639
+ },
106640
+ data: function data() {
106641
+ return {
106642
+ glyphsList: null,
106643
+ allIconList: null,
106644
+ pagination: 0,
106645
+ iconList: null,
106646
+ total: 0,
106647
+ selectIconClass: null,
106648
+ visible: false,
106649
+ search: null
106650
+ };
106651
+ },
106652
+ watch: {
106653
+ pagination: {
106654
+ handler: function handler(newValue) {
106655
+ if (!this.glyphsList) return;
106656
+ this.iconList = this.allIconList.slice(newValue * 20, (newValue + 1) * 20);
106657
+ },
106658
+ immediate: true
106659
+ }
106660
+ },
106661
+ created: function created() {
106662
+ var _this = this;
106663
+
106664
+ axios_default.a.get('/icon-list.json').then(function (res) {
106665
+ if (res.status === 200) {
106666
+ var _this$allIconList;
106667
+
106668
+ var glyphsList = res.data.glyphs;
106669
+ _this.glyphsList = glyphsList.sort(function (a, b) {
106670
+ return a.font_class - b.font_class;
106671
+ });
106672
+ _this.allIconList = JSON.parse(JSON.stringify(_this.glyphsList));
106673
+ _this.total = (_this$allIconList = _this.allIconList) === null || _this$allIconList === void 0 ? void 0 : _this$allIconList.length;
106674
+ _this.iconList = _this.allIconList.slice(_this.pagination * 20, (_this.pagination + 1) * 20);
106675
+ }
106676
+ });
106677
+ },
106678
+ methods: {
106679
+ handleCurrentChange: function handleCurrentChange(val) {
106680
+ if (val - 1 > this.total / 20) return;
106681
+ this.pagination = val - 1;
106682
+ },
106683
+ selectIcon: function selectIcon(params) {
106684
+ this.selectIconClass = params;
106685
+ },
106686
+ searchInfo: function searchInfo() {
106687
+ var _this2 = this;
106688
+
106689
+ this.pagination = 0;
106690
+ var glyphs = JSON.parse(JSON.stringify(this.glyphsList));
106691
+ var iconArr = [];
106692
+ glyphs.forEach(function (item) {
106693
+ var str = "".concat(item.font_class, "+").concat(item.name).toLowerCase();
106694
+
106695
+ if (str.indexOf(_this2.search.toLowerCase()) !== -1) {
106696
+ iconArr.push(item);
106697
+ }
106698
+ });
106699
+ this.allIconList = iconArr;
106700
+ this.total = this.allIconList.length;
106701
+
106702
+ if (iconArr.length > 20) {
106703
+ this.iconList = this.allIconList.slice(this.pagination * 20, (this.pagination + 1) * 20).sort(function (a, b) {
106704
+ return a.font_class - b.font_class;
106705
+ });
106706
+ } else {
106707
+ this.iconList = iconArr.sort(function (a, b) {
106708
+ return a.font_class - b.font_class;
106709
+ });
106710
+ }
106711
+ },
106712
+ cleanSearch: function cleanSearch() {
106713
+ var _this$allIconList2;
106714
+
106715
+ this.pagination = 0;
106716
+ this.allIconList = JSON.parse(JSON.stringify(this.glyphsList));
106717
+ this.total = (_this$allIconList2 = this.allIconList) === null || _this$allIconList2 === void 0 ? void 0 : _this$allIconList2.length;
106718
+ this.iconList = this.allIconList.slice(this.pagination * 20, (this.pagination + 1) * 20);
106719
+ },
106720
+ select: function select() {
106721
+ if (this.selectIconClass) {
106722
+ this.$emit('selectIcon', JSON.parse(JSON.stringify(this.selectIconClass)));
106723
+ } else {
106724
+ this.$message.error('未选择图标');
106725
+ }
106726
+
106727
+ this.selectIconClass = null;
106728
+ this.visible = false;
106729
+ }
106730
+ }
106731
+ });
106732
+ // CONCATENATED MODULE: ./package/tf-icon-picker/src/tf-icon-picker.vue?vue&type=script&lang=js&
106733
+ /* harmony default export */ var src_tf_icon_pickervue_type_script_lang_js_ = (tf_icon_pickervue_type_script_lang_js_);
106734
+ // EXTERNAL MODULE: ./package/tf-icon-picker/src/tf-icon-picker.vue?vue&type=style&index=0&id=248a1fd3&lang=less&scoped=true&
106735
+ var tf_icon_pickervue_type_style_index_0_id_248a1fd3_lang_less_scoped_true_ = __webpack_require__("b967");
106736
+
106737
+ // CONCATENATED MODULE: ./package/tf-icon-picker/src/tf-icon-picker.vue
106738
+
106739
+
106740
+
106741
+
106742
+
106743
+
106744
+ /* normalize component */
106745
+
106746
+ var tf_icon_picker_component = Object(componentNormalizer["a" /* default */])(
106747
+ src_tf_icon_pickervue_type_script_lang_js_,
106748
+ tf_icon_pickervue_type_template_id_248a1fd3_scoped_true_render,
106749
+ tf_icon_pickervue_type_template_id_248a1fd3_scoped_true_staticRenderFns,
106750
+ false,
106751
+ null,
106752
+ "248a1fd3",
106753
+ null
106754
+
106755
+ )
106756
+
106757
+ /* harmony default export */ var tf_icon_picker = (tf_icon_picker_component.exports);
106758
+ // CONCATENATED MODULE: ./package/tf-icon-picker/index.js
106759
+
106760
+
106761
+ /* istanbul ignore next */
106762
+
106763
+ tf_icon_picker.install = function (Vue) {
106764
+ Vue.component(tf_icon_picker.name, tf_icon_picker);
106765
+ };
106766
+
106767
+ /* harmony default export */ var package_tf_icon_picker = (tf_icon_picker);
106433
106768
  // CONCATENATED MODULE: ./src/index.js
106434
106769
 
106435
106770
 
@@ -106439,7 +106774,8 @@ t_input.install = function (Vue) {
106439
106774
 
106440
106775
 
106441
106776
 
106442
- var components = [package_tf_widget, svg_icon, package_tf_layout, t_data_list, package_t_input];
106777
+
106778
+ var components = [package_tf_widget, svg_icon, package_tf_layout, t_data_list, package_t_input, package_tf_icon_picker];
106443
106779
 
106444
106780
  var install = function install(Vue) {
106445
106781
  components.forEach(function (component) {
@@ -106453,7 +106789,8 @@ var install = function install(Vue) {
106453
106789
  SvgIcon: svg_icon,
106454
106790
  TfLayout: package_tf_layout,
106455
106791
  TDataList: t_data_list,
106456
- Tinput: package_t_input
106792
+ Tinput: package_t_input,
106793
+ TfIconPicker: package_tf_icon_picker
106457
106794
  });
106458
106795
  // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
106459
106796