frappe-ui 0.0.104 → 0.0.106
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/package.json
CHANGED
package/src/components/Alert.vue
CHANGED
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
<h3 class="text-lg font-medium text-gray-900" v-if="title">
|
|
25
25
|
{{ title }}
|
|
26
26
|
</h3>
|
|
27
|
-
<div class="mt-1 md:
|
|
27
|
+
<div class="mt-1 md:ml-2 md:mt-0">
|
|
28
28
|
<slot></slot>
|
|
29
29
|
</div>
|
|
30
|
-
<div class="mt-3 md:
|
|
30
|
+
<div class="mt-3 md:ml-auto md:mt-0">
|
|
31
31
|
<slot name="actions"></slot>
|
|
32
32
|
</div>
|
|
33
33
|
</div>
|
package/src/components/Input.vue
CHANGED
|
@@ -54,7 +54,7 @@ export default {
|
|
|
54
54
|
default: null,
|
|
55
55
|
},
|
|
56
56
|
placeholder: {
|
|
57
|
-
type: String,
|
|
57
|
+
type: [String, Function],
|
|
58
58
|
default: '',
|
|
59
59
|
},
|
|
60
60
|
editorClass: {
|
|
@@ -152,9 +152,10 @@ export default {
|
|
|
152
152
|
}),
|
|
153
153
|
Placeholder.configure({
|
|
154
154
|
showOnlyWhenEditable: false,
|
|
155
|
-
placeholder:
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
placeholder:
|
|
156
|
+
typeof this.placeholder === 'function'
|
|
157
|
+
? this.placeholder
|
|
158
|
+
: () => this.placeholder,
|
|
158
159
|
}),
|
|
159
160
|
configureMention(this.mentions),
|
|
160
161
|
...(this.extensions || []),
|
|
@@ -33,6 +33,8 @@ export function createListResource(options, vm) {
|
|
|
33
33
|
debug: options.debug || 0,
|
|
34
34
|
originalData: null,
|
|
35
35
|
data: null,
|
|
36
|
+
previous,
|
|
37
|
+
hasPreviousPage: false,
|
|
36
38
|
next,
|
|
37
39
|
hasNextPage: true,
|
|
38
40
|
auto: options.auto,
|
|
@@ -55,6 +57,7 @@ export function createListResource(options, vm) {
|
|
|
55
57
|
}
|
|
56
58
|
},
|
|
57
59
|
onSuccess(data) {
|
|
60
|
+
out.hasPreviousPage = !!out.start
|
|
58
61
|
if (data.length < out.pageLength) {
|
|
59
62
|
out.hasNextPage = false
|
|
60
63
|
}
|
|
@@ -221,6 +224,11 @@ export function createListResource(options, vm) {
|
|
|
221
224
|
out.data = transform(data)
|
|
222
225
|
}
|
|
223
226
|
|
|
227
|
+
function previous() {
|
|
228
|
+
out.start = out.start - out.pageLength
|
|
229
|
+
out.list.fetch()
|
|
230
|
+
}
|
|
231
|
+
|
|
224
232
|
function next() {
|
|
225
233
|
out.start = out.start + out.pageLength
|
|
226
234
|
out.list.fetch()
|