@deanwu/vue-component-library 1.0.15 → 1.0.17

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.
@@ -1673,6 +1673,8 @@ if (typeof window !== 'undefined') {
1673
1673
  // Indicate to webpack that this file can be concatenated
1674
1674
  /* harmony default export */ var setPublicPath = (null);
1675
1675
 
1676
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
1677
+ var es_array_push = __webpack_require__(7658);
1676
1678
  ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/unit/button.vue?vue&type=template&id=73616ebe&scoped=true&
1677
1679
  var render = function render() {
1678
1680
  var _vm = this,
@@ -2246,7 +2248,9 @@ var radiovue_type_template_id_07d956d7_scoped_true_staticRenderFns = [];
2246
2248
  // import Vue from 'vue'
2247
2249
 
2248
2250
  function createStore(data) {
2249
- return {};
2251
+ return {
2252
+ commit: function () {}
2253
+ };
2250
2254
  // return new (Vue.extend({
2251
2255
  // data() {
2252
2256
  // return data
@@ -2692,8 +2696,6 @@ var selectvue_type_template_id_752f2375_staticRenderFns = [function () {
2692
2696
 
2693
2697
  ;// CONCATENATED MODULE: ./src/components/unit/select.vue?vue&type=template&id=752f2375&
2694
2698
 
2695
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
2696
- var es_array_push = __webpack_require__(7658);
2697
2699
  ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/unit/select.vue?vue&type=script&lang=js&
2698
2700
 
2699
2701
 
@@ -3469,6 +3471,721 @@ var file_component = normalizeComponent(
3469
3471
  )
3470
3472
 
3471
3473
  /* harmony default export */ var file = (file_component.exports);
3474
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/popup/dialog.vue?vue&type=template&id=a69b8388&scoped=true&
3475
+ var dialogvue_type_template_id_a69b8388_scoped_true_render = function render() {
3476
+ var _vm = this,
3477
+ _c = _vm._self._c;
3478
+ return _c('div', {
3479
+ directives: [{
3480
+ name: "show",
3481
+ rawName: "v-show",
3482
+ value: _vm.show,
3483
+ expression: "show"
3484
+ }]
3485
+ }, [_c('div', {
3486
+ staticClass: "popup-mask an an-fadein",
3487
+ class: {
3488
+ 'an-fadeout': !_vm.active
3489
+ },
3490
+ staticStyle: {
3491
+ "z-index": "101"
3492
+ }
3493
+ }), _c('div', {
3494
+ ref: "wrapper",
3495
+ staticClass: "c-dialog-wrapper",
3496
+ attrs: {
3497
+ "mode": _vm.mode
3498
+ }
3499
+ }, [_c('div', {
3500
+ staticClass: "c-dialog flex-column an",
3501
+ class: {
3502
+ [_vm.animate]: _vm.active,
3503
+ 'an-fadeout': !_vm.active
3504
+ },
3505
+ style: {
3506
+ 'width': _vm.parsePixel(_vm.compWidth)
3507
+ },
3508
+ attrs: {
3509
+ "mode": _vm.mode,
3510
+ "confirm": _vm.confirm
3511
+ }
3512
+ }, [_vm.title !== false ? _c('div', {
3513
+ staticClass: "c-dialog-head"
3514
+ }, [_c('p', [_vm._v(_vm._s(_vm.title))])]) : _vm._e(), _vm.closeButton ? _c('div', {
3515
+ staticClass: "c-dialog-close flex-center",
3516
+ on: {
3517
+ "click": _vm.close
3518
+ }
3519
+ }, [_c('i', {
3520
+ staticClass: "tf tf-cross"
3521
+ })]) : _vm._e(), _c('div', {
3522
+ ref: "content",
3523
+ class: {
3524
+ 'flex-grow': _vm.mode == 'slide'
3525
+ },
3526
+ style: {
3527
+ 'height': _vm.parsePixel(_vm.compHeight),
3528
+ 'padding-bottom': _vm.oddHeight ? '1px' : '',
3529
+ 'overflow': _vm.compHeight == 'auto' ? '' : 'auto'
3530
+ }
3531
+ }, [_vm._t("default")], 2), _vm.button ? _c('div', {
3532
+ staticClass: "c-dialog-button flex-center-cross flex-end-center"
3533
+ }, [_vm.$slots.button ? _vm._t("button") : [_c('c-button', {
3534
+ attrs: {
3535
+ "size": "m"
3536
+ },
3537
+ on: {
3538
+ "click": function ($event) {
3539
+ return _vm.buttonHandle('resolve');
3540
+ }
3541
+ }
3542
+ }, [_vm._v(_vm._s(_vm.buttonName))]), _vm.cancelButton ? _c('c-button', {
3543
+ attrs: {
3544
+ "color": "black",
3545
+ "size": "m",
3546
+ "hollow": ""
3547
+ },
3548
+ on: {
3549
+ "click": function ($event) {
3550
+ return _vm.buttonHandle('cancel');
3551
+ }
3552
+ }
3553
+ }, [_vm._v(_vm._s(_vm.cancelButtonnName))]) : _vm._e()]], 2) : _vm._e()])])]);
3554
+ };
3555
+ var dialogvue_type_template_id_a69b8388_scoped_true_staticRenderFns = [];
3556
+
3557
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/popup/dialog.vue?vue&type=script&lang=js&
3558
+ /* harmony default export */ var dialogvue_type_script_lang_js_ = ({
3559
+ name: 'cDialog',
3560
+ props: {
3561
+ mode: {
3562
+ // 打开模式(popup: 渐显; slide: 侧滑)
3563
+ type: String,
3564
+ default: 'popup'
3565
+ },
3566
+ confirm: Boolean,
3567
+ title: {
3568
+ type: [String, Boolean],
3569
+ default: ''
3570
+ },
3571
+ width: [Number, String],
3572
+ height: {
3573
+ type: [Number, String],
3574
+ default: 'auto'
3575
+ },
3576
+ closeButton: {
3577
+ type: Boolean,
3578
+ default: true
3579
+ },
3580
+ button: {
3581
+ type: Boolean,
3582
+ default: true
3583
+ },
3584
+ buttonName: {
3585
+ type: String,
3586
+ default: '确定'
3587
+ },
3588
+ cancelButton: {
3589
+ type: Boolean,
3590
+ default: true
3591
+ },
3592
+ cancelButtonnName: {
3593
+ type: String,
3594
+ default: '取消'
3595
+ }
3596
+ },
3597
+ data() {
3598
+ return {
3599
+ show: false,
3600
+ active: false,
3601
+ oddHeight: false
3602
+ };
3603
+ },
3604
+ computed: {
3605
+ compWidth() {
3606
+ return this.width || {
3607
+ popup: 750,
3608
+ slide: 600
3609
+ }[this.mode];
3610
+ },
3611
+ compHeight() {
3612
+ return this.mode == 'slide' ? 0 : this.height;
3613
+ },
3614
+ animate() {
3615
+ return {
3616
+ popup: 'an-popup',
3617
+ slide: 'an-slidein'
3618
+ }[this.mode];
3619
+ }
3620
+ },
3621
+ mounted() {
3622
+ this._observer = new MutationObserver(this.updateOddHeight);
3623
+ this._observer.observe(this.$refs.content, {
3624
+ childList: true,
3625
+ subtree: true
3626
+ });
3627
+ },
3628
+ beforeDestroy() {
3629
+ this._observer.disconnect();
3630
+ },
3631
+ methods: {
3632
+ updateOddHeight() {
3633
+ if (this.show) {
3634
+ this.$nextTick(() => {
3635
+ this.oddHeight = (this.$refs.wrapper.getBoundingClientRect().height - (this.oddHeight ? 1 : 0)) % 2 == 1;
3636
+ });
3637
+ }
3638
+ },
3639
+ open() {
3640
+ this.active = true;
3641
+ this.show = true;
3642
+ this.updateOddHeight();
3643
+ },
3644
+ close() {
3645
+ this.active = false;
3646
+ this.$emit('close');
3647
+ setTimeout(() => {
3648
+ this.show = false;
3649
+ }, 250);
3650
+ },
3651
+ buttonHandle(state) {
3652
+ let stop = false;
3653
+ this.$emit(state, () => {
3654
+ stop = true;
3655
+ });
3656
+ !stop && this.close();
3657
+ }
3658
+ }
3659
+ });
3660
+ ;// CONCATENATED MODULE: ./src/components/popup/dialog.vue?vue&type=script&lang=js&
3661
+ /* harmony default export */ var popup_dialogvue_type_script_lang_js_ = (dialogvue_type_script_lang_js_);
3662
+ ;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-37.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-37.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-37.use[2]!./node_modules/stylus-loader/index.js??clonedRuleSet-37.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/popup/dialog.vue?vue&type=style&index=0&id=a69b8388&prod&lang=stylus&scoped=true&
3663
+ // extracted by mini-css-extract-plugin
3664
+
3665
+ ;// CONCATENATED MODULE: ./src/components/popup/dialog.vue?vue&type=style&index=0&id=a69b8388&prod&lang=stylus&scoped=true&
3666
+
3667
+ ;// CONCATENATED MODULE: ./src/components/popup/dialog.vue
3668
+
3669
+
3670
+
3671
+ ;
3672
+
3673
+
3674
+ /* normalize component */
3675
+
3676
+ var dialog_component = normalizeComponent(
3677
+ popup_dialogvue_type_script_lang_js_,
3678
+ dialogvue_type_template_id_a69b8388_scoped_true_render,
3679
+ dialogvue_type_template_id_a69b8388_scoped_true_staticRenderFns,
3680
+ false,
3681
+ null,
3682
+ "a69b8388",
3683
+ null
3684
+
3685
+ )
3686
+
3687
+ /* harmony default export */ var dialog = (dialog_component.exports);
3688
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/popup/loading.vue?vue&type=template&id=1786b91e&
3689
+ var loadingvue_type_template_id_1786b91e_render = function render() {
3690
+ var _vm = this,
3691
+ _c = _vm._self._c;
3692
+ return _c('div');
3693
+ };
3694
+ var loadingvue_type_template_id_1786b91e_staticRenderFns = [];
3695
+
3696
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/popup/loading.vue?vue&type=script&lang=js&
3697
+ /* harmony default export */ var loadingvue_type_script_lang_js_ = ({
3698
+ name: 'loading',
3699
+ data() {
3700
+ return {
3701
+ message: '',
3702
+ // 消息内容
3703
+ timeout: 10000 // 自动消失时长
3704
+ };
3705
+ },
3706
+
3707
+ created() {
3708
+ this._$message = this.$message({
3709
+ type: 'loading',
3710
+ message: this.message,
3711
+ timeout: this.timeout,
3712
+ mask: true
3713
+ });
3714
+ },
3715
+ methods: {
3716
+ close() {
3717
+ this._$message.close();
3718
+ }
3719
+ }
3720
+ });
3721
+ ;// CONCATENATED MODULE: ./src/components/popup/loading.vue?vue&type=script&lang=js&
3722
+ /* harmony default export */ var popup_loadingvue_type_script_lang_js_ = (loadingvue_type_script_lang_js_);
3723
+ ;// CONCATENATED MODULE: ./src/components/popup/loading.vue
3724
+
3725
+
3726
+
3727
+
3728
+
3729
+ /* normalize component */
3730
+ ;
3731
+ var loading_component = normalizeComponent(
3732
+ popup_loadingvue_type_script_lang_js_,
3733
+ loadingvue_type_template_id_1786b91e_render,
3734
+ loadingvue_type_template_id_1786b91e_staticRenderFns,
3735
+ false,
3736
+ null,
3737
+ null,
3738
+ null
3739
+
3740
+ )
3741
+
3742
+ /* harmony default export */ var loading = (loading_component.exports);
3743
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/popup/message.vue?vue&type=template&id=54a8762f&scoped=true&
3744
+ var messagevue_type_template_id_54a8762f_scoped_true_render = function render() {
3745
+ var _vm = this,
3746
+ _c = _vm._self._c;
3747
+ return _c('div', [_vm.mask ? _c('div', {
3748
+ staticClass: "popup-mask",
3749
+ staticStyle: {
3750
+ "z-index": "999"
3751
+ },
3752
+ attrs: {
3753
+ "invisible": ""
3754
+ }
3755
+ }) : _vm._e(), _c('div', {
3756
+ staticClass: "c-message flex flex-center an",
3757
+ class: {
3758
+ 'an-fadein': _vm.active,
3759
+ 'an-fadeout': !_vm.active
3760
+ },
3761
+ style: {
3762
+ 'min-width': _vm.type == 'loading' ? 'auto' : ''
3763
+ }
3764
+ }, [_c('i', {
3765
+ staticClass: "tf tf-message",
3766
+ class: _vm.type ? `tf-message-${_vm.type}` : ''
3767
+ }), _vm.message ? _c('p', {
3768
+ domProps: {
3769
+ "innerHTML": _vm._s(_vm.message)
3770
+ }
3771
+ }) : _vm._e()])]);
3772
+ };
3773
+ var messagevue_type_template_id_54a8762f_scoped_true_staticRenderFns = [];
3774
+
3775
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/popup/message.vue?vue&type=script&lang=js&
3776
+ /* harmony default export */ var messagevue_type_script_lang_js_ = ({
3777
+ name: 'message',
3778
+ data() {
3779
+ return {
3780
+ type: '',
3781
+ // 消息类型 (success: 成功; fail: 失败; warn: 警告;)
3782
+ message: '',
3783
+ // 消息内容
3784
+ timeout: 2500,
3785
+ // 自动消失时长
3786
+ mask: false,
3787
+ // 是否显示遮罩
3788
+ active: true
3789
+ };
3790
+ },
3791
+ mounted() {
3792
+ window._$messageVm && window._$messageVm.close();
3793
+ window._$messageVm = this;
3794
+ this.timeout && (this._timer = setTimeout(this.close, this.timeout));
3795
+ },
3796
+ methods: {
3797
+ close() {
3798
+ this.active = false;
3799
+ clearTimeout(this._timer);
3800
+ setTimeout(() => {
3801
+ this.$destroy();
3802
+ this.$el.remove();
3803
+ }, 250);
3804
+ }
3805
+ }
3806
+ });
3807
+ ;// CONCATENATED MODULE: ./src/components/popup/message.vue?vue&type=script&lang=js&
3808
+ /* harmony default export */ var popup_messagevue_type_script_lang_js_ = (messagevue_type_script_lang_js_);
3809
+ ;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-37.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-37.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-37.use[2]!./node_modules/stylus-loader/index.js??clonedRuleSet-37.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/popup/message.vue?vue&type=style&index=0&id=54a8762f&prod&lang=stylus&scoped=true&
3810
+ // extracted by mini-css-extract-plugin
3811
+
3812
+ ;// CONCATENATED MODULE: ./src/components/popup/message.vue?vue&type=style&index=0&id=54a8762f&prod&lang=stylus&scoped=true&
3813
+
3814
+ ;// CONCATENATED MODULE: ./src/components/popup/message.vue
3815
+
3816
+
3817
+
3818
+ ;
3819
+
3820
+
3821
+ /* normalize component */
3822
+
3823
+ var message_component = normalizeComponent(
3824
+ popup_messagevue_type_script_lang_js_,
3825
+ messagevue_type_template_id_54a8762f_scoped_true_render,
3826
+ messagevue_type_template_id_54a8762f_scoped_true_staticRenderFns,
3827
+ false,
3828
+ null,
3829
+ "54a8762f",
3830
+ null
3831
+
3832
+ )
3833
+
3834
+ /* harmony default export */ var message = (message_component.exports);
3835
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/popup/notice.vue?vue&type=template&id=4669efae&scoped=true&
3836
+ var noticevue_type_template_id_4669efae_scoped_true_render = function render() {
3837
+ var _vm = this,
3838
+ _c = _vm._self._c;
3839
+ return _c('div', {
3840
+ staticClass: "c-notice an",
3841
+ class: {
3842
+ 'an-slidein': _vm.active,
3843
+ 'an-fadeout': !_vm.active
3844
+ },
3845
+ style: {
3846
+ 'margin-top': _vm.active ? '' : -_vm.height + 'px'
3847
+ }
3848
+ }, [_c('div', {
3849
+ staticClass: "flex"
3850
+ }, [_c('i', {
3851
+ staticClass: "icon tf tf-message",
3852
+ class: _vm.type ? `tf-message-${_vm.type}` : '',
3853
+ attrs: {
3854
+ "color": ""
3855
+ }
3856
+ }), _c('div', {
3857
+ staticClass: "flex-grow"
3858
+ }, [_c('p', {
3859
+ staticClass: "title"
3860
+ }, [_vm._v(_vm._s(_vm.title))]), _c('div', {
3861
+ staticClass: "content",
3862
+ domProps: {
3863
+ "innerHTML": _vm._s(_vm.message)
3864
+ }
3865
+ })])]), _vm.button ? _c('div', {
3866
+ staticClass: "button"
3867
+ }, _vm._l(_vm.button, function (item, i) {
3868
+ return _c('a', {
3869
+ key: i,
3870
+ on: {
3871
+ "click": function ($event) {
3872
+ return _vm.buttonHandle(item);
3873
+ }
3874
+ }
3875
+ }, [_vm._v(_vm._s(item.name))]);
3876
+ }), 0) : _vm._e(), _c('a', {
3877
+ staticClass: "close flex-center",
3878
+ on: {
3879
+ "click": _vm.close
3880
+ }
3881
+ }, [_c('i', {
3882
+ staticClass: "tf tf-cross"
3883
+ })])]);
3884
+ };
3885
+ var noticevue_type_template_id_4669efae_scoped_true_staticRenderFns = [];
3886
+
3887
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/popup/notice.vue?vue&type=script&lang=js&
3888
+ /* harmony default export */ var noticevue_type_script_lang_js_ = ({
3889
+ name: 'notice',
3890
+ data() {
3891
+ return {
3892
+ type: '',
3893
+ // 通知类型 (success: 成功; fail: 失败; warn: 警告;)
3894
+ title: '',
3895
+ // 通知标题
3896
+ message: '',
3897
+ // 通知内容
3898
+ timeout: 10000,
3899
+ // 自动消失时长
3900
+ button: false,
3901
+ // 按钮
3902
+ active: true,
3903
+ height: 0
3904
+ };
3905
+ },
3906
+ mounted() {
3907
+ this.$nextTick(() => {
3908
+ this.height = this.$el.clientHeight;
3909
+ });
3910
+ this.timeout && (this._timer = setTimeout(this.close, this.timeout));
3911
+ },
3912
+ methods: {
3913
+ close() {
3914
+ this.active = false;
3915
+ clearTimeout(this._timer);
3916
+ setTimeout(() => {
3917
+ this.$destroy();
3918
+ this.$el.remove();
3919
+ }, 450);
3920
+ },
3921
+ buttonHandle(item) {
3922
+ item.callback();
3923
+ this.close();
3924
+ }
3925
+ }
3926
+ });
3927
+ ;// CONCATENATED MODULE: ./src/components/popup/notice.vue?vue&type=script&lang=js&
3928
+ /* harmony default export */ var popup_noticevue_type_script_lang_js_ = (noticevue_type_script_lang_js_);
3929
+ ;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-37.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-37.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-37.use[2]!./node_modules/stylus-loader/index.js??clonedRuleSet-37.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/popup/notice.vue?vue&type=style&index=0&id=4669efae&prod&lang=stylus&scoped=true&
3930
+ // extracted by mini-css-extract-plugin
3931
+
3932
+ ;// CONCATENATED MODULE: ./src/components/popup/notice.vue?vue&type=style&index=0&id=4669efae&prod&lang=stylus&scoped=true&
3933
+
3934
+ ;// CONCATENATED MODULE: ./src/components/popup/notice.vue
3935
+
3936
+
3937
+
3938
+ ;
3939
+
3940
+
3941
+ /* normalize component */
3942
+
3943
+ var notice_component = normalizeComponent(
3944
+ popup_noticevue_type_script_lang_js_,
3945
+ noticevue_type_template_id_4669efae_scoped_true_render,
3946
+ noticevue_type_template_id_4669efae_scoped_true_staticRenderFns,
3947
+ false,
3948
+ null,
3949
+ "4669efae",
3950
+ null
3951
+
3952
+ )
3953
+
3954
+ /* harmony default export */ var notice = (notice_component.exports);
3955
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/popup/confirm.vue?vue&type=template&id=63f1dde7&scoped=true&
3956
+ var confirmvue_type_template_id_63f1dde7_scoped_true_render = function render() {
3957
+ var _vm = this,
3958
+ _c = _vm._self._c;
3959
+ return _c('c-dialog', {
3960
+ ref: "dialog",
3961
+ attrs: {
3962
+ "confirm": "",
3963
+ "title": false,
3964
+ "width": "450",
3965
+ "close-button": false
3966
+ }
3967
+ }, [_c('div', {
3968
+ staticClass: "c-confirm flex"
3969
+ }, [_c('i', {
3970
+ staticClass: "icon tf",
3971
+ class: _vm.type ? `tf-message-${_vm.type}` : '',
3972
+ attrs: {
3973
+ "color": ""
3974
+ }
3975
+ }), _c('div', {
3976
+ staticClass: "flex-grow"
3977
+ }, [_c('p', {
3978
+ staticClass: "title"
3979
+ }, [_vm._v(_vm._s(_vm.title))]), _c('div', {
3980
+ staticClass: "content",
3981
+ domProps: {
3982
+ "innerHTML": _vm._s(_vm.message)
3983
+ }
3984
+ })])]), _c('template', {
3985
+ slot: "button"
3986
+ }, [_c('c-button', {
3987
+ attrs: {
3988
+ "width": "72",
3989
+ "height": "34",
3990
+ "size": "m"
3991
+ },
3992
+ on: {
3993
+ "click": function ($event) {
3994
+ return _vm.buttonHandle('resolve');
3995
+ }
3996
+ }
3997
+ }, [_vm._v(_vm._s(_vm.buttonName))]), _vm.cancelButton ? _c('c-button', {
3998
+ attrs: {
3999
+ "width": "72",
4000
+ "height": "34",
4001
+ "size": "m",
4002
+ "color": "black",
4003
+ "hollow": ""
4004
+ },
4005
+ on: {
4006
+ "click": function ($event) {
4007
+ return _vm.buttonHandle('cancel');
4008
+ }
4009
+ }
4010
+ }, [_vm._v(_vm._s(_vm.cancelButtonName))]) : _vm._e()], 1)], 2);
4011
+ };
4012
+ var confirmvue_type_template_id_63f1dde7_scoped_true_staticRenderFns = [];
4013
+
4014
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/popup/confirm.vue?vue&type=script&lang=js&
4015
+ /* harmony default export */ var confirmvue_type_script_lang_js_ = ({
4016
+ name: 'confirm',
4017
+ data() {
4018
+ return {
4019
+ type: 'enquire',
4020
+ // 消息类型 (enquire: 询问; warn: 警告;)
4021
+ title: '消息提醒',
4022
+ // 消息标题
4023
+ message: '',
4024
+ // 消息内容
4025
+ buttonName: '确定',
4026
+ cancelButton: true,
4027
+ cancelButtonName: '取消'
4028
+ };
4029
+ },
4030
+ mounted() {
4031
+ this.$refs.dialog.open();
4032
+ },
4033
+ methods: {
4034
+ buttonHandle(state) {
4035
+ this[state] && this[state]();
4036
+ this.$refs.dialog.close();
4037
+ setTimeout(() => {
4038
+ this.$destroy();
4039
+ this.$el.remove();
4040
+ }, 260);
4041
+ }
4042
+ }
4043
+ });
4044
+ ;// CONCATENATED MODULE: ./src/components/popup/confirm.vue?vue&type=script&lang=js&
4045
+ /* harmony default export */ var popup_confirmvue_type_script_lang_js_ = (confirmvue_type_script_lang_js_);
4046
+ ;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-37.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-37.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-37.use[2]!./node_modules/stylus-loader/index.js??clonedRuleSet-37.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/popup/confirm.vue?vue&type=style&index=0&id=63f1dde7&prod&lang=stylus&scoped=true&
4047
+ // extracted by mini-css-extract-plugin
4048
+
4049
+ ;// CONCATENATED MODULE: ./src/components/popup/confirm.vue?vue&type=style&index=0&id=63f1dde7&prod&lang=stylus&scoped=true&
4050
+
4051
+ ;// CONCATENATED MODULE: ./src/components/popup/confirm.vue
4052
+
4053
+
4054
+
4055
+ ;
4056
+
4057
+
4058
+ /* normalize component */
4059
+
4060
+ var confirm_component = normalizeComponent(
4061
+ popup_confirmvue_type_script_lang_js_,
4062
+ confirmvue_type_template_id_63f1dde7_scoped_true_render,
4063
+ confirmvue_type_template_id_63f1dde7_scoped_true_staticRenderFns,
4064
+ false,
4065
+ null,
4066
+ "63f1dde7",
4067
+ null
4068
+
4069
+ )
4070
+
4071
+ /* harmony default export */ var popup_confirm = (confirm_component.exports);
4072
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/popup/preview.vue?vue&type=template&id=dc0d36ce&scoped=true&
4073
+ var previewvue_type_template_id_dc0d36ce_scoped_true_render = function render() {
4074
+ var _vm = this,
4075
+ _c = _vm._self._c;
4076
+ return _c('c-dialog', {
4077
+ ref: "dialog",
4078
+ attrs: {
4079
+ "title": false,
4080
+ "width": "auto",
4081
+ "button": false
4082
+ }
4083
+ }, [_c('div', {
4084
+ staticClass: "preview-close flex-center",
4085
+ on: {
4086
+ "click": _vm.close
4087
+ }
4088
+ }, [_c('i', {
4089
+ staticClass: "tf tf-cross"
4090
+ })]), _vm.video ? _c('video', {
4091
+ ref: "video",
4092
+ staticClass: "preview-video",
4093
+ attrs: {
4094
+ "src": _vm.src,
4095
+ "controls": "",
4096
+ "loop": "",
4097
+ "autoplay": ""
4098
+ }
4099
+ }) : _c('img', {
4100
+ ref: "img",
4101
+ staticClass: "preview-img",
4102
+ attrs: {
4103
+ "src": _vm.src
4104
+ }
4105
+ })]);
4106
+ };
4107
+ var previewvue_type_template_id_dc0d36ce_scoped_true_staticRenderFns = [];
4108
+
4109
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/popup/preview.vue?vue&type=script&lang=js&
4110
+ /* harmony default export */ var previewvue_type_script_lang_js_ = ({
4111
+ name: 'preview',
4112
+ data() {
4113
+ return {
4114
+ src: ''
4115
+ };
4116
+ },
4117
+ computed: {
4118
+ video() {
4119
+ var arr = this.src.split('.');
4120
+ return ['mp4', 'webm'].includes(arr[arr.length - 1]);
4121
+ }
4122
+ },
4123
+ mounted() {
4124
+ if (!this.src) return;
4125
+ this.$loading();
4126
+ if (this.video) {
4127
+ this.$refs.video.addEventListener('play', () => {
4128
+ this.$loadOver();
4129
+ this.$refs.dialog.open();
4130
+ });
4131
+ this.$refs.video.addEventListener('error', () => {
4132
+ this.$loadOver();
4133
+ this.$message({
4134
+ type: 'fail',
4135
+ message: '视频加载失败'
4136
+ });
4137
+ });
4138
+ } else {
4139
+ this.$refs.img.onload = () => {
4140
+ this.$loadOver();
4141
+ this.$refs.dialog.open();
4142
+ };
4143
+ this.$refs.img.onerror = () => {
4144
+ this.$loadOver();
4145
+ this.$message({
4146
+ type: 'fail',
4147
+ message: '图片加载失败'
4148
+ });
4149
+ };
4150
+ }
4151
+ },
4152
+ methods: {
4153
+ close() {
4154
+ this.$refs.dialog.close();
4155
+ setTimeout(() => {
4156
+ this.$el.remove();
4157
+ }, 260);
4158
+ }
4159
+ }
4160
+ });
4161
+ ;// CONCATENATED MODULE: ./src/components/popup/preview.vue?vue&type=script&lang=js&
4162
+ /* harmony default export */ var popup_previewvue_type_script_lang_js_ = (previewvue_type_script_lang_js_);
4163
+ ;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-37.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-37.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-37.use[2]!./node_modules/stylus-loader/index.js??clonedRuleSet-37.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/popup/preview.vue?vue&type=style&index=0&id=dc0d36ce&prod&lang=stylus&scoped=true&
4164
+ // extracted by mini-css-extract-plugin
4165
+
4166
+ ;// CONCATENATED MODULE: ./src/components/popup/preview.vue?vue&type=style&index=0&id=dc0d36ce&prod&lang=stylus&scoped=true&
4167
+
4168
+ ;// CONCATENATED MODULE: ./src/components/popup/preview.vue
4169
+
4170
+
4171
+
4172
+ ;
4173
+
4174
+
4175
+ /* normalize component */
4176
+
4177
+ var preview_component = normalizeComponent(
4178
+ popup_previewvue_type_script_lang_js_,
4179
+ previewvue_type_template_id_dc0d36ce_scoped_true_render,
4180
+ previewvue_type_template_id_dc0d36ce_scoped_true_staticRenderFns,
4181
+ false,
4182
+ null,
4183
+ "dc0d36ce",
4184
+ null
4185
+
4186
+ )
4187
+
4188
+ /* harmony default export */ var preview = (preview_component.exports);
3472
4189
  ;// CONCATENATED MODULE: ./src/components/index.js
3473
4190
 
3474
4191
 
@@ -3480,87 +4197,78 @@ var file_component = normalizeComponent(
3480
4197
 
3481
4198
 
3482
4199
 
4200
+
4201
+
4202
+
4203
+
4204
+
3483
4205
  // import Editor from './unit/editor.vue'
3484
4206
 
3485
- // import cDialog from './popup/dialog.vue'
3486
- // import loading from './popup/loading.vue';
3487
- // import message from './popup/message.vue';
3488
- // import notice from './popup/notice.vue';
3489
- // import confirm from './popup/confirm.vue';
3490
- // import preview from './popup/preview.vue';
3491
4207
 
3492
- const COMPS = [unit_button, input, unit_radio, radio_group, unit_checkbox, checkbox_group, unit_select, region, upload_file, file
4208
+
4209
+
4210
+
4211
+
4212
+
4213
+ const COMPS = [unit_button, input, unit_radio, radio_group, unit_checkbox, checkbox_group, unit_select, region, upload_file, file,
3493
4214
  // Editor,
3494
- // cDialog
3495
- ];
3496
- // const DYNAMIC_COMPS = [
3497
- // loading,
3498
- // message,
3499
- // notice,
3500
- // confirm,
3501
- // preview
3502
- // ];
4215
+ dialog];
4216
+ const DYNAMIC_COMPS = [loading, message, notice, popup_confirm, preview];
3503
4217
  const install = function (Vue, config) {
3504
4218
  COMPS.forEach(comp => {
3505
4219
  Vue.component(comp.name, comp);
3506
4220
  });
3507
-
3508
- // var popupNoticeList = [];
3509
- // var $popupNotice = document.createElement('div');
3510
- // $popupNotice.style.zIndex = 999;
3511
- // $popupNotice.style.position = 'fixed';
3512
- // $popupNotice.style.right = 0;
3513
- // $popupNotice.style.top = 0;
3514
- // document.body.appendChild($popupNotice);
3515
- // DYNAMIC_COMPS.forEach(comp => {
3516
- // let constructor = Vue.extend(comp);
3517
- // Vue.prototype[`$${comp.name}`] = function(opt = {}) {
3518
- // let vm = new constructor({
3519
- // el: document.createElement('div'),
3520
- // data() {
3521
- // return opt
3522
- // },
3523
- // mounted() {
3524
- // if (this.$options.name == 'notice') {
3525
- // this.$nextTick(() => {
3526
- // if ($popupNotice.clientHeight > window.innerHeight) {
3527
- // popupNoticeList[0].close();
3528
- // }
3529
- // });
3530
- // }
3531
- // },
3532
- // beforeDestroy() {
3533
- // if (this.$options.name == 'notice') {
3534
- // this.$nextTick(() => {
3535
- // popupNoticeList.splice(popupNoticeList.findIndex(item => item == this), 1);
3536
- // if ($popupNotice.clientHeight > window.innerHeight) {
3537
- // popupNoticeList[0].close();
3538
- // }
3539
- // });
3540
- // }
3541
- // }
3542
- // });
3543
-
3544
- // switch (comp.name) {
3545
- // case 'loading':
3546
- // Vue.prototype.$loadOver = function() {
3547
- // vm.close();
3548
- // };
3549
-
3550
- // case 'notice':
3551
- // popupNoticeList.push(vm);
3552
- // $popupNotice.appendChild(vm.$el);
3553
- // break;
3554
-
3555
- // default:
3556
- // document.body.appendChild(vm.$el);
3557
- // }
3558
-
3559
- // return vm;
3560
- // }
3561
- // });
4221
+ var popupNoticeList = [];
4222
+ var $popupNotice = document.createElement('div');
4223
+ $popupNotice.style.zIndex = 999;
4224
+ $popupNotice.style.position = 'fixed';
4225
+ $popupNotice.style.right = 0;
4226
+ $popupNotice.style.top = 0;
4227
+ document.body.appendChild($popupNotice);
4228
+ DYNAMIC_COMPS.forEach(comp => {
4229
+ let constructor = Vue.extend(comp);
4230
+ Vue.prototype[`$${comp.name}`] = function (opt = {}) {
4231
+ let vm = new constructor({
4232
+ el: document.createElement('div'),
4233
+ data() {
4234
+ return opt;
4235
+ },
4236
+ mounted() {
4237
+ if (this.$options.name == 'notice') {
4238
+ this.$nextTick(() => {
4239
+ if ($popupNotice.clientHeight > window.innerHeight) {
4240
+ popupNoticeList[0].close();
4241
+ }
4242
+ });
4243
+ }
4244
+ },
4245
+ beforeDestroy() {
4246
+ if (this.$options.name == 'notice') {
4247
+ this.$nextTick(() => {
4248
+ popupNoticeList.splice(popupNoticeList.findIndex(item => item == this), 1);
4249
+ if ($popupNotice.clientHeight > window.innerHeight) {
4250
+ popupNoticeList[0].close();
4251
+ }
4252
+ });
4253
+ }
4254
+ }
4255
+ });
4256
+ switch (comp.name) {
4257
+ case 'loading':
4258
+ Vue.prototype.$loadOver = function () {
4259
+ vm.close();
4260
+ };
4261
+ case 'notice':
4262
+ popupNoticeList.push(vm);
4263
+ $popupNotice.appendChild(vm.$el);
4264
+ break;
4265
+ default:
4266
+ document.body.appendChild(vm.$el);
4267
+ }
4268
+ return vm;
4269
+ };
4270
+ });
3562
4271
  };
3563
-
3564
4272
  /* harmony default export */ var components = (install);
3565
4273
  ;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
3566
4274