You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
317 B
14 lines
317 B
import { behavior } from './behavior';
|
|
import { observeProps } from './props';
|
|
|
|
export function observe(sfc) {
|
|
if (sfc.computed) {
|
|
sfc.behaviors.push(behavior);
|
|
sfc.methods = sfc.methods || {};
|
|
sfc.methods.$options = () => sfc;
|
|
|
|
if (sfc.properties) {
|
|
observeProps(sfc.properties);
|
|
}
|
|
}
|
|
}
|
|
|