Skip to content

Commit

Permalink
fix: 修复了接口管理静态数据和动态数据无快速选择操作 #90
Browse files Browse the repository at this point in the history
  • Loading branch information
AnsGoo committed Sep 17, 2023
1 parent 59e4372 commit 6553a82
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 22 deletions.
6 changes: 5 additions & 1 deletion examples/data/Quick/Content.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
placeholder="请选择数据"
@update:value="dataChangeHandler"
@clear="clear"
/>
>
<template #arrow>
<x-icon name="data" />
</template>
</n-select>
<n-input-group v-if="mode === 'debug'">
<n-input v-model:value="formData.title" class="title">
<template #prefix>
Expand Down
40 changes: 21 additions & 19 deletions examples/data/Rest/DynamicExtendContent.vue
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
<template>
<RestContent v-model:options="formData" @update:rest-options="formChange" @change="formChange">
<template #data-select>
<n-select
:options="restDataList"
:value="formData.id"
class="selected"
clearable
placeholder="请选择数据"
@update:value="selectedChange"
@clear="clear"
/>
<n-input v-if="mode === 'debug'" v-model:value="formData.title" class="title">
<template #prefix>
<x-icon name="api" />
</template>
</n-input>
<n-space v-if="mode === 'debug'">
<n-button-group class="save">
<n-button @click="formData.id ? handleUpdate() : handleSave()">保存</n-button>
</n-button-group>
</n-space>
<div class="flex flex-nowrap flex-row">
<n-select
:options="restDataList"
:value="formData.id"
class="selected"
clearable
placeholder="请选择数据"
@update:value="selectedChange"
@clear="clear"
/>
<n-input v-if="mode === 'debug'" v-model:value="formData.title" class="title">
<template #prefix>
<x-icon name="api" />
</template>
</n-input>
<n-space v-if="mode === 'debug'">
<n-button-group class="save">
<n-button @click="formData.id ? handleUpdate() : handleSave()">保存</n-button>
</n-button-group>
</n-space>
</div>
</template>
</RestContent>
</template>
Expand Down
5 changes: 3 additions & 2 deletions examples/pages/ApiView/View.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { RestContent } from 'open-data-v/data/rest'
import { StaticContent } from 'open-data-v/data/static'
import { defineComponent } from 'vue'

import StaticContent from '@/data/Quick/Content.vue'
import RestContent from '@/data/Rest/DynamicExtendContent.vue'

export default defineComponent({
props: {
active: {
Expand Down

0 comments on commit 6553a82

Please sign in to comment.