aaa-ui-test 1.0.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of aaa-ui-test might be problematic. Click here for more details.

Files changed (104) hide show
  1. package/README.md +62 -0
  2. package/babel-plugin-on-demand-load/index.js +74 -0
  3. package/babel-plugin-on-demand-load/report.js +49 -0
  4. package/lib/index.css +2213 -0
  5. package/lib/index.js +10083 -0
  6. package/package.json +73 -0
  7. package/src/assets/css/common/_mixin.scss +130 -0
  8. package/src/assets/css/common/_var.scss +69 -0
  9. package/src/components/address/index.js +8 -0
  10. package/src/components/address/index.scss +72 -0
  11. package/src/components/address/src/address.vue +238 -0
  12. package/src/components/amount/index.js +6 -0
  13. package/src/components/amount/index.scss +88 -0
  14. package/src/components/amount/src/amount.vue +143 -0
  15. package/src/components/button/__tests__/__snapshots__/index.test.js.snap +7 -0
  16. package/src/components/button/__tests__/index.test.js +39 -0
  17. package/src/components/button/index.js +7 -0
  18. package/src/components/button/index.scss +83 -0
  19. package/src/components/button/src/button.vue +39 -0
  20. package/src/components/button-group/index.js +8 -0
  21. package/src/components/button-group/index.scss +37 -0
  22. package/src/components/button-group/src/button-group.vue +21 -0
  23. package/src/components/checkbox/index.js +8 -0
  24. package/src/components/checkbox/index.scss +47 -0
  25. package/src/components/checkbox/src/checkbox-group.vue +53 -0
  26. package/src/components/checkbox/src/checkbox.vue +153 -0
  27. package/src/components/date-selecter/index.js +6 -0
  28. package/src/components/date-selecter/index.scss +190 -0
  29. package/src/components/date-selecter/src/dateselecter.vue +387 -0
  30. package/src/components/default/index.js +6 -0
  31. package/src/components/default/index.scss +25 -0
  32. package/src/components/default/src/default.vue +23 -0
  33. package/src/components/dialog/index.js +146 -0
  34. package/src/components/dialog/index.scss +250 -0
  35. package/src/components/dialog/src/dialog.vue +153 -0
  36. package/src/components/field/index.js +8 -0
  37. package/src/components/field/index.scss +93 -0
  38. package/src/components/field/src/field.vue +57 -0
  39. package/src/components/input/__tests__/__snapshots__/index.test.js.snap +10 -0
  40. package/src/components/input/__tests__/index.test.js +63 -0
  41. package/src/components/input/index.js +8 -0
  42. package/src/components/input/index.scss +91 -0
  43. package/src/components/input/src/input.vue +214 -0
  44. package/src/components/list/index.js +8 -0
  45. package/src/components/list/index.scss +21 -0
  46. package/src/components/list/src/list.vue +16 -0
  47. package/src/components/list-item/index.js +8 -0
  48. package/src/components/list-item/index.scss +126 -0
  49. package/src/components/list-item/src/list-item.vue +59 -0
  50. package/src/components/loading/__tests__/__snapshots__/index.test.js.snap +9 -0
  51. package/src/components/loading/__tests__/index.test.js +30 -0
  52. package/src/components/loading/index.js +128 -0
  53. package/src/components/loading/index.scss +33 -0
  54. package/src/components/loading/src/loading.vue +23 -0
  55. package/src/components/mask/index.js +9 -0
  56. package/src/components/mask/index.scss +16 -0
  57. package/src/components/mask/src/mask.vue +52 -0
  58. package/src/components/notice/index.js +6 -0
  59. package/src/components/notice/index.scss +81 -0
  60. package/src/components/notice/src/notice.vue +128 -0
  61. package/src/components/overlay/index.js +8 -0
  62. package/src/components/overlay/index.scss +119 -0
  63. package/src/components/overlay/src/overlay.vue +72 -0
  64. package/src/components/picker/index.js +7 -0
  65. package/src/components/picker/index.scss +49 -0
  66. package/src/components/picker/src/picker.vue +205 -0
  67. package/src/components/popup/index.js +8 -0
  68. package/src/components/popup/index.scss +79 -0
  69. package/src/components/popup/src/popup.vue +88 -0
  70. package/src/components/popup-header/index.js +8 -0
  71. package/src/components/popup-header/index.scss +45 -0
  72. package/src/components/popup-header/src/popup-header.vue +41 -0
  73. package/src/components/radio/index.js +8 -0
  74. package/src/components/radio/index.scss +19 -0
  75. package/src/components/radio/src/radio.vue +51 -0
  76. package/src/components/select/index.js +8 -0
  77. package/src/components/select/index.scss +51 -0
  78. package/src/components/select/src/select.vue +86 -0
  79. package/src/components/swiper/index.js +6 -0
  80. package/src/components/swiper/index.scss +49 -0
  81. package/src/components/swiper/src/swiper.vue +211 -0
  82. package/src/components/switch/__tests__/__snapshots__/index.test.js.snap +15 -0
  83. package/src/components/switch/__tests__/index.test.js +44 -0
  84. package/src/components/switch/index.js +8 -0
  85. package/src/components/switch/index.scss +85 -0
  86. package/src/components/switch/src/switch.vue +60 -0
  87. package/src/components/tabs/index.js +8 -0
  88. package/src/components/tabs/index.scss +73 -0
  89. package/src/components/tabs/src/tab-item.vue +40 -0
  90. package/src/components/tabs/src/tabs.vue +121 -0
  91. package/src/components/textarea/index.js +8 -0
  92. package/src/components/textarea/index.scss +41 -0
  93. package/src/components/textarea/src/textarea.vue +140 -0
  94. package/src/components/toast/__tests__/__snapshots__/index.test.js.snap +3 -0
  95. package/src/components/toast/__tests__/index.test.js +25 -0
  96. package/src/components/toast/index.js +53 -0
  97. package/src/components/toast/index.scss +102 -0
  98. package/src/components/toast/src/toast.vue +19 -0
  99. package/src/index.js +87 -0
  100. package/src/mixins/emitter.js +33 -0
  101. package/src/mixins/visible.js +23 -0
  102. package/src/utils/clickoutside.js +42 -0
  103. package/src/utils/fix-body.js +46 -0
  104. package/src/utils/utils.js +71 -0
