feat: input、textare组件替换

This commit is contained in:
rd
2025-09-04 11:07:21 +08:00
parent 1a6fad8bd5
commit cf574da1da
47 changed files with 435 additions and 425 deletions

View File

@ -4,8 +4,8 @@
-->
<script lang="jsx">
import { ref, computed } from 'vue';
import { Button, Modal, Form, FormItem, RadioGroup, Radio } from 'ant-design-vue';
import { Input, Upload, Switch, Tooltip, Message as AMessage, Textarea } from '@arco-design/web-vue';
import { Button, Modal, Form, FormItem, RadioGroup, Radio, Input } from 'ant-design-vue';
import { Upload, Switch, Tooltip, Message as AMessage, Textarea } from '@arco-design/web-vue';
import AuthorizedAccountModal from '../authorized-account-modal';
// import ImportPromptModal from '../import-prompt-modal';
import StatusBox from '@/views/property-marketing/media-account/components/status-select/status-box.tsx';
@ -340,10 +340,10 @@ export default {
{isEdit.value && (
<>
<FormItem label="账号名称" name="name">
<Input v-model={form.value.name} placeholder="请输入..." size="large" disabled />
<Input v-model:value={form.value.name} placeholder="请输入..." size="large" disabled />
</FormItem>
<FormItem label="账号ID" name="account_id">
<Input v-model={form.value.account_id} placeholder="请输入..." size="large" disabled />
<Input v-model:value={form.value.account_id} placeholder="请输入..." size="large" disabled />
</FormItem>
<FormItem label="状态" name="status">
<StatusBox item={form.value} />
@ -351,10 +351,10 @@ export default {
</>
)}
<FormItem label="手机号码" name="mobile" required>
<Input v-model={form.value.mobile} placeholder="请输入..." size="large" />
<Input v-model:value={form.value.mobile} placeholder="请输入..." size="large" />
</FormItem>
<FormItem label="运营人员" name="operator_name" required>
<Input v-model={form.value.operator_name} placeholder="请输入..." class="w-240px" size="large" />
<Input v-model:value={form.value.operator_name} placeholder="请输入..." class="w-240px" size="large" />
</FormItem>
<FormItem label="运营平台" required={!isEdit.value}>
{isEdit.value ? (
@ -367,7 +367,7 @@ export default {
)}
</FormItem>
<FormItem label="号码持有人" name="holder_name">
<Input v-model={form.value.holder_name} placeholder="请输入..." class="w-240px" size="large" />
<Input v-model:value={form.value.holder_name} placeholder="请输入..." class="w-240px" size="large" />
</FormItem>
<FormItem label="所属项目">
<CommonSelect

View File

@ -8,83 +8,70 @@
<div class="filter-row flex">
<div class="filter-row-item">
<span class="label">账号名称/ID/手机号</span>
<a-space size="medium">
<a-input
v-model="query.search"
class="w-240px"
placeholder="请搜索..."
size="medium"
allow-clear
@change="handleSearch"
>
<template #prefix>
<icon-search />
</template>
</a-input>
</a-space>
<Input v-model:value="query.search" class="w-240px" placeholder="请搜索..." allowClear @change="handleSearch">
<template #prefix>
<icon-search />
</template>
</Input>
</div>
<div class="filter-row-item">
<span class="label">状态</span>
<a-space class="w-180px">
<StatusSelect v-model="query.status" @change="handleSearch" />
</a-space>
<StatusSelect v-model="query.status" @change="handleSearch" class="w-180px" />
</div>
<div class="filter-row-item">
<span class="label">平台</span>
<a-space class="w-160px">
<a-select v-model="query.platform" size="medium" placeholder="全部" allow-clear @change="handleSearch">
<a-option
v-for="(item, index) in MEDIA_ACCOUNT_PLATFORMS"
:key="index"
:value="item.value"
:label="item.label"
>{{ item.label }}</a-option
>
</a-select>
</a-space>
<a-select
v-model="query.platform"
class="w-160px"
size="medium"
placeholder="全部"
allow-clear
@change="handleSearch"
>
<a-option
v-for="(item, index) in MEDIA_ACCOUNT_PLATFORMS"
:key="index"
:value="item.value"
:label="item.label"
>{{ item.label }}</a-option
>
</a-select>
</div>
<div class="filter-row-item">
<span class="label">运营人员</span>
<a-space class="w-160px">
<CommonSelect
v-model="query.operator_id"
allowSearch
:multiple="false"
:options="operators"
@change="handleSearch"
/>
</a-space>
<CommonSelect
class="w-160px"
v-model="query.operator_id"
allowSearch
:multiple="false"
:options="operators"
@change="handleSearch"
/>
</div>
</div>
<div class="filter-row">
<div class="filter-row-item">
<span class="label">分组</span>
<a-space class="w-200px">
<CommonSelect v-model="query.group_ids" multiple :options="groups" @change="handleSearch" />
</a-space>
<CommonSelect v-model="query.group_ids" multiple :options="groups" @change="handleSearch" class="!w-200px" />
</div>
<div class="filter-row-item">
<span class="label">所属项目</span>
<a-space class="w-200px">
<CommonSelect v-model="query.project_ids" :options="projects" @change="handleSearch" />
</a-space>
<CommonSelect v-model="query.project_ids" :options="projects" @change="handleSearch" class="!w-200px" />
</div>
<div class="filter-row-item">
<span class="label">标签</span>
<a-space class="w-320px">
<CommonSelect v-model="query.tag_ids" :options="tags" @change="handleSearch" />
</a-space>
<CommonSelect v-model="query.tag_ids" :options="tags" @change="handleSearch" class="!w-320px" />
</div>
<div class="filter-row-item">
<Button type="primary" ghost class="w-84px mr-12px"@click="handleSearch">
<Button type="primary" ghost class="w-84px mr-12px" @click="handleSearch">
<template #icon>
<icon-search class="mr-8px"/>
<icon-search class="mr-8px" />
</template>
<template #default>搜索</template>
</Button>
<Button class="w-84px" @click="handleReset">
<template #icon>
<icon-refresh class="mr-8px"/>
<icon-refresh class="mr-8px" />
</template>
<template #default>重置</template>
</Button>
@ -95,7 +82,7 @@
<script setup>
import { reactive, defineEmits, defineProps } from 'vue';
import { Button } from 'ant-design-vue';
import { Button, Input } from 'ant-design-vue';
import {
fetchAccountTags,
getProjectList,

View File

@ -13,7 +13,7 @@
>
<Form ref="formRef" :model="form" :rules="rules" layout="horizontal" auto-label-width>
<FormItem :label="isEdit ? '分组名称' : '新分组名称'" name="name" required>
<a-input v-model="form.name" placeholder="请输入…" />
<Input v-model:value="form.name" placeholder="请输入…" />
</FormItem>
</Form>
<template #footer>
@ -25,7 +25,7 @@
<script setup>
import { ref, watch, nextTick } from 'vue';
import { Button, Modal, Form, FormItem } from 'ant-design-vue';
import { Button, Modal, Form, FormItem, Input } from 'ant-design-vue';
import { postAccountGroups, putGroup } from '@/api/all/propertyMarketing';
const emits = defineEmits(['success', 'close']);

View File

@ -17,11 +17,11 @@
<div class="filter-row-item flex items-center">
<span class="s1 !color-#211F24 mr-12px">分组名称</span>
<a-space size="medium" class="w-240px">
<a-input v-model="query.name" placeholder="请搜索..." size="medium" allow-clear @change="reload">
<Input v-model:value="query.name" placeholder="请搜索..." size="middle" allowClear @change="reload">
<template #prefix>
<icon-search />
</template>
</a-input>
</Input>
</a-space>
</div>
<Button type="primary" size="middle" @click="openAdd"
@ -82,7 +82,7 @@
<script setup>
import { ref, reactive, onMounted } from 'vue';
import { Button, Modal } from 'ant-design-vue';
import { Button, Modal, Input } from 'ant-design-vue';
import { getAccountGroup } from '@/api/all/propertyMarketing';
import { exactFormatTime } from '@/utils/tools';

View File

@ -9,7 +9,7 @@
>
<Form ref="formRef" :model="form" :rules="rules" layout="horizontal" auto-label-width>
<FormItem :label="isEdit ? '标签名称' : '新标签名称'" name="name" required>
<a-input v-model="form.name" placeholder="请输入…" />
<Input v-model:value="form.name" placeholder="请输入…" />
</FormItem>
</Form>
<template #footer>
@ -21,7 +21,7 @@
<script setup>
import { ref, nextTick } from 'vue';
import { Button, Modal, Form, FormItem } from 'ant-design-vue';
import { Button, Modal, Form, FormItem, Input } from 'ant-design-vue';
import { postAccountTags, putTag } from '@/api/all/propertyMarketing';
const emits = defineEmits(['success', 'close']);

View File

@ -16,17 +16,22 @@
<div class="flex items-center justify-between mb-16px">
<div class="filter-row-item flex items-center">
<span class="s1 !color-#211F24 mr-12px">分组名称</span>
<a-space size="medium" class="w-240px">
<a-input v-model="query.name" placeholder="请搜索..." size="medium" allow-clear @change="handleSearch">
<template #prefix>
<icon-search />
</template>
</a-input>
</a-space>
<Input
v-model:value="query.name"
placeholder="请搜索..."
class="w-240px"
size="medium"
allowClear
@change="handleSearch"
>
<template #prefix>
<icon-search />
</template>
</Input>
</div>
<Button type="primary" @click="openAdd">
<template #icon>
<icon-plus size="16" class="mr-8px"/>
<icon-plus size="16" class="mr-8px" />
</template>
<template #default>添加新标签</template>
</Button>
@ -46,7 +51,7 @@
<span class="s1 mb-16px">暂无标签</span>
<Button type="primary" class="mb-16px" @click="openAdd">
<template #icon>
<icon-plus size="16" class="mr-8px"/>
<icon-plus size="16" class="mr-8px" />
</template>
<template #default>去添加</template>
</Button>
@ -61,9 +66,8 @@
<script setup>
import { ref } from 'vue';
import { Button, Modal } from 'ant-design-vue';
import { Button, Modal, Input } from 'ant-design-vue';
import { getTagsList } from '@/api/all/propertyMarketing';
import AddTag from './add-tag.vue';
import DeleteTag from './delete-tag.vue';