Skip to content

Commit

Permalink
调整权重在列表中的位置
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleBing committed Jul 7, 2023
1 parent 855bdb8 commit 959c43a
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 19 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

## v1.20 `2023-07-01`
- 网络请求中添加 Diary-Uid

## v1.20 `2023-07-01`
- 显示搜索词的权重

Expand Down
4 changes: 4 additions & 0 deletions assets/scss/_list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ $border-color-checkbox: #d6d6d6;
text-overflow: ellipsis;
}
.priority{
min-width: 50px;
flex-shrink: 0;
white-space: nowrap;
@extend .font-roboto;
padding-right: 10px;
Expand All @@ -149,6 +151,8 @@ $border-color-checkbox: #d6d6d6;
}
.note{
color: $text-subtitle;
min-width: 50px;
flex-shrink: 0;
padding-right: 10px;
white-space: nowrap;
font-size: $fz-list - 2;
Expand Down
4 changes: 4 additions & 0 deletions assets/scss/wubi.css
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,8 @@
text-overflow: ellipsis;
}
.word-item .priority {
min-width: 50px;
flex-shrink: 0;
white-space: nowrap;
padding-right: 10px;
text-align: right;
Expand All @@ -619,6 +621,8 @@
}
.word-item .note {
color: #848484;
min-width: 50px;
flex-shrink: 0;
padding-right: 10px;
white-space: nowrap;
font-size: 11px;
Expand Down
4 changes: 2 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ function createMainWindow() {

function getOnlineDictContent(dictName, userInfo) {
let config = readConfigFile() // 没有配置文件时,返回 false
return wubiApi.pullDictFileContent(userInfo.password,{
return wubiApi.pullDictFileContent(userInfo,{
title: dictName,
}, config.baseURL)
}
Expand All @@ -223,7 +223,7 @@ function createMainWindow() {

wubiApi
.pushDictFileContent(
userInfo.password,
userInfo,
{
title: fileName,
content: finalContent, // 为了避免一些标点干扰出现的问题,直接全部转义,
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "wubi-dict-editor",
"version": "1.2.0",
"version": "1.2.1",
"private": true,
"author": {
"name": "KyleBing",
"email": "[email protected]"
},
"date": "2023-07-01",
"date": "2023-07-07",
"dateInit": "2021-07-24",
"description": "五笔码表管理工具",
"main": "main.js",
Expand Down Expand Up @@ -34,7 +34,7 @@
"config": {
"forge": {
"packagerConfig": {
"appVersion": "1.2.0",
"appVersion": "1.2.1",
"name": "五笔码表助手",
"appCopyright": "[email protected]",
"icon": "./assets/img/appIcon/appicon",
Expand Down
29 changes: 15 additions & 14 deletions view/index/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
<label for="code">编码</label>
<input ref="editInputCode" id="code" type="text" v-model="wordEditing.code" >
</div>
<div class="input-item mt-1">
<label for="note">备注</label>
<input ref="editInputNote" id="note" type="text" v-model="wordEditing.note" >
</div>
<div class="input-item mt-1">
<label for="priority">权重</label>
<input ref="editInputPriority" id="priority" type="text" v-model="wordEditing.priority" >
</div>
<div class="input-item mt-1">
<label for="note">备注</label>
<input ref="editInputNote" id="note" type="text" v-model="wordEditing.note" >
</div>
</div>
<div class="modal-footer">
<div class="btn btn-cyan " @click="generateCodeForWordEdit">生成编码</div>
Expand Down Expand Up @@ -84,7 +84,7 @@
@focus="isSearchbarFocused = true"
@focusout="isSearchbarFocused = false"
@keyup.enter="enterKeyPressed"
v-model="word" type="text" placeholder="词条">
v-model="word" type="text" placeholder="*词条">
<div @click="word = ''" v-show="word" class="btn-clear">
<img src="../../assets/img/delete_white.svg" alt="clear">
</div>
Expand All @@ -105,28 +105,29 @@
@focus="isSearchbarFocused = true"
@focusout="isSearchbarFocused = false"
@keyup.enter="enterKeyPressed"
v-model="code" type="text" placeholder="编码">
v-model="code" type="text" placeholder="*编码">
<div @click="code = ''" v-show="code" class="btn-clear">
<img src="../../assets/img/delete_white.svg" alt="clear">
</div>
</div>
<div class="input-item">
<input class="note" ref="domInputNote" @keyup.enter="enterKeyPressed" v-model="note" type="text" placeholder="备注:可选">
<div @click="note = ''" v-show="note" class="btn-clear">
<input class="priority" ref="domInputPriority" @keyup.enter="enterKeyPressed" v-model="priority" type="text" placeholder="权重">
<div @click="priority = ''" v-show="priority" class="btn-clear">
<img src="../../assets/img/delete_white.svg" alt="clear">
</div>
</div>
<div class="input-item">
<input class="priority" ref="domInputPriority" @keyup.enter="enterKeyPressed" v-model="priority" type="text" placeholder="权重:可选">
<div @click="priority = ''" v-show="priority" class="btn-clear">
<input class="note" ref="domInputNote" @keyup.enter="enterKeyPressed" v-model="note" type="text" placeholder="备注">
<div @click="note = ''" v-show="note" class="btn-clear">
<img src="../../assets/img/delete_white.svg" alt="clear">
</div>
</div>

<div class="btn btn-primary" @click="addNewWord">添加</div>
<div class="btn btn-primary" @click="search">搜索</div>

<div class="btn btn-roseo" v-show="chosenWordIdArray.length > 0" @click="deleteWords">删除</div>
<p class="notice">显示格式:<b>编码</b> - 词条 - 备注 - 权重 - id</p>
<p class="notice">显示格式:<b>编码</b> - 词条 - 权重 - 备注 - id</p>

<template v-if="IS_IN_DEVELOP">

Expand Down Expand Up @@ -163,8 +164,8 @@
</div>
<div title="编码" class="code">{{ item.code }}</div>
<div :title="item.word" class="word">{{ item.word }}</div>
<div title="备注" class="note">{{ item.note }}</div>
<div title="权重" class="priority">{{ item.priority }}</div>
<div title="备注" class="note">{{ item.note }}</div>
<div v-if="IS_IN_DEVELOP" class="id">{{ index + 1 }}</div>
<div class="id">{{ item.id }}</div>
<div class="operation">
Expand Down Expand Up @@ -254,8 +255,8 @@
</div>
<div title="编码" class="code">{{ item.code }}</div>
<div :title="item.word" class="word">{{ item.word }}</div>
<div title="备注" class="note">{{ item.note }}</div>
<div title="权重" class="priority">{{ item.priority }}</div>
<div title="备注" class="note">{{ item.note }}</div>
<div v-if="IS_IN_DEVELOP" class="id">{{ index + 1 }}</div>
<div class="id">{{ item.id }}</div>
<div class="operation">
Expand Down Expand Up @@ -404,7 +405,7 @@
<div class="btn btn-primary" @click="openCurrentYaml">编辑源码表文件</div>
</div>
<div class="btn-item mt-1">
<div class="btn btn-primary" @click="generateSqlFile">生成数据库文件</div>
<div class="btn btn-primary" @click="generateSqlFile">生成 sql 文件</div>
</div>
<div class="btn-item mt-1">
<div class="btn btn-cyan" @click="exportSelectionToPlist">导出选中词条到 .plist 文件</div>
Expand Down

0 comments on commit 959c43a

Please sign in to comment.