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

直接内容项 组件

上级 f3950954
......@@ -96,6 +96,7 @@ import DiskImageUpload from './components/disk-image-upload/disk-image-upload.vu
import AppFormPart from './components/app-form-part/app-form-part.vue'
import AppAlert from './components/app-alert/app-alert.vue'
import AppAlertGroup from './components/app-alert-group/app-alert-group.vue'
import AppRawItem from './components/app-rawitem/app-rawitem.vue'
// 全局挂载UI实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister;
......@@ -207,5 +208,6 @@ export const AppComponents = {
v.component('app-form-part', AppFormPart);
v.component('app-alert', AppAlert);
v.component('app-alert-group', AppAlertGroup);
v.component('app-rawitem',AppRawItem);
},
};
\ No newline at end of file
<template>
<div>
<span v-if="caption">{{caption}}</span>
<div :class="classStyle" :style="sizeStyle">
<template v-if="Object.is(contentType,'RAW')">
{{rawContent ? rawContent : ''}}
</template>
<template v-else-if="Object.is(contentType,'HTML')">
{{htmlContent ? htmlContent : ''}}
</template>
<template v-else-if="Object.is(contentType,'IMAGE')">
<i :class="imageContent ? imageContent : ''"></i>
</template>
</div>
</div>
</template>
<script lang='ts'>
import { Component, Vue, Prop, Model, Watch } from "vue-property-decorator";
@Component({})
export default class AppRawItem extends Vue {
/**
* 内容类型
*
* @type {string}
* @memberof AppRawItem
*/
@Prop() public contentType!: string;
/**
* 直接内容
*
* @type {strin}
* @memberof AppRawItem
*/
@Prop() public rawContent?: string;
/**
* html内容
*
* @type {strin}
* @memberof AppRawItem
*/
@Prop() public htmlContent?: string;
/**
* html内容
*
* @type {strin}
* @memberof AppRawItem
*/
@Prop() public imageContent?: string;
/**
* 标题
*
* @type {string}
* @memberof AppRawItem
*/
@Prop() public caption?: string;
/**
* 内容样式
*
* @type {strin}
* @memberof AppRawItem
*/
@Prop() public classStyle!: string;
/**
* 内容宽高
*
* @type {strin}
* @memberof AppRawItem
*/
@Prop() public sizeStyle!: string;
}
</script>
<style lang='less'>
</style>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册