mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
🎨 支持按文档大小排序 Fix https://github.com/siyuan-note/siyuan/issues/6029
This commit is contained in:
parent
76ef70ae68
commit
24250bb359
9 changed files with 45 additions and 3 deletions
|
|
@ -39,13 +39,13 @@ func PinYinCompare(str1, str2 string) bool {
|
|||
return true
|
||||
}
|
||||
|
||||
//UTF82GBK : transform UTF8 rune into GBK byte array
|
||||
// UTF82GBK : transform UTF8 rune into GBK byte array
|
||||
func UTF82GBK(src string) ([]byte, error) {
|
||||
GB18030 := simplifiedchinese.All[0]
|
||||
return io.ReadAll(transform.NewReader(bytes.NewReader([]byte(src)), GB18030.NewEncoder()))
|
||||
}
|
||||
|
||||
//GBK2UTF8 : transform GBK byte array into UTF8 string
|
||||
// GBK2UTF8 : transform GBK byte array into UTF8 string
|
||||
func GBK2UTF8(src []byte) (string, error) {
|
||||
GB18030 := simplifiedchinese.All[0]
|
||||
bytes, err := io.ReadAll(transform.NewReader(bytes.NewReader(src), GB18030.NewDecoder()))
|
||||
|
|
@ -64,4 +64,6 @@ const (
|
|||
SortModeRefCountDESC // 8:引用数降序
|
||||
SortModeCreatedASC // 9:文件创建时间升序
|
||||
SortModeCreatedDESC // 10:文件创建时间降序
|
||||
SortModeSizeASC // 11:文件大小升序
|
||||
SortModeSizeDESC // 12:文件大小降序
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue