Skip to content

Commit

Permalink
feat : ws-message
Browse files Browse the repository at this point in the history
  • Loading branch information
GAtomis committed Mar 24, 2023
1 parent 1fc0e46 commit 3787001
Show file tree
Hide file tree
Showing 13 changed files with 150 additions and 3 deletions.
8 changes: 6 additions & 2 deletions packages/aux-admin/aux-ui/styles/global.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
@import './font.scss';
@import './icon.scss';
@use './font.scss';
@use './icon.scss';
@use './wise-ui.scss';


$globa-prefix: aux;

:root {
Expand Down Expand Up @@ -57,6 +60,7 @@ $globa-prefix: aux;
--aux-transition-duration:.3s;



// Colors
--dark: #000000;
--grey: #666666;
Expand Down
5 changes: 5 additions & 0 deletions packages/aux-admin/aux-ui/styles/wise-ui.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
:root{



}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { ComponentPublicInstance } from 'vue';
import { DOMWrapper, mount, VueWrapper } from '@vue/test-utils';
import { WiseMessage } from '..';

describe('wise-message', () => {
let wrapper: VueWrapper<ComponentPublicInstance>;

it('wise-message init render', async () => {
wrapper = mount({
setup() {
return () => {
return <WiseMessage />;
};
},
});

// todo
})
})
15 changes: 15 additions & 0 deletions packages/aux-admin/aux-ui/wise-message/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { App } from 'vue';
import WiseMessage from './src/wise-message';

export * from './src/wise-message-types';

export { WiseMessage };

export default {
title: 'WiseMessage 万设消息弹出框',
category: '通用',
status: '1%', // TODO 组件完成状态,开发完组件新特性请及时更新该状态值;若组件开发完成则填入'100%',并删除该注释
install(app: App): void {
app.component(WiseMessage.name, WiseMessage);
}
};
10 changes: 10 additions & 0 deletions packages/aux-admin/aux-ui/wise-message/src/wise-message-types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import type { PropType, ExtractPropTypes } from 'vue';

export const wiseMessageProps = {
// data: {
// type: type,
// default: defaultValue
// },
} as const;

export type WiseMessageProps = ExtractPropTypes<typeof wiseMessageProps>;
4 changes: 4 additions & 0 deletions packages/aux-admin/aux-ui/wise-message/src/wise-message.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// 引入主题变量
@import '../../styles/global.scss';
.#{$globa-prefix}-wise-message {
}
21 changes: 21 additions & 0 deletions packages/aux-admin/aux-ui/wise-message/src/wise-message.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { defineComponent, toRefs } from 'vue';
import type { SetupContext } from 'vue';
import { wiseMessageProps, WiseMessageProps } from './wise-message-types';
import './wise-message.scss';

export default defineComponent({
name: 'AuxWiseMessage',
props: wiseMessageProps,
emits: [],
setup(props: WiseMessageProps, ctx: SetupContext) {
// 直接解构 props 会导致响应式失效,需要使用 toRefs 进行包裹
// const { data } = toRefs(props);
// console.log(data.value);

return () => {
return (
<div class="aux-wise-message"></div>
);
};
}
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { ComponentPublicInstance } from 'vue';
import { DOMWrapper, mount, VueWrapper } from '@vue/test-utils';
import { WiseNotification } from '..';

describe('wise-notification', () => {
let wrapper: VueWrapper<ComponentPublicInstance>;

it('wise-notification init render', async () => {
wrapper = mount({
setup() {
return () => {
return <WiseNotification />;
};
},
});

// todo
})
})
15 changes: 15 additions & 0 deletions packages/aux-admin/aux-ui/wise-notification/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { App } from 'vue';
import WiseNotification from './src/wise-notification';

export * from './src/wise-notification-types';

export { WiseNotification };

export default {
title: 'WiseNotification 通知',
category: '通用',
status: '1%', // TODO 组件完成状态,开发完组件新特性请及时更新该状态值;若组件开发完成则填入'100%',并删除该注释
install(app: App): void {
app.component(WiseNotification.name, WiseNotification);
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import type { PropType, ExtractPropTypes } from 'vue';

export const wiseNotificationProps = {
// data: {
// type: type,
// default: defaultValue
// },
} as const;

export type WiseNotificationProps = ExtractPropTypes<typeof wiseNotificationProps>;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// 引入主题变量
@import '../../styles/global.scss';
.#{$globa-prefix}-wise-notification {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { defineComponent, toRefs } from 'vue';
import type { SetupContext } from 'vue';
import { wiseNotificationProps, WiseNotificationProps } from './wise-notification-types';
import './wise-notification.scss';

export default defineComponent({
name: 'AuxWiseNotification',
props: wiseNotificationProps,
emits: [],
setup(props: WiseNotificationProps, ctx: SetupContext) {
// 直接解构 props 会导致响应式失效,需要使用 toRefs 进行包裹
// const { data } = toRefs(props);
// console.log(data.value);

return () => {
return (
<div class="aux-wise-notification"></div>
);
};
}
});
2 changes: 1 addition & 1 deletion packages/aux-admin/docs/components/noble/button/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
| :---- | :---- | :--------- |
| default | 任意内容 | [基本用法](#基本用法) |

## Swiper Bug&update
## Button Bug&update

::: tip 功能更新
参数:
Expand Down

0 comments on commit 3787001

Please sign in to comment.