Skip to content

Commit

Permalink
feat: upgrade tdesign-vue to 0.46 (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
uyarn authored Aug 17, 2022
1 parent add3c36 commit a397ab3
Show file tree
Hide file tree
Showing 5 changed files with 155 additions and 154 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
"nprogress": "^0.2.0",
"qrcode.vue": "^1.7.0",
"tdesign-icons-vue": "^0.1.0",
"tdesign-vue": "^0.45.0",
"tdesign-vue": "^0.46.0",
"tvision-color": "~1.4.0",
"typescript": "^4.2.4",
"vue": "~2.6.11",
"vue": "~2.6.14",
"vue-clipboard2": "^0.3.1",
"vue-router": "^3.5.1",
"vuex": "^3.6.2",
Expand Down Expand Up @@ -60,7 +60,7 @@
"vite-plugin-theme": "^0.8.1",
"vite-plugin-vue2": "^2.0.1",
"vite-plugin-vue2-svg": "~0.3.0",
"vue-template-compiler": "2.6.14"
"vue-template-compiler": "~2.6.14"
},
"config": {
"commitizen": {
Expand Down
291 changes: 146 additions & 145 deletions src/pages/form/base/index.vue
Original file line number Diff line number Diff line change
@@ -1,158 +1,159 @@
<template>
<t-form
ref="form"
class="base-form"
:data="formData"
:rules="FORM_RULES"
label-align="top"
:label-width="100"
@reset="onReset"
@submit="onSubmit"
>
<div class="form-basic-container">
<div class="form-basic-item">
<div class="form-basic-container-title">合同信息</div>
<!-- 表单内容 -->
<t-card>
<t-form
ref="form"
:data="formData"
:rules="FORM_RULES"
label-align="top"
:label-width="100"
@reset="onReset"
@submit="onSubmit"
>
<div class="form-basic-container">
<div class="form-basic-item">
<div class="form-basic-container-title">合同信息</div>
<!-- 表单内容 -->

<!-- 合同名称,合同类型 -->
<t-row class="row-gap" :gutter="[16, 24]">
<t-col :span="6">
<t-form-item label="合同名称" name="name">
<t-input v-model="formData.name" :style="{ width: '322px' }" placeholder="请输入内容" />
</t-form-item>
</t-col>
<t-col :span="6">
<t-form-item label="合同类型" name="type">
<t-select
v-model="formData.type"
:style="{ width: '322px' }"
placeholder="请选择类型"
class="demo-select-base"
clearable
>
<t-option v-for="(item, index) in typeOptions" :key="index" :value="item.value" :label="item.label">
{{ item.label }}
</t-option>
</t-select>
</t-form-item>
</t-col>
<!-- 合同名称,合同类型 -->
<t-row class="row-gap" :gutter="[16, 24]">
<t-col :span="6">
<t-form-item label="合同名称" name="name">
<t-input v-model="formData.name" :style="{ width: '322px' }" placeholder="请输入内容" />
</t-form-item>
</t-col>
<t-col :span="6">
<t-form-item label="合同类型" name="type">
<t-select
v-model="formData.type"
:style="{ width: '322px' }"
placeholder="请选择类型"
class="demo-select-base"
clearable
>
<t-option v-for="(item, index) in typeOptions" :key="index" :value="item.value" :label="item.label">
{{ item.label }}
</t-option>
</t-select>
</t-form-item>
</t-col>

<!-- 合同收付类型 -->
<t-col :span="8">
<t-form-item label="合同收付类型" name="payment">
<t-radio-group v-model="formData.payment">
<t-radio value="1"> 收款 </t-radio>
<t-radio value="2"> 付款 </t-radio>
</t-radio-group>
<span class="space-item" />
<t-input placeholder="请输入金额" :style="{ width: '160px' }" />
</t-form-item>
</t-col>
<!-- 合同收付类型 -->
<t-col :span="8">
<t-form-item label="合同收付类型" name="payment">
<t-radio-group v-model="formData.payment">
<t-radio value="1"> 收款 </t-radio>
<t-radio value="2"> 付款 </t-radio>
</t-radio-group>
<span class="space-item" />
<t-input placeholder="请输入金额" :style="{ width: '160px' }" />
</t-form-item>
</t-col>

<t-col :span="6">
<t-form-item label="甲方" name="partyA">
<t-select
v-model="formData.partyA"
:style="{ width: '322px' }"
class="demo-select-base"
placeholder="请选择类型"
clearable
>
<t-option v-for="(item, index) in partyAOptions" :key="index" :value="item.value" :label="item.label">
{{ item.label }}
</t-option>
</t-select>
</t-form-item>
</t-col>
<t-col :span="6">
<t-form-item label="乙方" name="partyB">
<t-select
v-model="formData.partyB"
:style="{ width: '322px' }"
placeholder="请选择类型"
class="demo-select-base"
clearable
>
<t-option v-for="(item, index) in partyBOptions" :key="index" :value="item.value" :label="item.label">
{{ item.label }}
</t-option>
</t-select>
</t-form-item>
</t-col>
<t-col :span="6">
<t-form-item label="合同签订日期" name="signDate">
<t-date-picker
v-model="formData.signDate"
:style="{ width: '322px' }"
theme="primary"
mode="date"
separator="/"
/>
</t-form-item>
</t-col>
<t-col :span="6">
<t-form-item label="合同生效日期" name="startDate">
<t-date-picker
v-model="formData.startDate"
:style="{ width: '322px' }"
theme="primary"
mode="date"
separator="/"
/>
</t-form-item>
</t-col>
<t-col :span="6">
<t-form-item label="合同结束日期" name="endDate">
<t-date-picker
v-model="formData.endDate"
:style="{ width: '322px' }"
theme="primary"
mode="date"
separator="/"
/>
</t-form-item>
</t-col>
<t-col :span="6">
<t-form-item label="" name="files">
<t-upload
v-model="formData.files"
action="https://service-bv448zsw-1257786608.gz.apigw.tencentcs.com/api/upload-demo"
tips="请上传pdf文件,大小在60M以内"
:size-limit="{ size: 60, unit: 'MB' }"
:format-response="formatResponse"
:before-upload="beforeUpload"
@fail="handleFail"
>
<t-button class="form-submit-upload-btn" variant="outline"> 上传合同文件 </t-button>
</t-upload>
</t-form-item>
</t-col>
</t-row>
<t-col :span="6">
<t-form-item label="甲方" name="partyA">
<t-select
v-model="formData.partyA"
:style="{ width: '322px' }"
class="demo-select-base"
placeholder="请选择类型"
clearable
>
<t-option v-for="(item, index) in partyAOptions" :key="index" :value="item.value" :label="item.label">
{{ item.label }}
</t-option>
</t-select>
</t-form-item>
</t-col>
<t-col :span="6">
<t-form-item label="乙方" name="partyB">
<t-select
v-model="formData.partyB"
:style="{ width: '322px' }"
placeholder="请选择类型"
class="demo-select-base"
clearable
>
<t-option v-for="(item, index) in partyBOptions" :key="index" :value="item.value" :label="item.label">
{{ item.label }}
</t-option>
</t-select>
</t-form-item>
</t-col>
<t-col :span="6">
<t-form-item label="合同签订日期" name="signDate">
<t-date-picker
v-model="formData.signDate"
:style="{ width: '322px' }"
theme="primary"
mode="date"
separator="/"
/>
</t-form-item>
</t-col>
<t-col :span="6">
<t-form-item label="合同生效日期" name="startDate">
<t-date-picker
v-model="formData.startDate"
:style="{ width: '322px' }"
theme="primary"
mode="date"
separator="/"
/>
</t-form-item>
</t-col>
<t-col :span="6">
<t-form-item label="合同结束日期" name="endDate">
<t-date-picker
v-model="formData.endDate"
:style="{ width: '322px' }"
theme="primary"
mode="date"
separator="/"
/>
</t-form-item>
</t-col>
<t-col :span="6">
<t-form-item label="" name="files">
<t-upload
v-model="formData.files"
action="https://service-bv448zsw-1257786608.gz.apigw.tencentcs.com/api/upload-demo"
tips="请上传pdf文件,大小在60M以内"
:size-limit="{ size: 60, unit: 'MB' }"
:format-response="formatResponse"
:before-upload="beforeUpload"
@fail="handleFail"
>
<t-button class="form-submit-upload-btn" variant="outline"> 上传合同文件 </t-button>
</t-upload>
</t-form-item>
</t-col>
</t-row>

<div class="form-basic-container-title form-title-gap">其它信息</div>
<div class="form-basic-container-title form-title-gap">其它信息</div>

<t-form-item label="备注" name="comment">
<t-textarea v-model="formData.comment" :height="124" placeholder="请输入备注" />
</t-form-item>
<t-form-item label="公证人">
<t-avatar-group>
<t-avatar>D</t-avatar>
<t-avatar>S</t-avatar>
<t-avatar>+</t-avatar>
</t-avatar-group>
</t-form-item>
<t-form-item label="备注" name="comment">
<t-textarea v-model="formData.comment" :height="124" placeholder="请输入备注" />
</t-form-item>
<t-form-item label="公证人">
<t-avatar-group>
<t-avatar>D</t-avatar>
<t-avatar>S</t-avatar>
<t-avatar>+</t-avatar>
</t-avatar-group>
</t-form-item>
</div>
</div>
</div>

<div class="form-submit-container">
<div class="form-submit-sub">
<div class="form-submit-left">
<t-button theme="primary" class="form-submit-confirm" type="submit"> 提交 </t-button>
<t-button type="reset" class="form-submit-cancel" theme="default" variant="base"> 取消 </t-button>
<div class="form-submit-container">
<div class="form-submit-sub">
<div class="form-submit-left">
<t-button theme="primary" class="form-submit-confirm" type="submit"> 提交 </t-button>
<t-button type="reset" class="form-submit-cancel" theme="default" variant="base"> 取消 </t-button>
</div>
</div>
</div>
</div>
</t-form>
</t-form>
</t-card>
</template>
<script>
import { prefix } from '@/config/global';
Expand Down
4 changes: 2 additions & 2 deletions src/pages/form/step/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div>
<t-card>
<div class="form-step-container">
<!-- 简单步骤条 -->
<t-card :bordered="false">
Expand Down Expand Up @@ -141,7 +141,7 @@
</div>
</div>
</div>
</div>
</t-card>
</template>
<script>
import { CheckCircleFilledIcon } from 'tdesign-icons-vue';
Expand Down
4 changes: 2 additions & 2 deletions src/pages/list/filter/index.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div>
<t-card>
<common-table />
</div>
</t-card>
</template>
<script lang="ts">
import CommonTable from '../components/CommonTable.vue';
Expand Down
4 changes: 2 additions & 2 deletions src/pages/list/tree/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div>
<t-card>
<div class="table-tree-container">
<div class="list-tree-wrapper">
<div class="list-tree-operator">
Expand All @@ -13,7 +13,7 @@
</div>
</div>
</div>
</div>
</t-card>
</template>
<script>
import { SearchIcon } from 'tdesign-icons-vue';
Expand Down

0 comments on commit a397ab3

Please sign in to comment.