renusify 2.3.0 → 2.3.2
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/bar/bottomNavigationCircle.vue +1 -0
- package/components/bar/scss/toolbar.scss +2 -2
- package/components/bar/toolbar/index.vue +29 -23
- package/components/bar/toolbar/laptop.vue +27 -25
- package/components/bar/toolbar/mobile.vue +28 -27
- package/components/breadcrumb/bredcrumbItem.vue +2 -2
- package/components/calendar/index.vue +25 -33
- package/components/calendar/month.vue +33 -8
- package/components/calendar/year.vue +18 -7
- package/components/card/index.vue +49 -49
- package/components/chart/chart.vue +2 -1
- package/components/chat/MessageList.vue +4 -4
- package/components/codeEditor/index.vue +3 -3
- package/components/float/index.vue +3 -3
- package/components/form/dateInput/index.vue +407 -413
- package/components/form/dateInput/month.vue +33 -9
- package/components/form/dateInput/year.vue +13 -7
- package/components/form/groupInput/index.js +2 -1
- package/components/form/groupInput/index.vue +13 -32
- package/components/form/jsonInput/index.vue +7 -7
- package/components/form/switchInput/index.vue +1 -1
- package/components/map/index.vue +1 -1
- package/components/notify/index.vue +6 -6
- package/components/table/crud/index.vue +82 -66
- package/components/table/index.vue +5 -8
- package/components/timeline/index.vue +5 -5
- package/components/tree/index.vue +2 -2
- package/directive/skeleton/style.scss +7 -5
- package/directive/sortable/index.js +1 -3
- package/package.json +1 -1
- package/style/app.scss +6 -2
- package/style/mixins/container.scss +6 -5
- package/style/variables/base.scss +2 -2
- package/tools/icons.js +3 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="d-flex flex-wrap">
|
|
3
|
-
<r-btn v-for="i in
|
|
3
|
+
<r-btn v-for="i in ls"
|
|
4
4
|
:key="i"
|
|
5
5
|
outlined
|
|
6
6
|
class="w-30 ma-2"
|
|
7
|
-
:class="{'color-one
|
|
8
|
-
@click.prevent="emit(i
|
|
7
|
+
:class="{'color-one':i===modelValue}"
|
|
8
|
+
@click.prevent="emit(i)">
|
|
9
9
|
{{
|
|
10
|
-
|
|
10
|
+
$d(new Date(year, i, 1, 0, timezoneOffset), 'month', locale)
|
|
11
11
|
}}
|
|
12
12
|
</r-btn>
|
|
13
13
|
</div>
|
|
@@ -22,17 +22,41 @@ export default {
|
|
|
22
22
|
month: Number,
|
|
23
23
|
year: Number
|
|
24
24
|
},
|
|
25
|
-
emits:['update:modelValue'],
|
|
25
|
+
emits: ['update:modelValue'],
|
|
26
26
|
data() {
|
|
27
27
|
return {
|
|
28
|
-
|
|
28
|
+
ls: []
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
beforeMount() {
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
const year = this.$d(new Date(this.year, this.month, 5, 0, this.timezoneOffset), 'ye', this.locale)
|
|
33
|
+
let ls = []
|
|
34
|
+
let first = 0
|
|
35
|
+
let n = 0
|
|
36
|
+
while (true) {
|
|
37
|
+
n++
|
|
38
|
+
if (n > 100) {
|
|
39
|
+
break
|
|
40
|
+
}
|
|
41
|
+
const y = this.$d(new Date(this.year, first, 5, 0, this.timezoneOffset), 'ye', this.locale)
|
|
42
|
+
const m = parseInt(this.$d(new Date(this.year, first, 5, 0, this.timezoneOffset), 'me', this.locale))
|
|
43
|
+
if (y === year && m === 1) {
|
|
44
|
+
break
|
|
45
|
+
}
|
|
46
|
+
if (y > year) {
|
|
47
|
+
first--
|
|
48
|
+
} else if (y < year) {
|
|
49
|
+
first++
|
|
50
|
+
} else if (m > 1) {
|
|
51
|
+
first--
|
|
52
|
+
} else {
|
|
53
|
+
first++
|
|
54
|
+
}
|
|
35
55
|
}
|
|
56
|
+
for (let i = 0; i < 12; i++) {
|
|
57
|
+
ls.push(first + i)
|
|
58
|
+
}
|
|
59
|
+
this.ls = ls
|
|
36
60
|
},
|
|
37
61
|
methods: {
|
|
38
62
|
emit(n) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="d-flex flex-wrap">
|
|
3
|
-
<r-btn v-for="i in
|
|
2
|
+
<div class="date-picker-year d-flex flex-wrap">
|
|
3
|
+
<r-btn v-for="i in 200"
|
|
4
4
|
:key="i"
|
|
5
5
|
class="w-30 ma-2"
|
|
6
|
-
:class="{'color-one-
|
|
6
|
+
:class="{'color-one year-select':modelValue+i-100===modelValue}"
|
|
7
7
|
outlined
|
|
8
|
-
@click.prevent="emit(modelValue+i-
|
|
8
|
+
@click.prevent="emit(modelValue+i-100)">
|
|
9
9
|
{{
|
|
10
|
-
|
|
10
|
+
$d(new Date(modelValue + i - 100, month, 5, 0, timezoneOffset), 'year', locale)
|
|
11
11
|
}}
|
|
12
12
|
</r-btn>
|
|
13
13
|
</div>
|
|
@@ -22,10 +22,16 @@ export default {
|
|
|
22
22
|
month: Number
|
|
23
23
|
},
|
|
24
24
|
emits:['update:modelValue'],
|
|
25
|
+
mounted() {
|
|
26
|
+
let el = document.querySelector('.year-select')
|
|
27
|
+
if (el) {
|
|
28
|
+
el.scrollIntoView(true)
|
|
29
|
+
}
|
|
30
|
+
},
|
|
25
31
|
methods: {
|
|
26
32
|
emit(n) {
|
|
27
|
-
this.$emit('update:modelValue', n)
|
|
33
|
+
this.$emit('update:modelValue', n - this.modelValue)
|
|
28
34
|
}
|
|
29
35
|
}
|
|
30
36
|
}
|
|
31
|
-
</script>
|
|
37
|
+
</script>
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
hide>
|
|
5
5
|
<div class="w-full">
|
|
6
6
|
<span v-if="label" class="group-input-label">{{ label }}</span>
|
|
7
|
+
<div :key="key" v-sortable="{grab:'.grab-btn-group-input',end:end}">
|
|
7
8
|
<div class="group-holder" v-for="(item,i) in modelValue" :key="i">
|
|
8
9
|
<div class="group-slot">
|
|
9
10
|
<slot :item="item" :index="i" :disableDel="disDel">
|
|
@@ -17,18 +18,15 @@
|
|
|
17
18
|
</slot>
|
|
18
19
|
</div>
|
|
19
20
|
<div class="group-action">
|
|
20
|
-
<r-btn icon text>
|
|
21
|
-
<r-icon v-html="$r.icons.
|
|
22
|
-
</r-btn>
|
|
23
|
-
<r-btn icon text>
|
|
24
|
-
<r-icon v-html="$r.icons.chevron_down" :class="{'icon-disabled':i===modelValue.length-1}"
|
|
25
|
-
@click.prevent="down(i)"></r-icon>
|
|
21
|
+
<r-btn icon text class="grab-btn-group-input">
|
|
22
|
+
<r-icon v-html="$r.icons.drag"></r-icon>
|
|
26
23
|
</r-btn>
|
|
27
24
|
<r-btn v-if="!disableItems.includes(itemKey?item[itemKey]:'')" icon text @click.prevent="del(i)">
|
|
28
25
|
<r-icon v-html="$r.icons.delete" class="color-error-text"></r-icon>
|
|
29
26
|
</r-btn>
|
|
30
27
|
</div>
|
|
31
28
|
</div>
|
|
29
|
+
</div>
|
|
32
30
|
<div class="mt-5" :class="addBtnClass">
|
|
33
31
|
<transition name="scale">
|
|
34
32
|
<r-btn v-if="show_add" class="color-success" icon @click.prevent="add">
|
|
@@ -55,6 +53,7 @@ export default {
|
|
|
55
53
|
emits:['update:modelValue','add','delete'],
|
|
56
54
|
data() {
|
|
57
55
|
return {
|
|
56
|
+
key: 0,
|
|
58
57
|
disabledDel: {}
|
|
59
58
|
}
|
|
60
59
|
},
|
|
@@ -71,6 +70,14 @@ export default {
|
|
|
71
70
|
}
|
|
72
71
|
},
|
|
73
72
|
methods: {
|
|
73
|
+
end(e) {
|
|
74
|
+
let a = []
|
|
75
|
+
for (let i = 0; i < e.length; i++) {
|
|
76
|
+
a.push(this.modelValue[parseInt(e[i])])
|
|
77
|
+
}
|
|
78
|
+
this.$emit('update:modelValue', a)
|
|
79
|
+
this.key++
|
|
80
|
+
},
|
|
74
81
|
t(k) {
|
|
75
82
|
if (this.translate) {
|
|
76
83
|
return this.$t(k)
|
|
@@ -104,32 +111,6 @@ export default {
|
|
|
104
111
|
this.$emit('delete', i)
|
|
105
112
|
this.$emit('update:modelValue', a)
|
|
106
113
|
},
|
|
107
|
-
up(i) {
|
|
108
|
-
if (i === 0) {
|
|
109
|
-
return
|
|
110
|
-
}
|
|
111
|
-
let a = this.modelValue || []
|
|
112
|
-
a = this.array_move(a, i, i - 1)
|
|
113
|
-
this.$emit('update:modelValue', a)
|
|
114
|
-
},
|
|
115
|
-
down(i) {
|
|
116
|
-
if (i === this.modelValue.length - 1) {
|
|
117
|
-
return
|
|
118
|
-
}
|
|
119
|
-
let a = this.modelValue || []
|
|
120
|
-
a = this.array_move(a, i, i + 1)
|
|
121
|
-
this.$emit('update:modelValue', a)
|
|
122
|
-
},
|
|
123
|
-
array_move(arr, old_index, new_index) {
|
|
124
|
-
if (new_index >= arr.length) {
|
|
125
|
-
let k = new_index - arr.length + 1;
|
|
126
|
-
while (k--) {
|
|
127
|
-
arr.push(undefined);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
arr.splice(new_index, 0, arr.splice(old_index, 1)[0]);
|
|
131
|
-
return arr;
|
|
132
|
-
}
|
|
133
114
|
}
|
|
134
115
|
}
|
|
135
116
|
</script>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
:label="keyLabel||$t('key','renusify')"
|
|
30
30
|
:tile="tile"
|
|
31
31
|
class="w-30 pe-1"></r-text-input>
|
|
32
|
-
<div
|
|
32
|
+
<div v-if="!valueType" class="w-20">
|
|
33
33
|
<r-select-input v-model="info.type"
|
|
34
34
|
:items="['text','number','boolean','json','array']"
|
|
35
35
|
:tile="tile"
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
@update:model-value="info.value=null"></r-select-input>
|
|
42
42
|
</div>
|
|
43
43
|
<r-text-input v-if="info.type==='text'"
|
|
44
|
-
|
|
44
|
+
v-model="info.value"
|
|
45
45
|
:label="valueLabel||$t('value','renusify')"
|
|
46
|
-
|
|
46
|
+
:tile="tile"></r-text-input>
|
|
47
47
|
<r-number-input v-else-if="info.type==='number'"
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
v-model="info.value"
|
|
49
|
+
:label="valueLabel||$t('value','renusify')" :tile="tile"></r-number-input>
|
|
50
50
|
<r-switch-input v-else-if="info.type==='boolean'"
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
v-model="info.value"
|
|
52
|
+
:label="valueLabel||$t('value','renusify')" :tile="tile"></r-switch-input>
|
|
53
53
|
<r-btn :rounded="!c_tile" class="ms-1 color-success" @click.prevent="add">{{ $t('add', 'renusify') }}</r-btn>
|
|
54
54
|
</slot>
|
|
55
55
|
</div>
|
|
@@ -94,7 +94,7 @@ emits:['update:modelValue','change'],
|
|
|
94
94
|
height: 20px;
|
|
95
95
|
border-radius: 50%;
|
|
96
96
|
background-color: #cdcbcb;
|
|
97
|
-
transition: .3s map.get(base.$transition,'fast-in-fast-out');
|
|
97
|
+
transition: .3s map.get(base.$transition, 'fast-in-fast-out');
|
|
98
98
|
@include mixins.rtl() {
|
|
99
99
|
right: 0;
|
|
100
100
|
}
|
package/components/map/index.vue
CHANGED
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
{{ $t('clear', 'renusify') }}
|
|
14
14
|
</r-btn>
|
|
15
15
|
<notification v-for="item in list" :key="item.id"
|
|
16
|
-
:
|
|
16
|
+
:content="item.content"
|
|
17
17
|
:permanent="item.permanent"
|
|
18
|
+
:pos="left?'left':'right'"
|
|
18
19
|
:status="`color-${item.status}`"
|
|
19
|
-
:width="item.width"
|
|
20
20
|
:timeout="item.timeout"
|
|
21
|
-
:
|
|
22
|
-
@
|
|
23
|
-
@
|
|
21
|
+
:width="item.width"
|
|
22
|
+
@hide="hideChild(item.id,item.on_close)"
|
|
23
|
+
@click.prevent="handle(item.on_click)">
|
|
24
24
|
|
|
25
25
|
<slot :data="item">
|
|
26
26
|
{{ item }}
|
|
@@ -118,7 +118,7 @@ export default {
|
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
</script>
|
|
121
|
-
<style lang="scss"
|
|
121
|
+
<style lang="scss">
|
|
122
122
|
@use "sass:map";
|
|
123
123
|
@use "../../style/variables/base";
|
|
124
124
|
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
class="mb-5">
|
|
25
25
|
<template v-if="item['formInput']!==false">
|
|
26
26
|
|
|
27
|
-
<r-json-input v-if="item['type']==='file-uploader'" v-model="copyItem['d'][key]"
|
|
27
|
+
<r-json-input v-if="item['type']==='file-uploader'" v-model="copyItem['d'][key]"
|
|
28
|
+
:label="$t(key,'renusify')"
|
|
28
29
|
baseArray></r-json-input>
|
|
29
30
|
<component
|
|
30
31
|
:is="item['type']"
|
|
@@ -60,37 +61,44 @@
|
|
|
60
61
|
@a-search="(a_search=$event),(searching())"></manage-header>
|
|
61
62
|
<div v-if="card" class="d-flex overflow-x-auto">
|
|
62
63
|
<div class="d-flex">
|
|
63
|
-
<r-card v-for="(item,i) in table.data" :key="i" :class="{'br-lg':!$r.inputs.tile}"
|
|
64
|
+
<r-card v-for="(item,i) in table.data" :key="i" :class="{'br-lg':!$r.inputs.tile}"
|
|
65
|
+
class="pa-3 me-3"
|
|
64
66
|
style="width: 300px">
|
|
65
|
-
<div v-for="(h,j) in headerTable" :key="i+'-'+j"
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
67
|
+
<div v-for="(h,j) in headerTable" :key="i+'-'+j"
|
|
68
|
+
class="d-flex text-no-wrap overflow-x-auto">
|
|
69
|
+
<slot :editItem="editItem" :item="item" :value="h" :name="'td-'+h.value">
|
|
70
|
+
<slot :editItem="editItem" :item="item" :value="h" name="card">
|
|
71
|
+
<div v-if="h['option']['type']==='r-date-input' && item[h['value']]!==undefined"
|
|
72
|
+
class="py-2">
|
|
73
|
+
{{ h['text'] }}:
|
|
74
|
+
{{ $d(new Date(item[h['value']]), h['option']['format'] || 'short') }}
|
|
75
|
+
</div>
|
|
76
|
+
<div
|
|
77
|
+
v-else-if="h['option']['type']==='r-time-ago' && item[h['value']]!==undefined"
|
|
78
|
+
class="py-2">
|
|
79
|
+
{{ h['text'] }}:
|
|
80
|
+
<r-time-ago :time="item[h['value']]"></r-time-ago>
|
|
81
|
+
</div>
|
|
82
|
+
<div v-else-if="h['option']['type']==='r-switch-input'" class="d-flex py-2">
|
|
83
|
+
{{ h['text'] }}:
|
|
84
|
+
<r-switch-input
|
|
85
|
+
:modelValue="item[h['value']]"
|
|
86
|
+
:readonly="h['option']['formInput']===false"
|
|
87
|
+
class="mt-0"
|
|
88
|
+
@update:modelValue="h['option']['formInput']!==false?editItem(item,true,h['value']):''"
|
|
89
|
+
></r-switch-input>
|
|
90
|
+
</div>
|
|
91
|
+
<div v-else-if="h['option']['type'] === 'r-number-input'" class="py-2">
|
|
92
|
+
{{ h['text'] }}: {{ $n(item[h['value']]) }}
|
|
93
|
+
</div>
|
|
94
|
+
<div v-else-if="h['option']['type']!=='action'" class="py-2">
|
|
95
|
+
{{ h['text'] }}: {{
|
|
89
96
|
h['value'] in cast ?
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
97
|
+
$helper.ifHas(item, '', h['value'], cast[h['value']])
|
|
98
|
+
: item[h['value']]
|
|
99
|
+
}}
|
|
100
|
+
</div>
|
|
101
|
+
</slot>
|
|
94
102
|
</slot>
|
|
95
103
|
<div v-if="h['option']['type']==='action'" class="w-full text-end">
|
|
96
104
|
<r-divider class="mt-3"></r-divider>
|
|
@@ -102,7 +110,8 @@
|
|
|
102
110
|
icon text @click.prevent="deleteItem(item)">
|
|
103
111
|
<r-icon v-html="$r.icons.delete"></r-icon>
|
|
104
112
|
</r-btn>
|
|
105
|
-
<r-btn v-for="(val,index) in actions" :key="index" :class="`color-${val.color}-text`"
|
|
113
|
+
<r-btn v-for="(val,index) in actions" :key="index" :class="`color-${val.color}-text`"
|
|
114
|
+
class="mx-0" icon
|
|
106
115
|
text @click.prevent="$emit(val.name,item)">
|
|
107
116
|
<r-icon exact v-html="val.icon"></r-icon>
|
|
108
117
|
</r-btn>
|
|
@@ -111,7 +120,8 @@
|
|
|
111
120
|
</r-card>
|
|
112
121
|
</div>
|
|
113
122
|
</div>
|
|
114
|
-
<r-table v-else :headers="headerTable" :items="table.data" :key-item="itemId"
|
|
123
|
+
<r-table v-else :headers="headerTable" :items="table.data" :key-item="itemId"
|
|
124
|
+
:responsive="responsive"
|
|
115
125
|
transition="table-row">
|
|
116
126
|
<template v-slot:header="{header}">
|
|
117
127
|
<th v-for="(item,key) in header"
|
|
@@ -157,33 +167,37 @@
|
|
|
157
167
|
icon text @click.prevent="props.open(props.key)">
|
|
158
168
|
<r-icon v-html="props.opened!==props.key?$r.icons.plus:$r.icons.minus"></r-icon>
|
|
159
169
|
</r-btn>
|
|
160
|
-
<slot :editItem="editItem" :item="props.item" :value="value" name="
|
|
161
|
-
<
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
170
|
+
<slot :editItem="editItem" :item="props.item" :value="value" :name="'td-'+value.value">
|
|
171
|
+
<slot :editItem="editItem" :item="props.item" :value="value" name="cell">
|
|
172
|
+
<div
|
|
173
|
+
v-if="value['option']['type']==='r-date-input' && props.item[value['value']]!==undefined">
|
|
174
|
+
{{
|
|
175
|
+
$d(new Date(props.item[value['value']]), value['option']['format'] || 'short')
|
|
176
|
+
}}
|
|
177
|
+
</div>
|
|
178
|
+
<div
|
|
179
|
+
v-else-if="value['option']['type']==='r-time-ago' && props.item[value['value']]!==undefined">
|
|
180
|
+
<r-time-ago :time="props.item[value['value']]"></r-time-ago>
|
|
181
|
+
</div>
|
|
182
|
+
<div v-else-if="value['option']['type']==='r-switch-input'">
|
|
183
|
+
<r-switch-input
|
|
184
|
+
:modelValue="props.item[value['value']]"
|
|
185
|
+
:readonly="value['option']['formInput']===false"
|
|
186
|
+
class="mt-0"
|
|
187
|
+
@update:modelValue="value['option']['formInput']!==false?editItem(props.item,true,value['value']):''"
|
|
188
|
+
></r-switch-input>
|
|
189
|
+
</div>
|
|
190
|
+
<div v-else-if="value['option']['type'] === 'r-number-input'">
|
|
191
|
+
{{ $n(props.item[value['value']]) }}
|
|
192
|
+
</div>
|
|
193
|
+
<div v-else-if="value['option']['type']!=='action'">
|
|
194
|
+
{{
|
|
182
195
|
value['value'] in cast ?
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
196
|
+
$helper.ifHas(props.item, '', value['value'], cast[value['value']])
|
|
197
|
+
: props.item[value['value']]
|
|
198
|
+
}}
|
|
199
|
+
</div>
|
|
200
|
+
</slot>
|
|
187
201
|
</slot>
|
|
188
202
|
<div v-if="value['option']['type']==='action'">
|
|
189
203
|
<r-btn v-if="!disableUpdate" class="mx-0 color-success-text"
|
|
@@ -194,7 +208,8 @@
|
|
|
194
208
|
icon text @click.prevent="deleteItem(props.item)">
|
|
195
209
|
<r-icon v-html="$r.icons.delete"></r-icon>
|
|
196
210
|
</r-btn>
|
|
197
|
-
<r-btn v-for="(val,index) in actions" :key="index" :class="`color-${val.color}-text`"
|
|
211
|
+
<r-btn v-for="(val,index) in actions" :key="index" :class="`color-${val.color}-text`"
|
|
212
|
+
class="mx-0" icon
|
|
198
213
|
text @click.prevent="$emit(val.name,props.item)">
|
|
199
214
|
<r-icon exact v-html="val.icon"></r-icon>
|
|
200
215
|
</r-btn>
|
|
@@ -204,7 +219,8 @@
|
|
|
204
219
|
</template>
|
|
205
220
|
|
|
206
221
|
</r-table>
|
|
207
|
-
<manage-footer v-model:page="page" v-model:per-page="itemsPerPage"
|
|
222
|
+
<manage-footer v-model:page="page" v-model:per-page="itemsPerPage"
|
|
223
|
+
:total="table.total"></manage-footer>
|
|
208
224
|
<r-confirm
|
|
209
225
|
v-model="showConfirm"
|
|
210
226
|
hard
|
|
@@ -221,9 +237,9 @@ export default {
|
|
|
221
237
|
name: 'r-table-crud',
|
|
222
238
|
components: {
|
|
223
239
|
ManageHeader: defineAsyncComponent(() =>
|
|
224
|
-
import(
|
|
240
|
+
import('./header.vue')
|
|
225
241
|
), ManageFooter: defineAsyncComponent(() =>
|
|
226
|
-
import(
|
|
242
|
+
import('./footer.vue')
|
|
227
243
|
)
|
|
228
244
|
},
|
|
229
245
|
props: {
|
|
@@ -260,7 +276,7 @@ export default {
|
|
|
260
276
|
disableDelete: Boolean,
|
|
261
277
|
disableUpdate: Boolean,
|
|
262
278
|
mcud: String,
|
|
263
|
-
itemId: {type: String, default:
|
|
279
|
+
itemId: {type: String, default: '_id'},
|
|
264
280
|
headers: Object
|
|
265
281
|
},
|
|
266
282
|
emits: ['actions'],
|
|
@@ -532,9 +548,9 @@ export default {
|
|
|
532
548
|
let all = []
|
|
533
549
|
if (this.mcud) {
|
|
534
550
|
all.push({
|
|
535
|
-
option: {type:
|
|
536
|
-
text:
|
|
537
|
-
value:
|
|
551
|
+
option: {type: 'mcud', sortable: false, formInput: false, priority: 10},
|
|
552
|
+
text: 'action',
|
|
553
|
+
value: 'action'
|
|
538
554
|
})
|
|
539
555
|
}
|
|
540
556
|
all = all.concat(data.headers)
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
<slot :key="key" :item="item" :open="open" :opened="opened" :show="show" :th="th"
|
|
44
44
|
name="row">
|
|
45
45
|
<td v-for="(value,k) in th" :key="`${key}- ${k}`">
|
|
46
|
+
<slot :item="item" :value="value" :name="'td-'+value.value">
|
|
46
47
|
<div>
|
|
47
48
|
<r-btn v-if="show(k)"
|
|
48
49
|
icon text @click.prevent="open(key)">
|
|
@@ -51,6 +52,7 @@
|
|
|
51
52
|
</r-btn>
|
|
52
53
|
{{ item[value.value] }}
|
|
53
54
|
</div>
|
|
55
|
+
</slot>
|
|
54
56
|
</td>
|
|
55
57
|
</slot>
|
|
56
58
|
</tr>
|
|
@@ -72,6 +74,7 @@
|
|
|
72
74
|
</div>
|
|
73
75
|
<r-modal v-if="editable" v-model="showModal">
|
|
74
76
|
<div
|
|
77
|
+
:key="key"
|
|
75
78
|
v-sortable="{
|
|
76
79
|
items: cols,
|
|
77
80
|
end: store_db,
|
|
@@ -120,6 +123,7 @@ export default {
|
|
|
120
123
|
},
|
|
121
124
|
data() {
|
|
122
125
|
return {
|
|
126
|
+
key: 0,
|
|
123
127
|
showTable: true,
|
|
124
128
|
opened: null,
|
|
125
129
|
sortKey: null,
|
|
@@ -132,14 +136,6 @@ export default {
|
|
|
132
136
|
cols: []
|
|
133
137
|
}
|
|
134
138
|
},
|
|
135
|
-
created() {
|
|
136
|
-
if (!this.$r.icons.setting) {
|
|
137
|
-
this.$r.icons.setting = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path fill="currentColor" d="M19.14 12.94c.04-.3.06-.61.06-.94c0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 0 0 .12-.61l-1.92-3.32a.488.488 0 0 0-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 0 0-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 0 0-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6s3.6 1.62 3.6 3.6s-1.62 3.6-3.6 3.6z"/></svg>'
|
|
138
|
-
}
|
|
139
|
-
if (!this.$r.icons.drag) {
|
|
140
|
-
this.$r.icons.drag = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path fill="currentColor" d="M7 19v-2h2v2H7m4 0v-2h2v2h-2m4 0v-2h2v2h-2m-8-4v-2h2v2H7m4 0v-2h2v2h-2m4 0v-2h2v2h-2m-8-4V9h2v2H7m4 0V9h2v2h-2m4 0V9h2v2h-2M7 7V5h2v2H7m4 0V5h2v2h-2m4 0V5h2v2h-2Z"/></svg>'
|
|
141
|
-
}
|
|
142
|
-
},
|
|
143
139
|
watch: {
|
|
144
140
|
items: {
|
|
145
141
|
immediate: true,
|
|
@@ -225,6 +221,7 @@ export default {
|
|
|
225
221
|
},
|
|
226
222
|
store_db(data) {
|
|
227
223
|
this.$storage.set('table_' + this.hash_key, data)
|
|
224
|
+
this.key++
|
|
228
225
|
this.check_hidden()
|
|
229
226
|
if (this.responsive) {
|
|
230
227
|
this.build()
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<r-container
|
|
3
|
-
<r-row
|
|
4
|
-
<r-col
|
|
5
|
-
<slot
|
|
2
|
+
<r-container :class="`${$r.prefix}timeline`" full-width>
|
|
3
|
+
<r-row v-for="(item,i) in items" :key="i" class="timeline-item" no-gutters>
|
|
4
|
+
<r-col v-if="$r.breakpoint.mdAndUp" class="md-5">
|
|
5
|
+
<slot :item="item" :k="i" name="back"></slot>
|
|
6
6
|
</r-col>
|
|
7
7
|
<r-col class="col-2 md-2">
|
|
8
|
-
<slot
|
|
8
|
+
<slot :item="item" :k="i" name="counter">
|
|
9
9
|
<div class="d-flex h-center v-center h-full">
|
|
10
10
|
<div class="timeline-counter color-one d-flex h-center v-center">{{ i + 1 }}</div>
|
|
11
11
|
</div>
|
|
@@ -125,12 +125,12 @@ $distance: 20px;
|
|
|
125
125
|
height: 100%;
|
|
126
126
|
|
|
127
127
|
&.tree-searchable {
|
|
128
|
-
|
|
128
|
+
.#{base.$prefix}float {
|
|
129
129
|
height: calc(100% - 70px)
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
|
|
133
|
+
.#{base.$prefix}float {
|
|
134
134
|
direction: ltr;
|
|
135
135
|
}
|
|
136
136
|
|
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
opacity: 0 !important;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
& {
|
|
7
|
+
-webkit-text-fill-color: transparent !important;
|
|
8
|
+
background-color: rgba(0, 0, 0, 0.12) !important;
|
|
9
|
+
overflow: hidden !important;
|
|
10
|
+
position: relative !important;
|
|
11
|
+
}
|
|
12
|
+
;
|
|
11
13
|
|
|
12
14
|
&:after {
|
|
13
15
|
animation: skeletonloading 1.5s infinite;
|
|
@@ -43,9 +43,7 @@ function mousestart(e, wrapper) {
|
|
|
43
43
|
wrapper.el.insertBefore(holder, targetEl);
|
|
44
44
|
wrapper.holder = holder
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
targetEl.style.top = y - targetEl.clientHeight / 2 + "px";
|
|
46
|
+
targetEl.style.top = targetEl.offsetTop - targetEl.clientHeight / 2 + "px";
|
|
49
47
|
targetEl.style.width = targetEl.clientWidth + "px";
|
|
50
48
|
targetEl.classList.add("on-drag");
|
|
51
49
|
|