renusify 1.4.7 → 1.4.8
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.
- package/components/codeEditor/mixin.js +5 -5
- package/components/form/address.vue +6 -0
- package/components/form/address_ir.vue +17 -17
- package/components/form/rating.vue +9 -5
- package/components/form/select.vue +17 -11
- package/components/form/timepicker/index.vue +3 -3
- package/components/form/timepicker/timepicker.vue +139 -108
- package/components/formCreator/index.vue +2 -2
- package/components/img/index.vue +2 -0
- package/components/tabs/index.vue +4 -65
- package/package.json +1 -1
- package/plugins/request/Request.js +3 -3
- package/style/app.scss +18 -13
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
}
|
|
7
7
|
text = text.trim()
|
|
8
8
|
text = text.replace(/ +(?= )/g, '');
|
|
9
|
-
text = text.replace(/[\r
|
|
9
|
+
text = text.replace(/[\r\n\t]/g, '');
|
|
10
10
|
let r = ''
|
|
11
11
|
text = text.split('<')
|
|
12
12
|
let numopen = 0
|
|
@@ -22,7 +22,7 @@ export default {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
})
|
|
25
|
-
r = r.replace(/<([^/].*)>+[\r
|
|
25
|
+
r = r.replace(/<([^/].*)>+[\r\n\t]+<\//g, '<$1></');
|
|
26
26
|
return r
|
|
27
27
|
},
|
|
28
28
|
pretty_js(text) {
|
|
@@ -31,8 +31,8 @@ export default {
|
|
|
31
31
|
}
|
|
32
32
|
text = text.trim()
|
|
33
33
|
text = text.replace(/ +(?= )/g, '');
|
|
34
|
-
text = text.replace(/[\r
|
|
35
|
-
text = text.replace(/([
|
|
34
|
+
text = text.replace(/[\r\n\t]/g, '');
|
|
35
|
+
text = text.replace(/([,;{(\[])+[\s]/g, '$1');
|
|
36
36
|
let r = ''
|
|
37
37
|
text = text.split('')
|
|
38
38
|
let numopen = 0
|
|
@@ -176,7 +176,7 @@ export default {
|
|
|
176
176
|
|
|
177
177
|
|
|
178
178
|
//function like $r $d()
|
|
179
|
-
regex = /(\$([a-zA-z0-9]*)[
|
|
179
|
+
regex = /(\$([a-zA-z0-9]*)[.(])/g;
|
|
180
180
|
res = res.replace(regex, '<span class="color-func code-editor-span">$1</span>')
|
|
181
181
|
|
|
182
182
|
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
:searchLink="`https://codenus.com/api/apps/address?lang=${$r.lang}`"
|
|
9
9
|
:rules="required?['required']:[]"
|
|
10
10
|
:headers="{'Authorization':''}"
|
|
11
|
+
:readonly="readonly"
|
|
11
12
|
:tile="tile">
|
|
12
13
|
</r-select-input>
|
|
13
14
|
<r-select-input :label="$t('state','renusify')"
|
|
@@ -20,6 +21,7 @@
|
|
|
20
21
|
:rules="required?['required']:[]"
|
|
21
22
|
value="id"
|
|
22
23
|
:headers="{'Authorization':''}"
|
|
24
|
+
:readonly="readonly"
|
|
23
25
|
:tile="tile">
|
|
24
26
|
|
|
25
27
|
</r-select-input>
|
|
@@ -33,6 +35,7 @@
|
|
|
33
35
|
:rules="required?['required']:[]"
|
|
34
36
|
value="id"
|
|
35
37
|
:headers="{'Authorization':''}"
|
|
38
|
+
:readonly="readonly"
|
|
36
39
|
:tile="tile">
|
|
37
40
|
|
|
38
41
|
</r-select-input>
|
|
@@ -40,11 +43,13 @@
|
|
|
40
43
|
:label="$t('zip_code','renusify')"
|
|
41
44
|
v-model="zip_code"
|
|
42
45
|
:tile="tile"
|
|
46
|
+
:readonly="readonly"
|
|
43
47
|
:rules="required?['required']:[]"></r-text-input>
|
|
44
48
|
<r-text-area v-if="!hideStreet" @update:model-value="emit(false,false)"
|
|
45
49
|
:label="$t('street','renusify')"
|
|
46
50
|
v-model="street"
|
|
47
51
|
:tile="tile"
|
|
52
|
+
:readonly="readonly"
|
|
48
53
|
:rules="required?['required']:[]"></r-text-area>
|
|
49
54
|
</template>
|
|
50
55
|
<script>
|
|
@@ -59,6 +64,7 @@ export default {
|
|
|
59
64
|
hideCity: Boolean,
|
|
60
65
|
hideZipCode: Boolean,
|
|
61
66
|
hideStreet: Boolean,
|
|
67
|
+
readonly: Boolean,
|
|
62
68
|
tile: {type: Boolean, default: undefined},
|
|
63
69
|
defaultCountry: Object,
|
|
64
70
|
modelValue: Object
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<r-select-input
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
<r-select-input v-model="state"
|
|
3
|
+
:items="Object.keys(states)"
|
|
4
|
+
:label="$t('state','renusify')"
|
|
5
|
+
:rules="required?['required']:[]"
|
|
6
|
+
:tile="tile"
|
|
7
|
+
justValue
|
|
8
|
+
@update:model-value="emit">
|
|
9
9
|
|
|
10
10
|
</r-select-input>
|
|
11
11
|
<r-select-input v-if="state"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
v-model="city"
|
|
13
|
+
:items="states[state]"
|
|
14
|
+
:label="$t('city','renusify')"
|
|
15
|
+
:rules="required?['required']:[]"
|
|
16
|
+
:tile="tile"
|
|
17
|
+
justValue
|
|
18
|
+
@update:model-value="emit">
|
|
19
19
|
|
|
20
20
|
</r-select-input>
|
|
21
|
-
<r-text-area v-if="city && !hideAddress"
|
|
21
|
+
<r-text-area v-if="city && !hideAddress" v-model="address"
|
|
22
22
|
:label="$t('address','renusify')"
|
|
23
|
-
|
|
23
|
+
:rules="required?['required']:[]"
|
|
24
24
|
:tile="tile"
|
|
25
|
-
:
|
|
25
|
+
@update:model-value="emit"></r-text-area>
|
|
26
26
|
</template>
|
|
27
27
|
<script>
|
|
28
28
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="`${$r.prefix}rating size-${size} ms-n1`">
|
|
3
|
-
<r-btn :class="`${Math.round(modelValue)>=i?'color-
|
|
3
|
+
<r-btn :key="i" :class="`${Math.round(modelValue)>=i?'color-rating':''}`"
|
|
4
4
|
:readonly="readonly"
|
|
5
5
|
@click="select(i)"
|
|
6
6
|
icon
|
|
@@ -30,14 +30,14 @@ export default {
|
|
|
30
30
|
modelValue: Number,
|
|
31
31
|
readonly: Boolean
|
|
32
32
|
},
|
|
33
|
-
emits:['update:modelValue'],
|
|
34
|
-
created(){
|
|
35
|
-
if(!this.$r.icons.star) {
|
|
33
|
+
emits: ['update:modelValue'],
|
|
34
|
+
created() {
|
|
35
|
+
if (!this.$r.icons.star) {
|
|
36
36
|
this.$r.icons.star = '<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path fill="currentColor" d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.62L12 2L9.19 8.62L2 9.24l5.45 4.73L5.82 21L12 17.27Z"/></svg>'
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
methods: {
|
|
40
|
-
select
|
|
40
|
+
select(n) {
|
|
41
41
|
this.$emit('update:modelValue', n)
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -59,6 +59,10 @@ $btn-sizes: (
|
|
|
59
59
|
transition: 1s $primary-transition;
|
|
60
60
|
color: var(--color-disabled);
|
|
61
61
|
|
|
62
|
+
.color-rating * {
|
|
63
|
+
color: #fbc02d !important;
|
|
64
|
+
}
|
|
65
|
+
|
|
62
66
|
@each $name, $size in $btn-sizes {
|
|
63
67
|
&.size-#{$name} {
|
|
64
68
|
.#{$prefix}btn {
|
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
'flex-nowrap':!multiple
|
|
12
12
|
}">
|
|
13
13
|
<r-chip
|
|
14
|
-
|
|
15
|
-
:close="multiple&&!textChip"
|
|
14
|
+
v-for="(item,key) in chips"
|
|
16
15
|
:key="key"
|
|
17
|
-
:text="textChip || !multiple"
|
|
18
16
|
:class="{'px-0':!multiple}"
|
|
19
|
-
|
|
17
|
+
:close="multiple&&!textChip"
|
|
18
|
+
:text="textChip || !multiple"
|
|
19
|
+
class="my-0 ms-0 color-primary-text"
|
|
20
20
|
selectable
|
|
21
|
-
|
|
21
|
+
@update:modelValue="handleChip($event,key)">
|
|
22
22
|
{{ item ? item[text] : '' }}
|
|
23
23
|
</r-chip>
|
|
24
24
|
<span>
|
|
@@ -103,7 +103,7 @@ export default {
|
|
|
103
103
|
firstSelect: Boolean,
|
|
104
104
|
headers: Object
|
|
105
105
|
},
|
|
106
|
-
emits:['update:modelValue','del'],
|
|
106
|
+
emits: ['update:modelValue', 'del'],
|
|
107
107
|
data() {
|
|
108
108
|
return {
|
|
109
109
|
apiData: [],
|
|
@@ -220,12 +220,14 @@ export default {
|
|
|
220
220
|
} else {
|
|
221
221
|
this.handleClick()
|
|
222
222
|
}
|
|
223
|
-
|
|
224
223
|
},
|
|
225
224
|
handleClick() {
|
|
226
225
|
if (this.$refs.input) {
|
|
227
226
|
this.$refs.input.focus()
|
|
228
|
-
this.$refs.
|
|
227
|
+
this.$refs.select.scrollIntoView({
|
|
228
|
+
block: "start",
|
|
229
|
+
behavior: "smooth"
|
|
230
|
+
})
|
|
229
231
|
} else {
|
|
230
232
|
this.focusInput(true)
|
|
231
233
|
}
|
|
@@ -309,9 +311,12 @@ export default {
|
|
|
309
311
|
</script>
|
|
310
312
|
<style lang="scss">
|
|
311
313
|
@import "../../style/include";
|
|
312
|
-
|
|
314
|
+
|
|
315
|
+
$min-height: 40px;
|
|
313
316
|
.#{$prefix}select-container {
|
|
314
317
|
position: relative;
|
|
318
|
+
scroll-margin: $min-height;
|
|
319
|
+
|
|
315
320
|
.input-control {
|
|
316
321
|
min-height: $min-height;
|
|
317
322
|
height: auto;
|
|
@@ -353,7 +358,8 @@ $min-height:40px;
|
|
|
353
358
|
left: 0;
|
|
354
359
|
z-index: map_get($z-index, 'default');
|
|
355
360
|
}
|
|
356
|
-
|
|
361
|
+
|
|
362
|
+
.to-top {
|
|
357
363
|
bottom: $min-height+2px;
|
|
358
364
|
}
|
|
359
365
|
|
|
@@ -364,4 +370,4 @@ $min-height:40px;
|
|
|
364
370
|
}
|
|
365
371
|
}
|
|
366
372
|
|
|
367
|
-
</style>
|
|
373
|
+
</style>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
:closebtn="false"
|
|
23
23
|
:no-overlay="noOverlay"
|
|
24
24
|
>
|
|
25
|
-
<r-card class="pt-3">
|
|
25
|
+
<r-card class="pt-3 pb-1">
|
|
26
26
|
<timepicker
|
|
27
27
|
class="mb-2 mx-3"
|
|
28
28
|
:disableTime="disableTime"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
:withSec="withSec"
|
|
31
31
|
v-model="lazyValue"
|
|
32
32
|
></timepicker>
|
|
33
|
-
<div class="my-3 d-flex h-space-between">
|
|
33
|
+
<div class="my-3 d-flex h-space-between px-3">
|
|
34
34
|
<r-btn
|
|
35
35
|
class="color-success-text"
|
|
36
36
|
outlined
|
|
@@ -70,7 +70,7 @@ export default {
|
|
|
70
70
|
noOverlay: Boolean,
|
|
71
71
|
modelValue: String
|
|
72
72
|
},
|
|
73
|
-
emits:['update:modelValue'],
|
|
73
|
+
emits: ['update:modelValue'],
|
|
74
74
|
data() {
|
|
75
75
|
return {
|
|
76
76
|
active: false,
|
|
@@ -1,76 +1,76 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="`${$r.prefix}timepicker-clock`">
|
|
3
|
-
<
|
|
4
|
-
<div
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
3
|
+
<transition mode="out-in" name="scale">
|
|
4
|
+
<div :key="show" ref="clock" class="clock ltr">
|
|
5
|
+
<div ref="center" class="center"></div>
|
|
6
|
+
<div ref="hand" :class="{ 'is-small': isSmall }" class="clock-item-hand hour"></div>
|
|
7
|
+
<div
|
|
8
|
+
v-for="(num, i) in nums"
|
|
9
|
+
:key="i"
|
|
10
|
+
ref="number"
|
|
11
|
+
:class="['number' + i,{'number-disabled':disableTime(parseInt(i),show,hour,min,sec)}]"
|
|
12
|
+
class="number"
|
|
13
|
+
@click="set(i)"
|
|
14
|
+
>
|
|
15
|
+
{{ num }}
|
|
16
|
+
</div>
|
|
17
17
|
</div>
|
|
18
|
-
</
|
|
18
|
+
</transition>
|
|
19
19
|
<div class="text-meridiem ltr" v-if="!is24Hour">
|
|
20
20
|
<div
|
|
21
|
-
class="time-meridiem"
|
|
22
|
-
@click="(meridiem = 'AM'),emit()"
|
|
23
21
|
:class="{ 'meridiem-active': meridiem === 'AM' }"
|
|
22
|
+
class="time-meridiem overflow-hidden"
|
|
23
|
+
@click="(meridiem = 'AM'),emit()"
|
|
24
24
|
>
|
|
25
25
|
{{ $t('timepicker_am', 'renusify') }}
|
|
26
26
|
</div>
|
|
27
27
|
<div
|
|
28
|
-
class="time-meridiem"
|
|
29
|
-
@click="(meridiem = 'PM'),emit()"
|
|
30
28
|
:class="{ 'meridiem-active': meridiem === 'PM' }"
|
|
29
|
+
class="time-meridiem overflow-hidden"
|
|
30
|
+
@click="(meridiem = 'PM'),emit()"
|
|
31
31
|
>
|
|
32
32
|
{{ $t('timepicker_pm', 'renusify') }}
|
|
33
33
|
</div>
|
|
34
34
|
</div>
|
|
35
35
|
<div class="text-time ltr">
|
|
36
36
|
<input
|
|
37
|
-
@input="emit"
|
|
38
37
|
v-model="hour"
|
|
39
|
-
placeholder="00"
|
|
40
|
-
@update:model-value="handle_hour()"
|
|
41
|
-
@click.prevent.stop="handle_hour(false)"
|
|
42
|
-
class="time-show"
|
|
43
38
|
:class="{
|
|
44
39
|
'time-active': show === 'hours24'||show==='hours12',
|
|
45
40
|
'time-selected': hour != null
|
|
46
41
|
}"
|
|
42
|
+
class="time-show"
|
|
43
|
+
placeholder="00"
|
|
44
|
+
@input="emit"
|
|
45
|
+
@update:model-value="handle_hour()"
|
|
46
|
+
@click.prevent.stop="handle_hour(false)"
|
|
47
47
|
/>
|
|
48
48
|
<div class="t-text">:</div>
|
|
49
49
|
<input
|
|
50
|
-
@input="emit"
|
|
51
50
|
v-model="min"
|
|
52
|
-
placeholder="00"
|
|
53
|
-
@update:model-value="handle_min()"
|
|
54
|
-
@click.prevent.stop="handle_min(false)"
|
|
55
|
-
class="time-show"
|
|
56
51
|
:class="{
|
|
57
52
|
'time-active': show === 'mins',
|
|
58
53
|
'time-selected': min != null
|
|
59
54
|
}"
|
|
55
|
+
class="time-show"
|
|
56
|
+
placeholder="00"
|
|
57
|
+
@input="emit"
|
|
58
|
+
@update:model-value="handle_min()"
|
|
59
|
+
@click.prevent.stop="handle_min(false)"
|
|
60
60
|
/>
|
|
61
61
|
<div class="t-text" v-if="withSec">:</div>
|
|
62
62
|
<input
|
|
63
|
-
@input="emit"
|
|
64
63
|
v-if="withSec"
|
|
65
64
|
v-model="sec"
|
|
66
|
-
placeholder="00"
|
|
67
|
-
@update:model-value="handle_sec()"
|
|
68
|
-
@click.prevent.stop="handle_sec(false)"
|
|
69
|
-
class="time-show"
|
|
70
65
|
:class="{
|
|
71
66
|
'time-active': show === 'seconds',
|
|
72
67
|
'time-selected': sec != null
|
|
73
68
|
}"
|
|
69
|
+
class="time-show"
|
|
70
|
+
placeholder="00"
|
|
71
|
+
@input="emit"
|
|
72
|
+
@update:model-value="handle_sec()"
|
|
73
|
+
@click.prevent.stop="handle_sec(false)"
|
|
74
74
|
/>
|
|
75
75
|
</div>
|
|
76
76
|
</div>
|
|
@@ -89,16 +89,16 @@ export default {
|
|
|
89
89
|
is24Hour: Boolean,
|
|
90
90
|
modelValue: String
|
|
91
91
|
},
|
|
92
|
-
emits:['update:modelValue','finish'],
|
|
92
|
+
emits: ['update:modelValue', 'finish'],
|
|
93
93
|
data() {
|
|
94
94
|
return {
|
|
95
95
|
show: this.is24Hour ? "hours24" : "hours12",
|
|
96
|
-
hour:
|
|
96
|
+
hour: null,
|
|
97
|
+
delay: 350,
|
|
97
98
|
meridiem: "AM",
|
|
98
|
-
min:
|
|
99
|
-
sec:
|
|
99
|
+
min: null,
|
|
100
|
+
sec: null,
|
|
100
101
|
isSmall: false,
|
|
101
|
-
isHand: false,
|
|
102
102
|
hours12: {
|
|
103
103
|
1: "1",
|
|
104
104
|
2: "2",
|
|
@@ -267,7 +267,9 @@ export default {
|
|
|
267
267
|
},
|
|
268
268
|
mounted() {
|
|
269
269
|
this.setup_hour();
|
|
270
|
-
|
|
270
|
+
setTimeout(() => {
|
|
271
|
+
this.parser(this.modelValue)
|
|
272
|
+
}, 100)
|
|
271
273
|
},
|
|
272
274
|
computed: {
|
|
273
275
|
nums() {
|
|
@@ -286,12 +288,15 @@ export default {
|
|
|
286
288
|
txt = txt[0].split(':')
|
|
287
289
|
this.hour = parseInt(txt[0])
|
|
288
290
|
this.min = parseInt(txt[1])
|
|
291
|
+
if (this.withSec) {
|
|
292
|
+
this.sec = parseInt(txt[2])
|
|
293
|
+
}
|
|
289
294
|
this.handle_hour(false)
|
|
290
295
|
},
|
|
291
296
|
emit() {
|
|
292
|
-
let hour = this.hour
|
|
293
|
-
let min = this.min
|
|
294
|
-
let sec = this.sec
|
|
297
|
+
let hour = this.hour || 0
|
|
298
|
+
let min = this.min || 0
|
|
299
|
+
let sec = this.sec || 0
|
|
295
300
|
if (hour < 10) {
|
|
296
301
|
hour = '0' + hour;
|
|
297
302
|
}
|
|
@@ -308,10 +313,9 @@ export default {
|
|
|
308
313
|
if (!this.is24Hour) {
|
|
309
314
|
n += " " + this.meridiem;
|
|
310
315
|
}
|
|
316
|
+
|
|
311
317
|
this.$emit("update:modelValue", n);
|
|
312
|
-
|
|
313
|
-
this.$emit("finish", true);
|
|
314
|
-
}
|
|
318
|
+
this.$emit("finish", this.min === null ? 'hour' : (this.sec === null ? 'minute' : 'second'));
|
|
315
319
|
},
|
|
316
320
|
handle_hour(next = true) {
|
|
317
321
|
if (this.hour > (this.is24Hour ? 23 : 12)) {
|
|
@@ -320,42 +324,45 @@ export default {
|
|
|
320
324
|
|
|
321
325
|
this.show = this.is24Hour ? "hours24" : "hours12";
|
|
322
326
|
setTimeout(() => {
|
|
327
|
+
this.isSmall = false
|
|
323
328
|
this.setup_hour();
|
|
324
329
|
this.hour && this.set(this.hour, next);
|
|
325
|
-
},
|
|
330
|
+
}, this.delay);
|
|
326
331
|
},
|
|
327
332
|
handle_min(next = true) {
|
|
328
333
|
if (this.min > 59) {
|
|
329
334
|
this.min = 59;
|
|
330
335
|
}
|
|
331
336
|
this.show = "mins";
|
|
332
|
-
|
|
337
|
+
this.setSmall(this.min)
|
|
333
338
|
setTimeout(() => {
|
|
334
339
|
this.setup_min();
|
|
335
340
|
this.min && this.set(this.min, next);
|
|
336
|
-
},
|
|
341
|
+
}, this.delay);
|
|
337
342
|
},
|
|
338
343
|
handle_sec(next = true) {
|
|
339
344
|
if (this.sec > 59) {
|
|
340
345
|
this.sec = 59;
|
|
341
346
|
}
|
|
342
347
|
this.show = "seconds";
|
|
348
|
+
this.setSmall(this.sec)
|
|
343
349
|
setTimeout(() => {
|
|
344
350
|
this.setup_min();
|
|
345
351
|
this.sec && this.set(this.sec, next);
|
|
346
|
-
},
|
|
352
|
+
}, this.delay);
|
|
347
353
|
},
|
|
348
354
|
|
|
349
355
|
set(h, next = true) {
|
|
350
356
|
h = parseInt(h);
|
|
351
|
-
|
|
352
|
-
|
|
357
|
+
let cl = this.$refs["number"][h];
|
|
358
|
+
if (this.show === "hours12") {
|
|
359
|
+
cl = this.$refs["number"][h - 1];
|
|
360
|
+
}
|
|
361
|
+
|
|
353
362
|
const hand = this.$refs.hand;
|
|
354
363
|
const clock = this.$refs.clock.getBoundingClientRect();
|
|
355
364
|
|
|
356
365
|
const b = cl.getBoundingClientRect();
|
|
357
|
-
circle.style.top = parseInt(cl.style.top) + 10 + "px";
|
|
358
|
-
circle.style.left = parseInt(cl.style.left) + 10 + "px";
|
|
359
366
|
|
|
360
367
|
let ang = this.angle(
|
|
361
368
|
b.left + 10,
|
|
@@ -376,46 +383,62 @@ export default {
|
|
|
376
383
|
hand.style.transform = "rotate(" + ang + "deg)";
|
|
377
384
|
|
|
378
385
|
if (this.show === "hours24" && (h === 0 || h >= 13)) {
|
|
379
|
-
hand.style.height = "
|
|
386
|
+
hand.style.height = "70px";
|
|
380
387
|
} else {
|
|
381
|
-
hand.style.height = "
|
|
388
|
+
hand.style.height = "110px";
|
|
382
389
|
}
|
|
383
390
|
|
|
384
391
|
if (!next) {
|
|
392
|
+
if (this.show === "hours24" || this.show === "hours12") {
|
|
393
|
+
this.hour = h;
|
|
394
|
+
} else if (this.show === "mins") {
|
|
395
|
+
this.min = h;
|
|
396
|
+
}
|
|
397
|
+
this.emit();
|
|
385
398
|
return
|
|
386
399
|
}
|
|
387
400
|
if (this.show === "hours24") {
|
|
388
|
-
this.show = "mins";
|
|
389
401
|
this.hour = h;
|
|
390
402
|
setTimeout(() => {
|
|
391
|
-
this.
|
|
392
|
-
|
|
403
|
+
this.show = "mins";
|
|
404
|
+
setTimeout(() => {
|
|
405
|
+
this.setup_min();
|
|
406
|
+
}, this.delay);
|
|
407
|
+
}, this.delay);
|
|
393
408
|
} else if (this.show === "hours12") {
|
|
394
|
-
this.show = "mins";
|
|
395
|
-
setTimeout(() => {
|
|
396
|
-
this.setup_min();
|
|
397
|
-
}, 10);
|
|
398
409
|
this.hour = h;
|
|
410
|
+
setTimeout(() => {
|
|
411
|
+
this.show = "mins";
|
|
412
|
+
setTimeout(() => {
|
|
413
|
+
this.setup_min();
|
|
414
|
+
}, this.delay);
|
|
415
|
+
}, this.delay);
|
|
416
|
+
|
|
399
417
|
} else if (this.show === "mins") {
|
|
400
418
|
this.min = h;
|
|
401
|
-
|
|
402
|
-
this.isSmall = false;
|
|
403
|
-
this.isHand = false;
|
|
404
|
-
} else {
|
|
405
|
-
this.isSmall = true;
|
|
406
|
-
this.isHand = true;
|
|
407
|
-
}
|
|
419
|
+
this.setSmall(h)
|
|
408
420
|
if (this.withSec) {
|
|
409
|
-
this.show = "seconds";
|
|
410
421
|
setTimeout(() => {
|
|
411
|
-
this.
|
|
412
|
-
|
|
422
|
+
this.show = "seconds";
|
|
423
|
+
this.isSmall = false;
|
|
424
|
+
setTimeout(() => {
|
|
425
|
+
this.setup_min();
|
|
426
|
+
}, this.delay);
|
|
427
|
+
}, this.delay);
|
|
413
428
|
}
|
|
414
429
|
} else {
|
|
430
|
+
this.setSmall(h)
|
|
415
431
|
this.sec = h;
|
|
416
432
|
}
|
|
417
433
|
this.emit();
|
|
418
434
|
},
|
|
435
|
+
setSmall(h) {
|
|
436
|
+
if ([0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55].includes(h)) {
|
|
437
|
+
this.isSmall = false;
|
|
438
|
+
} else {
|
|
439
|
+
this.isSmall = true;
|
|
440
|
+
}
|
|
441
|
+
},
|
|
419
442
|
angle(p1x, p1y, p2x, p2y, p3x, p3y) {
|
|
420
443
|
let p0c = Math.sqrt(Math.pow(p3x - p1x, 2) + Math.pow(p3y - p1y, 2));
|
|
421
444
|
let p1c = Math.sqrt(Math.pow(p3x - p2x, 2) + Math.pow(p3y - p2y, 2));
|
|
@@ -439,14 +462,15 @@ export default {
|
|
|
439
462
|
setup_hour() {
|
|
440
463
|
let cl = null;
|
|
441
464
|
let po = null;
|
|
442
|
-
|
|
443
|
-
cl = this.$refs["number"][i];
|
|
444
|
-
po = this.print_point(i, 110);
|
|
445
|
-
cl.style.left = po[0] - 10 + "px";
|
|
446
|
-
cl.style.top = po[1] - 10 + "px";
|
|
447
|
-
cl.classList.add('number-show')
|
|
448
|
-
}
|
|
465
|
+
|
|
449
466
|
if (this.is24Hour) {
|
|
467
|
+
for (let i = 1; i <= 12; i++) {
|
|
468
|
+
cl = this.$refs["number"][i];
|
|
469
|
+
po = this.print_point(i, 110);
|
|
470
|
+
cl.style.left = po[0] - 10 + "px";
|
|
471
|
+
cl.style.top = po[1] - 10 + "px";
|
|
472
|
+
cl.classList.add('number-show')
|
|
473
|
+
}
|
|
450
474
|
for (let i = 13; i <= 23; i++) {
|
|
451
475
|
cl = this.$refs["number"][i];
|
|
452
476
|
po = this.print_point(i, 70);
|
|
@@ -459,20 +483,24 @@ export default {
|
|
|
459
483
|
cl.style.left = po[0] - 10 + "px";
|
|
460
484
|
cl.style.top = po[1] - 10 + "px";
|
|
461
485
|
cl.classList.add('number-show')
|
|
486
|
+
} else {
|
|
487
|
+
for (let i = 0; i < 12; i++) {
|
|
488
|
+
cl = this.$refs["number"][i];
|
|
489
|
+
po = this.print_point(i + 1, 110);
|
|
490
|
+
cl.style.left = po[0] - 10 + "px";
|
|
491
|
+
cl.style.top = po[1] - 10 + "px";
|
|
492
|
+
cl.classList.add('number-show')
|
|
493
|
+
}
|
|
462
494
|
}
|
|
463
495
|
},
|
|
464
496
|
setup_min() {
|
|
465
|
-
const circle = this.$refs.circle;
|
|
466
|
-
circle.style.left = "130px";
|
|
467
|
-
circle.style.top = "20px";
|
|
468
|
-
|
|
469
497
|
const clock = this.$refs.hand;
|
|
470
498
|
clock.style.transform = "rotate(0)";
|
|
471
|
-
clock.style.height = "
|
|
499
|
+
clock.style.height = "110px";
|
|
472
500
|
|
|
473
501
|
let cl = null;
|
|
474
502
|
let po = null;
|
|
475
|
-
for (let i = 0; i
|
|
503
|
+
for (let i = 0; i < 60; i++) {
|
|
476
504
|
cl = this.$refs["number"][i];
|
|
477
505
|
po = this.print_point(i, 110, 60);
|
|
478
506
|
cl.style.left = po[0] - 10 + "px";
|
|
@@ -491,6 +519,10 @@ export default {
|
|
|
491
519
|
|
|
492
520
|
--color-timepicker: var(--color-one);
|
|
493
521
|
|
|
522
|
+
* {
|
|
523
|
+
transition: .15s all ease-in-out !important;
|
|
524
|
+
}
|
|
525
|
+
|
|
494
526
|
.text-time {
|
|
495
527
|
display: flex;
|
|
496
528
|
justify-content: center;
|
|
@@ -585,6 +617,27 @@ export default {
|
|
|
585
617
|
border-top-left-radius: 10px;
|
|
586
618
|
border-top-right-radius: 10px;
|
|
587
619
|
transform-origin: bottom;
|
|
620
|
+
|
|
621
|
+
&:after {
|
|
622
|
+
content: "";
|
|
623
|
+
position: absolute;
|
|
624
|
+
width: 35px;
|
|
625
|
+
height: 35px;
|
|
626
|
+
border-radius: 50%;
|
|
627
|
+
color: var(--color-timepicker);
|
|
628
|
+
background-color: var(--color-timepicker);
|
|
629
|
+
border: 2px solid;
|
|
630
|
+
transform: translate(-50%, -50%);
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
.is-small:after {
|
|
635
|
+
width: 12px !important;
|
|
636
|
+
height: 12px !important;
|
|
637
|
+
border-radius: 50% !important;
|
|
638
|
+
border: 2px solid;
|
|
639
|
+
background-color: unset !important;
|
|
640
|
+
transform: translate(-50%, -90%) !important;
|
|
588
641
|
}
|
|
589
642
|
|
|
590
643
|
.clock > .clock-item {
|
|
@@ -610,20 +663,6 @@ export default {
|
|
|
610
663
|
border-radius: 50%;
|
|
611
664
|
}
|
|
612
665
|
|
|
613
|
-
.clock .circle {
|
|
614
|
-
position: absolute;
|
|
615
|
-
z-index: 11;
|
|
616
|
-
width: 35px;
|
|
617
|
-
height: 35px;
|
|
618
|
-
top: 20px;
|
|
619
|
-
left: 130px;
|
|
620
|
-
border-radius: 50%;
|
|
621
|
-
color: var(--color-timepicker);
|
|
622
|
-
background-color: var(--color-timepicker);
|
|
623
|
-
border: 2px solid;
|
|
624
|
-
transform: translate(-50%, -50%);
|
|
625
|
-
}
|
|
626
|
-
|
|
627
666
|
.time-active {
|
|
628
667
|
color: var(--color-timepicker);
|
|
629
668
|
}
|
|
@@ -642,14 +681,6 @@ export default {
|
|
|
642
681
|
background-color: var(--color-timepicker);
|
|
643
682
|
}
|
|
644
683
|
|
|
645
|
-
.is-small {
|
|
646
|
-
width: 12px !important;
|
|
647
|
-
height: 12px !important;
|
|
648
|
-
border-radius: 50% !important;
|
|
649
|
-
border: 2px solid;
|
|
650
|
-
background-color: unset !important;
|
|
651
|
-
transform: translate(-50%, -50%) !important;
|
|
652
|
-
}
|
|
653
684
|
|
|
654
685
|
.number-disabled {
|
|
655
686
|
pointer-events: none;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<r-card v-if="!autoSend" class="overflow-auto">
|
|
2
|
+
<r-card v-if="!autoSend" :class="$r.prefix+'form-creator'" class="overflow-auto">
|
|
3
3
|
<r-container>
|
|
4
4
|
<h1 v-if="title" class="title">{{ title }}</h1>
|
|
5
5
|
<r-form ref="form" v-model="valid" @submit.prevent="save">
|
|
@@ -194,4 +194,4 @@ export default {
|
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
|
-
</script>
|
|
197
|
+
</script>
|
package/components/img/index.vue
CHANGED
|
@@ -1,17 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<div
|
|
4
|
-
<r-btn @click.stop="isRtl?scroll_right():scroll_left()"
|
|
5
|
-
icon
|
|
6
|
-
text
|
|
7
|
-
v-if="isRtl?!disableRight:!disableLeft">
|
|
8
|
-
<r-icon v-html="$r.icons.chevron_left"></r-icon>
|
|
9
|
-
</r-btn>
|
|
10
|
-
</div>
|
|
11
|
-
|
|
12
|
-
<div :class="[wrapperClass,{
|
|
13
|
-
'tabs-hidden':$r.breakpoint.width>960
|
|
14
|
-
}]" class="tabs-wrap" ref="tabs">
|
|
2
|
+
<div :class="$r.prefix+'tabs'">
|
|
3
|
+
<div ref="tabs" :class="[wrapperClass]" class="tabs-wrap">
|
|
15
4
|
<button
|
|
16
5
|
v-for="tab in items"
|
|
17
6
|
:key="tab.title"
|
|
@@ -33,16 +22,7 @@
|
|
|
33
22
|
:style="{ width: `${activeLineWidth}px`, transform: `translateX(${activeLineOffset}px)` }"
|
|
34
23
|
class="tabs__active-line"></div>
|
|
35
24
|
</div>
|
|
36
|
-
|
|
37
|
-
<r-btn @click.stop="isRtl?scroll_left():scroll_right()"
|
|
38
|
-
icon
|
|
39
|
-
text
|
|
40
|
-
v-if="isRtl?!disableLeft:!disableRight">
|
|
41
|
-
<r-icon v-html="$r.icons.chevron_right"></r-icon>
|
|
42
|
-
</r-btn>
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
</nav>
|
|
25
|
+
</div>
|
|
46
26
|
</template>
|
|
47
27
|
|
|
48
28
|
<script>
|
|
@@ -77,15 +57,12 @@ export default {
|
|
|
77
57
|
emits: ['update:modelValue'],
|
|
78
58
|
data() {
|
|
79
59
|
return {
|
|
80
|
-
disableLeft: true,
|
|
81
|
-
disableRight: true,
|
|
82
60
|
activeLineWidth: 0,
|
|
83
61
|
activeLineOffset: 0
|
|
84
62
|
}
|
|
85
63
|
},
|
|
86
64
|
mounted() {
|
|
87
65
|
setTimeout(() => {
|
|
88
|
-
this.offset()
|
|
89
66
|
if (this.modelValue) {
|
|
90
67
|
this.moveActiveLine(this.modelValue.toString())
|
|
91
68
|
}
|
|
@@ -95,46 +72,12 @@ export default {
|
|
|
95
72
|
modelValue(newCurrentTab, o) {
|
|
96
73
|
if (o === newCurrentTab) return
|
|
97
74
|
setTimeout(() => {
|
|
98
|
-
this.offset()
|
|
99
75
|
this.moveActiveLine(newCurrentTab)
|
|
100
76
|
}, 100)
|
|
101
77
|
}
|
|
102
78
|
},
|
|
103
|
-
computed: {
|
|
104
|
-
isRtl() {
|
|
105
|
-
return this.$r.rtl
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
methods: {
|
|
109
|
-
scroll_left() {
|
|
110
|
-
this.$refs.tabs.scrollLeft -= this.$refs.tabs.clientWidth * 3 / 4
|
|
111
|
-
this.offset()
|
|
112
|
-
},
|
|
113
|
-
scroll_right() {
|
|
114
|
-
this.$refs.tabs.scrollLeft += this.$refs.tabs.clientWidth * 3 / 4
|
|
115
|
-
this.offset()
|
|
116
|
-
},
|
|
117
|
-
offset() {
|
|
118
|
-
const div = this.$refs.tabs
|
|
119
|
-
this.disableLeft = true
|
|
120
|
-
this.disableRight = true
|
|
121
|
-
if (!div) {
|
|
122
|
-
return false
|
|
123
|
-
}
|
|
124
79
|
|
|
125
|
-
|
|
126
|
-
if (div.clientWidth === div.scrollWidth) {
|
|
127
|
-
this.disableLeft = true
|
|
128
|
-
this.disableRight = true
|
|
129
|
-
} else if (div.scrollLeft === 0) {
|
|
130
|
-
this.disableLeft = true
|
|
131
|
-
this.disableRight = false
|
|
132
|
-
} else if (div.scrollLeft + div.clientWidth === div.scrollWidth) {
|
|
133
|
-
this.disableRight = true
|
|
134
|
-
this.disableLeft = false
|
|
135
|
-
}
|
|
136
|
-
}, 100)
|
|
137
|
-
},
|
|
80
|
+
methods: {
|
|
138
81
|
handleClick(value) {
|
|
139
82
|
this.$emit('update:modelValue', value)
|
|
140
83
|
this.moveActiveLine(value.toString())
|
|
@@ -169,10 +112,6 @@ $btnTabsWidth: 50px;
|
|
|
169
112
|
width: calc(100% - #{$btnTabsWidth*2});
|
|
170
113
|
overflow: auto;
|
|
171
114
|
|
|
172
|
-
&.tabs-hidden {
|
|
173
|
-
overflow: hidden;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
115
|
scroll-behavior: smooth;
|
|
177
116
|
}
|
|
178
117
|
|
package/package.json
CHANGED
|
@@ -3,8 +3,8 @@ class Request {
|
|
|
3
3
|
this._baseURL = '/';
|
|
4
4
|
this._headers={
|
|
5
5
|
common:{
|
|
6
|
-
'Accept': '
|
|
7
|
-
'X-Requested-With':'XMLHttpRequest'
|
|
6
|
+
'Accept': '*/*',
|
|
7
|
+
'X-Requested-With': 'XMLHttpRequest'
|
|
8
8
|
},
|
|
9
9
|
get:{
|
|
10
10
|
'Content-Type':'application/x-www-form-urlencoded;charset=utf-8'
|
|
@@ -49,7 +49,7 @@ class Request {
|
|
|
49
49
|
xhr.setRequestHeader(key, opts.headers[key]);
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
|
|
52
|
+
let params = opts.params;
|
|
53
53
|
// We'll need to stringify if we've been given an object
|
|
54
54
|
// If we have a string, this is skipped.
|
|
55
55
|
if (params && typeof params === "object") {
|
package/style/app.scss
CHANGED
|
@@ -250,13 +250,17 @@ $color-text: var(--color-two-text);
|
|
|
250
250
|
}
|
|
251
251
|
|
|
252
252
|
.#{$prefix}app {
|
|
253
|
+
* {
|
|
254
|
+
scroll-margin: 100px;
|
|
255
|
+
}
|
|
256
|
+
|
|
253
257
|
ol, ul {
|
|
254
258
|
margin: 0 15px;
|
|
255
259
|
}
|
|
256
260
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
261
|
+
pre {
|
|
262
|
+
border-left: 5px solid var(--color-one);
|
|
263
|
+
}
|
|
260
264
|
|
|
261
265
|
pre {
|
|
262
266
|
direction: ltr;
|
|
@@ -286,20 +290,21 @@ $color-text: var(--color-two-text);
|
|
|
286
290
|
color: white;
|
|
287
291
|
}
|
|
288
292
|
|
|
289
|
-
|
|
290
|
-
blockquote {
|
|
291
|
-
background-color: $background;
|
|
292
|
-
border: 5px solid var(--color-one);
|
|
293
|
+
$background: #e2ece2;
|
|
293
294
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
295
|
+
blockquote {
|
|
296
|
+
background-color: $background;
|
|
297
|
+
border: 5px solid var(--color-one);
|
|
297
298
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
}
|
|
299
|
+
&::before {
|
|
300
|
+
background-color: $background;
|
|
301
301
|
}
|
|
302
302
|
|
|
303
|
+
&::after {
|
|
304
|
+
color: var(--color-one);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
303
308
|
blockquote {
|
|
304
309
|
font-family: Georgia, Times, "Times New Roman", serif;
|
|
305
310
|
font-size: 1.25em;
|