mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Theming API: Implement layer order
This commit is contained in:
parent
926b085060
commit
592a8ed0c4
6 changed files with 40 additions and 13 deletions
|
@ -19,7 +19,7 @@ export function useStyle(css, options = {}) {
|
|||
const styleRef = ref(null);
|
||||
|
||||
const defaultDocument = DomHandler.isClient() ? window.document : undefined;
|
||||
const { document = defaultDocument, immediate = true, manual = false, name = `style_${++_id}`, id = undefined, media = undefined, nonce = undefined, props = {} } = options;
|
||||
const { document = defaultDocument, immediate = true, manual = false, name = `style_${++_id}`, id = undefined, media = undefined, nonce = undefined, first = false, props = {} } = options;
|
||||
|
||||
let stop = () => {};
|
||||
|
||||
|
@ -41,7 +41,7 @@ export function useStyle(css, options = {}) {
|
|||
media,
|
||||
nonce: _nonce
|
||||
});
|
||||
document.head.appendChild(styleRef.value);
|
||||
first ? document.head.prepend(styleRef.value) : document.head.appendChild(styleRef.value);
|
||||
DomHandler.setAttribute(styleRef.value, 'data-primevue-style-id', name);
|
||||
DomHandler.setAttributes(styleRef.value, _styleProps);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue