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
package/package.json ADDED
@@ -0,0 +1,73 @@
1
+ {
2
+ "name": "aaa-ui-test",
3
+ "version": "1.0.0",
4
+ "main": "lib/index.js",
5
+ "scripts": {
6
+ "serve": "vue-cli-service serve",
7
+ "build": "vue-cli-service build",
8
+ "lint": "vue-cli-service lint",
9
+ "docs:dev": "vuepress dev docs",
10
+ "docs:build": "vuepress build docs",
11
+ "build:module": "cross-env NODE_ENV=production gulp",
12
+ "build:main": "cross-env NODE_ENV=production node build/webpack.prod.conf.js",
13
+ "test": "cross-env NODE_ENV=test jest --config .jest.conf.js",
14
+ "update:jest": "cross-env NODE_ENV=test jest --config .jest.conf.js --updateSnapshot",
15
+ "postinstall": " node ./babel-plugin-on-demand-load/report.js"
16
+ },
17
+ "dependencies": {
18
+ "axios": "^0.18.0",
19
+ "better-scroll": "^1.15.2"
20
+ },
21
+ "devDependencies": {
22
+ "@babel/plugin-transform-object-assign": "^7.8.3",
23
+ "@babel/plugin-transform-typeof-symbol": "^7.2.0",
24
+ "@vue/cli-plugin-babel": "^3.3.0",
25
+ "@vue/cli-plugin-eslint": "^3.3.0",
26
+ "@vue/cli-service": "^3.3.0",
27
+ "@vue/test-utils": "^1.0.0-beta.29",
28
+ "autoprefixer": "^9.5.1",
29
+ "babel-core": "^7.0.0-bridge.0",
30
+ "babel-eslint": "^10.0.1",
31
+ "babel-plugin-istanbul": "^5.1.1",
32
+ "cross-env": "^5.2.0",
33
+ "eslint": "^5.8.0",
34
+ "eslint-plugin-vue": "^5.0.0",
35
+ "gulp": "^4.0.2",
36
+ "gulp-babel": "^8.0.0",
37
+ "gulp-clean-css": "^4.3.0",
38
+ "gulp-concat": "^2.6.1",
39
+ "gulp-postcss": "^8.0.0",
40
+ "gulp-sass": "^4.0.2",
41
+ "gulp-vue-compiler": "^1.0.0-beta.1",
42
+ "highlight.js": "^9.13.1",
43
+ "jest": "^24.1.0",
44
+ "jest-serializer-vue": "^2.0.2",
45
+ "jest-transform-stub": "^2.0.0",
46
+ "node-sass": "^4.11.0",
47
+ "optimize-css-assets-webpack-plugin": "^5.0.1",
48
+ "sass-loader": "^7.1.0",
49
+ "through2": "^3.0.1",
50
+ "uglifyjs-webpack-plugin": "^2.1.2",
51
+ "vue": "^2.5.21",
52
+ "vue-highlight.js": "^3.0.1",
53
+ "vue-jest": "^3.0.4",
54
+ "vue-router": "^3.0.2",
55
+ "vue-template-compiler": "^2.5.21"
56
+ },
57
+ "eslintConfig": {
58
+ "root": true,
59
+ "env": {
60
+ "node": true
61
+ },
62
+ "extends": [
63
+ "plugin:vue/essential",
64
+ "eslint:recommended"
65
+ ],
66
+ "rules": {
67
+ "no-console": 0
68
+ },
69
+ "parserOptions": {
70
+ "parser": "babel-eslint"
71
+ }
72
+ }
73
+ }
@@ -0,0 +1,130 @@
1
+ @charset "utf-8";
2
+
3
+ @mixin jdd-border-1px($color:#eeeeee, $radius:2px) {
4
+ position: relative;
5
+
6
+ &::before {
7
+ display: block;
8
+ content: " ";
9
+ position: absolute;
10
+ pointer-events: none;
11
+ backface-visibility: hidden;
12
+ transform-origin: left top;
13
+ z-index: 0;
14
+ left: 0;
15
+ top: 0;
16
+ border: 1px solid $color;
17
+ border-radius: $radius;
18
+
19
+ @media (min-resolution: 2dppx) {
20
+ border-radius: $radius*2;
21
+ right: -100%;
22
+ bottom: -100%;
23
+ transform: scale(0.5);
24
+ }
25
+
26
+ @media (min-resolution: 3dppx) {
27
+ border-radius: $radius*3;
28
+ right: -200%;
29
+ bottom: -200%;
30
+ transform: scale(0.333333);
31
+ }
32
+ }
33
+
34
+ }
35
+
36
+ @mixin jdd-border-top ($color:#eeeeee,$left:0) {
37
+ position: relative;
38
+
39
+ &::before {
40
+ content: " ";
41
+ position: absolute;
42
+ display: block;
43
+ transform-origin: top;
44
+ z-index: 0;
45
+ left: $left;
46
+ top: 0;
47
+ right: 0;
48
+ border-top: 1px solid $color;
49
+
50
+ @media (min-resolution: 2dppx) {
51
+ transform: scaleY(0.5);
52
+ }
53
+
54
+ @media (min-resolution: 3dppx) {
55
+ transform: scaleY(0.333333);
56
+ }
57
+ }
58
+ }
59
+
60
+ @mixin jdd-border-right($color:#eeeeee,$top:0){
61
+ position: relative;
62
+
63
+ &::after {
64
+ content: " ";
65
+ position: absolute;
66
+ display: block;
67
+ transform-origin: right;
68
+ z-index: 0;
69
+ right: 0;
70
+ bottom: 0;
71
+ top: $top;
72
+ border-bottom: 1px solid $color;
73
+
74
+ @media (min-resolution: 2dppx) {
75
+ transform: scaleX(0.5);
76
+ }
77
+
78
+ @media (min-resolution: 3dppx) {
79
+ transform: scaleX(0.333333);
80
+ }
81
+ }
82
+ }
83
+
84
+ @mixin jdd-border-bottom ($color:#eeeeee,$left:0){
85
+ position: relative;
86
+
87
+ &::after {
88
+ content: " ";
89
+ position: absolute;
90
+ display: block;
91
+ transform-origin: bottom;
92
+ z-index: 0;
93
+ left: $left;
94
+ bottom: 0;
95
+ right: 0;
96
+ border-bottom: 1px solid $color;
97
+
98
+ @media (min-resolution: 2dppx) {
99
+ transform: scaleY(0.5);
100
+ }
101
+
102
+ @media (min-resolution: 3dppx) {
103
+ transform: scaleY(0.333333);
104
+ }
105
+ }
106
+ }
107
+
108
+ @mixin jdd-border-left ($color:#eeeeee,$top:0){
109
+ position: relative;
110
+
111
+ &::before {
112
+ content: " ";
113
+ position: absolute;
114
+ display: block;
115
+ transform-origin: left;
116
+ z-index: 0;
117
+ left: 0;
118
+ bottom: 0;
119
+ top: $top;
120
+ border-left: 1px solid $color;
121
+
122
+ @media (min-resolution: 2dppx) {
123
+ transform: scaleX(0.5);
124
+ }
125
+
126
+ @media (min-resolution: 3dppx) {
127
+ transform: scaleX(0.333333);
128
+ }
129
+ }
130
+ }
@@ -0,0 +1,69 @@
1
+ @charset "utf-8";
2
+ // 背景
3
+ $bg: #f6f8fc;
4
+ // 强化背景
5
+ $darkBg: #ecf0f9;
6
+ // 弱化背景
7
+ $weakBg: #fafbfd;
8
+ // 分隔线、边框
9
+ $borderColor: #eee;
10
+ // 分隔线、边框
11
+ $borderWeak: #999;
12
+ // 标题、强化
13
+ $cMainStrong: #444;
14
+ // 正文
15
+ $cMain: #727682;
16
+ //弱化/辅助文案
17
+ $cMainWeak: #999;
18
+ // 辅助
19
+ $cRemark: #bec1ca;
20
+
21
+ // 蓝色
22
+ $blue: #0074ff;
23
+ $blueDark: #006def;
24
+ $blueActive: #0064da;
25
+ $blueDisabled: #9fcbff;
26
+ // 绿色
27
+ $green: #0bdba8;
28
+ // 橙色
29
+ $orange: #ffb540;
30
+ // 红色
31
+ $red: #f52f3e;
32
+ $redDark: #de2b38;
33
+ $redDisabled: #feadb3;
34
+ // 白色
35
+ $white: #fff;
36
+ // 粉色
37
+ $pink: #ff3f80;
38
+ // 滚动条颜色
39
+ $scroll: #c1c4cc;
40
+ // border-radius
41
+ $borderRadius: 2px;
42
+ // 动画时间
43
+ $animateTime: .2s;
44
+
45
+ // border-radius
46
+ $borderRadius: 2px;
47
+
48
+ // 项目前缀
49
+ $proPrefix: "jdd-";
50
+
51
+ // fontSize
52
+ $sizeLarge: 18px;
53
+ $sizeMedium: 16px;
54
+ $sizeNormal: 14px;
55
+ $sizeSmall: 12px;
56
+
57
+ // padding
58
+ $baseNum: 16px;
59
+
60
+ // z-index
61
+ $z-index-description: 50;
62
+ $z-index-mask: 100;
63
+ $z-index-popup: 200;
64
+ $z-index-addrPicker: 240;
65
+ $z-index-actionsheet: 300;
66
+ $z-index-alert: 500;
67
+ $z-index-modal: 500;
68
+ $z-index-loading: 600;
69
+ $z-index-toast: 999;
@@ -0,0 +1,8 @@
1
+ import Address from './src/address.vue';
2
+ import "./index.scss"
3
+
4
+ Address.install = function(Vue){
5
+ Vue.component(Address.name, Address);
6
+ }
7
+
8
+ export default Address;
@@ -0,0 +1,72 @@
1
+ .jdd-address {
2
+ &-main {
3
+ display: flex;
4
+ flex-direction: column;
5
+ overflow: hidden;
6
+ flex: 1;
7
+ height: 100%;
8
+ }
9
+
10
+ &-chose-area {
11
+ transition: transform 0.3s cubic-bezier(0.1, 0.57, 0.1, 1);
12
+ flex: 1;
13
+ display: flex;
14
+ width: 100%;
15
+ position: absolute;
16
+ top: 109px;
17
+ bottom: 0;
18
+ bottom: constant(safe-area-inset-bottom) !important;
19
+ bottom: env(safe-area-inset-bottom) !important;
20
+ .jdd-radio-item-active p {
21
+ color: #4d7bfe;
22
+ }
23
+ }
24
+ &-radio-item {
25
+ flex: 0 0 100%;
26
+ -webkit-overflow-scrolling: touch;
27
+ max-height: 100%;
28
+ }
29
+ &-area-active {
30
+ overflow: auto;
31
+ }
32
+ &-item-text {
33
+ line-height: 56px;
34
+ height: 56px;
35
+ font-family: PingFangSC-Regular;
36
+ font-size: 14px;
37
+ color: #333333;
38
+ padding-left: 16px;
39
+ }
40
+ &-tab-active {
41
+ &::after {
42
+ content: "";
43
+ position: absolute;
44
+ height: 3px;
45
+ width: 20px;
46
+ bottom: 0;
47
+ left: 0;
48
+ right: 0;
49
+ margin: auto;
50
+ background-color: #333333;
51
+ }
52
+ }
53
+ &-chosen {
54
+ flex-shrink: 0;
55
+ display: flex;
56
+ line-height: 44px;
57
+ height: 44px;
58
+ padding-left: 16px;
59
+ padding-right: 16px;
60
+ overflow-x: auto;
61
+ li {
62
+ margin-right: 24px;
63
+ position: relative;
64
+ font-family: PingFangSC-Regular;
65
+ font-size: 14px;
66
+ flex-shrink: 0;
67
+ }
68
+ }
69
+ }
70
+ .jdd-address-popup .jdd-popup-content{
71
+ flex: 1;
72
+ }
@@ -0,0 +1,238 @@
1
+ <template>
2
+ <jdd-popup :visible.sync="isVisible" pop-height="80%" class="jdd-address-popup">
3
+ <jdd-popup-header :main-title="mainTitle" slot="popup-header"></jdd-popup-header>
4
+ <div class="jdd-address-main">
5
+ <ul class="jdd-address-chosen">
6
+ <li
7
+ v-for="(item,index) in selectData"
8
+ :key="index"
9
+ @click="clickTab(item,index)"
10
+ :class="{'jdd-address-tab-active':index===current}"
11
+ >{{item.name}}</li>
12
+ </ul>
13
+ <div class="jdd-address-chose-area" :style="{'transform':getTrans}">
14
+ <jdd-radio
15
+ :options="item"
16
+ v-model="selectArray[index]"
17
+ :select-field="selectField"
18
+ @select-item="selectValue"
19
+ :auto-close="false"
20
+ v-for="(item,index) in myData"
21
+ :key="index"
22
+ :class="[index===current?'jdd-address-area-active':'','jdd-address-radio-item']"
23
+ >
24
+ <template slot-scope="{slotProps}">
25
+ <p class="jdd-address-item-text">{{slotProps.name}}</p>
26
+ </template>
27
+ </jdd-radio>
28
+ </div>
29
+ </div>
30
+ </jdd-popup>
31
+ </template>
32
+ <script>
33
+ import JddPopup from "../../popup";
34
+ import JddPopupHeader from "../../popup-header";
35
+ import JddRadio from "../../radio";
36
+ import visibleMixin from "@/mixins/visible";
37
+ import axios from "axios";
38
+ export default {
39
+ name: "JddAddress",
40
+ props: {
41
+ mainTitle: {
42
+ type: String,
43
+ default: "请选择地址"
44
+ },
45
+ options: {
46
+ type: Array,
47
+ default: function() {
48
+ return [];
49
+ }
50
+ },
51
+ value: {
52
+ type: Array,
53
+ default: function() {
54
+ return [];
55
+ }
56
+ },
57
+ selectField: {
58
+ type: String,
59
+ default: "code"
60
+ },
61
+ queryUrl: {
62
+ required: true,
63
+ type: String,
64
+ default: ""
65
+ },
66
+ otherParam: {
67
+ type: Object,
68
+ default: function() {
69
+ return {};
70
+ }
71
+ },
72
+ selectRange: {
73
+ type: Number,
74
+ default: 99
75
+ },
76
+ resolveData:{
77
+ default:null
78
+ }
79
+ },
80
+ components: {
81
+ JddPopup,
82
+ JddPopupHeader,
83
+ JddRadio
84
+ },
85
+ mixins: [visibleMixin],
86
+ created() {
87
+ axios
88
+ .get(this.queryUrl, {
89
+ params: {
90
+ reqData: Object.assign(
91
+ {
92
+ type: "area",
93
+ parentCode: ""
94
+ },
95
+ this.otherParam
96
+ )
97
+ }
98
+ })
99
+ .then(response => {
100
+ let resData = response.data.resultData.data;
101
+ if(this.resolveData){
102
+ resData = this.resolveData(resData,0);
103
+ }
104
+ this.myData.splice(0, 1, resData || []);
105
+ if (this.value[0]) {
106
+ for (let i = 0; i < resData.length; i++) {
107
+ const element = resData[i];
108
+ if (element[this.selectField] === this.value[0]) {
109
+ this.selectData[0] = element;
110
+ break;
111
+ }
112
+ }
113
+ }
114
+ });
115
+ if (this.value.length > 1) {
116
+ for (let index = 0; index < this.value.length - 1; index++) {
117
+ axios
118
+ .get(this.queryUrl, {
119
+ params: {
120
+ reqData: Object.assign(
121
+ {
122
+ type: "area",
123
+ parentCode: this.value[index]
124
+ },
125
+ this.otherParam
126
+ )
127
+ }
128
+ })
129
+ .then(response => {
130
+ let resData = response.data.resultData.data;
131
+ if(this.resolveData){
132
+ resData = this.resolveData(resData,index);
133
+ }
134
+ this.myData[index + 1] = resData;
135
+ // for (const iterator of resData) {
136
+ // debugger
137
+ // if (iterator[this.selectField] === this.value[index + 1]) {
138
+ // this.selectData[index + 1] = iterator;
139
+ // break;
140
+ // }
141
+ // }
142
+ for (let i = 0; i < resData.length; i++) {
143
+ const element = resData[i];
144
+ if (element[this.selectField] === this.value[index + 1]) {
145
+ this.selectData[index + 1] = element;
146
+ break;
147
+ }
148
+ }
149
+ });
150
+ }
151
+ }
152
+ // }
153
+ },
154
+ data() {
155
+ return {
156
+ activeTab: 0,
157
+ currentData: [],
158
+ myData: [],
159
+ current: 0,
160
+ selectArray: [...this.value],
161
+ selectData: [{ name: "请选择" }]
162
+ };
163
+ },
164
+ computed: {
165
+ getTrans() {
166
+ return `translateX(-${this.current * 100}%)`;
167
+ }
168
+ },
169
+ methods: {
170
+ clickTab(item, index) {
171
+ this.current = index;
172
+ },
173
+ selectValue(val) {
174
+ this.$emit("select-item", val, this.current);
175
+ if (this.current < this.selectRange-1) {
176
+ axios
177
+ .get(this.queryUrl, {
178
+ params: {
179
+ reqData: Object.assign(
180
+ {
181
+ type: "area",
182
+ parentCode: val[this.selectField]
183
+ },
184
+ this.otherParam
185
+ )
186
+ }
187
+ })
188
+ .then(response => {
189
+ let _this = this;
190
+ let resData = response.data.resultData.data;
191
+ if(this.resolveData){
192
+ resData = this.resolveData(resData,this.current + 1);
193
+ }
194
+ if (resData && resData.length) {
195
+ this.myData.splice(
196
+ this.current + 1,
197
+ this.myData.length - this.current,
198
+ resData
199
+ );
200
+ this.selectData.splice(
201
+ this.current,
202
+ this.selectData.length - this.current,
203
+ val,
204
+ { name: "请选择" }
205
+ );
206
+ this.selectArray.splice(
207
+ this.current,
208
+ this.selectArray.length - this.current,
209
+ val[this.selectField]
210
+ );
211
+ this.current++;
212
+ // this.selectArray.splice(this.current, this.selectArray.length-this.current, val.id);
213
+ // this.selectData.splice(this.current, 1, val);
214
+ } else {
215
+ this.selectData.splice(this.current, 1, val);
216
+ this.selectArray.splice(this.current, 1, val[this.selectField]);
217
+ this.$emit("select-change", [...this.selectData]);
218
+ this.$emit("input", [...this.selectArray]);
219
+ setTimeout(function() {
220
+ _this.isVisible = false;
221
+ }, 300);
222
+ }
223
+ });
224
+ } else {
225
+ this.selectData.splice(this.current, 1, val);
226
+ this.selectArray.splice(this.current, 1, val[this.selectField]);
227
+ this.$emit("select-change", [...this.selectData]);
228
+ this.$emit("input", [...this.selectArray]);
229
+ setTimeout(()=>{
230
+ this.isVisible = false;
231
+ }, 300);
232
+ }
233
+ }
234
+ }
235
+ };
236
+ </script>
237
+
238
+
@@ -0,0 +1,6 @@
1
+ import Amount from './src/amount.vue';
2
+ import "./index.scss";
3
+ Amount.install = function(Vue){
4
+ Vue.component(Amount.name, Amount);
5
+ }
6
+ export default Amount;
@@ -0,0 +1,88 @@
1
+ .jdd-amount {
2
+ &-wrap {
3
+ display: flex;
4
+ position: relative;
5
+ height: 80px;
6
+ background: #fff;
7
+ padding: 0 16px;
8
+
9
+ }
10
+
11
+ &-icon,
12
+ &-value {
13
+ font-size: 26px;
14
+ font-family: "UDC1.04-Bold", "UDC104";
15
+
16
+ line-height: 80px;
17
+ }
18
+ &-shine {
19
+ display: inline-block;
20
+ animation: change-bordercolor 0.7s infinite ease-in-out;
21
+ width: 2px;
22
+ background-color: transparent;
23
+ height: 40px;
24
+ align-self: center;
25
+ }
26
+
27
+ &-edit {
28
+ display: flex;
29
+ flex: 1;
30
+ min-width: 0;
31
+ overflow-x: auto;
32
+ -webkit-overflow-scrolling: touch;
33
+ }
34
+ &-icon {
35
+ margin-right: 10px;
36
+ color: rgba(51, 51, 51, 1);
37
+ }
38
+ &-unit-wrap {
39
+ display: flex;
40
+ position: absolute;
41
+ top: 7px;
42
+ }
43
+ &-line {
44
+ display: inline-block;
45
+ width: 1px;
46
+ height: 20px;
47
+ background:rgba(221,221,221,1);
48
+ margin-right: 6px;
49
+ }
50
+ &-unit {
51
+ display: inline-block;
52
+ text-align: center;
53
+ line-height: 14px;
54
+ width: 26px;
55
+ height: 14px;
56
+ background: rgba(221, 221, 221, 1);
57
+ border-radius: 3px;
58
+ font-size: 10px;
59
+ font-weight: 400;
60
+ color: rgba(255, 255, 255, 1);
61
+ }
62
+ &-slot {
63
+ font-size:12px;
64
+ color:#4D7BFE;
65
+ padding-top: 38px;
66
+ margin-left: 16px;
67
+ }
68
+ &-hasvalue {
69
+ .jdd-amount-value {
70
+ flex-grow: 0;
71
+ font-size: 36px;
72
+ color: rgba(51, 51, 51, 1);
73
+ }
74
+ }
75
+
76
+ &-value {
77
+ color: rgba(204, 204, 204, 1);
78
+ flex-grow: 1;
79
+ }
80
+ }
81
+ @keyframes change-bordercolor {
82
+ 0% {
83
+ background-color: transparent;
84
+ }
85
+ 100% {
86
+ background-color: #3385ff;
87
+ }
88
+ }