Skip to content

Commit

Permalink
提高拼音匹配精度
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhaoZuohong committed Nov 22, 2023
1 parent 368231c commit bdaec47
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions ui/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ declare module '@vue/runtime-core' {
MaaWeekly: typeof import('./src/components/MaaWeekly.vue')['default']
MaaWeeklyNew: typeof import('./src/components/MaaWeeklyNew.vue')['default']
MaaWeeklypartly: typeof import('./src/components/MaaWeeklypartly.vue')['default']
NA: typeof import('naive-ui')['NA']
NAvatar: typeof import('naive-ui')['NAvatar']
NButton: typeof import('naive-ui')['NButton']
NCard: typeof import('naive-ui')['NCard']
Expand Down
4 changes: 2 additions & 2 deletions ui/src/components/PlanEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ import { match } from 'pinyin-pro'
:options="operators_with_free"
class="operator-select"
v-model:value="plan[facility].plans[i - 1].agent"
:filter="(p, o) => match(o.label, p, { precision: 'any' })"
:filter="(p, o) => match(o.label, p)"
:render-label="render_op_label"
/>
</td>
Expand All @@ -399,7 +399,7 @@ import { match } from 'pinyin-pro'
:options="operators_with_free"
class="replacement-select"
v-model:value="plan[facility].plans[i - 1].replacement"
:filter="(p, o) => match(o.label, p, { precision: 'any' })"
:filter="(p, o) => match(o.label, p)"
:render-label="render_op_label"
:render-tag="render_op_tag"
/>
Expand Down
12 changes: 6 additions & 6 deletions ui/src/pages/Plan.vue
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ import { match } from 'pinyin-pro'
filterable
:options="operators"
v-model:value="current_conf.rest_in_full"
:filter="(p, o) => match(o.label, p, { precision: 'any' })"
:filter="(p, o) => match(o.label, p)"
:render-label="render_op_label"
:render-tag="render_op_tag"
/>
Expand All @@ -292,7 +292,7 @@ import { match } from 'pinyin-pro'
filterable
:options="operators"
v-model:value="current_conf.exhaust_require"
:filter="(p, o) => match(o.label, p, { precision: 'any' })"
:filter="(p, o) => match(o.label, p)"
:render-label="render_op_label"
:render-tag="render_op_tag"
/>
Expand All @@ -306,7 +306,7 @@ import { match } from 'pinyin-pro'
filterable
:options="operators"
v-model:value="current_conf.workaholic"
:filter="(p, o) => match(o.label, p, { precision: 'any' })"
:filter="(p, o) => match(o.label, p)"
:render-label="render_op_label"
:render-tag="render_op_tag"
/>
Expand All @@ -320,7 +320,7 @@ import { match } from 'pinyin-pro'
filterable
:options="operators"
v-model:value="current_conf.resting_priority"
:filter="(p, o) => match(o.label, p, { precision: 'any' })"
:filter="(p, o) => match(o.label, p)"
:render-label="render_op_label"
:render-tag="render_op_tag"
/>
Expand All @@ -334,7 +334,7 @@ import { match } from 'pinyin-pro'
filterable
:options="operators"
v-model:value="current_conf.refresh_trading"
:filter="(p, o) => match(o.label, p, { precision: 'any' })"
:filter="(p, o) => match(o.label, p)"
:render-label="render_op_label"
:render-tag="render_op_tag"
/>
Expand All @@ -351,7 +351,7 @@ import { match } from 'pinyin-pro'
filterable
:options="operators"
v-model:value="current_conf.free_blacklist"
:filter="(p, o) => match(o.label, p, { precision: 'any' })"
:filter="(p, o) => match(o.label, p)"
:render-label="render_op_label"
:render-tag="render_op_tag"
/>
Expand Down
4 changes: 2 additions & 2 deletions ui/src/pages/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ import { render_op_label, render_op_tag } from '@/utils/op_select'
v-model:value="free_blacklist"
:render-source-label="(o) => render_op_label(o.option)"
:render-target-label="(o) => render_op_label(o.option)"
:filter="(p, o) => (p ? match(o.label, p, { precision: 'any' }) : true)"
:filter="(p, o) => (p ? match(o.label, p) : true)"
/>
<n-select
v-else
Expand All @@ -204,7 +204,7 @@ import { render_op_label, render_op_tag } from '@/utils/op_select'
:render-label="render_op_label"
:render-tag="render_op_tag"
v-model:value="free_blacklist"
:filter="(p, o) => match(o.label, p, { precision: 'any' })"
:filter="(p, o) => match(o.label, p)"
/>
</n-form-item>
<n-form-item>
Expand Down

0 comments on commit bdaec47

Please sign in to comment.