mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
15 lines
317 B
JavaScript
15 lines
317 B
JavaScript
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);
|
|
}
|
|
}
|
|
}
|