mirror of
https://github.com/certd/certd.git
synced 2026-05-17 05:37:30 +08:00
chore: code format
This commit is contained in:
@@ -10,6 +10,6 @@ export function useAppConfig(env: Record<string, any>, isProduction: boolean): A
|
||||
const { VITE_GLOB_API_URL } = config;
|
||||
|
||||
return {
|
||||
apiURL: VITE_GLOB_API_URL
|
||||
apiURL: VITE_GLOB_API_URL,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -10,15 +10,15 @@ export function useContentMaximize() {
|
||||
|
||||
updatePreferences({
|
||||
header: {
|
||||
hidden: !isMaximize
|
||||
hidden: !isMaximize,
|
||||
},
|
||||
sidebar: {
|
||||
hidden: !isMaximize
|
||||
}
|
||||
hidden: !isMaximize,
|
||||
},
|
||||
});
|
||||
}
|
||||
return {
|
||||
contentIsMaximize,
|
||||
toggleMaximize
|
||||
toggleMaximize,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ export function useAntdDesignTokens() {
|
||||
colorSuccess: "",
|
||||
colorTextBase: "",
|
||||
colorWarning: "",
|
||||
zIndexPopupBase: 2000 // 调整基础弹层层级,避免下拉等组件被弹窗或者最大化状态下的表格遮挡
|
||||
zIndexPopupBase: 2000, // 调整基础弹层层级,避免下拉等组件被弹窗或者最大化状态下的表格遮挡
|
||||
});
|
||||
|
||||
const getCssVariableValue = (variable: string, isColor: boolean = true) => {
|
||||
@@ -69,7 +69,7 @@ export function useAntdDesignTokens() {
|
||||
);
|
||||
|
||||
return {
|
||||
tokens
|
||||
tokens,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ export function useNaiveDesignTokens() {
|
||||
warningColor: "",
|
||||
warningColorHover: "",
|
||||
warningColorPressed: "",
|
||||
warningColorSuppl: ""
|
||||
warningColorSuppl: "",
|
||||
});
|
||||
|
||||
const getCssVariableValue = (variable: string, isColor: boolean = true) => {
|
||||
@@ -152,7 +152,7 @@ export function useNaiveDesignTokens() {
|
||||
{ immediate: true }
|
||||
);
|
||||
return {
|
||||
commonTokens
|
||||
commonTokens,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ export function useElementPlusDesignTokens() {
|
||||
|
||||
"--el-text-color-primary": getCssVariableValue("--foreground"),
|
||||
|
||||
"--el-text-color-regular": getCssVariableValue("--foreground")
|
||||
"--el-text-color-regular": getCssVariableValue("--foreground"),
|
||||
};
|
||||
|
||||
updateCSSVariables(variables, `__vben_design_styles__`);
|
||||
|
||||
@@ -19,7 +19,7 @@ export function useHoverToggle(refElement: Arrayable<MaybeElementRef>, delay: ((
|
||||
const value = ref(false);
|
||||
const timer = ref<ReturnType<typeof setTimeout> | undefined>();
|
||||
const refs = Array.isArray(refElement) ? refElement : [refElement];
|
||||
refs.forEach((refEle) => {
|
||||
refs.forEach(refEle => {
|
||||
const eleRef = computed(() => {
|
||||
const ele = unref(refEle);
|
||||
return ele instanceof Element ? ele : (ele?.$el as Element);
|
||||
@@ -27,7 +27,7 @@ export function useHoverToggle(refElement: Arrayable<MaybeElementRef>, delay: ((
|
||||
const isHover = useElementHover(eleRef);
|
||||
isHovers.push(isHover);
|
||||
});
|
||||
const isOutsideAll = computed(() => isHovers.every((v) => !v.value));
|
||||
const isOutsideAll = computed(() => isHovers.every(v => !v.value));
|
||||
|
||||
function setValueDelay(val: boolean) {
|
||||
timer.value && clearTimeout(timer.value);
|
||||
@@ -42,7 +42,7 @@ export function useHoverToggle(refElement: Arrayable<MaybeElementRef>, delay: ((
|
||||
|
||||
const watcher = watch(
|
||||
isOutsideAll,
|
||||
(val) => {
|
||||
val => {
|
||||
setValueDelay(!val);
|
||||
},
|
||||
{ immediate: true }
|
||||
@@ -54,7 +54,7 @@ export function useHoverToggle(refElement: Arrayable<MaybeElementRef>, delay: ((
|
||||
},
|
||||
disable() {
|
||||
watcher.pause();
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
onUnmounted(() => {
|
||||
|
||||
@@ -11,6 +11,6 @@ export function useRefresh() {
|
||||
}
|
||||
|
||||
return {
|
||||
refresh
|
||||
refresh,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ export function useTabs() {
|
||||
disabledCloseLeft,
|
||||
disabledCloseOther,
|
||||
disabledCloseRight,
|
||||
disabledRefresh: !isCurrentTab
|
||||
disabledRefresh: !isCurrentTab,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -108,6 +108,6 @@ export function useTabs() {
|
||||
resetTabTitle,
|
||||
setTabTitle,
|
||||
toggleTabPin,
|
||||
unpinTab
|
||||
unpinTab,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -11,14 +11,14 @@ const cachedOptions = ref<Partial<WatermarkOptions>>({
|
||||
colorStops: [
|
||||
{
|
||||
color: "gray",
|
||||
offset: 0
|
||||
offset: 0,
|
||||
},
|
||||
{
|
||||
color: "gray",
|
||||
offset: 1
|
||||
}
|
||||
offset: 1,
|
||||
},
|
||||
],
|
||||
type: "linear"
|
||||
type: "linear",
|
||||
},
|
||||
// fontSize: '20px',
|
||||
content: "",
|
||||
@@ -29,14 +29,14 @@ const cachedOptions = ref<Partial<WatermarkOptions>>({
|
||||
gap: [20, 20],
|
||||
matrix: [
|
||||
[1, 0],
|
||||
[0, 1]
|
||||
[0, 1],
|
||||
],
|
||||
rows: 2
|
||||
rows: 2,
|
||||
},
|
||||
height: 200,
|
||||
layout: "grid",
|
||||
rotate: 30,
|
||||
width: 160
|
||||
width: 160,
|
||||
});
|
||||
|
||||
export function useWatermark() {
|
||||
@@ -45,7 +45,7 @@ export function useWatermark() {
|
||||
|
||||
cachedOptions.value = {
|
||||
...cachedOptions.value,
|
||||
...options
|
||||
...options,
|
||||
};
|
||||
watermark.value = new Watermark(cachedOptions.value);
|
||||
updatePreferences({ app: { watermark: true } });
|
||||
@@ -57,7 +57,7 @@ export function useWatermark() {
|
||||
await nextTick();
|
||||
await watermark.value?.changeOptions({
|
||||
...cachedOptions.value,
|
||||
...options
|
||||
...options,
|
||||
});
|
||||
} else {
|
||||
await initWatermark(options);
|
||||
@@ -83,6 +83,6 @@ export function useWatermark() {
|
||||
return {
|
||||
destroyWatermark,
|
||||
updateWatermark,
|
||||
watermark: readonly(watermark)
|
||||
watermark: readonly(watermark),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user