import { QL } from "plume2" ; /**
 * 查询输入框的值
 */ export const valueQL = QL ( "value" , [ "value" , /**
     * 转换UI需要的值
     */ value => value ] ) ; /**
 * 查询todo
 */ export const todoQL = QL ( "todo" , [ "todo" , "filterStatus" , ( todo , filterStatus ) => { if ( filterStatus === "" ) { return todo ; } const done = filterStatus === "completed" ; return todo . filter ( v => { return v . get ( "done" ) === done ; } ) ; } ] ) ; /**
 * 查询todo的数量
 */ export const countQL = QL ( "count" , [ todoQL , /**
     * QL支持嵌套
     */ todoQL => todoQL . count ( ) ] ) ;