提交 d782f9bb 编写于 作者: Shine-zwj's avatar Shine-zwj

update:更新按钮

上级 b5b548d1
...@@ -14,7 +14,7 @@ import { entityServiceRegister } from '@/service/entity-service-register'; ...@@ -14,7 +14,7 @@ import { entityServiceRegister } from '@/service/entity-service-register';
import { counterServiceRegister } from '@/counter/counter-service-register'; import { counterServiceRegister } from '@/counter/counter-service-register';
import { codeListRegister } from '@codelist/codelist-register'; import { codeListRegister } from '@codelist/codelist-register';
import { messageServiceRegister } from '@/message/message-service-register'; import { messageServiceRegister } from '@/message/message-service-register';
import AppButton from './components/app-button/app-button.vue'
import InputBox from './components/input-box/input-box.vue' import InputBox from './components/input-box/input-box.vue'
import AppKeepAlive from './components/app-keep-alive/app-keep-alive.vue' import AppKeepAlive from './components/app-keep-alive/app-keep-alive.vue'
import TabPageExp from './components/tab-page-exp/tab-page-exp.vue' import TabPageExp from './components/tab-page-exp/tab-page-exp.vue'
...@@ -168,6 +168,7 @@ export const AppComponents = { ...@@ -168,6 +168,7 @@ export const AppComponents = {
v.prototype.$verify = Verify; v.prototype.$verify = Verify;
v.prototype.$viewTool = ViewTool; v.prototype.$viewTool = ViewTool;
v.prototype.$uiActionTool = UIActionTool; v.prototype.$uiActionTool = UIActionTool;
v.component('app-button',AppButton);
v.component('app-edit-view-layout',AppEditViewLayout); v.component('app-edit-view-layout',AppEditViewLayout);
v.component('app-index-view-layout-top',AppIndexViewLayoutTop); v.component('app-index-view-layout-top',AppIndexViewLayoutTop);
v.component('app-index-view-layout-left',AppIndexViewLayoutLeft); v.component('app-index-view-layout-left',AppIndexViewLayoutLeft);
......
<template>
<i-button :type="type" :size="size" :disabled="disabled">
<i v-if="showIcon" :class="{[iconClass ? iconClass : '']: true, 'app-button__icon': true}"></i>
<span v-if="showCaption" class="app-button__caption">
{{caption}}
</span>
</i-button>
</template>
<script lang="ts">
import { Component, Vue, Prop } from 'vue-property-decorator'
@Component({
})
export default class AppButton extends Vue {
/**
* 按钮类型
*
* @type {string}
* @memberof AppButton
*/
@Prop({ default: 'default' }) public type!: "default" | "primary" | "dashed" | "text" | "info" | "success" | "warning" | "error";
/**
* 按钮大小
*
* @type {string}
* @memberof AppButton
*/
@Prop({ default: 'default' }) public size!: 'large' | 'small' | 'default';
/**
* 按钮禁用
*
* @type {boolean}
* @memberof AppButton
*/
@Prop({ default: false }) public disabled!: boolean;
/**
* 按钮图标
*
* @type {string}
* @memberof AppButton
*/
@Prop() public iconClass?: string;
/**
* 按钮标题
*
* @type {string}
* @memberof AppButton
*/
@Prop() public caption?: string;
/**
* 显示图标
*
* @type {boolean}
* @memberof AppButton
*/
@Prop({ default: true }) public showIcon!: boolean;
/**
* 显示标题
*
* @type {boolean}
* @memberof AppButton
*/
@Prop({ default: true }) public showCaption!: boolean;
}
</script>
<style lang='scss'>
@import "./app-button.scss";
</style>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册