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