feat:change makeRef to createRef
This commit is contained in:
parent
c2b07e4a20
commit
4b66be7bc1
@ -17,7 +17,7 @@ import {
|
||||
Scroller,
|
||||
jsx,
|
||||
VLayout,
|
||||
makeRef,
|
||||
createRef,
|
||||
HLayout,
|
||||
} from "doric";
|
||||
import { colors } from "./utils";
|
||||
@ -216,11 +216,11 @@ interface GoBangState {
|
||||
class GoBangVH extends ViewHolder {
|
||||
root!: Group;
|
||||
gap = 0;
|
||||
currentRole = makeRef<Text>();
|
||||
result = makeRef<Text>();
|
||||
currentRole = createRef<Text>();
|
||||
result = createRef<Text>();
|
||||
targetZone: View[] = [];
|
||||
gameMode = makeRef<Text>();
|
||||
assistant = makeRef<Text>();
|
||||
gameMode = createRef<Text>();
|
||||
assistant = createRef<Text>();
|
||||
build(root: Group): void {
|
||||
this.root = root;
|
||||
}
|
||||
|
@ -6,10 +6,7 @@ import {
|
||||
Group,
|
||||
layoutConfig,
|
||||
Text,
|
||||
makeRef,
|
||||
Stack,
|
||||
Color,
|
||||
modal,
|
||||
createRef,
|
||||
} from "doric";
|
||||
|
||||
function createFragment() {
|
||||
@ -25,7 +22,7 @@ function createFragment() {
|
||||
class Counter extends Panel {
|
||||
build(root: Group) {
|
||||
const fragments = createFragment();
|
||||
const ref = makeRef<Text>();
|
||||
const ref = createRef<Text>();
|
||||
let count = 0;
|
||||
<VLayout
|
||||
space={20}
|
||||
|
@ -223,7 +223,7 @@ var Ref = /** @class */ (function () {
|
||||
});
|
||||
return Ref;
|
||||
}());
|
||||
function makeRef() {
|
||||
function createRef() {
|
||||
return new Ref;
|
||||
}
|
||||
var View = /** @class */ (function () {
|
||||
@ -4142,6 +4142,7 @@ exports.ViewHolder = ViewHolder;
|
||||
exports.ViewModel = ViewModel;
|
||||
exports.animate = animate;
|
||||
exports.coordinator = coordinator;
|
||||
exports.createRef = createRef;
|
||||
exports.draggable = draggable;
|
||||
exports.flexlayout = flexlayout;
|
||||
exports.flowItem = flowItem;
|
||||
@ -4158,7 +4159,6 @@ exports.listItem = listItem;
|
||||
exports.log = log;
|
||||
exports.loge = loge;
|
||||
exports.logw = logw;
|
||||
exports.makeRef = makeRef;
|
||||
exports.modal = modal;
|
||||
exports.navbar = navbar;
|
||||
exports.navigator = navigator;
|
||||
|
@ -152,7 +152,7 @@ class Ref {
|
||||
return this.view;
|
||||
}
|
||||
}
|
||||
function makeRef() {
|
||||
function createRef() {
|
||||
return new Ref;
|
||||
}
|
||||
class View {
|
||||
@ -3191,6 +3191,7 @@ exports.ViewHolder = ViewHolder;
|
||||
exports.ViewModel = ViewModel;
|
||||
exports.animate = animate;
|
||||
exports.coordinator = coordinator;
|
||||
exports.createRef = createRef;
|
||||
exports.draggable = draggable;
|
||||
exports.flexlayout = flexlayout;
|
||||
exports.flowItem = flowItem;
|
||||
@ -3207,7 +3208,6 @@ exports.listItem = listItem;
|
||||
exports.log = log;
|
||||
exports.loge = loge;
|
||||
exports.logw = logw;
|
||||
exports.makeRef = makeRef;
|
||||
exports.modal = modal;
|
||||
exports.navbar = navbar;
|
||||
exports.navigator = navigator;
|
||||
|
@ -1676,7 +1676,7 @@ class Ref {
|
||||
return this.view;
|
||||
}
|
||||
}
|
||||
function makeRef() {
|
||||
function createRef() {
|
||||
return new Ref;
|
||||
}
|
||||
class View {
|
||||
@ -4956,6 +4956,7 @@ exports.ViewHolder = ViewHolder;
|
||||
exports.ViewModel = ViewModel;
|
||||
exports.animate = animate;
|
||||
exports.coordinator = coordinator;
|
||||
exports.createRef = createRef;
|
||||
exports.draggable = draggable;
|
||||
exports.flexlayout = flexlayout;
|
||||
exports.flowItem = flowItem;
|
||||
@ -4972,7 +4973,6 @@ exports.listItem = listItem;
|
||||
exports.log = log;
|
||||
exports.loge = loge;
|
||||
exports.logw = logw;
|
||||
exports.makeRef = makeRef;
|
||||
exports.modal = modal;
|
||||
exports.navbar = navbar;
|
||||
exports.navigator = navigator;
|
||||
|
2
doric-js/index.d.ts
vendored
2
doric-js/index.d.ts
vendored
@ -195,7 +195,7 @@ declare module 'doric/lib/src/ui/view' {
|
||||
set current(v: T);
|
||||
get current(): T;
|
||||
}
|
||||
export function makeRef<T extends View>(): Ref<T>;
|
||||
export function createRef<T extends View>(): Ref<T>;
|
||||
export abstract class View implements Modeling {
|
||||
width: number;
|
||||
height: number;
|
||||
|
2
doric-js/lib/src/ui/view.d.ts
vendored
2
doric-js/lib/src/ui/view.d.ts
vendored
@ -19,7 +19,7 @@ export declare class Ref<T extends View> {
|
||||
set current(v: T);
|
||||
get current(): T;
|
||||
}
|
||||
export declare function makeRef<T extends View>(): Ref<T>;
|
||||
export declare function createRef<T extends View>(): Ref<T>;
|
||||
export declare abstract class View implements Modeling {
|
||||
width: number;
|
||||
height: number;
|
||||
|
@ -34,7 +34,7 @@ export class Ref {
|
||||
return this.view;
|
||||
}
|
||||
}
|
||||
export function makeRef() {
|
||||
export function createRef() {
|
||||
return new Ref;
|
||||
}
|
||||
export class View {
|
||||
|
@ -80,7 +80,7 @@ export class Ref<T extends View> {
|
||||
}
|
||||
}
|
||||
|
||||
export function makeRef() {
|
||||
export function createRef() {
|
||||
return new Ref
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ export class Ref<T extends View> {
|
||||
}
|
||||
}
|
||||
|
||||
export function makeRef<T extends View>(): Ref<T> {
|
||||
export function createRef<T extends View>(): Ref<T> {
|
||||
return new Ref
|
||||
}
|
||||
|
||||
|
4
doric-web/dist/index.js
vendored
4
doric-web/dist/index.js
vendored
@ -1730,7 +1730,7 @@ class Ref {
|
||||
return this.view;
|
||||
}
|
||||
}
|
||||
function makeRef() {
|
||||
function createRef() {
|
||||
return new Ref;
|
||||
}
|
||||
class View {
|
||||
@ -4769,6 +4769,7 @@ exports.ViewHolder = ViewHolder;
|
||||
exports.ViewModel = ViewModel;
|
||||
exports.animate = animate;
|
||||
exports.coordinator = coordinator;
|
||||
exports.createRef = createRef;
|
||||
exports.draggable = draggable;
|
||||
exports.flexlayout = flexlayout;
|
||||
exports.flowItem = flowItem;
|
||||
@ -4785,7 +4786,6 @@ exports.listItem = listItem;
|
||||
exports.log = log;
|
||||
exports.loge = loge;
|
||||
exports.logw = logw;
|
||||
exports.makeRef = makeRef;
|
||||
exports.modal = modal;
|
||||
exports.navbar = navbar;
|
||||
exports.navigator = navigator;
|
||||
|
Reference in New Issue
Block a user