mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-07-04 09:38:15 +08:00
feat: ✨ 表格右键菜单增加排序功能
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
<PackageReference Include="NetAdmin.FreeSql.Provider.Sqlite" Version="1.1.6" Label="refs"/>
|
||||
<PackageReference Include="Gurion" Version="1.2.15" Label="refs"/>
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="9.0.6"/>
|
||||
<PackageReference Include="Minio" Version="6.0.4"/>
|
||||
<PackageReference Include="Minio" Version="6.0.5"/>
|
||||
<PackageReference Include="NSExt" Version="2.3.6"/>
|
||||
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="2.1.6"/>
|
||||
</ItemGroup>
|
||||
|
@ -177,6 +177,13 @@
|
||||
<scContextmenuItem
|
||||
:command="`${menu}^|^NotAny^|^${tool.getNestedProperty(current.row, menu) ?? ''}`"
|
||||
:title="$t('非其一')"></scContextmenuItem>
|
||||
<scContextmenuItem
|
||||
:command="`${menu}^|^order-ascending^|^${tool.getNestedProperty(current.row, menu) ?? ''}`"
|
||||
:title="$t('顺序排序')"
|
||||
divided></scContextmenuItem>
|
||||
<scContextmenuItem
|
||||
:command="`${menu}^|^order-descending^|^${tool.getNestedProperty(current.row, menu) ?? ''}`"
|
||||
:title="$t('倒序排序')"></scContextmenuItem>
|
||||
</scContextmenuItem>
|
||||
<scContextmenuItem :title="$t('复制')" command="copy" divided icon="el-icon-copy-document" suffix="C"></scContextmenuItem>
|
||||
<scContextmenuItem
|
||||
@ -409,6 +416,11 @@ export default {
|
||||
return
|
||||
}
|
||||
const kv = command.split('^|^')
|
||||
if (kv[1].indexOf('order-') === 0) {
|
||||
this.vue.query.prop = kv[0]
|
||||
this.vue.query.order = kv[1].substring(6)
|
||||
this.upData()
|
||||
} else {
|
||||
this.$refs.fieldFilterDialog.open({ field: kv[0], operator: kv[1], value: kv[2] }, (data) => {
|
||||
const value = data.value?.split('\n') ?? ['']
|
||||
this.vue.query.dynamicFilter.filters.push({
|
||||
@ -421,6 +433,7 @@ export default {
|
||||
}
|
||||
this.upData()
|
||||
})
|
||||
}
|
||||
},
|
||||
contextMenuVisibleChange(visible) {
|
||||
if (!visible) {
|
||||
|
@ -624,4 +624,6 @@ export default {
|
||||
链接: 'Link',
|
||||
框架: 'IFrame',
|
||||
按钮: 'Button',
|
||||
倒序排序:'Sort-Descending',
|
||||
顺序排序:'Sort-Ascending',
|
||||
}
|
@ -622,4 +622,6 @@ export default {
|
||||
链接: '链接',
|
||||
框架: '框架',
|
||||
按钮: '按钮',
|
||||
倒序排序:'倒序排序',
|
||||
顺序排序:'顺序排序',
|
||||
}
|
Reference in New Issue
Block a user