@mythpe/quasar-ui-qui 0.2.48 → 0.2.49
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
|
@@ -195,12 +195,14 @@ export const useMyth = () => {
|
|
|
195
195
|
if (!item.align) {
|
|
196
196
|
item.align = 'right'
|
|
197
197
|
}
|
|
198
|
-
opts.classes = opts.classes || ''
|
|
198
|
+
// opts.classes = opts.classes || ''
|
|
199
199
|
if (typeof opts.classes === 'function') {
|
|
200
|
-
|
|
200
|
+
const callback = opts.classes
|
|
201
|
+
opts.classes = (item) => (callback(item) || '') + ' m--control-cell'
|
|
202
|
+
} else if (typeof opts.classes === 'string') {
|
|
203
|
+
opts.classes += ' m--control-cell'
|
|
204
|
+
opts.classes = opts.classes.trim()
|
|
201
205
|
}
|
|
202
|
-
opts.classes += ' m--control-cell'
|
|
203
|
-
opts.classes = opts.classes.trim()
|
|
204
206
|
}
|
|
205
207
|
|
|
206
208
|
item = { ...opts, ...item }
|
|
@@ -161,13 +161,13 @@ export type MDatatableScope = {
|
|
|
161
161
|
closeImageDialog: () => void;
|
|
162
162
|
}
|
|
163
163
|
type E = MDatatableDialogsOptions['item'];
|
|
164
|
-
export type GenericMDtBtn
|
|
164
|
+
export type GenericMDtBtn = Record<string, any> & {
|
|
165
165
|
name: string;
|
|
166
166
|
label?: string;
|
|
167
167
|
contextLabel?: string | null;
|
|
168
168
|
tooltip?: string;
|
|
169
|
-
click?: (item: UnwrapRef<
|
|
170
|
-
multiClick?: (items:
|
|
169
|
+
click?: <V extends E = E>(item: UnwrapRef<V> | Ref<V> | V, index: UnwrapRef<MDatatableDialogsOptions['index']>) => void;
|
|
170
|
+
multiClick?: <V extends E = E>(items: V[]) => void;
|
|
171
171
|
showIf?: boolean | ((item: UnwrapRef<MDatatableDialogsOptions['item']>, index: UnwrapRef<MDatatableDialogsOptions['index']>) => boolean);
|
|
172
172
|
order?: number;
|
|
173
173
|
attr?: Partial<MDtBtnProps> & Partial<{ icon?: string; textColor?: NamedColor | undefined; color?: NamedColor | undefined; }>;
|
package/src/types/m-helpers.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export type ParseHeaderOptions = {
|
|
|
15
15
|
controlStyle?: 'max-width: 150px' | string
|
|
16
16
|
align?: 'left' | 'right' | 'center' | undefined
|
|
17
17
|
sortable?: boolean | undefined;
|
|
18
|
-
classes?: string | (() => string),
|
|
18
|
+
classes?: string | (() => string) | (<T>(item: T) => string),
|
|
19
19
|
noSort?: string[]
|
|
20
20
|
}
|
|
21
21
|
|