mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-19 01:15:53 +08:00
refactor(manager): 替换iView组件为TDesign并优化样式
- 将iView组件统一替换为TDesign组件 - 优化表单、表格、弹窗等交互样式 - 修复路由重复添加问题 - 更新依赖版本 - 调整布局间距与响应式 - 修复表单重置方法兼容性 - 统一消息提示组件
This commit is contained in:
@@ -1,25 +1,20 @@
|
||||
<template>
|
||||
<div>
|
||||
<div style="display:flex;">
|
||||
<Input
|
||||
<t-input
|
||||
v-model="currentValue"
|
||||
@on-change="handleChange"
|
||||
@change="handleChange"
|
||||
v-show="showInput"
|
||||
:placeholder="placeholder"
|
||||
:size="size"
|
||||
:disabled="disabled"
|
||||
:readonly="readonly"
|
||||
:maxlength="maxlength"
|
||||
>
|
||||
<Poptip slot="append" transfer trigger="hover" title="图片预览" placement="right">
|
||||
<Icon type="md-eye" class="see-icon" />
|
||||
<div slot="content">
|
||||
<img :src="currentValue" alt="该资源不存在" style="max-width: 300px;margin: 0 auto;display: block;" />
|
||||
<a @click="viewImage=true" style="margin-top:5px;text-align:right;display:block">查看大图</a>
|
||||
</div>
|
||||
</Poptip>
|
||||
</Input>
|
||||
<Button @click="handleCLickImg('storeLogo')">选择图片</Button>
|
||||
<template #suffix>
|
||||
<a style="margin-left:8px" @click="viewImage=true">预览</a>
|
||||
</template>
|
||||
</t-input>
|
||||
<t-button @click="handleCLickImg('storeLogo')">选择图片</t-button>
|
||||
<!--<Upload-->
|
||||
<!--:action="uploadFileUrl"-->
|
||||
<!--:headers="accessToken"-->
|
||||
@@ -39,16 +34,19 @@
|
||||
<!--</Upload>-->
|
||||
</div>
|
||||
|
||||
<Modal title="图片预览" v-model="viewImage" :styles="{top: '30px'}" draggable>
|
||||
<t-dialog header="图片预览" :visible.sync="viewImage" :width="500" @close="viewImage=false">
|
||||
<img :src="currentValue" alt="该资源不存在" style="max-width: 300px;margin: 0 auto;display: block;" />
|
||||
<div slot="footer">
|
||||
<Button @click="viewImage=false">关闭</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
<template #footer>
|
||||
<t-button variant="text" @click="viewImage=false">关闭</t-button>
|
||||
</template>
|
||||
</t-dialog>
|
||||
|
||||
<Modal width="1200px" v-model="picModalFlag">
|
||||
<t-dialog :width="1200" header="选择图片" :visible.sync="picModalFlag" @close="picModalFlag=false">
|
||||
<ossManage @callback="callbackSelected" ref="ossManage" :isComponent="true" :initialize="picModalFlag" />
|
||||
</Modal>
|
||||
<template #footer>
|
||||
<t-button variant="text" @click="picModalFlag=false">关闭</t-button>
|
||||
</template>
|
||||
</t-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
@@ -56,6 +54,7 @@
|
||||
<script>
|
||||
import { uploadFile } from "@/api/index";
|
||||
import ossManage from "@/views/sys/oss-manage/ossManage";
|
||||
import { MessagePlugin } from "tdesign-vue";
|
||||
export default {
|
||||
name: "uploadPicInput",
|
||||
components: {
|
||||
@@ -161,7 +160,7 @@ export default {
|
||||
// 上传失败
|
||||
handleError(error, file, fileList) {
|
||||
this.loading = false;
|
||||
this.$Message.error(error.toString());
|
||||
MessagePlugin.error(error.toString());
|
||||
},
|
||||
// 上传成功回显
|
||||
handleChange(v) {
|
||||
|
||||
Reference in New Issue
Block a user