opentiny / tiny-vue

TinyVue is an enterprise-class UI component library of OpenTiny community, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.
https://opentiny.design/tiny-vue
MIT License
1.54k stars 253 forks source link

🐛 [Bug]: I would like to ask if the pop-up editing component has parameter search. After clicking OK, open the pop-up editing again. Does it support resetting the query? #555

Closed thestar077 closed 11 months ago

thestar077 commented 11 months ago

Version

3.10.0

Vue Version

3.2.47

Link to minimal reproduction

21d75f28e97fb77dcfb4baf413b37bd

Step to reproduce

21d75f28e97fb77dcfb4baf413b37bd

What is expected

No response

What is actually happening

No response

Any additional comments (optional)

No response

Issues-translate-bot commented 11 months ago

Bot detected the issue body's language is not English, translate it automatically.


Title: 🐛 [Bug]:

wkif commented 11 months ago

或许可以使用 before-close 对参数重置

Issues-translate-bot commented 11 months ago

Bot detected the issue body's language is not English, translate it automatically.


Maybe you can use before-close to reset parameters

thestar077 commented 11 months ago

请问重置查询条件是调用哪个方法呢?希望使用before-close后调用重置查询条件

籽然 @.***

 

------------------ 原始邮件 ------------------ 发件人: "opentiny/tiny-vue" @.>; 发送时间: 2023年10月7日(星期六) 中午1:41 @.>; @.**@.>; 主题: Re: [opentiny/tiny-vue] 🐛 [Bug]: 请问弹出编辑组件带参数搜索,点击确定后,再次打开弹出编辑,支持重置查询吗 (Issue #555)

Bot detected the issue body's language is not English, translate it automatically.

Maybe you can use before-close to reset parameters

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

wkif commented 11 months ago

请问重置查询条件是调用哪个方法呢?希望使用before-close后调用重置查询条件 籽然 @.   ------------------ 原始邮件 ------------------ 发件人: "opentiny/tiny-vue" @.>; 发送时间: 2023年10月7日(星期六) 中午1:41 @.>; @*.**@*.>; 主题: Re: [opentiny/tiny-vue] 🐛 [Bug]: 请问弹出编辑组件带参数搜索,点击确定后,再次打开弹出编辑,支持重置查询吗 (Issue #555) Bot detected the issue body's language is not English, translate it automatically. Maybe you can use before-close to reset parameters — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.>

参照官网实例具体实现如下:

playground

thestar077 commented 11 months ago

<tiny-popeditor multi :remote-search="remoteSearch" v-model="value" show-pager :grid-op="gridOp" text-field="name" value-field="id" :conditions="conditions"

const conditions = ref([ { label: '公司名', field: 'name' }, { label: '城市', field: 'city' } ])

tiny-popeditor查询条件使用conditions 配置,这样怎么重置查询条件呢

thestar077 commented 11 months ago

<tiny-popeditor     multi     :remote-search="remoteSearch"     v-model="value"     show-pager     :grid-op="gridOp"     text-field="name"     value-field="id"     :conditions="conditions"   ></tiny-popeditor>

const conditions = ref([   { label: '公司名', field: 'name' },   { label: '城市', field: 'city' } ])

tiny-popeditor查询条件使用conditions 配置,这样怎么重置查询条件呢

籽然 @.***

 

------------------ 原始邮件 ------------------ 发件人: "opentiny/tiny-vue" @.>; 发送时间: 2023年10月7日(星期六) 下午4:10 @.>; @.**@.>; 主题: Re: [opentiny/tiny-vue] 🐛 [Bug]: 请问弹出编辑组件带参数搜索,点击确定后,再次打开弹出编辑,支持重置查询吗 (Issue #555)

请问重置查询条件是调用哪个方法呢?希望使用before-close后调用重置查询条件 籽然 @.   … ------------------ 原始邮件 ------------------ 发件人: "opentiny/tiny-vue" @.>; 发送时间: 2023年10月7日(星期六) 中午1:41 @.>; @.@.>; 主题: Re: [opentiny/tiny-vue] 🐛 [Bug]: 请问弹出编辑组件带参数搜索,点击确定后,再次打开弹出编辑,支持重置查询吗 (Issue #555) Bot detected the issue body's language is not English, translate it automatically. Maybe you can use before-close to reset parameters — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.>

参照官网实例具体实现如下:

playground

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

wkif commented 11 months ago

<tiny-popeditor multi :remote-search="remoteSearch" v-model="value" show-pager :grid-op="gridOp" text-field="name" value-field="id" :conditions="conditions"

const conditions = ref([ { label: '公司名', field: 'name' }, { label: '城市', field: 'city' } ])

tiny-popeditor查询条件使用conditions 配置,这样怎么重置查询条件呢

不好意思是我误解了,您使用的是 tiny-popeditor,而我给的是 tiny-dialog-select 组件。tiny-popeditor有提供“重置”方法,但并未暴露,后面可能考虑暴露出来,暂时可以使用ref在close事件直接调用,


 <tiny-popeditor
    ref="tinypopeditor"
    :conditions="conditions"
    @close="close"
  ></tiny-popeditor>

const tinypopeditor = ref(null)
const close = ()=>{
  tinypopeditor.value.handleReset();
}

示例:

playground

thestar077 commented 11 months ago

收到,谢谢你 

籽然 @.***

 

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2023年10月7日(星期六) 晚上6:46 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [opentiny/tiny-vue] 🐛 [Bug]: 请问弹出编辑组件带参数搜索,点击确定后,再次打开弹出编辑,支持重置查询吗 (Issue #555)

<tiny-popeditor multi :remote-search="remoteSearch" v-model="value" show-pager :grid-op="gridOp" text-field="name" value-field="id" :conditions="conditions"

const conditions = ref([ { label: '公司名', field: 'name' }, { label: '城市', field: 'city' } ])

tiny-popeditor查询条件使用conditions 配置,这样怎么重置查询条件呢

不好意思是我误解了,您使用的是 tiny-popeditor,而我给的是 tiny-dialog-select 组件。tiny-popeditor有提供“重置”方法,但并未暴露,后面可能考虑暴露出来,暂时可以使用ref在close事件直接调用, <tiny-popeditor ref="tinypopeditor" :conditions="conditions" @close="close" ></tiny-popeditor> const tinypopeditor = ref(null) const close = ()=>{ tinypopeditor.value.handleReset(); }

示例:

playground

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>