Ref actively registers data And ref 注册方法 #685
githublaohu
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
test.vue
import { mode } from '@model'; mode(ref)
model.ts
`
const addModel = {};
const updateModel = {};
const deleteModel = {}
addModel.addRequest = function(){}
declare const _default = function(ref){
ref("addModel", addModel);
ref("updateModel", addModel);
ref("deleteModel", addModel);
}
export default _default;
`
---------------- vue2 ---------------------------
Vue2 can bind component data and methods with Vue pages through data. I don't know how to operate Vue3.
`<script>
import modelManage from "../modelManage"
var viewModel = null;
export default {
props: {
info: {
type: Object,
default: null
},
view: {
type: Object,
default: null
}
},
beforeCreate(){
}
</script>`
Beta Was this translation helpful? Give feedback.
All reactions