@antdv-next/icons 1.1.0 → 1.1.1
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.
|
@@ -8,6 +8,11 @@ interface IconContextProps {
|
|
|
8
8
|
nonce?: string;
|
|
9
9
|
};
|
|
10
10
|
layer?: string;
|
|
11
|
+
/**
|
|
12
|
+
* When enabled, skip runtime icon style injection (the reset/spin CSS is
|
|
13
|
+
* expected to be extracted statically). Aligns with `@ant-design/icons`.
|
|
14
|
+
*/
|
|
15
|
+
zeroRuntime?: boolean;
|
|
11
16
|
}
|
|
12
17
|
declare const IconContextProvider: vue.DefineSetupFnComponent<IconContextProps, {}, {}, IconContextProps & {}, vue.PublicProps>;
|
|
13
18
|
//#endregion
|
package/dist/utils.js
CHANGED
|
@@ -94,7 +94,8 @@ function useInsertStyles(eleRef) {
|
|
|
94
94
|
let mergedStyleStr = iconStyles;
|
|
95
95
|
onMounted(async () => {
|
|
96
96
|
await nextTick();
|
|
97
|
-
const { prefixCls, csp, layer } = iconContext.value;
|
|
97
|
+
const { prefixCls, csp, layer, zeroRuntime } = iconContext.value;
|
|
98
|
+
if (zeroRuntime) return;
|
|
98
99
|
if (prefixCls) mergedStyleStr = mergedStyleStr.replace(/anticon/g, prefixCls);
|
|
99
100
|
if (layer) mergedStyleStr = `@layer ${layer} {\n${mergedStyleStr}\n}`;
|
|
100
101
|
const ele = eleRef.value;
|