renusify 2.0.4 → 2.1.0
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/app/index.js +5 -0
- package/components/app/index.vue +0 -2
- package/components/avatar/index.js +3 -0
- package/components/bar/bottomNav.js +1 -0
- package/components/bar/bottomNavigationCircle.js +2 -0
- package/components/bar/bottomNavigationCircle.vue +1 -1
- package/components/bar/toolbar/index.js +8 -0
- package/components/bar/toolbar/laptop.vue +2 -2
- package/components/bar/toolbar/menuLaptop.vue +2 -2
- package/components/bar/toolbar/menuMob.vue +28 -28
- package/components/bar/toolbar/mobile.vue +2 -2
- package/components/breadcrumb/index.js +3 -0
- package/components/breadcrumb/index.vue +0 -2
- package/components/button/buttonConfirm.js +3 -0
- package/components/button/buttonConfirm.vue +1 -1
- package/components/button/buttonGroup.js +7 -0
- package/components/button/index.js +3 -0
- package/components/calendar/index.js +10 -0
- package/components/calendar/index.vue +4 -7
- package/components/card/index.js +3 -0
- package/components/card/style.scss +2 -3
- package/components/chart/chart.js +1 -0
- package/components/chart/chart.vue +8 -5
- package/components/chart/worldMap.js +2 -0
- package/components/chart/worldMap.vue +1 -1
- package/components/chat/MessageList.vue +2 -6
- package/components/chat/chatInput.vue +1 -1
- package/components/chat/index.js +11 -0
- package/components/chat/index.vue +2 -5
- package/components/chip/index.js +3 -0
- package/components/codeEditor/highlightCss.vue +1 -1
- package/components/codeEditor/highlightHtml.vue +1 -1
- package/components/codeEditor/highlightJs.vue +1 -1
- package/components/codeEditor/index.js +3 -0
- package/components/codeEditor/index.vue +206 -199
- package/components/confirm/index.js +10 -0
- package/components/container/col.js +1 -0
- package/components/container/divider.js +1 -0
- package/components/container/index.js +1 -0
- package/components/container/row.js +1 -0
- package/components/container/spacer.js +1 -0
- package/components/content/index.js +1 -0
- package/components/countdown/index.js +1 -0
- package/components/cropper/index.js +3 -0
- package/components/cropper/index.vue +1 -1
- package/components/float/index.js +1 -0
- package/components/form/addressInput/index.js +4 -0
- package/components/form/camInput/index.js +4 -0
- package/components/form/{camInput.vue → camInput/index.vue} +1 -1
- package/components/form/checkInput/index.js +4 -0
- package/components/form/{check-input.vue → checkInput/index.vue} +1 -1
- package/components/form/checkboxInput/index.js +3 -0
- package/components/form/{checkbox.vue → checkboxInput/index.vue} +1 -1
- package/components/form/colorInput/index.js +7 -0
- package/components/form/{colorPicker → colorInput}/index.vue +2 -2
- package/components/form/{colorPicker → colorInput}/picker.vue +5 -9
- package/components/form/dateInput/index.js +8 -0
- package/components/form/dateInput/index.vue +475 -0
- package/components/form/fileInput/index.js +8 -0
- package/components/form/{fileUploader → fileInput}/index.vue +2 -2
- package/components/form/groupInput/index.js +4 -0
- package/components/form/{group-input.vue → groupInput/index.vue} +1 -1
- package/components/form/index.js +1 -0
- package/components/form/input/index.js +3 -0
- package/components/form/{input.vue → input/index.vue} +1 -1
- package/components/form/{json → jsonInput}/JsonView.vue +1 -1
- package/components/form/jsonInput/index.js +7 -0
- package/components/form/{json → jsonInput}/index.vue +7 -7
- package/components/form/maskInput/index.js +3 -0
- package/components/form/numberInput/index.js +4 -0
- package/components/form/{number.vue → numberInput/index.vue} +1 -1
- package/components/form/passwordInput/index.js +3 -0
- package/components/form/radioInput/index.js +3 -0
- package/components/form/{radioInput.vue → radioInput/index.vue} +1 -1
- package/components/form/rangeInput/index.js +3 -0
- package/components/form/{range.vue → rangeInput/index.vue} +1 -1
- package/components/form/ratingInput/index.js +4 -0
- package/components/form/{rating.vue → ratingInput/index.vue} +1 -1
- package/components/form/selectInput/index.js +8 -0
- package/components/form/{select.vue → selectInput/index.vue} +34 -2
- package/components/form/switchInput/index.js +2 -0
- package/components/form/{switch.vue → switchInput/index.vue} +1 -1
- package/components/form/telInput/index.js +7 -0
- package/components/form/{inputTel → telInput}/index.vue +5 -5
- package/components/form/text-editor/index.js +15 -0
- package/components/form/text-editor/preview.js +1 -0
- package/components/form/text-editor/preview.vue +14 -13
- package/components/form/text-editor/style.scss +4 -2
- package/components/form/textArea/index.js +2 -0
- package/components/form/{text-area.vue → textArea/index.vue} +1 -1
- package/components/form/textInput/index.js +2 -0
- package/components/form/timeInput/index.js +5 -0
- package/components/form/{timepicker → timeInput}/index.vue +2 -2
- package/components/form/timeInput/range.js +5 -0
- package/components/form/{timepicker → timeInput}/range.vue +2 -2
- package/components/form/uniqueInput/index.js +2 -0
- package/components/form/unitInput/index.js +3 -0
- package/components/form/{unit-input.vue → unitInput/index.vue} +1 -1
- package/components/formCreator/index.js +8 -0
- package/components/html2pdf/index.js +4 -0
- package/components/html2pdf/pageBreak.js +1 -0
- package/components/icon/index.js +1 -0
- package/components/img/index.js +2 -0
- package/components/img/index.vue +2 -2
- package/components/img/svgImg.vue +1 -1
- package/components/index.js +100 -191
- package/components/infinite/div.js +6 -0
- package/components/infinite/index.js +7 -0
- package/components/infinite/page.js +3 -0
- package/components/list/index.js +3 -0
- package/components/map/index.js +5 -0
- package/components/map/index.vue +8 -7
- package/components/map/route.js +9 -0
- package/components/map/route.vue +1 -1
- package/components/map/select.js +2 -0
- package/components/menu/index.js +5 -0
- package/components/message/index.js +4 -0
- package/components/meta/index.js +1 -1
- package/components/modal/index.js +3 -0
- package/components/modal/index.vue +6 -2
- package/components/modal/style.scss +1 -0
- package/components/nestable/NestableItem.vue +163 -0
- package/components/nestable/editable.js +44 -0
- package/components/nestable/index.js +1 -0
- package/components/nestable/index.vue +109 -0
- package/components/nestable/methods.js +397 -0
- package/components/notify/index.js +3 -0
- package/components/notify/index.vue +2 -2
- package/components/progress/circle.js +1 -0
- package/components/progress/line.js +1 -0
- package/components/searchBox/index.js +8 -0
- package/components/searchBox/index.vue +1 -1
- package/components/skeleton/index.js +1 -0
- package/components/skeleton/index.vue +1 -1
- package/components/slider/index.js +6 -0
- package/components/swiper/index.js +2 -0
- package/components/table/crud/index.js +20 -0
- package/components/table/crud/index.vue +459 -453
- package/components/table/index.js +11 -0
- package/components/table/index.vue +10 -17
- package/components/tabs/index.js +3 -0
- package/components/timeAgo/index.js +1 -0
- package/components/timeline/index.js +6 -0
- package/components/timeline/index.vue +1 -1
- package/components/tour/index.js +4 -0
- package/components/tour/index.vue +225 -221
- package/components/tree/index.js +9 -0
- package/components/tree/index.vue +120 -120
- package/components/tree/tree-element.vue +5 -18
- package/directive/index.js +17 -18
- package/package.json +1 -1
- package/components/form/address_ir.vue +0 -106
- package/components/form/datePicker/index.vue +0 -473
- package/components/iframe/index.vue +0 -67
- /package/components/form/{address.vue → addressInput/index.vue} +0 -0
- /package/components/form/{colorPicker → colorInput}/Alpha.vue +0 -0
- /package/components/form/{colorPicker → colorInput}/Hue.vue +0 -0
- /package/components/form/{colorPicker → colorInput}/Preview.vue +0 -0
- /package/components/form/{colorPicker → colorInput}/Saturation.vue +0 -0
- /package/components/form/{colorPicker → colorInput}/mixin.js +0 -0
- /package/components/form/{datePicker → dateInput}/month.vue +0 -0
- /package/components/form/{datePicker → dateInput}/year.vue +0 -0
- /package/components/form/{fileUploader → fileInput}/file.js +0 -0
- /package/components/form/{fileUploader → fileInput}/single.vue +0 -0
- /package/components/form/{form.vue → index.vue} +0 -0
- /package/components/form/{mask-input.vue → maskInput/index.vue} +0 -0
- /package/components/form/{password.vue → passwordInput/index.vue} +0 -0
- /package/components/form/{inputTel → telInput}/assets/all-countries.js +0 -0
- /package/components/form/{inputTel → telInput}/assets/flags.png +0 -0
- /package/components/form/{inputTel → telInput}/assets/flags@2x.png +0 -0
- /package/components/form/{inputTel → telInput}/assets/sprite.css +0 -0
- /package/components/form/{text-input.vue → textInput/index.vue} +0 -0
- /package/components/form/{timepicker → timeInput}/timepicker.vue +0 -0
- /package/components/form/{unique → uniqueInput}/index.vue +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * as rTable from './index.vue'
|
|
2
|
+
export * as l_btn from '../button/index.js'
|
|
3
|
+
export * as l_modal from '../modal/index.js'
|
|
4
|
+
export * as l_card from '../card/index.js'
|
|
5
|
+
export * as l_container from '../container/index.js'
|
|
6
|
+
export * as l_row from '../container/row.js'
|
|
7
|
+
export * as l_col from '../container/col.js'
|
|
8
|
+
export * as l_icon from '../icon/index.js'
|
|
9
|
+
export * as l_switch from '../form/switchInput/index.js'
|
|
10
|
+
export * as l_line from '../progress/line.js'
|
|
11
|
+
export * as d_sortable from '../../directive/sortable/index.js'
|
|
@@ -71,34 +71,27 @@
|
|
|
71
71
|
</div>
|
|
72
72
|
</div>
|
|
73
73
|
<r-modal v-if="editable" v-model="showModal">
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
<div
|
|
75
|
+
v-sortable="{
|
|
76
76
|
items: cols,
|
|
77
77
|
end: store_db,
|
|
78
78
|
grab: '.drag-btn'
|
|
79
79
|
}"
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
:key="col.value+i"
|
|
84
|
-
class="no-gutters"
|
|
85
|
-
>
|
|
86
|
-
<r-col>
|
|
87
|
-
<r-card class="pa-4 ma-1 d-flex h-space-between" tile>
|
|
80
|
+
>
|
|
81
|
+
<r-card v-for="(col, i) in cols"
|
|
82
|
+
:key="i" class="pa-4 ma-1 d-flex h-space-between" tile>
|
|
88
83
|
<span class="title-1">
|
|
89
84
|
<r-btn class="drag-btn" icon text>
|
|
90
85
|
<r-icon v-html="$r.icons.drag"></r-icon>
|
|
91
86
|
</r-btn>
|
|
92
87
|
{{ col.text }}
|
|
93
88
|
</span>
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
89
|
+
<span>
|
|
90
|
+
<r-switch-input v-model="col.show" :label="$t('show','renusify')"
|
|
91
|
+
@update:model-value="store_db(cols)"></r-switch-input>
|
|
97
92
|
</span>
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
</r-row>
|
|
101
|
-
</r-container>
|
|
93
|
+
</r-card>
|
|
94
|
+
</div>
|
|
102
95
|
</r-modal>
|
|
103
96
|
</template>
|
|
104
97
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as rTimeAgo from './index.vue'
|
|
@@ -1,258 +1,262 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
<teleport v-if="show" :to="`.${$r.prefix}app`">
|
|
3
|
+
<div :style="style" class="tour-layer"></div>
|
|
4
|
+
<transition name="slide-up" mode="out-in">
|
|
5
|
+
<div v-if="msg" ref="tourMsg" :style="style_msg" class="tour-msg headline-1">
|
|
6
|
+
<r-container>
|
|
7
|
+
<div v-html="$helper.cleanXss(steps[run].msg)"></div>
|
|
8
|
+
<div class="d-flex">
|
|
9
|
+
<div><span
|
|
10
|
+
class="title-2 color-success br-lg py-1 px-2 ltr">{{ steps.length }} / {{ run + 1 }}</span>
|
|
11
|
+
</div>
|
|
12
|
+
<r-spacer></r-spacer>
|
|
13
|
+
<r-btn v-if="has_prev" :disabled="disable_prev" class="color-info tour-clickable"
|
|
14
|
+
@click.prevent="prev">
|
|
15
|
+
{{ $t('prev', 'renusify') }}
|
|
16
|
+
</r-btn>
|
|
17
|
+
<r-btn v-if="has_next" :disabled="disable_next" class="color-info mx-1 tour-clickable"
|
|
18
|
+
@click.prevent="next">
|
|
19
|
+
{{ $t('next', 'renusify') }}
|
|
20
|
+
</r-btn>
|
|
21
|
+
<r-btn v-if="steps.length===run+1||canFinish" :disabled="disable_finish"
|
|
22
|
+
class="color-success mx-1 tour-clickable"
|
|
23
|
+
@click.prevent="finish">{{ $t('finish', 'renusify') }}
|
|
24
|
+
</r-btn>
|
|
25
|
+
</div>
|
|
26
|
+
</r-container>
|
|
11
27
|
</div>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
{{ $t('prev', 'renusify') }}
|
|
15
|
-
</r-btn>
|
|
16
|
-
<r-btn v-if="has_next" :disabled="disable_next" class="color-info mx-1 tour-clickable"
|
|
17
|
-
@click.prevent="next">
|
|
18
|
-
{{ $t('next', 'renusify') }}
|
|
19
|
-
</r-btn>
|
|
20
|
-
<r-btn v-if="steps.length===run+1||canFinish" :disabled="disable_finish"
|
|
21
|
-
class="color-success mx-1 tour-clickable"
|
|
22
|
-
@click.prevent="finish">{{ $t('finish', 'renusify') }}
|
|
23
|
-
</r-btn>
|
|
24
|
-
</div>
|
|
25
|
-
</r-container>
|
|
26
|
-
</div>
|
|
27
|
-
</transition>
|
|
28
|
-
</teleport>
|
|
28
|
+
</transition>
|
|
29
|
+
</teleport>
|
|
29
30
|
</template>
|
|
30
31
|
<script>
|
|
31
32
|
export default {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
name: 'r-tour',
|
|
34
|
+
props: {
|
|
35
|
+
steps: {
|
|
36
|
+
type: Array, default: () => {
|
|
37
|
+
return []
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
canFinish: Boolean,
|
|
41
|
+
abortOnNotFound: Boolean,
|
|
42
|
+
delay: {type: Number, default: 2000}
|
|
38
43
|
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
msg: null,
|
|
53
|
-
run: 0
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
mounted() {
|
|
57
|
-
setTimeout(() => {
|
|
58
|
-
this._show()
|
|
59
|
-
}, this.delay)
|
|
60
|
-
|
|
61
|
-
},
|
|
62
|
-
watch: {
|
|
63
|
-
'$r.breakpoint.height': function () {
|
|
64
|
-
this._show()
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
computed: {
|
|
68
|
-
has_next() {
|
|
69
|
-
if (this.finished) {
|
|
70
|
-
console.log('tour finished has_next:' + this.run)
|
|
71
|
-
this.reset()
|
|
72
|
-
return false
|
|
73
|
-
}
|
|
74
|
-
return this.$helper.ifHas(this.steps, false, this.run + 1, 'key')
|
|
44
|
+
data() {
|
|
45
|
+
return {
|
|
46
|
+
show: false,
|
|
47
|
+
finished: false,
|
|
48
|
+
disable_next: false,
|
|
49
|
+
disable_prev: false,
|
|
50
|
+
disable_finish: false,
|
|
51
|
+
all: {},
|
|
52
|
+
style: {},
|
|
53
|
+
style_msg: {},
|
|
54
|
+
msg: null,
|
|
55
|
+
run: 0
|
|
56
|
+
}
|
|
75
57
|
},
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
58
|
+
mounted() {
|
|
59
|
+
setTimeout(() => {
|
|
60
|
+
this.show = true;
|
|
61
|
+
setTimeout(() => {
|
|
62
|
+
this._show()
|
|
63
|
+
}, this.delay)
|
|
64
|
+
}, 10)
|
|
83
65
|
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
return null
|
|
89
|
-
}
|
|
90
|
-
const key = this.$helper.ifHas(this.steps, false, this.run, 'key')
|
|
91
|
-
if (key) {
|
|
92
|
-
return document.querySelector(key)
|
|
93
|
-
}
|
|
94
|
-
console.log(key + ': key not found in step:' + this.run)
|
|
95
|
-
return null
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
methods: {
|
|
99
|
-
elm_next() {
|
|
100
|
-
return document.querySelector(this.has_next)
|
|
66
|
+
watch: {
|
|
67
|
+
'$r.breakpoint.height': function () {
|
|
68
|
+
this._show()
|
|
69
|
+
}
|
|
101
70
|
},
|
|
102
|
-
|
|
103
|
-
|
|
71
|
+
computed: {
|
|
72
|
+
has_next() {
|
|
73
|
+
if (this.finished) {
|
|
74
|
+
console.log('tour finished has_next:' + this.run)
|
|
75
|
+
this.reset()
|
|
76
|
+
return false
|
|
77
|
+
}
|
|
78
|
+
return this.$helper.ifHas(this.steps, false, this.run + 1, 'key')
|
|
79
|
+
},
|
|
80
|
+
has_prev() {
|
|
81
|
+
if (this.finished) {
|
|
82
|
+
console.log('tour finished has_prev:' + this.run)
|
|
83
|
+
this.reset()
|
|
84
|
+
return false
|
|
85
|
+
}
|
|
86
|
+
return this.$helper.ifHas(this.steps, false, this.run - 1, 'key')
|
|
87
|
+
},
|
|
88
|
+
elm() {
|
|
89
|
+
if (this.finished) {
|
|
90
|
+
console.log('tour finished step:' + this.run)
|
|
91
|
+
this.reset()
|
|
92
|
+
return null
|
|
93
|
+
}
|
|
94
|
+
const key = this.$helper.ifHas(this.steps, false, this.run, 'key')
|
|
95
|
+
if (key) {
|
|
96
|
+
return document.querySelector(key)
|
|
97
|
+
}
|
|
98
|
+
console.log(key + ': key not found in step:' + this.run)
|
|
99
|
+
return null
|
|
100
|
+
}
|
|
104
101
|
},
|
|
105
|
-
|
|
106
|
-
|
|
102
|
+
methods: {
|
|
103
|
+
elm_next() {
|
|
104
|
+
return document.querySelector(this.has_next)
|
|
105
|
+
},
|
|
106
|
+
elm_prev() {
|
|
107
|
+
return document.querySelector(this.has_prev)
|
|
108
|
+
},
|
|
109
|
+
_getOffsetLeft(elem) {
|
|
110
|
+
let box = elem.getBoundingClientRect();
|
|
107
111
|
|
|
108
|
-
|
|
109
|
-
|
|
112
|
+
let body = document.body;
|
|
113
|
+
let docEl = document.documentElement;
|
|
110
114
|
|
|
111
|
-
|
|
112
|
-
|
|
115
|
+
let scrollTop = window.pageYOffset || docEl.scrollTop || body.scrollTop;
|
|
116
|
+
let scrollLeft = window.pageXOffset || docEl.scrollLeft || body.scrollLeft;
|
|
113
117
|
|
|
114
|
-
|
|
115
|
-
|
|
118
|
+
let clientTop = docEl.clientTop || body.clientTop || 0;
|
|
119
|
+
let clientLeft = docEl.clientLeft || body.clientLeft || 0;
|
|
116
120
|
|
|
117
|
-
|
|
118
|
-
|
|
121
|
+
let top = box.top + scrollTop - clientTop;
|
|
122
|
+
let left = box.left + scrollLeft - clientLeft;
|
|
119
123
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}
|
|
137
|
-
this.finished = true
|
|
138
|
-
this.run = 0
|
|
139
|
-
this.reset()
|
|
140
|
-
this.$storage.set("tour_finish", true);
|
|
141
|
-
},
|
|
142
|
-
prev() {
|
|
143
|
-
this.reset()
|
|
144
|
-
const item = this.steps[this.run]
|
|
145
|
-
if (item.onPrev) {
|
|
146
|
-
item.onPrev()
|
|
147
|
-
}
|
|
148
|
-
this.run--
|
|
149
|
-
const s = this._show()
|
|
150
|
-
if (!s && this.run > 0) {
|
|
151
|
-
this.prev()
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
next() {
|
|
155
|
-
this.reset()
|
|
156
|
-
const item = this.steps[this.run]
|
|
157
|
-
if (item.onNext) {
|
|
158
|
-
item.onNext()
|
|
159
|
-
}
|
|
160
|
-
this.run++
|
|
161
|
-
const s = this._show()
|
|
162
|
-
if (!s && this.run < this.steps.length - 1) {
|
|
163
|
-
this.next()
|
|
164
|
-
}
|
|
165
|
-
},
|
|
166
|
-
_show() {
|
|
167
|
-
this.msg = null
|
|
168
|
-
if (this.elm && !this.finished) {
|
|
169
|
-
const item = this.steps[this.run]
|
|
170
|
-
|
|
171
|
-
if (item.before) {
|
|
172
|
-
item.before()
|
|
173
|
-
}
|
|
174
|
-
if (item.options) {
|
|
175
|
-
if (item.options.clickable) {
|
|
176
|
-
this.elm.classList.add('tour-clickable')
|
|
177
|
-
}
|
|
178
|
-
for (let key in item.options) {
|
|
179
|
-
if (this.$helper.hasKey(item.options, key)) {
|
|
180
|
-
this[key] = item.options[key]
|
|
124
|
+
return {top: Math.round(top), left: Math.round(left)};
|
|
125
|
+
},
|
|
126
|
+
reset() {
|
|
127
|
+
this.style = {}
|
|
128
|
+
this.style_msg = {}
|
|
129
|
+
this.msg = null
|
|
130
|
+
this.disable_next = false
|
|
131
|
+
this.disable_prev = false
|
|
132
|
+
this.disable_finish = false
|
|
133
|
+
},
|
|
134
|
+
finish() {
|
|
135
|
+
document.documentElement.classList.remove('disable-event')
|
|
136
|
+
document.documentElement.style.overflow = 'auto';
|
|
137
|
+
const item = this.steps[this.run]
|
|
138
|
+
if (item.onFinish) {
|
|
139
|
+
item.onFinish()
|
|
181
140
|
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
141
|
+
this.finished = true
|
|
142
|
+
this.run = 0
|
|
143
|
+
this.reset()
|
|
144
|
+
this.$storage.set("tour_finish", true);
|
|
145
|
+
},
|
|
146
|
+
prev() {
|
|
147
|
+
this.reset()
|
|
148
|
+
const item = this.steps[this.run]
|
|
149
|
+
if (item.onPrev) {
|
|
150
|
+
item.onPrev()
|
|
151
|
+
}
|
|
152
|
+
this.run--
|
|
153
|
+
const s = this._show()
|
|
154
|
+
if (!s && this.run > 0) {
|
|
155
|
+
this.prev()
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
next() {
|
|
159
|
+
this.reset()
|
|
160
|
+
const item = this.steps[this.run]
|
|
161
|
+
if (item.onNext) {
|
|
162
|
+
item.onNext()
|
|
163
|
+
}
|
|
164
|
+
this.run++
|
|
165
|
+
const s = this._show()
|
|
166
|
+
if (!s && this.run < this.steps.length - 1) {
|
|
167
|
+
this.next()
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
_show() {
|
|
171
|
+
this.msg = null
|
|
172
|
+
if (this.elm && !this.finished) {
|
|
173
|
+
const item = this.steps[this.run]
|
|
197
174
|
|
|
198
|
-
|
|
199
|
-
|
|
175
|
+
if (item.before) {
|
|
176
|
+
item.before()
|
|
177
|
+
}
|
|
178
|
+
if (item.options) {
|
|
179
|
+
if (item.options.clickable) {
|
|
180
|
+
this.elm.classList.add('tour-clickable')
|
|
181
|
+
}
|
|
182
|
+
for (let key in item.options) {
|
|
183
|
+
if (this.$helper.hasKey(item.options, key)) {
|
|
184
|
+
this[key] = item.options[key]
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
this.msg = item['msg']
|
|
189
|
+
setTimeout(() => {
|
|
190
|
+
this.elm.scrollIntoView()
|
|
191
|
+
let msgDiv = this.$refs.tourMsg.getBoundingClientRect()
|
|
192
|
+
document.documentElement.classList.add('disable-event')
|
|
193
|
+
document.documentElement.style.overflow = 'hidden';
|
|
194
|
+
const b = this.elm.getBoundingClientRect()
|
|
195
|
+
const s = window.getComputedStyle(this.elm)
|
|
196
|
+
const p = this._getOffsetLeft(this.elm)
|
|
197
|
+
this.style.width = b.width + 'px'
|
|
198
|
+
this.style.height = b.height + 'px'
|
|
199
|
+
this.style.top = p.top + 'px'
|
|
200
|
+
this.style.left = p.left + 'px'
|
|
200
201
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
scroll = p.top - msgDiv.height
|
|
204
|
-
this.style_msg.top = scroll + 'px'
|
|
205
|
-
} else {
|
|
206
|
-
this.style_msg.top = scroll + b.height + 'px'
|
|
207
|
-
}
|
|
202
|
+
this.style['border-radius'] = s['border-radius']
|
|
203
|
+
this.style.opacity = 1
|
|
208
204
|
|
|
205
|
+
let scroll = p.top
|
|
206
|
+
if (msgDiv.height < p.top) {
|
|
207
|
+
scroll = p.top - msgDiv.height
|
|
208
|
+
this.style_msg.top = scroll + 'px'
|
|
209
|
+
} else {
|
|
210
|
+
this.style_msg.top = scroll + b.height + 'px'
|
|
211
|
+
}
|
|
209
212
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
213
|
+
|
|
214
|
+
window.scroll({
|
|
215
|
+
top: scroll,
|
|
216
|
+
behavior: 'smooth'
|
|
217
|
+
});
|
|
218
|
+
if (item.after) {
|
|
219
|
+
item.after()
|
|
220
|
+
}
|
|
221
|
+
}, 1)
|
|
222
|
+
return true
|
|
223
|
+
} else if (this.abortOnNotFound) {
|
|
224
|
+
console.log('abort on not found tour')
|
|
225
|
+
this.finish()
|
|
226
|
+
}
|
|
227
|
+
return false
|
|
228
|
+
}
|
|
224
229
|
}
|
|
225
|
-
}
|
|
226
230
|
}
|
|
227
231
|
</script>
|
|
228
232
|
<style lang="scss">
|
|
229
233
|
.disable-event {
|
|
230
|
-
|
|
234
|
+
pointer-events: none !important;
|
|
231
235
|
}
|
|
232
236
|
|
|
233
237
|
.tour-layer {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
238
|
+
transition: all .7s ease-in-out;
|
|
239
|
+
position: absolute;
|
|
240
|
+
box-shadow: #444444 0px 0px 1px 2px, rgba(160, 10, 255, 0.8) 0px 0px 0px 5000px;
|
|
241
|
+
z-index: 1000;
|
|
242
|
+
opacity: 0;
|
|
243
|
+
width: 1px;
|
|
244
|
+
height: 1px;
|
|
245
|
+
left: 0;
|
|
246
|
+
top: 0;
|
|
243
247
|
|
|
244
248
|
}
|
|
245
249
|
|
|
246
250
|
.tour-clickable {
|
|
247
|
-
|
|
251
|
+
pointer-events: auto !important;
|
|
248
252
|
}
|
|
249
253
|
|
|
250
254
|
.tour-msg {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
255
|
+
transition: all 1s ease-in-out;
|
|
256
|
+
color: white !important;
|
|
257
|
+
position: absolute;
|
|
258
|
+
width: 100%;
|
|
259
|
+
z-index: 1001;
|
|
260
|
+
top: 0
|
|
257
261
|
}
|
|
258
262
|
</style>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * as rTree from './index.vue'
|
|
2
|
+
export * as rTreeElement from './tree-element.vue'
|
|
3
|
+
export * as l_container from '../container/index.js'
|
|
4
|
+
export * as l_row from '../container/row.js'
|
|
5
|
+
export * as l_col from '../container/col.js'
|
|
6
|
+
export * as l_select from '../form/selectInput/index.js'
|
|
7
|
+
export * as l_float from '../float/index.js'
|
|
8
|
+
export * as l_btn from '../button/index.js'
|
|
9
|
+
export * as l_icon from '../icon/index.js'
|