File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed
service/sync/attribute/dto/instance Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " next-flow-interface" ,
3- "version" : " 0.23.13 " ,
3+ "version" : " 0.23.14 " ,
44 "description" : " Interface package for NEXT FlOW. You can use this package to build your own plugin that can control anything." ,
55 "type" : " module" ,
66 "module" : " dist/index.js" ,
Original file line number Diff line number Diff line change @@ -9,5 +9,9 @@ export default interface IBaseAttribute<T extends object = never> {
99
1010 defaultValue ?: T
1111
12+ getPath ( ) : RvPath
13+
1214 getPathString ( ) : string
15+
16+ isMyPath ( path : string | RvPath ) : boolean
1317}
Original file line number Diff line number Diff line change @@ -122,6 +122,20 @@ export class RvUtils {
122122 return true
123123 }
124124
125+ static checkRvPathStartWith ( from : RvPath | string , target : RvPath | string ) : boolean {
126+ const fromPath = RvUtils . ensureRvPath ( from )
127+ const targetPath = RvUtils . ensureRvPath ( target )
128+ if ( fromPath . length < targetPath . length ) {
129+ return false
130+ }
131+ for ( let i = 0 ; i < fromPath . length ; i ++ ) {
132+ if ( targetPath [ i ] != fromPath [ i ] ) {
133+ return false
134+ }
135+ }
136+ return true
137+ }
138+
125139 /**
126140 * 检查路径是否与目标列表中的任意路径重叠
127141 * @param from - 要检查的路径
You can’t perform that action at this time.
0 commit comments