@deanwu/vue-component-library 1.0.15 → 1.0.16

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