|
@@ -1,22 +1,27 @@
|
|
|
<template>
|
|
|
- <BasicModal v-bind="$attrs" @register="register" :showOkBtn='false' cancelText='关闭' :title="title">
|
|
|
+ <BasicModal
|
|
|
+ v-bind="$attrs"
|
|
|
+ @register="register"
|
|
|
+ :showOkBtn="false"
|
|
|
+ cancelText="关闭"
|
|
|
+ :title="title"
|
|
|
+ >
|
|
|
<Description
|
|
|
- :collapseOptions="{ canExpand: false, helpMessage: '日志详情' }"
|
|
|
- :column="1"
|
|
|
- :data="model"
|
|
|
- :schema="schema"
|
|
|
+ :collapseOptions="{ canExpand: false, helpMessage: '日志详情' }"
|
|
|
+ :column="1"
|
|
|
+ :data="model"
|
|
|
+ :schema="schema"
|
|
|
/>
|
|
|
</BasicModal>
|
|
|
</template>
|
|
|
<script lang="ts">
|
|
|
-
|
|
|
import { defineComponent, PropType, ref, toRefs } from 'vue';
|
|
|
import { BasicModal, useModalInner } from '/@/components/Modal';
|
|
|
import { Description, DescItem } from '/@/components/Description/index';
|
|
|
- import { adapt } from '/@/utils/adapt'
|
|
|
+ import { adapt } from '/@/utils/adapt';
|
|
|
|
|
|
interface ModelData {
|
|
|
- title: string,
|
|
|
+ title: string;
|
|
|
}
|
|
|
|
|
|
export default defineComponent({
|
|
@@ -28,48 +33,47 @@
|
|
|
},
|
|
|
},
|
|
|
setup(props) {
|
|
|
- const modelData:ModelData = props.modelData
|
|
|
+ const modelData: ModelData = props.modelData;
|
|
|
|
|
|
const modelRef = ref({});
|
|
|
- const adaptWidth = adapt()
|
|
|
+ const adaptWidth = adapt();
|
|
|
const schema: DescItem[] = [
|
|
|
{
|
|
|
- field: 'id',
|
|
|
- label: 'id',
|
|
|
+ field: 'id',
|
|
|
+ label: 'id',
|
|
|
},
|
|
|
{
|
|
|
- field: 'admin_id',
|
|
|
- label: 'admin_id',
|
|
|
+ field: 'admin_id',
|
|
|
+ label: 'admin_id',
|
|
|
},
|
|
|
{
|
|
|
- field: 'username',
|
|
|
- label: '用户名',
|
|
|
+ field: 'username',
|
|
|
+ label: '用户名',
|
|
|
},
|
|
|
{
|
|
|
- field: 'title',
|
|
|
- label: '标题',
|
|
|
+ field: 'title',
|
|
|
+ label: '标题',
|
|
|
},
|
|
|
{
|
|
|
- field: 'url',
|
|
|
- label: 'Url',
|
|
|
+ field: 'url',
|
|
|
+ label: 'Url',
|
|
|
},
|
|
|
{
|
|
|
- field: 'ip',
|
|
|
- label: 'IP',
|
|
|
+ field: 'ip',
|
|
|
+ label: 'IP',
|
|
|
},
|
|
|
{
|
|
|
- field: 'browser',
|
|
|
- label: 'Browser',
|
|
|
+ field: 'browser',
|
|
|
+ label: 'Browser',
|
|
|
},
|
|
|
{
|
|
|
- field: 'time',
|
|
|
- label: '创建时间',
|
|
|
+ field: 'time',
|
|
|
+ label: '创建时间',
|
|
|
},
|
|
|
];
|
|
|
- const [register ] = useModalInner((data) => {
|
|
|
-
|
|
|
+ const [register] = useModalInner((data) => {
|
|
|
// 方式2
|
|
|
- modelRef.value = data
|
|
|
+ modelRef.value = data;
|
|
|
});
|
|
|
|
|
|
return {
|
|
@@ -77,39 +81,38 @@
|
|
|
adaptWidth,
|
|
|
schema,
|
|
|
model: modelRef,
|
|
|
- ...toRefs(modelData)
|
|
|
+ ...toRefs(modelData),
|
|
|
};
|
|
|
},
|
|
|
});
|
|
|
</script>
|
|
|
-<style lang='less'>
|
|
|
-.ant-form-item-label {
|
|
|
- text-align: center !important;
|
|
|
-}
|
|
|
-
|
|
|
-.tree-label {
|
|
|
- width: 20.6%;
|
|
|
- margin-top: 8px;
|
|
|
- margin-bottom: 1em;
|
|
|
- text-align: center;
|
|
|
-}
|
|
|
-
|
|
|
-@media (max-width: 639px) {
|
|
|
+<style lang="less">
|
|
|
.ant-form-item-label {
|
|
|
- line-height: 2.5715 !important;
|
|
|
text-align: center !important;
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
.tree-label {
|
|
|
- width: 33%;
|
|
|
+ width: 20.6%;
|
|
|
margin-top: 8px;
|
|
|
margin-bottom: 1em;
|
|
|
text-align: center;
|
|
|
-}
|
|
|
+ }
|
|
|
|
|
|
-.ant-descriptions-item-content {
|
|
|
- font-size: 12px !important;
|
|
|
+ @media (max-width: 639px) {
|
|
|
+ .ant-form-item-label {
|
|
|
+ line-height: 2.5715 !important;
|
|
|
+ text-align: center !important;
|
|
|
+ }
|
|
|
|
|
|
-}
|
|
|
-}
|
|
|
+ .tree-label {
|
|
|
+ width: 33%;
|
|
|
+ margin-top: 8px;
|
|
|
+ margin-bottom: 1em;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+
|
|
|
+ .ant-descriptions-item-content {
|
|
|
+ font-size: 12px !important;
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|