This commit is contained in:
wenjiarui 2023-04-12 20:16:11 +08:00
parent b2131f70ed
commit 17faf4bc26
17 changed files with 53 additions and 62 deletions

View File

@ -1,23 +1,14 @@
/// <reference types="react" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../general-app-domain").EntityDict, keyof import("../../../general-app-domain").EntityDict, false, {
bgColor: StringConstructor;
bgImg: StringConstructor;
selectedIndex: {
type: NumberConstructor;
value: number;
};
bgColor: string;
bgImg: string;
selectedIndex: number;
list: {
redDot: boolean;
text: string;
pagePath: string;
}[];
color: {
type: StringConstructor;
value: string;
};
selectedColor: {
type: StringConstructor;
value: string;
};
color: string;
selectedColor: string;
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
export default _default;

View File

@ -4,30 +4,21 @@ exports.default = OakComponent({
isList: false,
properties: {
// 背景色
bgColor: String,
bgColor: '',
// 背景图
bgImg: String,
bgImg: '',
// 当前选中索引
selectedIndex: {
type: Number,
value: 0
},
selectedIndex: 0,
// tab 项
list: [],
color: {
type: String,
value: '#666'
},
selectedColor: {
type: String,
value: ''
}
color: '#666',
selectedColor: '',
},
lifetimes: {
show: function () {
// 切换 tab 选中项
this.parseCurrentPage();
}
},
},
data: {
showTabBar: true,
@ -53,7 +44,7 @@ exports.default = OakComponent({
return;
}
this.setState({
selectedIndex: index
selectedIndex: index,
});
// 触发事件
var item = list[index];
@ -65,7 +56,10 @@ exports.default = OakComponent({
onTapItem: function (e) {
var index = e.currentTarget.dataset.index;
var url = this.props.list[index].pagePath;
this.triggerEvent('lintap', { index: index, item: this.props.list[index] });
this.triggerEvent('lintap', {
index: index,
item: this.props.list[index],
});
if (!url) {
return;
}
@ -77,10 +71,10 @@ exports.default = OakComponent({
url: url,
fail: function (error) {
console.warn('路由跳转错误,错误信息为:', error);
}
},
});
}
},
});
}
}
},
},
});

View File

@ -1,6 +1,6 @@
/// <reference types="react" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../general-app-domain").EntityDict, keyof import("../../../general-app-domain").EntityDict, false, {
onActionClick: Function;
onActionClick: ((action: string) => void) | undefined;
actions: string[];
actionDescriptions: any;
iconSize: string;

View File

@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.default = OakComponent({
isList: false,
properties: {
onActionClick: (function () { return undefined; }),
onActionClick: undefined,
actions: [],
actionDescriptions: {},
iconSize: '',

View File

@ -1,7 +1,7 @@
/// <reference types="react" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../general-app-domain").EntityDict, keyof import("../../general-app-domain").EntityDict, false, {
onlyCaptcha: BooleanConstructor;
onlyPassword: BooleanConstructor;
onlyCaptcha: boolean;
onlyPassword: boolean;
eventLoggedIn: string;
backUrl: string;
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;

View File

@ -21,8 +21,8 @@ exports.default = OakComponent({
loading: false,
},
properties: {
onlyCaptcha: Boolean,
onlyPassword: Boolean,
onlyCaptcha: false,
onlyPassword: false,
eventLoggedIn: '',
backUrl: '', //回调url
},

View File

@ -1,8 +1,8 @@
/// <reference types="react" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../general-app-domain").EntityDict, keyof import("../../../general-app-domain").EntityDict, false, {
onlyCaptcha: BooleanConstructor;
onlyPassword: BooleanConstructor;
onlyCaptcha: boolean;
onlyPassword: boolean;
eventLoggedIn: string;
callback: Function;
callback: (() => void) | undefined;
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
export default _default;

View File

@ -17,10 +17,10 @@ exports.default = OakComponent({
password: '',
},
properties: {
onlyCaptcha: Boolean,
onlyPassword: Boolean,
onlyCaptcha: false,
onlyPassword: false,
eventLoggedIn: '',
callback: (function () { return undefined; }),
callback: undefined,
},
formData: function (_a) {
var _this = this;

View File

@ -1,5 +1,5 @@
/// <reference types="react" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../general-app-domain").EntityDict, "mobile", true, {
showBack: BooleanConstructor;
showBack: boolean;
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
export default _default;

View File

@ -44,7 +44,7 @@ exports.default = OakComponent({
deleteIdx: undefined,
},
properties: {
showBack: Boolean,
showBack: false,
},
methods: {
onRefreshMobile: function (e) {

View File

@ -1,7 +1,8 @@
/// <reference types="react" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../../general-app-domain").EntityDict, keyof import("../../../../general-app-domain").EntityDict, false, {
entity: StringConstructor;
entityId: StringConstructor;
relations: ArrayConstructor;
import { EntityDict } from '../../../../general-app-domain';
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, keyof EntityDict, false, {
entity: keyof EntityDict;
entityId: string;
relations: string[];
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
export default _default;

View File

@ -10,9 +10,9 @@ exports.default = OakComponent({
};
},
properties: {
entity: String,
entityId: String,
relations: Array,
entity: '',
entityId: '',
relations: [],
},
methods: {
onConfirm: function () {
@ -27,6 +27,6 @@ exports.default = OakComponent({
}
});
});
}
},
},
});

View File

@ -1,5 +1,5 @@
/// <reference types="react" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../../general-app-domain").EntityDict, "wechatPublicTag", true, {
applicationId: StringConstructor;
applicationId: string;
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
export default _default;

View File

@ -28,7 +28,7 @@ exports.default = OakComponent({
};
},
properties: {
applicationId: String,
applicationId: '',
},
methods: {
goCreate: function () {

View File

@ -226,10 +226,12 @@ var triggers = [
updateData = {
applicationId: appId,
allowShare: true,
url: url,
expired: false,
expiresAt: permanent ? null : Date.now() + 2592000 * 1000, // wecharQrCode里的过期时间都放到最大由上层关联对象来主动过期by Xc, 20230131)
};
if (url) {
Object.assign(updateData, { url: url });
}
if (!wechatQrCode.type) {
Object.assign(updateData, {
type: appType,

View File

@ -1,7 +1,7 @@
export default OakComponent({
isList: false,
properties: {
onActionClick: undefined as ((() => void) | undefined),
onActionClick: undefined as (((action: string) => void) | undefined),
actions: [] as string[],
actionDescriptions: {} as any,
iconSize: '',

View File

@ -248,11 +248,14 @@ const triggers: Trigger<EntityDict, 'wechatQrCode', RuntimeCxt>[] = [
const updateData = {
applicationId: appId,
allowShare: true,
url,
expired: false,
expiresAt: permanent ? null : Date.now() + 2592000 * 1000, // wecharQrCode里的过期时间都放到最大由上层关联对象来主动过期by Xc, 20230131)
};
if (url) {
Object.assign(updateData, { url });
}
if (!wechatQrCode.type) {
Object.assign(
updateData, {