Merge branch 'main' of https://github.com/vbenjs/vue-vben-admin
This commit is contained in:
commit
7b5e2e71d8
@ -57,6 +57,7 @@ const tableData = [
|
||||
<ElCard class="mb-5">
|
||||
<template #header> 按钮 </template>
|
||||
<ElSpace>
|
||||
<ElButton text>Text</ElButton>
|
||||
<ElButton>Default</ElButton>
|
||||
<ElButton type="primary"> Primary </ElButton>
|
||||
<ElButton type="info"> Info </ElButton>
|
||||
|
@ -68,7 +68,7 @@ async function initComponentAdapter() {
|
||||
DatePicker: NDatePicker,
|
||||
// 自定义默认按钮
|
||||
DefaultButton: (props, { attrs, slots }) => {
|
||||
return h(NButton, { ...props, attrs, type: 'info' }, slots);
|
||||
return h(NButton, { ...props, attrs, type: 'default' }, slots);
|
||||
},
|
||||
// 自定义主要按钮
|
||||
PrimaryButton: (props, { attrs, slots }) => {
|
||||
|
@ -333,6 +333,8 @@ export interface ActionButtonOptions {
|
||||
show?: boolean;
|
||||
/** 按钮文本 */
|
||||
text?: string;
|
||||
/** 任意属性 */
|
||||
[key: string]: any;
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -60,8 +60,8 @@ function defineApplicationConfig(userConfigPromise?: DefineApplicationOptions) {
|
||||
rollupOptions: {
|
||||
output: {
|
||||
assetFileNames: '[ext]/[name]-[hash].[ext]',
|
||||
chunkFileNames: 'js/[name]-[hash].mjs',
|
||||
entryFileNames: 'jse/index-[name]-[hash].mjs',
|
||||
chunkFileNames: 'js/[name]-[hash].js',
|
||||
entryFileNames: 'jse/index-[name]-[hash].js',
|
||||
},
|
||||
},
|
||||
target: 'es2015',
|
||||
|
@ -58,7 +58,7 @@
|
||||
|
||||
/* Used for accents such as hover effects on <DropdownMenuItem>, <SelectItem>...etc */
|
||||
--accent: 216 5% 19%;
|
||||
--accent-lighter: 216 5% 11%;
|
||||
--accent-lighter: 216 5% 12%;
|
||||
--accent-hover: 216 5% 24%;
|
||||
--accent-foreground: 0 0% 98%;
|
||||
|
||||
|
@ -2,4 +2,6 @@ export { default as EmptyIcon } from './components/empty.vue';
|
||||
export * from './create-icon';
|
||||
|
||||
export * from './lucide';
|
||||
export * from '@iconify/vue';
|
||||
|
||||
export type { IconifyIcon as IconifyIconStructure } from '@iconify/vue';
|
||||
export { addCollection, addIcon, Icon as IconifyIcon } from '@iconify/vue';
|
||||
|
9
packages/@core/base/shared/src/color/color.ts
Normal file
9
packages/@core/base/shared/src/color/color.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import { TinyColor } from '@ctrl/tinycolor';
|
||||
|
||||
export function isDarkColor(color: string) {
|
||||
return new TinyColor(color).isDark();
|
||||
}
|
||||
|
||||
export function isLightColor(color: string) {
|
||||
return new TinyColor(color).isLight();
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
export * from './color';
|
||||
export * from './convert';
|
||||
export * from './generator';
|
||||
|
@ -289,6 +289,7 @@ export interface FormRenderProps<
|
||||
}
|
||||
|
||||
export interface ActionButtonOptions extends VbenButtonProps {
|
||||
[key: string]: any;
|
||||
content?: string;
|
||||
show?: boolean;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { type Component, computed } from 'vue';
|
||||
|
||||
import { Icon, IconDefault } from '@vben-core/icons';
|
||||
import { IconDefault, IconifyIcon } from '@vben-core/icons';
|
||||
import {
|
||||
isFunction,
|
||||
isHttpUrl,
|
||||
@ -28,6 +28,6 @@ const isComponent = computed(() => {
|
||||
<template>
|
||||
<component :is="icon as Component" v-if="isComponent" v-bind="$attrs" />
|
||||
<img v-else-if="isRemoteIcon" :src="icon as string" v-bind="$attrs" />
|
||||
<Icon v-else-if="icon" v-bind="$attrs" :icon="icon as string" />
|
||||
<IconifyIcon v-else-if="icon" v-bind="$attrs" :icon="icon as string" />
|
||||
<IconDefault v-else-if="fallback" v-bind="$attrs" />
|
||||
</template>
|
||||
|
@ -217,12 +217,13 @@ export function useElementPlusDesignTokens() {
|
||||
|
||||
'--el-color-info-light-8': border,
|
||||
'--el-color-info-light-9': getCssVariableValue('--info'), // getCssVariableValue('--secondary'),
|
||||
|
||||
'--el-color-primary': getCssVariableValue('--primary-500'),
|
||||
'--el-color-primary-dark-2': getCssVariableValue('--primary'),
|
||||
'--el-color-primary-light-3': getCssVariableValue('--primary-400'),
|
||||
'--el-color-primary-light-5': getCssVariableValue('--primary-300'),
|
||||
'--el-color-primary-light-7': getCssVariableValue('--primary-200'),
|
||||
'--el-color-primary-light-7': isDark.value
|
||||
? border
|
||||
: getCssVariableValue('--primary-200'),
|
||||
'--el-color-primary-light-8': isDark.value
|
||||
? border
|
||||
: getCssVariableValue('--primary-100'),
|
||||
@ -268,6 +269,7 @@ export function useElementPlusDesignTokens() {
|
||||
|
||||
'--el-text-color-regular': getCssVariableValue('--foreground'),
|
||||
};
|
||||
|
||||
updateCSSVariables(variables, `__vben_design_styles__`);
|
||||
},
|
||||
{ immediate: true },
|
||||
|
@ -1,2 +1,2 @@
|
||||
export * from './iconify/index';
|
||||
export * from './svg/index';
|
||||
export * from './iconify/index.js';
|
||||
export * from './svg/index.js';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { createIconifyIcon } from '@vben-core/icons';
|
||||
|
||||
import './load';
|
||||
import './load.js';
|
||||
|
||||
const SvgAvatar1Icon = createIconifyIcon('svg:avatar-1');
|
||||
const SvgAvatar2Icon = createIconifyIcon('svg:avatar-2');
|
||||
|
@ -1,4 +1,6 @@
|
||||
import { addIcon, type IconifyIcon } from '@vben-core/icons';
|
||||
import type { IconifyIconStructure } from '@vben-core/icons';
|
||||
|
||||
import { addIcon } from '@vben-core/icons';
|
||||
|
||||
let loaded = false;
|
||||
if (!loaded) {
|
||||
@ -6,7 +8,7 @@ if (!loaded) {
|
||||
loaded = true;
|
||||
}
|
||||
|
||||
function parseSvg(svgData: string): IconifyIcon {
|
||||
function parseSvg(svgData: string): IconifyIconStructure {
|
||||
const parser = new DOMParser();
|
||||
const xmlDoc = parser.parseFromString(svgData, 'image/svg+xml');
|
||||
const svgElement = xmlDoc.documentElement;
|
||||
|
@ -22,7 +22,7 @@ catalog:
|
||||
'@ctrl/tinycolor': ^4.1.0
|
||||
'@eslint/js': ^9.13.0
|
||||
'@faker-js/faker': ^9.0.3
|
||||
'@iconify/json': ^2.2.261
|
||||
'@iconify/json': ^2.2.262
|
||||
'@iconify/tailwind': ^1.1.3
|
||||
'@iconify/vue': ^4.1.2
|
||||
'@intlify/core-base': ^10.0.4
|
||||
@ -36,7 +36,7 @@ catalog:
|
||||
'@tailwindcss/nesting': 0.0.0-insiders.565cd3e
|
||||
'@tailwindcss/typography': ^0.5.15
|
||||
'@tanstack/vue-query': ^5.59.13
|
||||
'@tanstack/vue-store': ^0.5.5
|
||||
'@tanstack/vue-store': ^0.5.6
|
||||
'@types/archiver': ^6.0.2
|
||||
'@types/chalk': ^2.2.0
|
||||
'@types/eslint': ^9.6.1
|
||||
@ -84,7 +84,7 @@ catalog:
|
||||
echarts: ^5.5.1
|
||||
element-plus: ^2.8.6
|
||||
eslint: ^9.13.0
|
||||
eslint-config-turbo: ^2.2.0
|
||||
eslint-config-turbo: ^2.2.1
|
||||
eslint-plugin-command: ^0.2.6
|
||||
eslint-plugin-eslint-comments: ^3.2.0
|
||||
eslint-plugin-import-x: ^4.3.1
|
||||
@ -98,7 +98,7 @@ catalog:
|
||||
eslint-plugin-unicorn: ^56.0.0
|
||||
eslint-plugin-unused-imports: ^4.1.4
|
||||
eslint-plugin-vitest: ^0.5.4
|
||||
eslint-plugin-vue: ^9.29.0
|
||||
eslint-plugin-vue: ^9.29.1
|
||||
execa: ^9.4.1
|
||||
find-up: ^7.0.0
|
||||
get-port: ^7.1.0
|
||||
@ -153,7 +153,7 @@ catalog:
|
||||
tailwindcss: ^3.4.14
|
||||
tailwindcss-animate: ^1.0.7
|
||||
theme-colors: ^0.1.0
|
||||
turbo: ^2.2.0
|
||||
turbo: ^2.2.1
|
||||
typescript: ^5.6.3
|
||||
unbuild: ^2.0.0
|
||||
unplugin-element-plus: ^0.8.0
|
||||
@ -174,8 +174,8 @@ catalog:
|
||||
vue-i18n: ^10.0.4
|
||||
vue-router: ^4.4.5
|
||||
vue-tsc: ^2.1.6
|
||||
vxe-pc-ui: ^4.2.24
|
||||
vxe-table: ^4.7.86
|
||||
vxe-pc-ui: ^4.2.26
|
||||
vxe-table: ^4.7.93
|
||||
watermark-js-plus: ^1.5.7
|
||||
zod: ^3.23.8
|
||||
zod-defaults: ^0.1.3
|
||||
|
Loading…
Reference in New Issue
Block a user