base-vue支持组件库支持前缀类名
This commit is contained in:
1 parent
8f4c696bdd
commit
8bd73b3786
18 files changed
+266
-152
No files matched your search
@@ -10,7 +10,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@ao/ao-design": "workspace:*",
|
||||
"@iconify/vue": "^5.0.0",
|
||||
"@iconify/vue": "5.0.0",
|
||||
"vue": "^3.5.18"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"version": "1.0.0",
|
||||
"exports": {
|
||||
".": "./src/index.ts",
|
||||
"./styles": "./src/_styles/index.scss"
|
||||
"./index.scss": "./src/index.scss"
|
||||
},
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
@@ -11,7 +11,7 @@
|
||||
}
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@iconify/vue": "^2.1.0",
|
||||
"@iconify/vue": "5.0.0",
|
||||
"vue": "^3.3.0"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
import type { InjectionKey } from 'vue'
|
||||
|
||||
export interface ConfigProviderContext {
|
||||
prefixCls: string
|
||||
}
|
||||
|
||||
export const configProviderInjectionKey: InjectionKey<ConfigProviderContext>
|
||||
= Symbol('ConfigProvider')
|
||||
@@ -0,0 +1,26 @@
|
||||
import { defineComponent, getCurrentInstance, provide, reactive, toRefs } from 'vue'
|
||||
import { configProviderInjectionKey } from './context'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'ConfigProvider',
|
||||
props: {
|
||||
prefixCls: { type: String, default: 'ao' },
|
||||
global: { type: Boolean, default: false },
|
||||
},
|
||||
setup(props, { slots }) {
|
||||
const { prefixCls } = toRefs(props)
|
||||
const config = reactive({ prefixCls: prefixCls.value })
|
||||
|
||||
if (props.global) {
|
||||
const instance = getCurrentInstance()
|
||||
if (instance) {
|
||||
instance.appContext.app.provide(configProviderInjectionKey, config)
|
||||
}
|
||||
}
|
||||
else {
|
||||
provide(configProviderInjectionKey, config)
|
||||
}
|
||||
|
||||
return () => slots.default?.()
|
||||
},
|
||||
})
|
||||
@@ -1,4 +0,0 @@
|
||||
@import './theme';
|
||||
@import '../button/index.scss';
|
||||
|
||||
@prefix: 'my-prefix';
|
||||
@@ -1,8 +0,0 @@
|
||||
/* 主题色 */
|
||||
$primary-color: #007bff;
|
||||
$secondary-color: #6c757d;
|
||||
$success-color: #28a745;
|
||||
$warning-color: #ffc107;
|
||||
$danger-color: #dc3545;
|
||||
$light-color: #f8f9fa;
|
||||
$dark-color: #343a40;
|
||||
@@ -0,0 +1,17 @@
|
||||
$prefix: 'ao' !default;
|
||||
|
||||
// 主色系
|
||||
$primary-color: #1677ff !default;
|
||||
$primary-hover-color: #0958d9 !default;
|
||||
|
||||
// 功能色
|
||||
$success-color: #52c41a !default;
|
||||
$danger-color: #ff4d4f !default;
|
||||
$warning-color: #faad14 !default;
|
||||
$info-color: #13c2c2 !default;
|
||||
|
||||
// 中性色
|
||||
$background-color: #f5f7fa !default;
|
||||
$border-color: #d9d9d9 !default;
|
||||
$text-color: #000000de !default;
|
||||
$text-secondary-color: #595959 !default;
|
||||
@@ -0,0 +1,14 @@
|
||||
import type { ConfigProviderContext } from '../_config/context'
|
||||
import { inject } from 'vue'
|
||||
import { configProviderInjectionKey } from '../_config/context'
|
||||
|
||||
const DEFAULT_PREFIX = 'ao'
|
||||
|
||||
export function getPrefixCls(componentName?: string): string {
|
||||
const configProvider: ConfigProviderContext | undefined
|
||||
= inject(configProviderInjectionKey, undefined)
|
||||
|
||||
const prefix = configProvider?.prefixCls ?? DEFAULT_PREFIX
|
||||
|
||||
return componentName ? `${prefix}-${componentName}` : prefix
|
||||
}
|
||||
@@ -1,95 +1,29 @@
|
||||
/* 基本按钮样式 */
|
||||
.btn {
|
||||
height: 40px; /* 增大按钮高度 */
|
||||
padding: 0 24px; /* 左右内边距增加 */
|
||||
font-size: 14px;
|
||||
font-weight: 500; /* 加粗字体 */
|
||||
border-radius: 6px; /* 增大圆角 */
|
||||
@import '../_styles/theme/index.scss';
|
||||
|
||||
// 按钮基础样式示例
|
||||
.#{$prefix}-btn {
|
||||
padding: 6px 16px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid transparent;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease; /* 平滑过渡效果 */
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 默认阴影效果 */
|
||||
}
|
||||
|
||||
/* 主色按钮 */
|
||||
.btn-primary {
|
||||
background: $primary-color; /* 使用主题色 */
|
||||
color: #fff;
|
||||
border: 1px solid $primary-color; /* 与背景颜色一致的边框 */
|
||||
}
|
||||
&-default {
|
||||
background: #fff;
|
||||
border-color: $border-color;
|
||||
color: $text-secondary-color;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background: darken($primary-color, 10%); /* 悬停效果 */
|
||||
border-color: darken($primary-color, 10%);
|
||||
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); /* 悬停时阴影加重 */
|
||||
}
|
||||
&-primary {
|
||||
background: $primary-color;
|
||||
color: #fff;
|
||||
|
||||
/* 辅助色按钮 */
|
||||
.btn-secondary {
|
||||
background: $secondary-color; /* 使用辅助色 */
|
||||
color: #fff;
|
||||
border: 1px solid $secondary-color; /* 边框颜色 */
|
||||
}
|
||||
&:hover {
|
||||
background: $primary-hover-color;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-secondary:hover {
|
||||
background: darken($secondary-color, 10%);
|
||||
border-color: darken($secondary-color, 10%);
|
||||
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1); /* 悬停时阴影加重 */
|
||||
}
|
||||
|
||||
/* 成功色按钮 */
|
||||
.btn-success {
|
||||
background: $success-color; /* 成功色 */
|
||||
color: #fff;
|
||||
border: 1px solid $success-color; /* 边框颜色 */
|
||||
}
|
||||
|
||||
.btn-success:hover {
|
||||
background: darken($success-color, 10%);
|
||||
border-color: darken($success-color, 10%);
|
||||
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1); /* 悬停时阴影加重 */
|
||||
}
|
||||
|
||||
/* 警告色按钮 */
|
||||
.btn-warning {
|
||||
background: $warning-color; /* 警告色 */
|
||||
color: #fff;
|
||||
border: 1px solid $warning-color; /* 边框颜色 */
|
||||
}
|
||||
|
||||
.btn-warning:hover {
|
||||
background: darken($warning-color, 10%);
|
||||
border-color: darken($warning-color, 10%);
|
||||
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1); /* 悬停时阴影加重 */
|
||||
}
|
||||
|
||||
/* 危险色按钮 */
|
||||
.btn-danger {
|
||||
background: $danger-color; /* 危险色 */
|
||||
color: #fff;
|
||||
border: 1px solid $danger-color; /* 边框颜色 */
|
||||
}
|
||||
|
||||
.btn-danger:hover {
|
||||
background: darken($danger-color, 10%);
|
||||
border-color: darken($danger-color, 10%);
|
||||
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1); /* 悬停时阴影加重 */
|
||||
}
|
||||
|
||||
/* 链接按钮 */
|
||||
.btn-link {
|
||||
background: transparent;
|
||||
color: $primary-color;
|
||||
padding: 0 16px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
border: none;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.btn-link:hover {
|
||||
text-decoration: underline;
|
||||
&-danger {
|
||||
background: $danger-color;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
@@ -1,26 +1,14 @@
|
||||
import type { PropType } from 'vue'
|
||||
import { defineComponent } from 'vue'
|
||||
import { computed, defineComponent } from 'vue'
|
||||
import { getPrefixCls } from '../_utils/getPrefixCls'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'Button',
|
||||
name: 'AButton',
|
||||
props: {
|
||||
type: {
|
||||
type: String as PropType<'primary' | 'secondary' | 'danger' | 'link'>,
|
||||
default: 'primary',
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
type: { type: String as () => 'primary' | 'danger' | 'default', default: 'default' },
|
||||
},
|
||||
setup(props, { slots }) {
|
||||
const baseClass = 'btn'
|
||||
const typeClass = `btn-${props.type}`
|
||||
|
||||
return () => (
|
||||
<button class={`${baseClass} ${typeClass}`} disabled={props.disabled}>
|
||||
{slots.default?.()}
|
||||
</button>
|
||||
)
|
||||
const prefixCls = getPrefixCls('btn')
|
||||
const cls = computed(() => [prefixCls, `${prefixCls}-${props.type}`])
|
||||
return () => <button class={cls.value}>{slots.default?.()}</button>
|
||||
},
|
||||
})
|
||||
@@ -1,3 +1,4 @@
|
||||
export { default as ConfigProvider } from './_config'
|
||||
export { default as Button } from './button'
|
||||
export { default as Icon } from './icon'
|
||||
export { default as Input } from './input'
|
||||
@@ -0,0 +1 @@
|
||||
@import './button/index.scss';
|
||||
+152
-26
@@ -12,7 +12,7 @@ importers:
|
||||
specifier: workspace:*
|
||||
version: link:packages/ao-design
|
||||
'@iconify/vue':
|
||||
specifier: ^5.0.0
|
||||
specifier: 5.0.0
|
||||
version: 5.0.0(vue@3.5.19(typescript@5.8.3))
|
||||
vue:
|
||||
specifier: ^3.5.18
|
||||
@@ -26,10 +26,10 @@ importers:
|
||||
version: 24.3.0
|
||||
'@vitejs/plugin-vue':
|
||||
specifier: ^6.0.1
|
||||
version: 6.0.1(vite@7.1.3(@types/node@24.3.0)(sass@1.90.0)(tsx@4.20.5)(yaml@2.8.1))(vue@3.5.19(typescript@5.8.3))
|
||||
version: 6.0.1(vite@7.1.3(@types/node@24.3.0)(less@4.4.1)(sass@1.90.0)(tsx@4.20.5)(yaml@2.8.1))(vue@3.5.19(typescript@5.8.3))
|
||||
'@vitejs/plugin-vue-jsx':
|
||||
specifier: ^5.1.1
|
||||
version: 5.1.1(vite@7.1.3(@types/node@24.3.0)(sass@1.90.0)(tsx@4.20.5)(yaml@2.8.1))(vue@3.5.19(typescript@5.8.3))
|
||||
version: 5.1.1(vite@7.1.3(@types/node@24.3.0)(less@4.4.1)(sass@1.90.0)(tsx@4.20.5)(yaml@2.8.1))(vue@3.5.19(typescript@5.8.3))
|
||||
'@vue/tsconfig':
|
||||
specifier: ^0.7.0
|
||||
version: 0.7.0(typescript@5.8.3)(vue@3.5.19(typescript@5.8.3))
|
||||
@@ -56,13 +56,20 @@ importers:
|
||||
version: 29.0.0(@babel/parser@7.28.3)(vue@3.5.19(typescript@5.8.3))
|
||||
vite:
|
||||
specifier: ^7.1.2
|
||||
version: 7.1.3(@types/node@24.3.0)(sass@1.90.0)(tsx@4.20.5)(yaml@2.8.1)
|
||||
version: 7.1.3(@types/node@24.3.0)(less@4.4.1)(sass@1.90.0)(tsx@4.20.5)(yaml@2.8.1)
|
||||
vue-tsc:
|
||||
specifier: ^3.0.5
|
||||
version: 3.0.6(typescript@5.8.3)
|
||||
|
||||
packages/ao-design:
|
||||
dependencies:
|
||||
'@iconify/vue':
|
||||
specifier: 5.0.0
|
||||
version: 5.0.0(vue@3.5.19(typescript@5.8.3))
|
||||
devDependencies:
|
||||
sass:
|
||||
specifier: ^1.90.0
|
||||
version: 1.90.0
|
||||
typescript:
|
||||
specifier: ^5.1.6
|
||||
version: 5.8.3
|
||||
@@ -572,42 +579,36 @@ packages:
|
||||
engines: {node: '>= 10.0.0'}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@parcel/watcher-linux-arm-musl@2.5.1':
|
||||
resolution: {integrity: sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==}
|
||||
engines: {node: '>= 10.0.0'}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@parcel/watcher-linux-arm64-glibc@2.5.1':
|
||||
resolution: {integrity: sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==}
|
||||
engines: {node: '>= 10.0.0'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@parcel/watcher-linux-arm64-musl@2.5.1':
|
||||
resolution: {integrity: sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==}
|
||||
engines: {node: '>= 10.0.0'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@parcel/watcher-linux-x64-glibc@2.5.1':
|
||||
resolution: {integrity: sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==}
|
||||
engines: {node: '>= 10.0.0'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@parcel/watcher-linux-x64-musl@2.5.1':
|
||||
resolution: {integrity: sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==}
|
||||
engines: {node: '>= 10.0.0'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@parcel/watcher-win32-arm64@2.5.1':
|
||||
resolution: {integrity: sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==}
|
||||
@@ -679,67 +680,56 @@ packages:
|
||||
resolution: {integrity: sha512-JWnrj8qZgLWRNHr7NbpdnrQ8kcg09EBBq8jVOjmtlB3c8C6IrynAJSMhMVGME4YfTJzIkJqvSUSVJRqkDnu/aA==}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-arm-musleabihf@4.48.0':
|
||||
resolution: {integrity: sha512-9xu92F0TxuMH0tD6tG3+GtngwdgSf8Bnz+YcsPG91/r5Vgh5LNofO48jV55priA95p3c92FLmPM7CvsVlnSbGQ==}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@rollup/rollup-linux-arm64-gnu@4.48.0':
|
||||
resolution: {integrity: sha512-NLtvJB5YpWn7jlp1rJiY0s+G1Z1IVmkDuiywiqUhh96MIraC0n7XQc2SZ1CZz14shqkM+XN2UrfIo7JB6UufOA==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-arm64-musl@4.48.0':
|
||||
resolution: {integrity: sha512-QJ4hCOnz2SXgCh+HmpvZkM+0NSGcZACyYS8DGbWn2PbmA0e5xUk4bIP8eqJyNXLtyB4gZ3/XyvKtQ1IFH671vQ==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@rollup/rollup-linux-loongarch64-gnu@4.48.0':
|
||||
resolution: {integrity: sha512-Pk0qlGJnhILdIC5zSKQnprFjrGmjfDM7TPZ0FKJxRkoo+kgMRAg4ps1VlTZf8u2vohSicLg7NP+cA5qE96PaFg==}
|
||||
cpu: [loong64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-ppc64-gnu@4.48.0':
|
||||
resolution: {integrity: sha512-/dNFc6rTpoOzgp5GKoYjT6uLo8okR/Chi2ECOmCZiS4oqh3mc95pThWma7Bgyk6/WTEvjDINpiBCuecPLOgBLQ==}
|
||||
cpu: [ppc64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-riscv64-gnu@4.48.0':
|
||||
resolution: {integrity: sha512-YBwXsvsFI8CVA4ej+bJF2d9uAeIiSkqKSPQNn0Wyh4eMDY4wxuSp71BauPjQNCKK2tD2/ksJ7uhJ8X/PVY9bHQ==}
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-riscv64-musl@4.48.0':
|
||||
resolution: {integrity: sha512-FI3Rr2aGAtl1aHzbkBIamsQyuauYtTF9SDUJ8n2wMXuuxwchC3QkumZa1TEXYIv/1AUp1a25Kwy6ONArvnyeVQ==}
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@rollup/rollup-linux-s390x-gnu@4.48.0':
|
||||
resolution: {integrity: sha512-Dx7qH0/rvNNFmCcIRe1pyQ9/H0XO4v/f0SDoafwRYwc2J7bJZ5N4CHL/cdjamISZ5Cgnon6iazAVRFlxSoHQnQ==}
|
||||
cpu: [s390x]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-x64-gnu@4.48.0':
|
||||
resolution: {integrity: sha512-GUdZKTeKBq9WmEBzvFYuC88yk26vT66lQV8D5+9TgkfbewhLaTHRNATyzpQwwbHIfJvDJ3N9WJ90wK/uR3cy3Q==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-linux-x64-musl@4.48.0':
|
||||
resolution: {integrity: sha512-ao58Adz/v14MWpQgYAb4a4h3fdw73DrDGtaiF7Opds5wNyEQwtO6M9dBh89nke0yoZzzaegq6J/EXs7eBebG8A==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
libc: [musl]
|
||||
|
||||
'@rollup/rollup-win32-arm64-msvc@4.48.0':
|
||||
resolution: {integrity: sha512-kpFno46bHtjZVdRIOxqaGeiABiToo2J+st7Yce+aiAoo1H0xPi2keyQIP04n2JjDVuxBN6bSz9R6RdTK5hIppw==}
|
||||
@@ -1071,6 +1061,9 @@ packages:
|
||||
convert-source-map@2.0.0:
|
||||
resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==}
|
||||
|
||||
copy-anything@2.0.6:
|
||||
resolution: {integrity: sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==}
|
||||
|
||||
core-js-compat@3.45.1:
|
||||
resolution: {integrity: sha512-tqTt5T4PzsMIZ430XGviK4vzYSoeNJ6CXODi6c/voxOT6IZqBht5/EKaSNnYiEjjRYxjVz7DQIsOsY0XNi8PIA==}
|
||||
|
||||
@@ -1131,6 +1124,10 @@ packages:
|
||||
resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==}
|
||||
engines: {node: '>=0.12'}
|
||||
|
||||
errno@0.1.8:
|
||||
resolution: {integrity: sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==}
|
||||
hasBin: true
|
||||
|
||||
esbuild@0.25.9:
|
||||
resolution: {integrity: sha512-CRbODhYyQx3qp7ZEwzxOk4JBqmD/seJrzPa/cGjY1VtIn5E09Oi9/dB4JwctnfZ8Q8iT7rioVv5k/FNT/uf54g==}
|
||||
engines: {node: '>=18'}
|
||||
@@ -1475,6 +1472,10 @@ packages:
|
||||
resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==}
|
||||
hasBin: true
|
||||
|
||||
iconv-lite@0.6.3:
|
||||
resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
ignore@5.3.2:
|
||||
resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==}
|
||||
engines: {node: '>= 4'}
|
||||
@@ -1483,6 +1484,11 @@ packages:
|
||||
resolution: {integrity: sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==}
|
||||
engines: {node: '>= 4'}
|
||||
|
||||
image-size@0.5.5:
|
||||
resolution: {integrity: sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
hasBin: true
|
||||
|
||||
immutable@5.1.3:
|
||||
resolution: {integrity: sha512-+chQdDfvscSF1SJqv2gn4SRO2ZyS3xL3r7IW/wWEEzrzLisnOlKiQu5ytC/BVNcS15C39WT2Hg/bjKjDMcu+zg==}
|
||||
|
||||
@@ -1518,6 +1524,9 @@ packages:
|
||||
resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}
|
||||
engines: {node: '>=0.12.0'}
|
||||
|
||||
is-what@3.14.1:
|
||||
resolution: {integrity: sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==}
|
||||
|
||||
isexe@2.0.0:
|
||||
resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==}
|
||||
|
||||
@@ -1570,6 +1579,11 @@ packages:
|
||||
keyv@4.5.4:
|
||||
resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==}
|
||||
|
||||
less@4.4.1:
|
||||
resolution: {integrity: sha512-X9HKyiXPi0f/ed0XhgUlBeFfxrlDP3xR4M7768Zl+WXLUViuL9AOPPJP4nCV0tgRWvTYvpNmN0SFhZOQzy16PA==}
|
||||
engines: {node: '>=14'}
|
||||
hasBin: true
|
||||
|
||||
levn@0.4.1:
|
||||
resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==}
|
||||
engines: {node: '>= 0.8.0'}
|
||||
@@ -1597,6 +1611,10 @@ packages:
|
||||
magic-string@0.30.18:
|
||||
resolution: {integrity: sha512-yi8swmWbO17qHhwIBNeeZxTceJMeBvWJaId6dyvTSOwTipqeHhMhOrz6513r1sOKnpvQ7zkhlG8tPrpilwTxHQ==}
|
||||
|
||||
make-dir@2.1.0:
|
||||
resolution: {integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==}
|
||||
engines: {node: '>=6'}
|
||||
|
||||
markdown-table@3.0.4:
|
||||
resolution: {integrity: sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==}
|
||||
|
||||
@@ -1731,6 +1749,11 @@ packages:
|
||||
resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==}
|
||||
engines: {node: '>=8.6'}
|
||||
|
||||
mime@1.6.0:
|
||||
resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==}
|
||||
engines: {node: '>=4'}
|
||||
hasBin: true
|
||||
|
||||
min-indent@1.0.1:
|
||||
resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==}
|
||||
engines: {node: '>=4'}
|
||||
@@ -1763,6 +1786,11 @@ packages:
|
||||
resolution: {integrity: sha512-kKHJhxwpR/Okycz4HhQKKlhWe4ASEfPgkSWNmKFHd7+ezuQlxkA5cM3+XkBPvm1gmHen3w53qsYAv+8GwRrBlg==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
needle@3.3.1:
|
||||
resolution: {integrity: sha512-6k0YULvhpw+RoLNiQCRKOl09Rv1dPLr8hHnVjHqdolKwDrdNyk+Hmrthi4lIGPPz3r39dLx0hsF5s40sZ3Us4Q==}
|
||||
engines: {node: '>= 4.4.x'}
|
||||
hasBin: true
|
||||
|
||||
node-addon-api@7.1.1:
|
||||
resolution: {integrity: sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==}
|
||||
|
||||
@@ -1802,6 +1830,10 @@ packages:
|
||||
parse-imports-exports@0.2.4:
|
||||
resolution: {integrity: sha512-4s6vd6dx1AotCx/RCI2m7t7GCh5bDRUtGNvRfHSP2wbBQdMi67pPe7mtzmgwcaQ8VKK/6IB7Glfyu3qdZJPybQ==}
|
||||
|
||||
parse-node-version@1.0.1:
|
||||
resolution: {integrity: sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==}
|
||||
engines: {node: '>= 0.10'}
|
||||
|
||||
parse-statements@1.0.11:
|
||||
resolution: {integrity: sha512-HlsyYdMBnbPQ9Jr/VgJ1YF4scnldvJpJxCVx6KgqPL4dxppsWrJHCIIxQXMJrqGnsRkNPATbeMJ8Yxu7JMsYcA==}
|
||||
|
||||
@@ -1830,6 +1862,10 @@ packages:
|
||||
resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==}
|
||||
engines: {node: '>=12'}
|
||||
|
||||
pify@4.0.1:
|
||||
resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==}
|
||||
engines: {node: '>=6'}
|
||||
|
||||
pkg-types@1.3.1:
|
||||
resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==}
|
||||
|
||||
@@ -1864,6 +1900,9 @@ packages:
|
||||
engines: {node: '>=14'}
|
||||
hasBin: true
|
||||
|
||||
prr@1.0.1:
|
||||
resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==}
|
||||
|
||||
punycode@2.3.1:
|
||||
resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
|
||||
engines: {node: '>=6'}
|
||||
@@ -1917,11 +1956,17 @@ packages:
|
||||
run-parallel@1.2.0:
|
||||
resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==}
|
||||
|
||||
safer-buffer@2.1.2:
|
||||
resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==}
|
||||
|
||||
sass@1.90.0:
|
||||
resolution: {integrity: sha512-9GUyuksjw70uNpb1MTYWsH9MQHOHY6kwfnkafC24+7aOMZn9+rVMBxRbLvw756mrBFbIsFg6Xw9IkR2Fnn3k+Q==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
hasBin: true
|
||||
|
||||
sax@1.4.1:
|
||||
resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==}
|
||||
|
||||
scslre@0.3.0:
|
||||
resolution: {integrity: sha512-3A6sD0WYP7+QrjbfNA2FN3FsOaGGFoekCVgTyypy53gPxhbkCIjtO6YWgdrfM+n/8sI8JeXZOIxsHjMTNxQ4nQ==}
|
||||
engines: {node: ^14.0.0 || >=16.0.0}
|
||||
@@ -1929,6 +1974,10 @@ packages:
|
||||
scule@1.3.0:
|
||||
resolution: {integrity: sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g==}
|
||||
|
||||
semver@5.7.2:
|
||||
resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==}
|
||||
hasBin: true
|
||||
|
||||
semver@6.3.1:
|
||||
resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==}
|
||||
hasBin: true
|
||||
@@ -1953,6 +2002,10 @@ packages:
|
||||
resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
source-map@0.6.1:
|
||||
resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
spdx-exceptions@2.5.0:
|
||||
resolution: {integrity: sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==}
|
||||
|
||||
@@ -2910,22 +2963,22 @@ snapshots:
|
||||
'@typescript-eslint/types': 8.40.0
|
||||
eslint-visitor-keys: 4.2.1
|
||||
|
||||
'@vitejs/plugin-vue-jsx@5.1.1(vite@7.1.3(@types/node@24.3.0)(sass@1.90.0)(tsx@4.20.5)(yaml@2.8.1))(vue@3.5.19(typescript@5.8.3))':
|
||||
'@vitejs/plugin-vue-jsx@5.1.1(vite@7.1.3(@types/node@24.3.0)(less@4.4.1)(sass@1.90.0)(tsx@4.20.5)(yaml@2.8.1))(vue@3.5.19(typescript@5.8.3))':
|
||||
dependencies:
|
||||
'@babel/core': 7.28.3
|
||||
'@babel/plugin-syntax-typescript': 7.27.1(@babel/core@7.28.3)
|
||||
'@babel/plugin-transform-typescript': 7.28.0(@babel/core@7.28.3)
|
||||
'@rolldown/pluginutils': 1.0.0-beta.34
|
||||
'@vue/babel-plugin-jsx': 1.5.0(@babel/core@7.28.3)
|
||||
vite: 7.1.3(@types/node@24.3.0)(sass@1.90.0)(tsx@4.20.5)(yaml@2.8.1)
|
||||
vite: 7.1.3(@types/node@24.3.0)(less@4.4.1)(sass@1.90.0)(tsx@4.20.5)(yaml@2.8.1)
|
||||
vue: 3.5.19(typescript@5.8.3)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@vitejs/plugin-vue@6.0.1(vite@7.1.3(@types/node@24.3.0)(sass@1.90.0)(tsx@4.20.5)(yaml@2.8.1))(vue@3.5.19(typescript@5.8.3))':
|
||||
'@vitejs/plugin-vue@6.0.1(vite@7.1.3(@types/node@24.3.0)(less@4.4.1)(sass@1.90.0)(tsx@4.20.5)(yaml@2.8.1))(vue@3.5.19(typescript@5.8.3))':
|
||||
dependencies:
|
||||
'@rolldown/pluginutils': 1.0.0-beta.29
|
||||
vite: 7.1.3(@types/node@24.3.0)(sass@1.90.0)(tsx@4.20.5)(yaml@2.8.1)
|
||||
vite: 7.1.3(@types/node@24.3.0)(less@4.4.1)(sass@1.90.0)(tsx@4.20.5)(yaml@2.8.1)
|
||||
vue: 3.5.19(typescript@5.8.3)
|
||||
|
||||
'@vitest/eslint-plugin@1.3.4(eslint@9.34.0)(typescript@5.8.3)':
|
||||
@@ -3168,6 +3221,11 @@ snapshots:
|
||||
|
||||
convert-source-map@2.0.0: {}
|
||||
|
||||
copy-anything@2.0.6:
|
||||
dependencies:
|
||||
is-what: 3.14.1
|
||||
optional: true
|
||||
|
||||
core-js-compat@3.45.1:
|
||||
dependencies:
|
||||
browserslist: 4.25.3
|
||||
@@ -3214,6 +3272,11 @@ snapshots:
|
||||
|
||||
entities@4.5.0: {}
|
||||
|
||||
errno@0.1.8:
|
||||
dependencies:
|
||||
prr: 1.0.1
|
||||
optional: true
|
||||
|
||||
esbuild@0.25.9:
|
||||
optionalDependencies:
|
||||
'@esbuild/aix-ppc64': 0.25.9
|
||||
@@ -3635,10 +3698,18 @@ snapshots:
|
||||
|
||||
he@1.2.0: {}
|
||||
|
||||
iconv-lite@0.6.3:
|
||||
dependencies:
|
||||
safer-buffer: 2.1.2
|
||||
optional: true
|
||||
|
||||
ignore@5.3.2: {}
|
||||
|
||||
ignore@7.0.5: {}
|
||||
|
||||
image-size@0.5.5:
|
||||
optional: true
|
||||
|
||||
immutable@5.1.3: {}
|
||||
|
||||
import-fresh@3.3.1:
|
||||
@@ -3666,6 +3737,9 @@ snapshots:
|
||||
|
||||
is-number@7.0.0: {}
|
||||
|
||||
is-what@3.14.1:
|
||||
optional: true
|
||||
|
||||
isexe@2.0.0: {}
|
||||
|
||||
js-tokens@4.0.0: {}
|
||||
@@ -3703,6 +3777,21 @@ snapshots:
|
||||
dependencies:
|
||||
json-buffer: 3.0.1
|
||||
|
||||
less@4.4.1:
|
||||
dependencies:
|
||||
copy-anything: 2.0.6
|
||||
parse-node-version: 1.0.1
|
||||
tslib: 2.8.1
|
||||
optionalDependencies:
|
||||
errno: 0.1.8
|
||||
graceful-fs: 4.2.11
|
||||
image-size: 0.5.5
|
||||
make-dir: 2.1.0
|
||||
mime: 1.6.0
|
||||
needle: 3.3.1
|
||||
source-map: 0.6.1
|
||||
optional: true
|
||||
|
||||
levn@0.4.1:
|
||||
dependencies:
|
||||
prelude-ls: 1.2.1
|
||||
@@ -3732,6 +3821,12 @@ snapshots:
|
||||
dependencies:
|
||||
'@jridgewell/sourcemap-codec': 1.5.5
|
||||
|
||||
make-dir@2.1.0:
|
||||
dependencies:
|
||||
pify: 4.0.1
|
||||
semver: 5.7.2
|
||||
optional: true
|
||||
|
||||
markdown-table@3.0.4: {}
|
||||
|
||||
mdast-util-find-and-replace@3.0.2:
|
||||
@@ -4052,6 +4147,9 @@ snapshots:
|
||||
braces: 3.0.3
|
||||
picomatch: 2.3.1
|
||||
|
||||
mime@1.6.0:
|
||||
optional: true
|
||||
|
||||
min-indent@1.0.1: {}
|
||||
|
||||
minimatch@3.1.2:
|
||||
@@ -4079,6 +4177,12 @@ snapshots:
|
||||
|
||||
natural-orderby@5.0.0: {}
|
||||
|
||||
needle@3.3.1:
|
||||
dependencies:
|
||||
iconv-lite: 0.6.3
|
||||
sax: 1.4.1
|
||||
optional: true
|
||||
|
||||
node-addon-api@7.1.1:
|
||||
optional: true
|
||||
|
||||
@@ -4119,6 +4223,9 @@ snapshots:
|
||||
dependencies:
|
||||
parse-statements: 1.0.11
|
||||
|
||||
parse-node-version@1.0.1:
|
||||
optional: true
|
||||
|
||||
parse-statements@1.0.11: {}
|
||||
|
||||
path-browserify@1.0.1: {}
|
||||
@@ -4135,6 +4242,9 @@ snapshots:
|
||||
|
||||
picomatch@4.0.3: {}
|
||||
|
||||
pify@4.0.1:
|
||||
optional: true
|
||||
|
||||
pkg-types@1.3.1:
|
||||
dependencies:
|
||||
confbox: 0.1.8
|
||||
@@ -4172,6 +4282,9 @@ snapshots:
|
||||
|
||||
prettier@3.6.2: {}
|
||||
|
||||
prr@1.0.1:
|
||||
optional: true
|
||||
|
||||
punycode@2.3.1: {}
|
||||
|
||||
quansync@0.2.11: {}
|
||||
@@ -4235,6 +4348,9 @@ snapshots:
|
||||
dependencies:
|
||||
queue-microtask: 1.2.3
|
||||
|
||||
safer-buffer@2.1.2:
|
||||
optional: true
|
||||
|
||||
sass@1.90.0:
|
||||
dependencies:
|
||||
chokidar: 4.0.3
|
||||
@@ -4243,6 +4359,9 @@ snapshots:
|
||||
optionalDependencies:
|
||||
'@parcel/watcher': 2.5.1
|
||||
|
||||
sax@1.4.1:
|
||||
optional: true
|
||||
|
||||
scslre@0.3.0:
|
||||
dependencies:
|
||||
'@eslint-community/regexpp': 4.12.1
|
||||
@@ -4251,6 +4370,9 @@ snapshots:
|
||||
|
||||
scule@1.3.0: {}
|
||||
|
||||
semver@5.7.2:
|
||||
optional: true
|
||||
|
||||
semver@6.3.1: {}
|
||||
|
||||
semver@7.7.2: {}
|
||||
@@ -4265,6 +4387,9 @@ snapshots:
|
||||
|
||||
source-map-js@1.2.1: {}
|
||||
|
||||
source-map@0.6.1:
|
||||
optional: true
|
||||
|
||||
spdx-exceptions@2.5.0: {}
|
||||
|
||||
spdx-expression-parse@4.0.0:
|
||||
@@ -4432,7 +4557,7 @@ snapshots:
|
||||
|
||||
util-deprecate@1.0.2: {}
|
||||
|
||||
vite@7.1.3(@types/node@24.3.0)(sass@1.90.0)(tsx@4.20.5)(yaml@2.8.1):
|
||||
vite@7.1.3(@types/node@24.3.0)(less@4.4.1)(sass@1.90.0)(tsx@4.20.5)(yaml@2.8.1):
|
||||
dependencies:
|
||||
esbuild: 0.25.9
|
||||
fdir: 6.5.0(picomatch@4.0.3)
|
||||
@@ -4443,6 +4568,7 @@ snapshots:
|
||||
optionalDependencies:
|
||||
'@types/node': 24.3.0
|
||||
fsevents: 2.3.3
|
||||
less: 4.4.1
|
||||
sass: 1.90.0
|
||||
tsx: 4.20.5
|
||||
yaml: 2.8.1
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AButton type="primary">
|
||||
primary按钮
|
||||
</AButton>
|
||||
<AConfigProvider>
|
||||
<AButton type="primary">
|
||||
按钮 A
|
||||
</AButton>
|
||||
</AConfigProvider>
|
||||
</template>
|
||||
@@ -9,6 +9,7 @@ export {}
|
||||
declare module 'vue' {
|
||||
export interface GlobalComponents {
|
||||
AButton: typeof import('@ao/ao-design')['Button']
|
||||
AConfigProvider: typeof import('@ao/ao-design')['ConfigProvider']
|
||||
AIcon: typeof import('@ao/ao-design')['Icon']
|
||||
AInput: typeof import('@ao/ao-design')['Input']
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
import '@ao/ao-design/styles'
|
||||
import './style.scss'
|
||||
|
||||
createApp(App).mount('#app')
|
||||
@@ -0,0 +1 @@
|
||||
@import '@ao/ao-design/index.scss';
|
||||
@@ -40,4 +40,11 @@ export default defineConfig({
|
||||
directoryAsNamespace: true,
|
||||
}),
|
||||
],
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
scss: {
|
||||
// additionalData: `$prefix: 'abc';`,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
Reference in new issue
Block a user