1/* 2 * Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15<template> 16 <BasicModal v-bind="$attrs" @register="registerModal" title="查看详情" :minHeight="200" :showCancelBtn="false" 17 :showOkBtn="false"> 18 <a-card class="daily-article"> 19 <a-card-meta :description="'用户名:' + comment.userName + ' 评价时间: ' + comment.createTime"> </a-card-meta> 20 <a-rate v-model:value="comment.star" style="margin-top: 8px;" /> 21 <a-divider /> 22 <span v-html="comment.content" class="article-content"></span> 23 </a-card> 24 </BasicModal> 25</template> 26<script lang="ts" setup> 27import { BasicModal, useModalInner } from '/@/components/Modal'; 28 29import { ref } from 'vue'; 30const comment = ref({ 31 userName: '', 32 createTime: '', 33 star: 0, 34 content: '' 35}); 36//表单赋值 37const [registerModal] = useModalInner(async (data) => { 38 comment.value = data.record; 39}); 40 41</script> 42 43<style scoped lang="less"></style> 44