@@ -0,0 +1,128 @@
1
+ import Vue from 'vue';
2
+ import LoadingComponent from './src/loading.vue';
3
+ import "./index.scss";
4
+
5
+ // const Loading = {};
6
+ let Loading = {};
7
+ // 注册Loading
8
+ //Loading.install = function (Vue) {
9
+
10
+
11
+ // 生成一个Vue的子类
12
+ // 同时这个子类也就是组件
13
+ const LoadingConstructor = Vue.extend(LoadingComponent)
14
+
15
+ let toastPool = [];
16
+
17
+ // 生成一个该子类的实例
18
+ let getAnInstance = () => {
19
+ if (toastPool.length > 0) {
20
+ let instance = toastPool[0];
21
+ toastPool.splice(0, 1);
22
+ return instance;
23
+ }
24
+ return new LoadingConstructor({
25
+ el: document.createElement('div')
26
+ });
27
+ };
28
+
29
+ let returnAnInstance = instance => {
30
+ if (instance) {
31
+ toastPool.push(instance);
32
+ }
33
+ };
34
+
35
+ let removeDom = event => {
36
+ if (event.target.parentNode) {
37
+ event.target.parentNode.removeChild(event.target);
38
+ }
39
+ };
40
+
41
+
42
+ LoadingConstructor.prototype.close = function() {
43
+ this.show = false;
44
+ this.closed = true;
45
+ this.$el.addEventListener('transitionend', removeDom);
46
+ returnAnInstance(this);
47
+
48
+ return this;
49
+ };
50
+
51
+ // LoadingConstructor.prototype.open = function() {
52
+ // this.test()
53
+ // this.show = true;
54
+ // this.closed = false;
55
+ // //this.$el.addEventListener('transitionend', removeDom);
56
+ // document.body.appendChild(this.$el);
57
+ // returnAnInstance(this);
58
+
59
+ // return this;
60
+ // };
61
+
62
+ // 通过Vue的原型注册一个方法
63
+ // 让所有实例共享这个方法
64
+ Loading = Vue.prototype.$loading = () => {
65
+
66
+ let instance = getAnInstance();
67
+
68
+
69
+ instance.closed = false;
70
+ clearTimeout(instance.timer);
71
+
72
+ instance.show = true;
73
+
74
+ document.body.appendChild(instance.$el);
75
+
76
+ Vue.nextTick(function() {
77
+ instance.show = true;
78
+ instance.$el.removeEventListener('transitionend', removeDom);
79
+ // ~duration && (instance.timer = setTimeout(function() {
80
+ // instance.show = false;
81
+ // if (instance.closed) return;
82
+ // instance.close();
83
+ // }, duration));
84
+ });
85
+
86
+ return instance;
87
+ }
88
+ Loading.install = function (Vue){
89
+
90
+ }
91
+
92
+
93
+ // 生成一个Vue的子类
94
+ // 同时这个子类也就是组件
95
+ // const LoadingConstructor = Vue.extend(LoadingComponent)
96
+ // 生成一个该子类的实例
97
+
98
+
99
+
100
+ // LoadingConstructor.prototype.close = function(){
101
+ // this.show = false;
102
+ // return this;
103
+ // }
104
+ // LoadingConstructor.prototype.open = function(){
105
+ // this.show = true;
106
+ // return this;
107
+ // }
108
+ // const instance = new LoadingConstructor();
109
+
110
+
111
+
112
+ // // 通过Vue的原型注册一个方法
113
+ // // 让所有实例共享这个方法
114
+ // Vue.prototype.$loading = () => {
115
+ // // debugger;
116
+ // // 将这个实例挂载在我创建的div上
117
+ // // 并将此div加入全局挂载点内部
118
+ // instance.$mount(document.createElement('div'))
119
+ // document.body.appendChild(instance.$el)
120
+
121
+ // instance.open();
122
+ // return instance
123
+ // }
124
+
125
+
126
+ //}
127
+
128
+ export default Loading
@@ -0,0 +1,33 @@
1
+ @charset "utf-8";
2
+
3
+ .jdd-loading {
4
+ display: flex;
5
+ position: fixed;
6
+ top: 40%;
7
+ left: 50%;
8
+ z-index: 9999;
9
+ width: 54px;
10
+ height: 54px;
11
+ margin: -27px 0 0 -27px;
12
+ border-radius: 3px;
13
+ background-color: rgba(0, 0, 0, .6);
14
+ justify-content: center;
15
+ align-items: center;
16
+ img {
17
+ display: inline-block;
18
+ vertical-align: middle;
19
+ width: auto;
20
+ }
21
+ }
22
+ .jdd-loading-fade-enter-active,
23
+ .jdd-loading-fade-leave-active {
24
+ transition: 0.3s ease-out;
25
+ }
26
+ .jdd-loading-fade-enter-to {
27
+ opacity: 1;
28
+ transform: scale(1);
29
+ }
30
+ .jdd-loading-fade-leave-to {
31
+ opacity: 0;
32
+ transform: scale(0.8);
33
+ }
@@ -0,0 +1,23 @@
1
+ <template>
2
+ <transition name="jdd-loading-fade">
3
+ <div class="jdd-loading" v-show="show">
4
+ <jdd-mask v-model="show" :transparent="true"></jdd-mask>
5
+ <img src="//m.jr.jd.com/statics/pageLoading/loading.svg">
6
+ </div>
7
+ </transition>
8
+ </template>
9
+
10
+ <script>
11
+ import JddMask from "../../mask";
12
+ export default {
13
+ name: 'JddLoading',
14
+ components:{
15
+ JddMask
16
+ },
17
+ data() {
18
+ return {
19
+ show:false
20
+ };
21
+ }
22
+ };
23
+ </script>
@@ -0,0 +1,9 @@
1
+ import Mask from './src/mask.vue';
2
+
3
+ import "./index.scss";
4
+
5
+ Mask.install = function(Vue){
6
+ Vue.component(Mask.name, Mask);
7
+ }
8
+
9
+ export default Mask;
@@ -0,0 +1,16 @@
1
+ @charset "utf-8";
2
+ .jdd-mask {
3
+ position: fixed;
4
+ z-index: 1000;
5
+ top: 0;
6
+ left: 0;
7
+ right: 0;
8
+ bottom: 0;
9
+ background-color: rgba(0,0,0,0.6);
10
+ &-transparent {
11
+ background-color: transparent;
12
+ }
13
+ }
14
+ body.jdd-modal-open {
15
+ position: fixed;
16
+ }
@@ -0,0 +1,52 @@
1
+ <template>
2
+ <div class="jdd-mask-box" v-show="value">
3
+ <div :class="classes" @click.stop="onClick">
4
+ <slot></slot>
5
+ </div>
6
+ </div>
7
+ </template>
8
+ <script>
9
+ import FixedBody from "@/utils/fix-body";
10
+ export default {
11
+ name: "JddMask",
12
+ props: {
13
+ transparent: {
14
+ type: Boolean,
15
+ default: false
16
+ },
17
+ custmerClassName: {
18
+ type: String,
19
+ default: ""
20
+ },
21
+ unClick: {
22
+ type: Boolean,
23
+ default: false
24
+ },
25
+ value: {
26
+ type: Boolean,
27
+ default: false
28
+ },
29
+ backgroundColor:{
30
+ type:String,
31
+ default:'rgba(0, 0, 0, 0.6)'
32
+ }
33
+ },
34
+ directives: {
35
+ fixed: FixedBody
36
+ },
37
+ computed: {
38
+ classes() {
39
+ return [
40
+ "jdd-mask",
41
+ this.transparent && "jdd-mask-transparent",
42
+ this.custmerClassName && this.custmerClassName
43
+ ];
44
+ }
45
+ },
46
+ methods: {
47
+ onClick(event) {
48
+ !this.unClick && this.$emit("onClick", event);
49
+ }
50
+ }
51
+ }
52
+ </script>
@@ -0,0 +1,6 @@
1
+ import Notice from './src/notice.vue';
2
+ import "./index.scss";
3
+ Notice.install = function(Vue){
4
+ Vue.component(Notice.name, Notice);
5
+ }
6
+ export default Notice;
@@ -0,0 +1,81 @@
1
+ @charset "utf-8";
2
+
3
+ .jdd-notice {
4
+ height: 36px;
5
+ line-height: 36px;
6
+ background: #FFF7EA;
7
+ position: relative;
8
+ padding: 0 16px 0;
9
+ &.has-icon {
10
+ padding-right: 39px;
11
+ }
12
+ // &.opacity-bg{
13
+ // .txt{
14
+ // color: #fff;
15
+ // opacity: 0.8;
16
+ // }
17
+ .info-white{
18
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAtCAMAAAANxBKoAAAARVBMVEX///8AAAD///////////////////////////////////////////////////////////////////////////////////+Y34OdAAAAF3RSTlOZAE0QlUeKeFU9kHBqXAsFey8dIHQ3K12BC1EAAAE4SURBVEjHnZVbcoMwDEVFZNmG8Ao03f9SK5O2CdIlEM6nOKPxCD2oMnDdtWMMcWy7mu1HWquS6JUkvGn3OZAl5B7agzSEaGTwNifaIrG1p0jbxGlt3wK9I9xe7dnIXp+eNkfaI/KfPSTaJw2/thDgmq/rgDzsHtX5rt/u67r3i51R5qqwzp6LzageWV2bJ7DaQgdzk6jtCoLfraSK2Ju4JgpTTYdRtzsuq9v64NflgY2rO3r7Ui3MNq5u3LR9aSMF9JK62P6NQX1AV+wIco/ILrmZwLtbZE9l+Hy4hfVuni1l6l1v9VRC/5IJl3AAxWLYg9/w31DC/d3jYRU/O9oksuwj1yeB/Vxeqn+Mnc3Me9vPfCW2XWHHyme76sweVKb9HXt2fyvz29swn707+zft5L08f4v37/wPEEEJqjAJwqAAAAAASUVORK5CYII=) no-repeat;
19
+ background-size: 16px;
20
+ background-position: center;
21
+ }
22
+ .link-white{
23
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAqCAMAAAB1LNBvAAAAV1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////+ORg7oAAAAHXRSTlMAzAOHCYGafKKEBmN2aA6qj4xwErCUa19bQJWRFUR+SGAAAACCSURBVDjLtdRJDoAgEERRARVxnuf7n1Mbt11NQmJt37p+QjsSuEZZRJVSEDP1ruZNi+gkNEEcAQ7R2BOuPJYiLoQNwFPANCes/sENYBHEncdWwHsmMxxNH2mOuhhqBSoC5DhKBcpjqPSUsbRguiDpHtOAyRBZlpwn/GkrtCCiIbA9D6TsBWKNDfNxAAAAAElFTkSuQmCC) no-repeat;
24
+ background-size: 10px;
25
+ background-position: center;
26
+ }
27
+ .close-white{
28
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAWVJREFUSA3dlbFOAzEMhu0rQzckZjYeAHiESmUoKyMvgMTzIPEILKxVhQ7oG/AEvAIS2y13wXYuqt0mjYEJLLXJXfz7S2JbB/DvLCwXx2E1O/3JwVjHeq1t9ENc7NYwwEtYzs/1Wm0u/qQD6NYaYgAQukcI4YR+RwB964VEv74VnegpzmgWgJMbQPyQNSfEBGch6znOaJgmacwKYDLHy/Yt+aTR47sDYLFH6PHhWFlADeINvhdQhGBzC2G4i4XAW+Sc5a+wCshCAAe6xFgcleAugIK80q4P+VkM4RPgYJZLfnLh0ZapXtmZh603xfQZvypgk1AYd89XRCanqTfjXsAmOHc2Gd9501x/pxmLgGxwrpbF8wNXjReSvchicNXNHh85tBxd/XmFLPH4mhN4BGovMq1pbA5Cf+/t0ASKfbCVE44zmgXg9IqS9x4TWG7/JE6jgYie4pTsV5/Mp4sz/TUrMf7W+y9KrBaurvrIqgAAAABJRU5ErkJggg==) no-repeat;
29
+ background-size: 12px;
30
+ background-position: center;
31
+ }
32
+
33
+ // }
34
+ .txt {
35
+ height: 100%;
36
+ font-family: PingFangSC-Regular;
37
+ font-size: 14px;
38
+ color: #FFB540;
39
+ overflow: hidden;
40
+ float: left;
41
+ }
42
+ .icon {
43
+ position: absolute;
44
+ width: 39px;
45
+ height: 100%;
46
+ right: 0;
47
+ top: 0;
48
+ }
49
+ .info {
50
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAtCAMAAAANxBKoAAAAclBMVEUAAAD/tkD/t0H/v0r/tUH/tUD/tkH/tkD/tkD/tUH/tkD/tkH/tUH/uUH/u0T/vEP/tkn/tkL/t0H/t0H/tUD/////2p//yXP/1pb/5bv/x2//8Nj/3qr/+vP/4rT/z4X/9ur/6sn/6MT/xWn/vVT/uUuzVhT1AAAAFHRSTlMAx3cY+fbw5uPMspmOMh4TB2VOZlBSPsgAAAE9SURBVEjHldXdbsIwDAVgJymUtoFSOC1lwNjv+7/ilGibSI/bLd9tLMtynFimXNfUVVmUVd10ThbtrMEjY3cyp/UFpgrfimZv19Cs7V6IM5hjqP7tBvM2W0kcVliyOiSZJ8Ec/pDdURlcjPvthsHfzE9nLBSn8YSElajV+nzu+/6c9r2VwGuZ+yDN7uNsFGBjjB7TIdglVXNurtyAcN2REXEgWk8iJ0f8XydNRnQjNcjTEI10UEsFMvTRhQ4qKWejr3RQSqFV8hyi7/xIQ252D9EfSu4KipD7BUrdNRSXeJOkVvv9ySMVNdLNzdS7dpcOegtvYE6dwVf1bmD0+b6pdwNLbycMyTWU/TYMAL8d8VTzN6Q8vXmKpjcvlsc1oqpz/qqsfzDrj836v7N2Q9beydpp+fsyfxczd1zY81821XtZdTEi1gAAAABJRU5ErkJggg==) no-repeat;
51
+ background-size: 16px;
52
+ background-position: center;
53
+ }
54
+ .link {
55
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAqCAMAAAB1LNBvAAAAV1BMVEUAAAD/x1f/tUD/vE3/tkH/tkD/tkH/xVf/tkD/tkD/tkH/tkH/tkH/tT//tkD/tkD/vEf/tj//tkD/tUD/tkD/t0H/t0D/tkD/tkH/uEH/u0T/tkD/tUAAyBDXAAAAHHRSTlMABf0Mq5+ACMCopaKazrt5E9fGtrGUjYdyTxjcIwZHJAAAAIdJREFUOMud1EsSgzAMA9CkhUBIy/+P739OxllHYoK3b2WPZKNzGDhOfog6EYhBCDaKZdqsZ1gwnBlOBKtWMbzAb/15wsamcWT4J9hH9G9weMQijSfFSxTBJmo7ugAnfNQuk6paILVKLpcmSDbShiLKCad+zSUfCRdwSVLAVGIyDtZdERD7PTfTUhRPIdZb4wAAAABJRU5ErkJggg==) no-repeat;
56
+ background-size: 10px;
57
+ background-position: center;
58
+ }
59
+ .close{
60
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAWVJREFUSA3dlbFOAzEMhu0rQzckZjYeAHiESmUoKyMvgMTzIPEILKxVhQ7oG/AEvAIS2y13wXYuqt0mjYEJLLXJXfz7S2JbB/DvLCwXx2E1O/3JwVjHeq1t9ENc7NYwwEtYzs/1Wm0u/qQD6NYaYgAQukcI4YR+RwB964VEv74VnegpzmgWgJMbQPyQNSfEBGch6znOaJgmacwKYDLHy/Yt+aTR47sDYLFH6PHhWFlADeINvhdQhGBzC2G4i4XAW+Sc5a+wCshCAAe6xFgcleAugIK80q4P+VkM4RPgYJZLfnLh0ZapXtmZh603xfQZvypgk1AYd89XRCanqTfjXsAmOHc2Gd9501x/pxmLgGxwrpbF8wNXjReSvchicNXNHh85tBxd/XmFLPH4mhN4BGovMq1pbA5Cf+/t0ASKfbCVE44zmgXg9IqS9x4TWG7/JE6jgYie4pTsV5/Mp4sz/TUrMf7W+y9KrBaurvrIqgAAAABJRU5ErkJggg==) no-repeat;
61
+ background-size: 12px;
62
+ background-position: center;
63
+ }
64
+ }
65
+
66
+
67
+
68
+ .jdd-notice-scroll {
69
+ width: 100%;
70
+ white-space: nowrap;
71
+ overflow: hidden;
72
+ }
73
+
74
+ .jdd-notice-pscroll {
75
+ width: 8000%;
76
+ overflow: hidden;
77
+ p {
78
+ display: inline-block;
79
+ padding-left: 16px;
80
+ }
81
+ }
@@ -0,0 +1,128 @@
1
+ <template>
2
+ <div v-show="value">
3
+ <div
4
+ class="jdd-notice"
5
+ :class="{'opacity-bg':opacity == '1','has-icon':icon}"
6
+ :style="{backgroundColor:background}"
7
+ >
8
+ <div class="jdd-notice-scroll wrapper" ref="jrNoticeScroll">
9
+ <div class="jdd-notice-pscroll inner" ref="jrNoticePscroll">
10
+ <div
11
+ class="txt scrollp"
12
+ ref="scrollp"
13
+ :style="{color:color,paddingLeft:paddingLeft+'px'}"
14
+ >
15
+ <slot></slot>
16
+ </div>
17
+ </div>
18
+ <i :class="[icon,'icon']" v-if="icon" @click="iconClick"></i>
19
+ <!-- <i class="link icon" v-if="icon === 'link'" @click="redirectFn"></i>
20
+ <i class="close icon" v-if="icon === 'close'" @click="closeNotice"></i>
21
+ <i class="icon info-white" v-if="icon === 'info-white'" @click="infoClickFn"></i>
22
+ <i class="icon link-white" v-if="icon === 'link-white'" @click="redirectFn"></i>
23
+ <i class="icon close-white" v-if="icon === 'close-white'" @click="closeNotice"></i>-->
24
+ </div>
25
+ </div>
26
+ </div>
27
+ </template>
28
+ <script>
29
+ import { rAF } from "@/utils/utils";
30
+ export default {
31
+ name: "JddNotice",
32
+ data() {
33
+ return {
34
+ paddingLeft: 0
35
+ };
36
+ },
37
+ props: {
38
+ // type: {
39
+ // type: String,
40
+ // default: 'normal'
41
+ // },
42
+ color: {
43
+ type: String,
44
+ default: "#FFB540"
45
+ },
46
+ background: {
47
+ type: String,
48
+ default: "#FFF7EA"
49
+ },
50
+ icon: {
51
+ type: String,
52
+ default: ""
53
+ },
54
+ // url: {
55
+ // type: String
56
+ // },
57
+ infoClick: {
58
+ type: Function
59
+ },
60
+ opacity: {
61
+ type: String,
62
+ default: "0"
63
+ },
64
+ value: {
65
+ type: Boolean,
66
+ default: false
67
+ }
68
+ },
69
+ mounted: function() {
70
+ let _this = this;
71
+ var wrapper = this.$refs.jrNoticeScroll;
72
+ var inner = this.$refs.jrNoticePscroll;
73
+ var p = this.$refs.scrollp;
74
+ var p_w = p.offsetWidth;
75
+ var wrapper_w = wrapper.offsetWidth;
76
+
77
+ // console.log(wrapper_w,p_w);
78
+ if (wrapper_w > p_w) {
79
+ return;
80
+ } else {
81
+ // inner.innerHTML += inner.innerHTML;
82
+ // var timer = setInterval(function(){
83
+
84
+ // if (p_w > wrapper.scrollLeft) {
85
+ // wrapper.scrollLeft++;
86
+ // }
87
+ // else{
88
+ // wrapper.scrollLeft = 0;
89
+ // }
90
+
91
+ // },16)
92
+ let stop = null;
93
+ let second = false;
94
+ let base = 0;
95
+ setTimeout(() => {
96
+ function step(timestamp) {
97
+
98
+ if (p_w > wrapper.scrollLeft - base) {
99
+ wrapper.scrollLeft++;
100
+ stop = rAF(step);
101
+ } else {
102
+ second = true;
103
+ cancelAnimationFrame(stop);
104
+ _this.paddingLeft = wrapper.offsetWidth;
105
+ base = wrapper.offsetWidth;
106
+ wrapper.scrollLeft = 0;
107
+ setTimeout(() => {
108
+ stop = rAF(step);
109
+ }, 1500);
110
+ }
111
+
112
+ }
113
+
114
+ stop = rAF(step);
115
+ }, 2000);
116
+ }
117
+ },
118
+ methods: {
119
+ iconClick: function() {
120
+ if (this.icon === "close" || this.icon === "close-white") {
121
+ this.$emit("close");
122
+ } else {
123
+ this.$emit("click");
124
+ }
125
+ }
126
+ }
127
+ };
128
+ </script>
@@ -0,0 +1,8 @@
1
+ import Overlay from './src/overlay.vue';
2
+ import "./index.scss";
3
+
4
+ Overlay.install = function(Vue){
5
+ Vue.component(Overlay.name, Overlay);
6
+ }
7
+
8
+ export default Overlay;
@@ -0,0 +1,119 @@
1
+ @charset "utf-8";
2
+ @import "~@/assets/css/common/var";
3
+ @import "~@/assets/css/common/mixin";
4
+ .screen-lock {
5
+ overflow: hidden;
6
+ }
7
+ .hide {
8
+ display: none
9
+ }
10
+ .bgWhite {
11
+ background-color: $white
12
+ }
13
+ .jdd-overlay-box {
14
+ position: fixed;
15
+ z-index: 1000;
16
+ top: 0;
17
+ left: 0;
18
+ right: 0;
19
+ bottom: 0;
20
+ }
21
+ .jdd-overlay-container {
22
+ position: relative;
23
+ height: 100%;
24
+ padding: 130px 0px 50px;
25
+ z-index: 1001;
26
+ display: flex;
27
+ flex-direction: column;
28
+ }
29
+ .jdd-overlay-title {
30
+ position: relative;
31
+ max-height: 79px;
32
+ margin: 0 40px;
33
+ overflow: hidden;
34
+ @include jdd-border-bottom();
35
+ h2 {
36
+ width: 100%;
37
+ padding-bottom: 20px;
38
+ font-size: 21px;
39
+ line-height: 29.5px;
40
+ color: #333;
41
+ text-align: center;
42
+ display: block;
43
+ }
44
+ }
45
+ .jdd-overlay-content {
46
+ padding: 20px 30px 0 40px;
47
+ flex: 1;
48
+ display: flex;
49
+ overflow-y: hidden;
50
+ }
51
+ .jdd-overlay-inner {
52
+ overflow-y: auto;
53
+ -webkit-overflow-scrolling: touch;
54
+ font-size: 16px;
55
+ line-height: 28px;
56
+ color: #666;
57
+ padding-right: 10px;
58
+ // height: 100%;
59
+ }
60
+ .jdd-overlay-btn {
61
+ margin: 50px auto 0px;
62
+ text-align: center;
63
+ overflow: hidden;
64
+ font-size: 0;
65
+ .jdd-imgs-close {
66
+ // margin-top: 2.625rem;
67
+ display: inline-block;
68
+ width: 44px;
69
+ height: 44px;
70
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFgAAABYCAYAAABxlTA0AAAAAXNSR0IArs4c6QAAAu9JREFUeAHt2r+LE0EUwPHLXqWlRQohhYWFIASSf+C82s5CQWut7QX9F+xTKni9licWlvlhQBRsUxmuucoiv3wPMse47ia3k7mdF+67EHay2X0788nL290hBwcsCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCCCAAALGBMbj8f3YXZKYdyaTyY3YcavGy6oeEHv/wWDwZjabfRsOh09ixR6NRnfn8/nX6XT6MTVyI9agQuIo7mq1er0+dpFl2bNOp/MhJJY7RnGXy+UXiXtbtzUajc/NZvNhq9X64/apc50sg7UsCMIrb7CHAvNul0zO42psOcexZPIL7zy1NpMBt9vt75qxMtqFN+Jg5CLcddye/CreeueotZm0ROhINWM1c6V56I28UrnYhNvtdp9LmVh5sWttJgfW0e6CbBlXx2YCOBTZOq4p4KrI+4BrDviyyPuCaxJ4G7JcsAb+fa7uv156qS9oriP+2kwN9jul7Q0XvnMBvpXb3ySu9tEssHauBFk/8hezuNpJ08DawS3IpnG1/8me5PTkl1m05soT33l+X9m+lO2nKR8i8n0qem8a2N0tFNRcnWPI9AlQM7xoYFa2mQV2uG5WzIFp5rq2rIPnLrwYV9o0CVyGKxI9AX4q6/8miGTq8/GVSgUGNwe8CVfvc3W+uGgWTjL9vUVkU3cR23D9C1rJ3cVCM1y+iJPAhIt+mBngKrhOYR+QTZSIEFxF1nJRVJMtlYvkGRyK67JY11p7FVWa/0zaWygXSYFj4Dpoq8jJSoT+byHmrJhe2MrKhdTqR+6LqHudDFj+C/Fbfta/cgPeaW6hBPlMzvMjd57a3iYtEf1+/6aM9JO8juS1E64cf7F45eJMsvqBwP+8+PC6NRRZQF5KlkX9srUsSNx7182T8SKAAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCCCAAAK2Bf4CoKj4d3I8GvAAAAAASUVORK5CYII=);
71
+ background-repeat: no-repeat;
72
+ background-size: 100% 100%;
73
+ }
74
+ }
75
+ .jdd-o-dl {
76
+ padding-bottom: 10px;
77
+ position: relative;
78
+ .jdd-o-dt {
79
+ color: #333
80
+ }
81
+ img {
82
+ width: 100%;
83
+ display: block;
84
+ }
85
+ }
86
+
87
+ dl.jdd-o-dl {
88
+ list-style-type: none;
89
+ counter-reset: sectioncounter;
90
+ dd {
91
+ margin-left: 16px;
92
+ &::before,
93
+ &:before {
94
+ content: counter(sectioncounter);
95
+ counter-increment: sectioncounter;
96
+ float: left;
97
+ margin-left: -16px;
98
+ }
99
+ }
100
+ }
101
+
102
+ .ani-scale-leave,
103
+ .ani-scale-enter-active {
104
+ opacity: .98;
105
+ backface-visibility: hidden;
106
+ transition-property: transform, opacity;
107
+ transition-timing-function: ease-out;
108
+ transition-duration: 200ms;
109
+ transform: scale(1);
110
+ }
111
+
112
+ .ani-scale-enter,
113
+ .ani-scale-leave-to {
114
+ opacity: 0;
115
+ transition-property: transform, opacity;
116
+ transition-timing-function: ease-out;
117
+ transition-duration: 200ms;
118
+ transform: scale(0.85);
119
+ }
@@ -0,0 +1,72 @@
1
+ <template>
2
+ <transition name="ani-scale">
3
+ <div class="jdd-overlay-box" v-show="show">
4
+ <jdd-mask v-model="show" :custmerClassName="custmerClassName"></jdd-mask>
5
+ <div class="jdd-overlay-container">
6
+ <div class="jdd-overlay-title">
7
+ <h2 v-text="title"></h2>
8
+ </div>
9
+ <div class="jdd-overlay-content">
10
+ <div class="jdd-overlay-inner">
11
+ <slot></slot>
12
+ </div>
13
+ </div>
14
+ <div class="jdd-overlay-btn">
15
+ <i class="jdd-imgs-close" @click="onClickClose"></i>
16
+ <input type="text" :value="value" class="hide" />
17
+ </div>
18
+ </div>
19
+ </div>
20
+ </transition>
21
+ </template>
22
+ <script>
23
+ import JddMask from "../../mask";
24
+ export default {
25
+ name: "JddOverlay",
26
+ props: {
27
+ /* Mask组件 */
28
+ custmerClassName: {
29
+ type: String,
30
+ default: "bgWhite"
31
+ },
32
+ /* 当前属性 */
33
+ value: {
34
+ type: Boolean,
35
+ default: false
36
+ },
37
+ title: {
38
+ type: String,
39
+ default: ""
40
+ }
41
+ },
42
+ data() {
43
+ return {
44
+ show: this.value
45
+ // html: document.getElementsByTagName('body')[0]
46
+ };
47
+ },
48
+ components: {
49
+ JddMask
50
+ },
51
+ watch: {
52
+ show(val) {
53
+ /* 隐藏的input 控件来保存v-model的值,进行双向绑定 */
54
+ this.$emit("input", val);
55
+ /* 全屏锁 */
56
+ // if(val) {
57
+ // this.html.className = 'screen-lock'
58
+ // } else {
59
+ // this.html.className = ''
60
+ // }
61
+ },
62
+ value(val) {
63
+ this.show = val;
64
+ }
65
+ },
66
+ methods: {
67
+ onClickClose() {
68
+ this.show = !this.show;
69
+ }
70
+ }
71
+ };
72
+ </script>
@@ -0,0 +1,7 @@
1
+ import Picker from './src/picker.vue';
2
+ import "./index.scss";
3
+
4
+ Picker.install = function(Vue){
5
+ Vue.component(Picker.name, Picker);
6
+ }
7
+ export default Picker;