input组件 临时解决中文不能输入

This commit is contained in:
Wang Kejun 2022-10-28 18:23:29 +08:00
parent 75c19f2380
commit d8cdf83a47
548 changed files with 23464 additions and 579 deletions

View File

@ -1,6 +1,6 @@
/// <reference types="@uiw/react-amap-types" />
import React from 'react';
import { DialogProps } from 'tdesign-react';
import { ModalProps } from 'antd';
import { GeolocationProps } from '@uiw/react-amap';
import './index.less';
export declare type LocationProps = {
@ -13,7 +13,7 @@ export declare type LocationProps = {
onConfirm?: (poi: Poi, result?: AMap.SearchResult | AMapUI.PositionPickerResult) => void;
geolocationProps?: GeolocationProps;
useGeolocation?: boolean;
dialogProps?: DialogProps;
dialogProps?: ModalProps;
};
export declare type Poi = {
id: string;

View File

@ -3,13 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var jsx_runtime_1 = require("react/jsx-runtime");
var react_1 = tslib_1.__importStar(require("react"));
var tdesign_react_1 = require("tdesign-react");
var tdesign_icons_react_1 = require("tdesign-icons-react");
var antd_1 = require("antd");
var icons_1 = require("@ant-design/icons");
var react_amap_1 = require("@uiw/react-amap");
var map_1 = tslib_1.__importDefault(require("./../map"));
var PositionPicker_1 = tslib_1.__importDefault(require("./PositionPicker"));
require("./index.less");
var ListItem = tdesign_react_1.List.ListItem, ListItemMeta = tdesign_react_1.List.ListItemMeta;
var Location = function (props) {
var visible = props.visible, akey = props.akey, _a = props.version, version = _a === void 0 ? '2.0' : _a, onClose = props.onClose, onConfirm = props.onConfirm, _b = props.geolocationProps, geolocationProps = _b === void 0 ? {} : _b, _c = props.useGeolocation, useGeolocation = _c === void 0 ? true : _c, _d = props.dialogProps, dialogProps = _d === void 0 ? {} : _d;
var prefixCls = 'oak';
@ -131,17 +130,17 @@ var Location = function (props) {
setSearchValue('');
setRefresh(true);
};
return ((0, jsx_runtime_1.jsx)(tdesign_react_1.Dialog, tslib_1.__assign({ width: "80%" }, dialogProps, { visible: visible, onClose: function () {
return ((0, jsx_runtime_1.jsx)(antd_1.Modal, tslib_1.__assign({ width: "80%", okText: "\u786E\u5B9A", cancelText: "\u53D6\u6D88", title: "\u9009\u62E9\u4F4D\u7F6E" }, dialogProps, { open: visible, onCancel: function () {
onClose && onClose();
clearData();
}, onConfirm: function () {
}, onOk: function () {
if (!currentPoi) {
return;
}
onConfirm &&
onConfirm(currentPoi, mode === 'dragMap' ? positionPickerResult : searchResult);
clearData();
} }, { children: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: "".concat(prefixCls, "-location") }, { children: (0, jsx_runtime_1.jsxs)(tdesign_react_1.Row, { children: [(0, jsx_runtime_1.jsx)(tdesign_react_1.Col, tslib_1.__assign({ xs: 12, sm: 7 }, { children: (0, jsx_runtime_1.jsxs)(map_1.default, tslib_1.__assign({ className: "".concat(prefixCls, "-location-map"), akey: akey, version: version, useAMapUI: true, mapRef: function (instance) {
} }, { children: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: "".concat(prefixCls, "-location") }, { children: (0, jsx_runtime_1.jsxs)(antd_1.Row, tslib_1.__assign({ gutter: [16, 16] }, { children: [(0, jsx_runtime_1.jsx)(antd_1.Col, tslib_1.__assign({ xs: 24, sm: 14 }, { children: (0, jsx_runtime_1.jsxs)(map_1.default, tslib_1.__assign({ className: "".concat(prefixCls, "-location-map"), akey: akey, version: version, useAMapUI: true, mapRef: function (instance) {
if (instance && instance.map && !map) {
setMap(instance.map);
}
@ -156,16 +155,14 @@ var Location = function (props) {
setPositionPickerResult(result);
} }), useGeolocation && ((0, jsx_runtime_1.jsx)(react_amap_1.Geolocation, tslib_1.__assign({ maximumAge: 100000, borderRadius: "5px", position: "RB", offset: [10, 10], zoomToAccuracy: true, showCircle: true }, geolocationProps, { onComplete: function (data) { }, onError: function (err) {
console.error(err);
} })))] })) })), (0, jsx_runtime_1.jsx)(tdesign_react_1.Col, tslib_1.__assign({ xs: 12, sm: 5 }, { children: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)(tdesign_react_1.List, tslib_1.__assign({ className: "".concat(prefixCls, "-location-list"), header: (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: "".concat(prefixCls, "-location-list-header") }, { children: [(0, jsx_runtime_1.jsx)(tdesign_react_1.Input, { ref: searchRef, placeholder: "\u641C\u7D22\u5730\u70B9", value: searchValue, clearable: true, onChange: function (value) {
setSearchValue(value);
}, onClear: function () {
setSearchValue('');
}, prefixIcon: (0, jsx_runtime_1.jsx)(tdesign_icons_react_1.SearchIcon, {}), onFocus: function () {
} })))] })) })), (0, jsx_runtime_1.jsx)(antd_1.Col, tslib_1.__assign({ xs: 24, sm: 10 }, { children: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)(antd_1.List, tslib_1.__assign({ className: "".concat(prefixCls, "-location-list"), header: (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: "".concat(prefixCls, "-location-list-header") }, { children: [(0, jsx_runtime_1.jsx)(antd_1.Input, { ref: searchRef, placeholder: "\u641C\u7D22\u5730\u70B9", value: searchValue, allowClear: true, onChange: function (e) {
setSearchValue(e.target.value);
}, prefix: (0, jsx_runtime_1.jsx)(icons_1.SearchOutlined, {}), onFocus: function () {
setMode('searchPoi');
setFocus(true);
}, onBlur: function () {
setFocus(false);
} }), mode === 'searchPoi' && ((0, jsx_runtime_1.jsx)(tdesign_react_1.Button, tslib_1.__assign({ style: { marginLeft: 5 }, variant: "text", theme: "primary", onClick: function () {
} }), mode === 'searchPoi' && ((0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ style: { marginLeft: 5 }, type: "link", onClick: function () {
var _a;
setMode('dragMap');
setSearchValue('');
@ -177,24 +174,29 @@ var Location = function (props) {
return ((0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ onClick: function () {
setRefresh(false);
setCurrentPoi(poi);
} }, { children: (0, jsx_runtime_1.jsx)(ListItem, tslib_1.__assign({ action: (currentPoi === null || currentPoi === void 0 ? void 0 : currentPoi.id) ===
poi.id ? ((0, jsx_runtime_1.jsx)(tdesign_icons_react_1.CheckCircleFilledIcon, { className: "".concat(prefixCls, "-location-list-checked"), size: 24 })) : ((0, jsx_runtime_1.jsx)("div", { style: {
width: 24,
} })) }, { children: (0, jsx_runtime_1.jsx)(ListItemMeta, { title: poi.name, description: "".concat(poi.distance
} }, { children: (0, jsx_runtime_1.jsx)(antd_1.List.Item, tslib_1.__assign({ actions: [
(0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ style: {
width: 24,
} }, { children: (currentPoi === null || currentPoi === void 0 ? void 0 : currentPoi.id) ===
poi.id && ((0, jsx_runtime_1.jsx)(icons_1.CheckCircleFilled, { className: "".concat(prefixCls, "-location-list-checked") })) })),
] }, { children: (0, jsx_runtime_1.jsx)(antd_1.List.Item.Meta, { title: poi.name, description: "".concat(poi.distance
? "".concat(poi.distance, "m\u5185 | ")
: '').concat(poi.address) }) })) }), poi.id));
})), mode === 'searchPoi' && ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [searchLoading && ((0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: "".concat(prefixCls, "-location-list-loadingBox") }, { children: (0, jsx_runtime_1.jsx)(tdesign_react_1.Loading, { delay: 0, fullscreen: false, indicator: true, inheritColor: false, loading: true, preventScrollThrough: true, showOverlay: true, size: "medium" }) }))), (pois === null || pois === void 0 ? void 0 : pois.length)
})), mode === 'searchPoi' && ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [searchLoading && ((0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: "".concat(prefixCls, "-location-list-loadingBox") }, { children: (0, jsx_runtime_1.jsx)(antd_1.Spin, { delay: 0, spinning: true, size: "default" }) }))), (pois === null || pois === void 0 ? void 0 : pois.length)
? pois.map(function (poi, index) {
return ((0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ onClick: function () {
setRefresh(false);
setCurrentPoi(poi);
} }, { children: (0, jsx_runtime_1.jsx)(ListItem, tslib_1.__assign({ action: (currentPoi === null || currentPoi === void 0 ? void 0 : currentPoi.id) ===
poi.id ? ((0, jsx_runtime_1.jsx)(tdesign_icons_react_1.CheckCircleFilledIcon, { className: "".concat(prefixCls, "-location-list-checked"), size: 24 })) : ((0, jsx_runtime_1.jsx)("div", { style: {
width: 24,
} })) }, { children: (0, jsx_runtime_1.jsx)(ListItemMeta, { title: poi.name, description: "".concat(poi.distance
} }, { children: (0, jsx_runtime_1.jsx)(antd_1.List.Item, tslib_1.__assign({ actions: [
(0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ style: {
width: 24,
} }, { children: (currentPoi === null || currentPoi === void 0 ? void 0 : currentPoi.id) ===
poi.id && ((0, jsx_runtime_1.jsx)(icons_1.CheckCircleFilled, { className: "".concat(prefixCls, "-location-list-checked") })) })),
] }, { children: (0, jsx_runtime_1.jsx)(antd_1.List.Item.Meta, { title: poi.name, description: "".concat(poi.distance
? "".concat(poi.distance, "m\u5185 | ")
: '').concat(poi.address) }) })) }), poi.id));
})
: show && ((0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: "".concat(prefixCls, "-location-list-noData") }, { children: "\u65E0\u641C\u7D20\u7ED3\u679C" })))] }))] })) }) }))] }) })) })));
: show &&
!searchLoading && ((0, jsx_runtime_1.jsx)(antd_1.Empty, { description: "\u65E0\u641C\u7D22\u7ED3\u679C", image: antd_1.Empty.PRESENTED_IMAGE_SIMPLE }))] }))] })) }) }))] })) })) })));
};
exports.default = Location;

View File

@ -0,0 +1,39 @@
.oak-location {
&-map {
width: 100%;
height: 500px;
}
&-list {
height: 500px;
&-header {
display: flex;
flex-direction: row;
align-items: center;
}
&-checked {
color: var(--oak-brand-color);
}
&-loadingBox {
display: flex;
flex-direction: row;
justify-content: center;
min-height: 100px;
}
&-noData {
display: flex;
flex-direction: row;
justify-content: center;
min-height: 100px;
align-items: center;
color: var(--oak-text-color-placeholder);
align-self: center;
}
}
}

View File

@ -0,0 +1,5 @@
.oak-map {
width: 500px;
height: 500px;
}

View File

@ -0,0 +1,28 @@
/** index.wxss **/
.page-body {
display: flex;
flex-direction: column;
align-items: stretch;
color: #aaa;
}
.label-bar {
padding: 20rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.label-bar text {
margin-right: 20rpx;
width: 200rpx;
}
.label-bar input {
flex: 1;
}
.usermotto {
margin-top: 200px;
}

View File

@ -0,0 +1,7 @@
<!-- index.wxml -->
<view class="page-body">
<view class="label-bar">
<text>地区名称</text>
<input placeholder="请输入名称" value="{{name}}" type="string" data-path="name" bindinput="setUpdateData" />
</view>
</view>

View File

@ -1,3 +1,4 @@
/// <reference types="react" />
import './index.less';
declare const Empty: () => JSX.Element;
export default Empty;

View File

@ -0,0 +1,146 @@
.oak-empty {
margin: 0 8px;
font-size: 14px;
line-height: 1.5715;
text-align: center;
&-image {
height: 100px;
margin-bottom: 8px;
img {
height: 100%;
}
svg {
height: 100%;
margin: auto;
}
}
&-footer {
margin-top: 16px;
}
&-normal {
margin: 32px 0;
color: var(--oak-text-color-disabled);
.oak-empty-image {
height: 40px;
}
}
&-small {
margin: 8px 0;
color: var(--oak-text-color-disabled);
.oak-empty-image {
height: 35px;
}
}
}
.oak-empty-img-default {
&-ellipse {
fill: #f5f5f5;
fill-opacity: 0.8;
}
&-path {
&-1 {
fill: #aeb8c2;
}
&-2 {
fill: url('#linearGradient-1');
}
&-3 {
fill: #f5f5f7;
}
&-4 {
fill: #dce0e6;
}
&-5 {
fill: #dce0e6;
}
}
&-g {
fill: var(--oak-font-white-1);
}
}
.oak-empty-img-default-dark {
&-ellipse {
fill: var(--oak-font-white-1);
fill-opacity: 0.08;
}
&-path {
&-1 {
fill: #262626;
}
&-2 {
fill: url('#linearGradient-1');
}
&-3 {
fill: #595959;
}
&-4 {
fill: #434343;
}
&-5 {
fill: #595959;
}
}
&-g {
fill: #434343;
}
}
.oak-empty-img-simple {
&-ellipse {
fill: #f5f5f5;
}
&-g {
stroke: #d9d9d9;
}
&-path {
fill: #fafafa;
}
}
.oak-empty-img-simple-dark {
&-ellipse {
fill: var(--oak-font-white-1);
fill-opacity: 0.08;
}
&-g {
stroke: #434343;
}
&-path {
fill: #262626;
stroke: #434343;
}
}

View File

@ -1,3 +1,4 @@
/// <reference types="react" />
import './index.less';
declare const Empty: () => JSX.Element;
export default Empty;

View File

@ -15,8 +15,7 @@ exports.default = (0, react_1.memo)(function (props) {
return ((0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: (0, classnames_1.default)(className, "".concat(prefixCls, "-grid-item"), (_a = {},
_a["".concat(prefixCls, "-grid-item-column-").concat(column)] = column,
_a)), style: style, onClick: onChange ? function (event) { return onChange(index, event); } : undefined }, { children: [typeof ele.image === 'string' ? ((0, jsx_runtime_1.jsx)("img", { className: (0, classnames_1.default)("".concat(prefixCls, "-grid-item-image"), imageClassName), src: ele.image })) : (ele.image), (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: "".concat(prefixCls, "-grid-item-text") }, { children: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: (0, classnames_1.default)("".concat(prefixCls, "-grid-item-title"), textClassName), style: {
paddingTop: 8,
marginBottom: 4,
paddingTop: 4,
} }, { children: ele.text })) }))] }), index));
}) })));
});

View File

@ -0,0 +1,69 @@
.oak-grid {
flex-wrap: wrap;
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: flex;
box-sizing: border-box;
&-item {
display: flex;
flex-direction: column;
padding-left: 0px;
padding-right: 0px;
align-items: center;
justify-content: center;
text-align: center;
padding-bottom: 12px;
padding-top: 12px;
&-column {
&-1 {
flex-basis: 100%;
}
&-2 {
flex-basis: 50%;
}
&-3 {
flex-basis: 33.33%;
}
&-4 {
flex-basis: 25%;
}
&-5 {
flex-basis: 20%;
}
&-6 {
flex-basis: 16.66%;
}
&-7 {
flex-basis: 14.28%;
}
&-8 {
flex-basis: 12.5%;
}
}
&-image {
display: block;
height: 42px;
width: 100%;
}
&-title {
color: #000000e6;
font-size: 12px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-break: break-all;
}
}
}

13
lib/components/common/input/index.d.ts vendored Normal file
View File

@ -0,0 +1,13 @@
import React from 'react';
import { InputProps } from 'antd';
interface IProps extends InputProps {
value?: string;
}
declare const Component: {
(props: IProps): JSX.Element;
Search(props: IProps): JSX.Element;
TextArea(props: IProps): JSX.Element;
Password: React.ForwardRefExoticComponent<import("antd/lib/input").PasswordProps & React.RefAttributes<import("antd").InputRef>>;
Group: React.FC<import("antd/lib/input").GroupProps>;
};
export default Component;

View File

@ -0,0 +1,59 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var jsx_runtime_1 = require("react/jsx-runtime");
var react_1 = require("react");
var antd_1 = require("antd");
function BaseHOC(key) {
return function (props) {
var defaultValue = props.defaultValue, value = props.value, onChange = props.onChange;
var hasValue = props.hasOwnProperty('value');
// 用户切换到底是显示 value 还是 input
// 不能直接用 isOnComposition 原因是,这个值发生变化不会触发重新渲染
// 不能只使用 flag 原因是setFlag 是异步的
var _a = tslib_1.__read((0, react_1.useState)(false), 2), flag = _a[0], setFlag = _a[1];
// 非中文输入时候显示 value。中文输入的时候显示 input
var _b = tslib_1.__read((0, react_1.useState)(hasValue ? value : defaultValue), 2), input = _b[0], setInput = _b[1];
(0, react_1.useEffect)(function () {
if (hasValue && input !== value) {
setInput(value);
}
}, [value]);
var isOnComposition = false;
function handleChange(e) {
setInput(e.target.value);
if (isOnComposition)
return;
onChange && onChange(e);
}
function handleComposition(e) {
if ('compositionend' === (e === null || e === void 0 ? void 0 : e.type)) {
isOnComposition = false;
handleChange(e);
}
else {
isOnComposition = true;
}
if (flag !== isOnComposition) {
setFlag(isOnComposition);
}
}
var Component = antd_1.Input;
if (key) {
Component = antd_1.Input[key];
}
return ((0, jsx_runtime_1.jsx)(Component, tslib_1.__assign({}, props, { value: hasValue && !flag ? value : input, onCompositionStart: handleComposition, onCompositionUpdate: handleComposition, onCompositionEnd: handleComposition, onChange: handleChange })));
};
}
var Component = function (props) {
return BaseHOC()(props);
};
Component.Search = function (props) {
return BaseHOC('Search')(props);
};
Component.TextArea = function (props) {
return BaseHOC('TextArea')(props);
};
Component.Password = antd_1.Input.Password;
Component.Group = antd_1.Input.Group;
exports.default = Component;

View File

@ -4,8 +4,8 @@ var tslib_1 = require("tslib");
var jsx_runtime_1 = require("react/jsx-runtime");
var react_1 = require("react");
var react_router_dom_1 = require("react-router-dom");
var tdesign_react_1 = require("tdesign-react");
var tdesign_icons_react_1 = require("tdesign-icons-react");
var antd_1 = require("antd");
var icons_1 = require("@ant-design/icons");
var classnames_1 = tslib_1.__importDefault(require("classnames"));
require("./index.less");
exports.default = (0, react_1.memo)(function (props) {
@ -13,13 +13,13 @@ exports.default = (0, react_1.memo)(function (props) {
var style = props.style, className = props.className, children = props.children, title = props.title, subTitle = props.subTitle, extra = props.extra, showBack = props.showBack, onBack = props.onBack, backIcon = props.backIcon, delta = props.delta, _b = props.contentMargin, contentMargin = _b === void 0 ? true : _b, contentStyle = props.contentStyle, contentClassName = props.contentClassName, tags = props.tags;
var prefixCls = 'oak';
var navigate = (0, react_router_dom_1.useNavigate)();
return ((0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ style: style, className: (0, classnames_1.default)("".concat(prefixCls, "-pageHeader"), className) }, { children: [(title || showBack || subTitle || tags || extra) && ((0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: "".concat(prefixCls, "-pageHeader-header") }, { children: (0, jsx_runtime_1.jsxs)(tdesign_react_1.Row, { children: [(0, jsx_runtime_1.jsxs)(tdesign_react_1.Col, tslib_1.__assign({ flex: "auto" }, { children: [showBack && ((0, jsx_runtime_1.jsx)(tdesign_react_1.Button, tslib_1.__assign({ shape: "square", variant: "text", className: "".concat(prefixCls, "-pageHeader-header-back"), onClick: function () {
return ((0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ style: style, className: (0, classnames_1.default)("".concat(prefixCls, "-pageHeader"), className) }, { children: [(title || showBack || subTitle || tags || extra) && ((0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: "".concat(prefixCls, "-pageHeader-header") }, { children: (0, jsx_runtime_1.jsxs)(antd_1.Row, tslib_1.__assign({ justify: 'center' }, { children: [(0, jsx_runtime_1.jsxs)(antd_1.Col, tslib_1.__assign({ flex: "auto", className: "".concat(prefixCls, "-pageHeader-header-col") }, { children: [showBack && ((0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "text", className: "".concat(prefixCls, "-pageHeader-header-back"), onClick: function () {
if (typeof onBack === 'function') {
onBack();
return;
}
navigate(delta || -1);
} }, { children: backIcon || ((0, jsx_runtime_1.jsx)(tdesign_icons_react_1.ArrowLeftIcon, { className: "".concat(prefixCls, "-pageHeader-header-backIcon") })) }))), title && ((0, jsx_runtime_1.jsx)("span", tslib_1.__assign({ className: "".concat(prefixCls, "-pageHeader-header-title") }, { children: title }))), subTitle && ((0, jsx_runtime_1.jsx)("span", tslib_1.__assign({ className: "".concat(prefixCls, "-pageHeader-header-subTitle") }, { children: subTitle }))), tags] })), (0, jsx_runtime_1.jsx)(tdesign_react_1.Col, tslib_1.__assign({ flex: "auto" }, { children: extra }))] }) }))), (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ style: contentStyle, className: (0, classnames_1.default)("".concat(prefixCls, "-pageHeader-content"), contentClassName, (_a = {},
} }, { children: backIcon || ((0, jsx_runtime_1.jsx)(icons_1.ArrowLeftOutlined, { className: "".concat(prefixCls, "-pageHeader-header-backIcon") })) }))), title && ((0, jsx_runtime_1.jsx)("span", tslib_1.__assign({ className: "".concat(prefixCls, "-pageHeader-header-title") }, { children: title }))), subTitle && ((0, jsx_runtime_1.jsx)("span", tslib_1.__assign({ className: "".concat(prefixCls, "-pageHeader-header-subTitle") }, { children: subTitle }))), tags] })), (0, jsx_runtime_1.jsx)(antd_1.Col, tslib_1.__assign({ flex: "auto" }, { children: extra }))] })) }))), (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ style: contentStyle, className: (0, classnames_1.default)("".concat(prefixCls, "-pageHeader-content"), contentClassName, (_a = {},
_a["".concat(prefixCls, "-pageHeader-content-margin")] = contentMargin,
_a)) }, { children: children }))] })));
});

View File

@ -0,0 +1,58 @@
.oak-pageHeader {
display: flex;
flex-direction: column;
&-header {
margin: 0;
font-size: 0;
height: auto;
line-height: inherit;
min-height: inherit;
position: relative;
padding: 10px 20px;
color: #000;
background: var(--oak-bg-color-container);
&-backIcon {
width: 16px;
height: 16px;
}
&-title {
display: inline-block;
vertical-align: middle;
font-size: 16px;
font-weight: 700;
margin-right: 20px;
max-width: 70%;
overflow: hidden;
white-space: nowrap;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
height: 30px;
line-height: 30px;
}
&-subTitle {
font-size: 12px;
display: inline-block;
vertical-align: middle;
margin-right: 20px;
}
&-back {
margin-right: 24px;
}
}
&-content {
display: flex;
flex-direction: column;
&-margin {
margin: 20px;
}
}
}

View File

@ -0,0 +1,105 @@
.oak-tabBar {
flex-wrap: nowrap;
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: flex;
box-sizing: border-box;
background-color: #fff;
height: 48px;
position: relative;
width: 100%;
&--fixed {
bottom: 0;
left: 0;
position: fixed;
}
&--bordered {
::before {
border-top: 1px solid #e7e7e7;
top: 0;
}
::after {
border-bottom: 1px solid #e7e7e7;
bottom: 0;
}
}
&-item {
display: flex;
flex-direction: column;
padding-left: 0px;
padding-right: 0px;
align-items: center;
justify-content: center;
text-align: center;
color: #0009;
::after {
border-left: 1px solid #e7e7e7;
}
:first-child::before {
border: unset;
}
&-column {
&-1 {
flex-basis: 100%;
}
&-2 {
flex-basis: 50%;
}
&-3 {
flex-basis: 33.33%;
}
&-4 {
flex-basis: 25%;
}
&-5 {
flex-basis: 20%;
}
&-6 {
flex-basis: 16.66%;
}
&-7 {
flex-basis: 14.28%;
}
&-8 {
flex-basis: 12.5%;
}
}
&-checked {
color: var(--oak-brand-color);
}
&-image {
display: block;
height: 24px;
width: 100%;
}
&-icon {}
&-text {
font-size: 10px;
line-height: 18px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-break: break-all;
}
}
}

View File

@ -0,0 +1,208 @@
.oak-typography {
overflow-wrap: break-word;
&-link {
color: var(--oak-brand-color);
outline: none;
cursor: pointer;
transition: color .3s;
text-decoration: none;
background-color: transparent;
}
&-italic {
font-style: italic;
}
&-strong {
font-weight: 600;
}
&-underline {
text-decoration: underline;
}
&-delete {
text-decoration: line-through;
}
&-code {
margin: 0 0.2em;
padding: 0.2em 0.4em 0.1em;
font-size: 85%;
background: rgba(150, 150, 150, .1);
border: 1px solid rgba(100, 100, 100, .2);
border-radius: 3px;
}
&-keyboard {
margin: 0 0.2em;
padding: 0.15em 0.4em 0.1em;
font-size: 90%;
background: rgba(150, 150, 150, .06);
border: 1px solid rgba(100, 100, 100, .2);
border-bottom-width: 2px;
border-radius: 3px;
}
&-mark {
padding: 0;
background-color: #ffe58f;
}
&-disabled {
cursor: not-allowed;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
&-link {
&-small {
font-size: var(--oak-font-size-link-small);
line-height: var(--oak-line-height-link-small);
}
&-medium {
font-size: var(--oak-font-size-link-medium);
line-height: var(--oak-line-height-link-medium);
}
&-large {
font-size: var(--oak-font-size-link-large);
line-height: var(--oak-line-height-link-large);
}
}
&-mark {
&-small {
font-size: var(--oak-font-size-mark-small);
line-height: var(--oak-line-height-mark-small);
}
&-medium {
font-size: var(--oak-font-size-mark-medium);
line-height: var(--oak-line-height-mark-medium);
}
&-large {
font-size: var(--oak-font-size-body-large);
line-height: var(--oak-line-height-body-large);
}
}
&-body {
&-small {
font-size: var(--oak-font-size-body-small);
line-height: var(--oak-line-height-body-small);
}
&-medium {
font-size: var(--oak-font-size-body-medium);
line-height: var(--oak-line-height-body-medium);
}
&-large {
font-size: var(--oak-font-size-body-large);
line-height: var(--oak-line-height-body-large);
}
}
&-title {
&-small {
font-size: var(--oak-font-size-title-small);
line-height: var(--oak-line-height-title-small);
}
&-medium {
font-size: var(--oak-font-size-title-medium);
line-height: var(--oak-line-height-title-medium);
}
&-large {
font-size: var(--oak-font-size-title-large);
line-height: var(--oak-line-height-title-large);
}
}
&-headline {
&-small {
font-size: var(--oak-font-size-headline-small);
line-height: var(--oak-line-height-headline-small);
}
&-medium {
font-size: var(--oak-font-size-headline-medium);
line-height: var(--oak-line-height-headline-medium);
}
&-large {
font-size: var(--oak-font-size-headline-large);
line-height: var(--oak-line-height-headline-large);
}
}
&-display {
&-small {
font-size: 40px;
line-height: 48px;
}
&-medium {
font-size: var(--oak-font-size-display-medium);
line-height: var(--oak-line-height-display-medium);
}
&-large {
font-size: var(--oak-font-size-display-large);
line-height: var(--oak-line-height-display-large);
}
}
&-color {
&-default {
color: var(--oak-text-color-primary);
}
&-secondary {
color: var(--oak-text-color-secondary);
}
&-primary {
color: var(--oak-brand-color);
}
&-danger {
color: var(--oak-error-color);
}
&-warning {
color: var(--oak-warning-color);
}
&-success {
color: var(--oak-success-color);
}
&-link {
color: var(--oak-text-color-link);
}
&-placeholder {
color: var(--oak-text-color-placeholder);
}
&-disabled {
color: var(--oak-text-color-disabled);
}
&-anti {
color: var(--oak-text-color-anti);
}
&-brand {
color: var(--oak-text-color-brand);
}
}
}

View File

@ -1,3 +1,4 @@
/// <reference types="react" />
import { Config } from '../../../../types/Config';
export default function Account(props: {
account: Required<Config>['Account'];

View File

@ -0,0 +1,16 @@
.label {
color: var(--oak-text-color-primary);
font-size: var(--oak-font-size-headline-medium);
line-height: var(--oak-line-height-headline-medium);
}
.tips {
color: var(--oak-gray-color-6);
font-size: var(--oak-font-size-mark-small);
}
.title {
margin-bottom: 0px;
margin-top:36px;
}

View File

@ -0,0 +1,38 @@
.container {
background: var(--oak-bg-color-container);
box-shadow: 0 2px 3px #0000001a;
border-radius: 3px;
padding: 30px 32px;
}
.padding {
background-color: var(--oak-bg-color-page);
width: 100%;
height: 77px;
}
.ctrl {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
padding: 10px;
border: solid 0.4px;
border-radius: 3px;
border-color: var(--oak-component-border);
position: absolute;
z-index: 10;
background-color: var(--oak-bg-color-container-hover);
width: calc(100vw - 138px);
top: 85px;
height: 55px;
text {
color: var(--oak-text-color-secondary);
.weight {
font-weight: bold;
color: var(--oak-text-color-primary);
text-decoration: underline;
}
}
}

View File

@ -1 +1,2 @@
/// <reference types="react" />
export default function render(this: any): JSX.Element;

View File

@ -0,0 +1,11 @@
/** index.wxss **/
.image {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
border: 1rpx solid #eee;
border-radius: 4rpx;
}

View File

@ -0,0 +1,2 @@
<!-- index.wxml -->
<image src="{{src}}" mode="{{mode}}" class="image l-class"/>

View File

@ -1 +1,2 @@
/// <reference types="react" />
export default function render(): JSX.Element;

View File

@ -0,0 +1,9 @@
.container {
height: 100vh;
display: flex;
flex-direction: column;
justify-content: 'center';
align-items: 'center';
}

View File

@ -0,0 +1,110 @@
@import "../../../config/styles/mp/index.less";
@import "../../../config/styles/mp/mixins.less";
.file-list__container {
position: relative;
display: flex;
flex-wrap: wrap;
}
.file-list__item {
position: relative;
width: 220rpx;
padding-bottom: 220rpx;
height: 0;
}
// size 不同时,对应的图片间距设置
// size 仅支持 1-10
each(range(2, 10), {
@valuePlusOne : @value+1;
.file-list__item--@{value}:nth-of-type(n+@{valuePlusOne}) {
margin-top : 20rpx;
}
.file-list__item--@{value}:not(:nth-of-type(@{value}n+1)) {
margin-left : 20rpx;
}
}) // 当 size 为 null每行会显示 3 张图片
.file-list__item--null:nth-of-type(n+4) {
margin-top: 20rpx;
}
.file-list__item--null:not(:nth-of-type(3n+1)) {
margin-left: 20rpx;
}
.file-list__image {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
border: 1rpx solid #eee;
border-radius: 4rpx;
}
.file-list__item--selected {
width: 100%;
height: 100%;
z-index: 10;
background-color: #000;
filter: Alpha(Opacity=50);
opacity: 0.5;
position: absolute;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-around;
}
.file-list__remove {
position: absolute;
right: 10rpx;
top: 10rpx;
height: 40rpx;
width: 40rpx;
border-radius: 50%;
background: rgb(0 0 0 / 40%);
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
}
.file-list__item--add {
border: 1rpx solid #eee;
border-radius: 4rpx;
background-color: white;
}
.file-list__image--add {
visibility: hidden;
position: absolute;
width: 50%;
height: 50%;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
align-items: center;
justify-content: center;
display: flex;
}
.file-list__item-slot-wrapper {
display: flex;
justify-content: center;
align-items: center;
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
}
.file-list__item-slot-wrapper:empty+.file-list__image--add {
visibility: visible;
}

View File

@ -0,0 +1,20 @@
<view class="file-list__container l-class">
<block wx:for="{{files}}" wx:key="index">
<block wx:if="{{item}}">
<view class="file-list__item file-list__item--{{size}} l-item-class" style="{{itemSizePercentage?'width:'+itemSizePercentage+'padding-bottom:'+itemSizePercentage:'xxx'}}">
<item data-index="{{index}}" bind:tap="onItemTapped" mode="{{mode}}" oakPath="{{oakFullpath}}.{{index}}" />
<view wx:if="{{!disableDelete}}" mut-bind:tap="onDelete" class="file-list__remove" data-value="{{item}}">
<t-icon name="close" color="#ffffff" size="18" />
</view>
</view>
</block>
</block>
<view class="file-list__item file-list__item--add file-list__item--{{size}} l-item-class" style="{{itemSizePercentage?'width:'+itemSizePercentage+'padding-bottom:'+itemSizePercentage:''}}" wx:if="{{!disableInsert}}" bind:tap="onPick">
<view class="file-list__item-slot-wrapper">
<slot />
</view>
<view class="file-list__image--add">
<t-icon name="add" size="80" />
</view>
</view>
</view>

View File

@ -1 +1,2 @@
/// <reference types="react" />
export default function render(this: any): JSX.Element;

View File

@ -0,0 +1,9 @@
.container {
height: 100vh;
display: flex;
flex-direction: column;
justify-content: 'center';
align-items: 'center';
}

View File

@ -0,0 +1,55 @@
@import "../../../config/styles/mp/index.less";
@import "../../../config/styles/mp/mixins.less";
.grid {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
}
.grid-item {
min-width: 25%;
padding: 20rpx;
display: flex;
flex-direction: column;
justify-content: center;
box-sizing: border-box;
}
.block {
width: 176rpx;
height: 176rpx;
background: #fff;
color: #333;
display: flex;
}
.block--bottom {
width: 100vw;
height: 35vh;
border-top-left-radius: 16rpx;
border-top-right-radius: 16rpx;
}
.btn-box {
display: flex;
flex: 1;
flex-direction: column;
padding: 32rpx;
}
.five-grid {
position: unset;
}
.external-class-content {
padding: 32rpx 0 !important;
}
.image-icon {
width: 96rpx !important;
height: 96rpx !important;
}
.image {
width: 100%;
height: 100%;
}

View File

@ -0,0 +1,13 @@
<t-popup placement="bottom" visible="{{show}}" bind:visible-change="closeDrawer" close-btn="true">
<view class="block block--bottom">
<view class="btn-box">
<t-grid t-class="five-grid" column="{{5}}">
<block wx:for="{{actionss}}" wx:key="index">
<t-grid-item bind:tap="onClick" data-index="{{index}}" text="{{item.label}}" t-class-text="text" t-class-image="image-icon" t-class-content="external-class-content">
<t-icon class="image" name="{{item.icon.name}}" slot="image" />
</t-grid-item>
</block>
</t-grid>
</view>
</view>
</t-popup>

View File

@ -0,0 +1,35 @@
.btn-popup {
position: fixed !important;
bottom: 10rpx;
// bottom: constant(safe-area-inset-bottom) !important;
// /* 兼容 iOS < 11.2 */
// bottom: env(safe-area-inset-bottom) !important;
right: 45%;
}
.block {
width: 176rpx;
height: 176rpx;
background: #fff;
color: #333;
display: flex;
}
.block--bottom {
width: 100vw;
height: 35vh;
border-top-left-radius: 16rpx;
border-top-right-radius: 16rpx;
}
.btn-box {
display: flex;
flex-direction: row;
padding: 32rpx;
flex-wrap: wrap;
}
.btn-item {
margin-top: 32rpx;
margin-right: 32rpx !important;
}

View File

@ -0,0 +1,12 @@
<t-button bind:tap="handlePopup" t-class="btn-popup" variant="text" theme="primary" icon="chevron-up" shape="circle"></t-button>
<t-popup visible="{{visible}}" bind:visible-change="onVisibleChange" placement="bottom" close-btn="true">
<view class="block block--bottom">
<view class="btn-box">
<t-button bind:tap="printRunningTree" t-class="btn-item" theme="primary" size="small" shape="circle">R</t-button>
<t-button bind:tap="printDebugStore" t-class="btn-item" theme="primary" size="small" shape="circle">S</t-button>
<t-button bind:tap="printCachedStore" t-class="btn-item" theme="primary" size="small" shape="circle">C</t-button>
<t-button bind:tap="showDialog" t-class="btn-item" theme="danger" size="small" shape="circle">Reset</t-button>
</view>
</view>
</t-popup>
<t-dialog visible="{{dialogVisible}}" title="重置数据" content="重置后,原来的数据不可恢复" cancel-btn="取消" confirm-btn="确定" bind:cancel="closeDialog" bind:confirm="handleReset" />

View File

@ -1 +1,2 @@
/// <reference types="react" />
export default function render(this: any): JSX.Element;

View File

@ -3,20 +3,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var jsx_runtime_1 = require("react/jsx-runtime");
var react_1 = tslib_1.__importDefault(require("react"));
var tdesign_react_1 = require("tdesign-react");
var tdesign_icons_react_1 = require("tdesign-icons-react");
// import { saveAs } from 'file-saver';
var antd_1 = require("antd");
var icons_1 = require("@ant-design/icons");
function render() {
var _this = this;
var _a = this.props, _b = _a.placement, placement = _b === void 0 ? 'bottom' : _b, _c = _a.style, style = _c === void 0 ? {} : _c;
var visible = this.state.visible;
return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(tdesign_react_1.Button, { variant: "text", shape: "circle", theme: "primary", icon: (0, jsx_runtime_1.jsx)(tdesign_icons_react_1.ChevronUpIcon, {}), style: tslib_1.__assign({ position: 'fixed', bottom: 0, right: '45vw' }, style), onClick: function () {
return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(antd_1.Button, { type: "text", shape: "circle", icon: (0, jsx_runtime_1.jsx)(icons_1.UpOutlined, { style: { fontSize: 12 } }), style: tslib_1.__assign({ position: 'fixed', bottom: 0, right: '45vw', zIndex: 999 }, style), onClick: function () {
_this.setVisible(true);
} }), (0, jsx_runtime_1.jsxs)(tdesign_react_1.Drawer, tslib_1.__assign({ placement: placement, visible: visible, onClose: function () {
} }), (0, jsx_runtime_1.jsxs)(antd_1.Drawer, tslib_1.__assign({ placement: placement, open: visible, onClose: function () {
_this.setVisible(false);
}, header: "Debug\u63A7\u5236\u53F0", footer: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}) }, { children: [(0, jsx_runtime_1.jsx)("input", { type: "file", accept: 'application/json', hidden: true, id: "upload", onChange: function () {
}, title: "Debug\u63A7\u5236\u53F0", footer: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}) }, { children: [(0, jsx_runtime_1.jsx)("input", { type: "file", accept: "application/json", hidden: true, id: "upload", onChange: function () {
var that = _this;
var file = document.getElementById('upload').files[0];
var file = document.getElementById('upload')
.files[0];
if (typeof FileReader === undefined) {
alert('浏览器版本太老了');
}
@ -34,35 +34,34 @@ function render() {
}
};
}
} }), (0, jsx_runtime_1.jsxs)(tdesign_react_1.Space, tslib_1.__assign({ breakLine: true, direction: "horizontal", size: "medium" }, { children: [(0, jsx_runtime_1.jsx)(tdesign_react_1.Button, tslib_1.__assign({ theme: "primary", shape: "circle", onClick: function () { return _this.printRunningTree(); } }, { children: "R" })), (0, jsx_runtime_1.jsx)(tdesign_react_1.Button, tslib_1.__assign({ theme: "primary", shape: "circle", onClick: function () { return _this.printDebugStore(); } }, { children: "S" })), (0, jsx_runtime_1.jsx)(tdesign_react_1.Button, tslib_1.__assign({ theme: "primary", shape: "circle", onClick: function () { return _this.printCachedStore(); } }, { children: "C" })), (0, jsx_runtime_1.jsx)(tdesign_react_1.Button, tslib_1.__assign({ theme: "primary", shape: "circle", onClick: function () {
var data = _this.features.localStorage.loadAll();
var element = document.createElement('a');
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(JSON.stringify(data)));
element.setAttribute('download', 'data.json');
element.style.display = 'none';
document.body.appendChild(element);
element.click();
document.body.removeChild(element);
} }, { children: "D" })), (0, jsx_runtime_1.jsx)(tdesign_react_1.Button, tslib_1.__assign({ theme: "primary", shape: "circle", onClick: function () {
var element = document.getElementById('upload');
element.click();
} }, { children: "U" })), (0, jsx_runtime_1.jsx)(tdesign_react_1.Button, tslib_1.__assign({ theme: "warning", shape: "circle", onClick: function () {
var confirmDia = tdesign_react_1.DialogPlugin.confirm({
header: '重置数据',
body: '重置后,原来的数据不可恢复',
confirmBtn: '确定',
cancelBtn: '取消',
onConfirm: function (_a) {
var e = _a.e;
_this.resetInitialData();
confirmDia.hide();
window.location.reload();
},
onClose: function (_a) {
var e = _a.e, trigger = _a.trigger;
confirmDia.hide();
},
});
} }, { children: "Reset" }))] }))] }))] }));
} }), (0, jsx_runtime_1.jsxs)(antd_1.Space, tslib_1.__assign({ wrap: true }, { children: [(0, jsx_runtime_1.jsx)(antd_1.Tooltip, tslib_1.__assign({ title: "\u9875\u9762\u7ED3\u6784" }, { children: (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ size: "large", type: "primary", shape: "circle", onClick: function () { return _this.printRunningTree(); } }, { children: "R" })) })), (0, jsx_runtime_1.jsx)(antd_1.Tooltip, tslib_1.__assign({ title: "Store\u6570\u636E" }, { children: (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ size: "large", type: "primary", shape: "circle", onClick: function () { return _this.printDebugStore(); } }, { children: "S" })) })), (0, jsx_runtime_1.jsx)(antd_1.Tooltip, tslib_1.__assign({ title: "\u9875\u9762\u7F13\u5B58" }, { children: (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ size: "large", type: "primary", shape: "circle", onClick: function () { return _this.printCachedStore(); } }, { children: "C" })) })), (0, jsx_runtime_1.jsx)(antd_1.Tooltip, tslib_1.__assign({ title: "\u4E0B\u8F7DStore" }, { children: (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ size: "large", type: "primary", shape: "circle", onClick: function () {
var data = _this.features.localStorage.loadAll();
var element = document.createElement('a');
element.setAttribute('href', 'data:text/plain;charset=utf-8,' +
encodeURIComponent(JSON.stringify(data)));
element.setAttribute('download', 'data.json');
element.style.display = 'none';
document.body.appendChild(element);
element.click();
document.body.removeChild(element);
} }, { children: "D" })) })), (0, jsx_runtime_1.jsx)(antd_1.Tooltip, tslib_1.__assign({ title: "\u4E0A\u4F20Store" }, { children: (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ size: "large", type: "primary", shape: "circle", onClick: function () {
var element = document.getElementById('upload');
element.click();
} }, { children: "U" })) })), (0, jsx_runtime_1.jsx)(antd_1.Tooltip, tslib_1.__assign({ title: "\u91CD\u7F6EStore" }, { children: (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ size: "large", type: "primary", danger: true, shape: "circle", onClick: function () {
var modal = antd_1.Modal.confirm({
title: '重置数据',
content: '重置后,原来的数据不可恢复',
okText: '确定',
cancelText: '取消',
onOk: function (e) {
_this.resetInitialData();
modal.destroy();
window.location.reload();
},
onCancel: function (e) {
modal.destroy();
},
});
} }, { children: "Reset" })) }))] }))] }))] }));
}
exports.default = render;

View File

@ -0,0 +1,9 @@
.container {
height: 100vh;
display: flex;
flex-direction: column;
justify-content: 'center';
align-items: 'center';
}

View File

@ -0,0 +1,3 @@
.container {
display: flex;
}

View File

@ -0,0 +1,2 @@
<t-message id="t-message" />

View File

@ -0,0 +1,3 @@
.container {
display: flex;
}

View File

@ -0,0 +1,142 @@
// 公共前缀
@prefix: t;
@primary-color-1: #ecf2fe;
@primary-color-2: #d4e3fc;
@primary-color-3: #bbd3fb;
@primary-color-4: #96bbf8;
@primary-color-5: #699ef5;
@primary-color-6: #4787f0;
@primary-color-7: #266fe8;
@primary-color-8: #0052d9;
@primary-color-9: #0034b5;
@primary-color-10: #001f97;
@warning-color-1: #fef3e6;
@warning-color-2: #f9e0c7;
@warning-color-3: #f7c797;
@warning-color-4: #f2995f;
@warning-color-5: #ed7b2f;
@warning-color-6: #d35a21;
@warning-color-7: #ba431b;
@warning-color-8: #9e3610;
@warning-color-9: #842b0b;
@warning-color-10: #5a1907;
@error-color-1: #fdecee;
@error-color-2: #f9d7d9;
@error-color-3: #f8b9be;
@error-color-4: #f78d94;
@error-color-5: #f36d78;
@error-color-6: #e34d59;
@error-color-7: #c9353f;
@error-color-8: #b11f26;
@error-color-9: #951114;
@error-color-10: #680506;
@success-color-1: #e8f8f2;
@success-color-2: #bcebdc;
@success-color-3: #85dbbe;
@success-color-4: #48c79c;
@success-color-5: #00a870;
@success-color-6: #078d5c;
@success-color-7: #067945;
@success-color-8: #056334;
@success-color-9: #044f2a;
@success-color-10: #033017;
@gray-color-1: #f3f3f3;
@gray-color-2: #eeeeee;
@gray-color-3: #e7e7e7;
@gray-color-4: #dcdcdc;
@gray-color-5: #c5c5c5;
@gray-color-6: #a6a6a6;
@gray-color-7: #8b8b8b;
@gray-color-8: #777777;
@gray-color-9: #5e5e5e;
@gray-color-10: #4b4b4b;
@gray-color-11: #383838;
@gray-color-12: #2c2c2c;
@gray-color-13: #242424;
@gray-color-14: #181818;
// 基础颜色
@primary-color: #0052d9; // 色彩-品牌-可操作
@success-color: #00a870; // 色彩-功能-成功
@warning-color: #ed7b2f; // 色彩-功能-警告
@error-color: #e34d59; // 色彩-功能-失败
// 遮罩
@mask-active: rgba(0, 0, 0, 0.6); // 遮罩-弹出
@mask-disabled: rgba(255, 255, 255, 0.6); // 遮罩-禁用
// 背景色
@bg-color: #f0f2f5; // 色彩-背景
@bg-color-fade: #fbfbfb; // 色彩-中层背景
@bg-color-block: #fff; // 色彩-模块
// @bg-primary-color:@primary-color;
// @bg-success-color:@success-color;
// @bg-warning-color:@warning-color;
// @bg-error-color:@error-color;
// 文本颜色
@text-level-1-color: #000000; // 色彩-文字-一级
@text-level-2-color: #444444; // 色彩-文字-二级
@text-level-3-color: #888888; // 色彩-文字-三级
@text-level-4-color: #bbbbbb; // 色彩-文字-四级
@text-anti-primary-color: #fff; // 色彩-文字-主色反色
@text-disabled-color: rgba(0, 0, 0, 0.26);
@text-placeholder-color: rgba(0, 0, 0, 0.4); // 占位符颜色
// @text-primary-color:@primary-color;
// @text-success-color:@success-color;
// @text-warning-color:@warning-color;
// @text-error-color:@error-color;
// 边框色
@border-color: #e7e7e7;
@border-level-1-color: #e6e6e6;
@border-level-2-color: #ddd;
// Spacer
@spacer: 8rpx * 2;
@spacer-1: @spacer * 1.5; // 间距-小-x
@spacer-2: @spacer * 2; // 间距-小
@spacer-3: @spacer * 3; // 间距-中
@spacer-4: @spacer * 4; // 间距-大
@spacer-5: @spacer * 6; // 间距-大-x
@spacer-6: @spacer * 10; // 间距-大-xx
// Font
@font-size: 10rpx * 2;
@font-size-xs: @font-size; // 字号-一级字号
@font-size-s: @font-size * 1.2; // 字号-二级字号
@font-size-base: @font-size * 1.4; // 字号-三级字号
@font-size-m: @font-size * 1.6; // 字号-二级字号
@font-size-l: @font-size * 2; // 字号-四级字号
@font-size-xl: @font-size * 3.6; // 字号-五级字号
@text-line-height: 1.5; //
@font-family: PingFang SC, Microsoft YaHei, Arial Regular; // 字体-磅数-常规
@font-family-medium: PingFang SC, Microsoft YaHei, Arial Medium; // 字体-磅数-粗体
// Border Radiusrpx
@border-radius: 8rpx * 2; // 圆角-全局
@border-radius-50: 50%; // 圆角-全圆角
// 表单相关
@form-height: 30rpx * 2;
@form-text-color: ;
@form-bg-color: ;
@form-border-color: ;
// shadow
@shadow-1: 2rpx 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.03);
@shadow-2: 6rpx 6rpx 16rpx 4rpx rgba(0, 0, 0, 0.06);
// 图标尺寸
@icon-default: 16rpx * 2;
@icon-l: 24rpx * 2;

View File

@ -0,0 +1,7 @@
// 解决全屏幕机型底部适配问题
.safe-area-inset-bottom() {
padding-bottom: constant(safe-area-inset-bottom) !important; /* 兼容 iOS < 11.2 */
padding-bottom: env(safe-area-inset-bottom) !important; /* 兼容 iOS >= 11.2 */
}

View File

@ -0,0 +1,350 @@
// 注意:该文件不能被外部项目引用
:root {
--td-screen-xs: var(--oak-screen-xs);
--td-screen-sm: var(--oak-screen-sm);
--td-screen-md: var(--oak-screen-md);
--td-screen-lg: var(--oak-screen-lg);
--td-screen-xl: var(--oak-screen-xl);
--td-screen-xxl: var(--oak-screen-xxl);
}
.narrow-scrollbar::-webkit-scrollbar {
width: 8px;
height: 8px;
background: transparent;
}
.narrow-scrollbar::-webkit-scrollbar-thumb {
border-radius: var(--oak-radius-medium);
border: 2px solid transparent;
background-clip: content-box;
background-color: var(--oak-scrollbar-color);
}
.t-fake-arrow path {
-webkit-transition: d 0.2s;
transition: d 0.2s;
stroke: currentcolor;
}
.t-fake-arrow--active path {
d: path("M3.75 10.2002L7.99274 5.7998L12.2361 10.0425");
}
:root,
:root[theme-mode="light"] {
--td-brand-color-1: var(--oak-brand-color-1);
--td-brand-color-2: var(--oak-brand-color-2);
--td-brand-color-3: var(--oak-brand-color-3);
--td-brand-color-4: var(--oak-brand-color-4);
--td-brand-color-5: var(--oak-brand-color-5);
--td-brand-color-6: var(--oak-brand-color-6);
--td-brand-color-7: var(--oak-brand-color-7);
--td-brand-color-8: var(--oak-brand-color-8);
--td-brand-color-9: var(--oak-brand-color-9);
--td-brand-color-10: var(--oak-brand-color-10);
--td-warning-color-1: var(--oak-warning-color-1);
--td-warning-color-2: var(--oak-warning-color-2);
--td-warning-color-3: var(--oak-warning-color-3);
--td-warning-color-4: var(--oak-warning-color-4);
--td-warning-color-5: var(--oak-warning-color-5);
--td-warning-color-6: var(--oak-warning-color-6);
--td-warning-color-7: var(--oak-warning-color-7);
--td-warning-color-8: var(--oak-warning-color-8);
--td-warning-color-9: var(--oak-warning-color-9);
--td-warning-color-10: var(--oak-warning-color-10);
--td-error-color-1: var(--oak-error-color-1);
--td-error-color-2: var(--oak-error-color-2);
--td-error-color-3: var(--oak-error-color-3);
--td-error-color-4: var(--oak-error-color-4);
--td-error-color-5: var(--oak-error-color-5);
--td-error-color-6: var(--oak-error-color-6);
--td-error-color-7: var(--oak-error-color-7);
--td-error-color-8: var(--oak-error-color-8);
--td-error-color-9: var(--oak-error-color-9);
--td-error-color-10: var(--oak-error-color-10);
--td-success-color-1: var(--oak-success-color-1);
--td-success-color-2: var(--oak-success-color-2);
--td-success-color-3: var(--oak-success-color-3);
--td-success-color-4: var(--oak-success-color-4);
--td-success-color-5: var(--oak-success-color-5);
--td-success-color-6: var(--oak-success-color-6);
--td-success-color-7: var(--oak-success-color-7);
--td-success-color-8: var(--oak-success-color-8);
--td-success-color-9: var(--oak-success-color-9);
--td-success-color-10: var(--oak-success-color-10);
--td-gray-color-1: var(--oak-gray-color-1);
--td-gray-color-2: var(--oak-gray-color-2);
--td-gray-color-3: var(--oak-gray-color-3);
--td-gray-color-4: var(--oak-gray-color-4);
--td-gray-color-5: var(--oak-gray-color-5);
--td-gray-color-6: var(--oak-gray-color-6);
--td-gray-color-7: var(--oak-gray-color-7);
--td-gray-color-8: var(--oak-gray-color-8);
--td-gray-color-9: var(--oak-gray-color-9);
--td-gray-color-10: var(--oak-gray-color-10);
--td-gray-color-11: var(--oak-gray-color-11);
--td-gray-color-12: var(--oak-gray-color-12);
--td-gray-color-13: var(--oak-gray-color-13);
--td-gray-color-14: var(--oak-gray-color-14);
--td-font-white-1: var(--oak-font-white-1);
--td-font-white-2: var(--oak-font-white-2);
--td-font-white-3: var(--oak-font-white-3);
--td-font-white-4: var(--oak-font-white-4);
--td-font-gray-1: var(--oak-font-gray-1);
--td-font-gray-2: var(--oak-font-gray-2);
--td-font-gray-3: var(--oak-font-gray-3);
--td-font-gray-4: var(--oak-font-gray-4);
--td-brand-color: var(--oak-brand-color);
--td-warning-color: var(--oak-warning-color);
--td-error-color: var(--oak-error-color);
--td-success-color: var(--oak-success-color);
--td-brand-color-hover: var(--oak-brand-color-hover);
--td-brand-color-focus: var(--oak-brand-color-focus);
--td-brand-color-active: var(--oak-brand-color-active);
--td-brand-color-disabled: var(--oak-brand-color-disabled);
--td-brand-color-light: var(--oak-brand-color-light);
--td-warning-color-hover: var(--oak-warning-color-hover);
--td-warning-color-focus: var(--oak-warning-color-focus);
--td-warning-color-active: var(--oak-warning-color-active);
--td-warning-color-disabled: var(--oak-warning-color-disabled);
--td-warning-color-light: var(--oak-warning-color-light);
--td-error-color-hover: var(--oak-error-color-hover);
--td-error-color-focus: var(--oak-error-color-focus);
--td-error-color-active: var(--oak-error-color-active);
--td-error-color-disabled: var(--oak-error-color-disabled);
--td-error-color-light: var(--oak-error-color-light);
--td-success-color-hover: var(--oak-success-color-hover);
--td-success-color-focus: var(--oak-success-color-focus);
--td-success-color-active: var(--oak-success-color-active);
--td-success-color-disabled: var(--oak-success-color-disabled);
--td-success-color-light: var(--oak-success-color-light);
--td-mask-active: var(--oak-mask-active);
--td-mask-disabled: var(--oak-mask-disabled);
--td-bg-color-page: var(--oak-bg-color-page);
--td-bg-color-container: var(--oak-bg-color-container);
--td-bg-color-container-hover: var(--oak-bg-color-container-hover);
--td-bg-color-container-active: var(--oak-bg-color-container-active);
--td-bg-color-container-select: var(--oak-bg-color-container-select);
--td-bg-color-secondarycontainer: var(--oak-bg-color-secondarycontainer);
--td-bg-color-secondarycontainer-hover: var(--oak--bg-color-secondarycontainer-hover);
--td-bg-color-secondarycontainer-active: var(--oak-bg-color-secondarycontainer-active);
--td-bg-color-component: var(--oak-bg-color-component);
--td-bg-color-component-hover: var(--oak-bg-color-component-hover);
--td-bg-color-component-active: var(--oak-bg-color-component-hover);
--td-bg-color-component-disabled: var(--oak-bg-color-component-disabled);
--td-bg-color-specialcomponent: var(--oak-bg-color-specialcomponent);
--td-text-color-primary: var(--oak-text-color-primary);
--td-text-color-secondary: var(--oak-text-color-secondary);
--td-text-color-placeholder: var(--oak-text-color-placeholder);
--td-text-color-disabled: var(--oak-text-color-disabled);
--td-text-color-anti: var(--oak-text-color-anti);
--td-text-color-brand: var(--oak-text-color-link);
--td-text-color-link: var(--oak-text-color-link);
--td-border-level-1-color: var(--oak-border-level-1-color);
--td-border-level-2-color: var(--oak-border-level-2-color);
--td-component-stroke: var(--oak-component-stroke);
--td-component-border: var(--oak-component-border);
--td-shadow-1: var(--oak-shadow-1);
--td-shadow-2: var(--oak-shadow-2);
--td-shadow-3: var(--oak-shadow-3);
--td-shadow-inset-top: var(--oak-shadow-inset-top);
--td-shadow-inset-right: var(--oak-shadow-inset-right);
--td-shadow-inset-bottom: var(--oak-shadow-inset-bottom);
--td-shadow-inset-left: var(--oak-shadow-inset-left);
--td-table-shadow-color: var(--oak-table-shadow-color);
--td-scrollbar-color: var(--oak-scrollbar-color);
--td-scrollbar-hover-color: var(--oak-scrollbar-hover-color);
--td-scroll-track-color: var(--oak-scroll-track-color);
}
:root[theme-mode="dark"] {
--td-brand-color-1: var(--oak-brand-color-1);
--td-brand-color-2: var(--oak-brand-color-2);
--td-brand-color-3: var(--oak-brand-color-3);
--td-brand-color-4: var(--oak-brand-color-4);
--td-brand-color-5: var(--oak-brand-color-5);
--td-brand-color-6: var(--oak-brand-color-6);
--td-brand-color-7: var(--oak-brand-color-7);
--td-brand-color-8: var(--oak-brand-color-8);
--td-brand-color-9: var(--oak-brand-color-9);
--td-brand-color-10: var(--oak-brand-color-10);
--td-warning-color-1: var(--oak-warning-color-1);
--td-warning-color-2: var(--oak-warning-color-2);
--td-warning-color-3: var(--oak-warning-color-3);
--td-warning-color-4: var(--oak-warning-color-4);
--td-warning-color-5: var(--oak-warning-color-5);
--td-warning-color-6: var(--oak-warning-color-6);
--td-warning-color-7: var(--oak-warning-color-7);
--td-warning-color-8: var(--oak-warning-color-8);
--td-warning-color-9: var(--oak-warning-color-9);
--td-warning-color-10: var(--oak-warning-color-10);
--td-error-color-1: var(--oak-error-color-1);
--td-error-color-2: var(--oak-error-color-2);
--td-error-color-3: var(--oak-error-color-3);
--td-error-color-4: var(--oak-error-color-4);
--td-error-color-5: var(--oak-error-color-5);
--td-error-color-6: var(--oak-error-color-6);
--td-error-color-7: var(--oak-error-color-7);
--td-error-color-8: var(--oak-error-color-8);
--td-error-color-9: var(--oak-error-color-9);
--td-error-color-10: var(--oak-error-color-10);
--td-success-color-1: var(--oak-success-color-1);
--td-success-color-2: var(--oak-success-color-2);
--td-success-color-3: var(--oak-success-color-3);
--td-success-color-4: var(--oak-success-color-4);
--td-success-color-5: var(--oak-success-color-5);
--td-success-color-6: var(--oak-success-color-6);
--td-success-color-7: var(--oak-success-color-7);
--td-success-color-8: var(--oak-success-color-8);
--td-success-color-9: var(--oak-success-color-9);
--td-success-color-10: var(--oak-success-color-10);
--td-gray-color-1: var(--oak-gray-color-1);
--td-gray-color-2: var(--oak-gray-color-2);
--td-gray-color-3: var(--oak-gray-color-3);
--td-gray-color-4: var(--oak-gray-color-4);
--td-gray-color-5: var(--oak-gray-color-5);
--td-gray-color-6: var(--oak-gray-color-6);
--td-gray-color-7: var(--oak-gray-color-7);
--td-gray-color-8: var(--oak-gray-color-8);
--td-gray-color-9: var(--oak-gray-color-9);
--td-gray-color-10: var(--oak-gray-color-10);
--td-gray-color-11: var(--oak-gray-color-11);
--td-gray-color-12: var(--oak-gray-color-12);
--td-gray-color-13: var(--oak-gray-color-13);
--td-gray-color-14: var(--oak-gray-color-14);
--td-font-white-1: var(--oak-font-white-1);
--td-font-white-2: var(--oak-font-white-2);
--td-font-white-3: var(--oak-font-white-3);
--td-font-white-4: var(--oak-font-white-4);
--td-font-gray-1: var(--oak-font-gray-1);
--td-font-gray-2: var(--oak-font-gray-2);
--td-font-gray-3: var(--oak-font-gray-3);
--td-font-gray-4: var(--oak-font-gray-4);
--td-brand-color: var(--oak-brand-color);
--td-warning-color: var(--oak-warning-color);
--td-error-color: var(--oak-error-color);
--td-success-color: var(--oak-success-color);
--td-brand-color-hover: var(--oak-brand-color-hover);
--td-brand-color-focus: var(--oak-brand-color-focus);
--td-brand-color-active: var(--oak-brand-color-active);
--td-brand-color-disabled: var(--oak-brand-color-disabled);
--td-brand-color-light: var(--oak-brand-color-light);
--td-warning-color-hover: var(--oak-warning-color-hover);
--td-warning-color-focus: var(--oak-warning-color-focus);
--td-warning-color-active: var(--oak-warning-color-active);
--td-warning-color-disabled: var(--oak-warning-color-disabled);
--td-warning-color-light: var(--oak-warning-color-light);
--td-error-color-hover: var(--oak-error-color-hover);
--td-error-color-focus: var(--oak-error-color-focus);
--td-error-color-active: var(--oak-error-color-active);
--td-error-color-disabled: var(--oak-error-color-disabled);
--td-error-color-light: var(--oak-error-color-light);
--td-success-color-hover: var(--oak-success-color-hover);
--td-success-color-focus: var(--oak-success-color-focus);
--td-success-color-active: var(--oak-success-color-active);
--td-success-color-disabled: var(--oak-success-color-disabled);
--td-success-color-light: var(--oak-success-color-light);
--td-mask-active: var(--oak-mask-active);
--td-mask-disabled: var(--oak-mask-disabled);
--td-bg-color-page: var(--oak-bg-color-page);
--td-bg-color-container: var(--oak-bg-color-container);
--td-bg-color-container-hover: var(--oak-bg-color-container-hover);
--td-bg-color-container-active: var(--oak-bg-color-container-active);
--td-bg-color-container-select: var(--oak-bg-color-container-select);
--td-bg-color-secondarycontainer: var(--oak-bg-color-secondarycontainer);
--td-bg-color-secondarycontainer-hover: var(--oak--bg-color-secondarycontainer-hover);
--td-bg-color-secondarycontainer-active: var(--oak-bg-color-secondarycontainer-active);
--td-bg-color-component: var(--oak-bg-color-component);
--td-bg-color-component-hover: var(--oak-bg-color-component-hover);
--td-bg-color-component-active: var(--oak-bg-color-component-hover);
--td-bg-color-component-disabled: var(--oak-bg-color-component-disabled);
--td-bg-color-specialcomponent: var(--oak-bg-color-specialcomponent);
--td-text-color-primary: var(--oak-text-color-primary);
--td-text-color-secondary: var(--oak-text-color-secondary);
--td-text-color-placeholder: var(--oak-text-color-placeholder);
--td-text-color-disabled: var(--oak-text-color-disabled);
--td-text-color-anti: var(--oak-text-color-anti);
--td-text-color-brand: var(--oak-text-color-link);
--td-text-color-link: var(--oak-text-color-link);
--td-border-level-1-color: var(--oak-border-level-1-color);
--td-border-level-2-color: var(--oak-border-level-2-color);
--td-component-stroke: var(--oak-component-stroke);
--td-component-border: var(--oak-component-border);
--td-shadow-1: var(--oak-shadow-1);
--td-shadow-2: var(--oak-shadow-2);
--td-shadow-3: var(--oak-shadow-3);
--td-shadow-inset-top: var(--oak-shadow-inset-top);
--td-shadow-inset-right: var(--oak-shadow-inset-right);
--td-shadow-inset-bottom: var(--oak-shadow-inset-bottom);
--td-shadow-inset-left: var(--oak-shadow-inset-left);
--td-table-shadow-color: var(--oak-table-shadow-color);
--td-scrollbar-color: var(--oak-scrollbar-color);
--td-scrollbar-hover-color: var(--oak-scrollbar-hover-color);
--td-scroll-track-color: var(--oak-scroll-track-color);
}
:root {
--td-radius-small: var(--oak-radius-small);
--td-radius-default: var(--oak-radius-default);
--td-radius-medium: var(--oak-radius-medium);
--td-radius-large: var(--oak-radius-large);
--td-radius-extraLarge: var(--oak-radius-extraLarge);
--td-radius-round: var(--oak-radius-round);
--td-radius-circle: var(--oak-radius-circle);
}
:root {
--td-font-family: var(--oak-font-family);
--td-font-family-medium: var(--oak-font-family-medium);
--td-font-size-link-small: var(--oak-font-size-link-small);
--td-font-size-link-medium: var(--oak-font-size-link-medium);
--td-font-size-link-large: var(--oak-font-size-link-large);
--td-font-size-mark-small: var(--oak-font-size-mark-small);
--td-font-size-mark-medium: var(--oak-font-size-mark-medium);
--td-font-size-body-small: var(--oak-font-size-body-small);
--td-font-size-body-medium: var(--oak-font-size-body-medium);
--td-font-size-body-large: var(--oak-font-size-body-large);
--td-font-size-title-small: var(--oak-font-size-title-small);
--td-font-size-title-medium: var(--oak-font-size-title-medium);
--td-font-size-title-large: var(--oak-font-size-title-large);
--td-font-size-headline-small: var(--oak-font-size-headline-small);
--td-font-size-headline-medium: var(--oak-font-size-headline-medium);
--td-font-size-headline-large: var(--oak-font-size-headline-large);
--td-font-size-display-medium: var(--oak-font-size-display-medium);
--td-font-size-display-large: var(--oak-font-size-display-large);
--td-line-height-link-small: var(--oak-line-height-link-small);
--td-line-height-link-medium: var(--oak-line-height-link-medium);
--td-line-height-link-large: var(--oak-line-height-link-large);
--td-line-height-mark-small: var(--oak-line-height-mark-small);
--td-line-height-mark-medium: var(--oak-line-height-mark-medium);
--td-line-height-body-small: var(--oak-line-height-body-small);
--td-line-height-body-medium: var(--oak-line-height-body-medium);
--td-line-height-body-large: var(--oak-line-height-body-large);
--td-line-height-title-small: var(--oak-line-height-title-small);
--td-line-height-title-medium: var(--oak-line-height-title-medium);
--td-line-height-title-large: var(--oak-line-height-title-large);
--td-line-height-headline-small: var(--oak-line-height-headline-small);
--td-line-height-headline-medium: var(--oak-line-height-headline-medium);
--td-line-height-headline-large: var(--oak-line-height-headline-large);
--td-line-height-display-medium: var(--oak-line-height-display-medium);
--td-line-height-display-large: var(--oak-line-height-display-large);
--td-font-link-small: var(--oak-font-size-link-small) / var(--oak-line-height-link-small) var(--oak-font-family);
--td-font-link-medium: var(--oak-font-size-link-medium) / var(--oak-line-height-link-medium) var(--oak-font-family);
--td-font-link-large: var(--oak-font-size-link-large) / var(--oak-line-height-link-large) var(--oak-font-family);
--td-font-mark-small: 600 var(--oak-font-size-mark-small) / var(--oak-line-height-mark-small) var(--oak-font-family);
--td-font-mark-medium: 600 var(--oak-font-size-mark-medium) / var(--oak-line-height-mark-medium) var(--oak-font-family);
--td-font-body-small: var(--oak-font-size-body-small) / var(--oak-line-height-body-small) var(--oak-font-family);
--td-font-body-medium: var(--oak-font-size-body-medium) / var(--oak-line-height-body-medium) var(--oak-font-family);
--td-font-body-large: var(--oak-font-size-body-large) / var(--oak-line-height-body-large) var(--oak-font-family);
--td-font-title-small: 600 var(--oak-font-size-title-small) / var(--oak-line-height-title-small) var(--oak-font-family);
--td-font-title-medium: 600 var(--oak-font-size-title-medium) / var(--oak-line-height-title-medium) var(--oak-font-family);
--td-font-title-large: 600 var(--oak-font-size-title-large) / var(--oak-line-height-title-large) var(--oak-font-family);
--td-font-headline-small: 600 var(--oak-font-size-headline-small) / var(--oak-line-height-headline-small) var(--oak-font-family);
--td-font-headline-medium: 600 var(--oak-font-size-headline-medium) / var(--oak-line-height-headline-medium) var(--oak-font-family);
--td-font-headline-large: 600 var(--oak-font-size-headline-large) / var(--td2line-height-headline-large) var(--oak-font-family);
--td-font-display-medium: 600 var(--oak-font-size-display-medium) / var(--oak-line-height-display-medium) var(--oak-font-family);
--td-font-display-large: 600 var(--oak-font-size-display-large) / var(--oak-line-height-display-large) var(--oak-font-family);
}

View File

@ -0,0 +1,358 @@
@import './cover.less'; // 覆盖td公共样式
:root {
--oak-screen-xs: 320px;
--oak-screen-sm: 768px;
--oak-screen-md: 992px;
--oak-screen-lg: 1200px;
--oak-screen-xl: 1400px;
--oak-screen-xxl: 1880px;
}
.narrow-scrollbar::-webkit-scrollbar {
width: 8px;
height: 8px;
background: transparent;
}
.narrow-scrollbar::-webkit-scrollbar-thumb {
border-radius: var(--oak-radius-medium);
border: 2px solid transparent;
background-clip: content-box;
background-color: var(--oak-scrollbar-color);
}
.t-fake-arrow path {
-webkit-transition: d 0.2s;
transition: d 0.2s;
stroke: currentcolor;
}
.t-fake-arrow--active path {
d: path("M3.75 10.2002L7.99274 5.7998L12.2361 10.0425");
}
:root,
:root[theme-mode="light"] {
--oak-brand-color-1: #ecf2fe;
--oak-brand-color-2: #d4e3fc;
--oak-brand-color-3: #bbd3fb;
--oak-brand-color-4: #96bbf8;
--oak-brand-color-5: #699ef5;
--oak-brand-color-6: #4787f0;
--oak-brand-color-7: #266fe8;
--oak-brand-color-8: #0052d9;
--oak-brand-color-9: #0034b5;
--oak-brand-color-10: #001f97;
--oak-warning-color-1: #fef3e6;
--oak-warning-color-2: #f9e0c7;
--oak-warning-color-3: #f7c797;
--oak-warning-color-4: #f2995f;
--oak-warning-color-5: #ed7b2f;
--oak-warning-color-6: #d35a21;
--oak-warning-color-7: #ba431b;
--oak-warning-color-8: #9e3610;
--oak-warning-color-9: #842b0b;
--oak-warning-color-10: #5a1907;
--oak-error-color-1: #fdecee;
--oak-error-color-2: #f9d7d9;
--oak-error-color-3: #f8b9be;
--oak-error-color-4: #f78d94;
--oak-error-color-5: #f36d78;
--oak-error-color-6: #e34d59;
--oak-error-color-7: #c9353f;
--oak-error-color-8: #b11f26;
--oak-error-color-9: #951114;
--oak-error-color-10: #680506;
--oak-success-color-1: #e8f8f2;
--oak-success-color-2: #bcebdc;
--oak-success-color-3: #85dbbe;
--oak-success-color-4: #48c79c;
--oak-success-color-5: #00a870;
--oak-success-color-6: #078d5c;
--oak-success-color-7: #067945;
--oak-success-color-8: #056334;
--oak-success-color-9: #044f2a;
--oak-success-color-10: #033017;
--oak-gray-color-1: #f3f3f3;
--oak-gray-color-2: #eee;
--oak-gray-color-3: #e7e7e7;
--oak-gray-color-4: #dcdcdc;
--oak-gray-color-5: #c5c5c5;
--oak-gray-color-6: #a6a6a6;
--oak-gray-color-7: #8b8b8b;
--oak-gray-color-8: #777;
--oak-gray-color-9: #5e5e5e;
--oak-gray-color-10: #4b4b4b;
--oak-gray-color-11: #383838;
--oak-gray-color-12: #2c2c2c;
--oak-gray-color-13: #242424;
--oak-gray-color-14: #181818;
--oak-font-white-1: #ffffff;
--oak-font-white-2: rgba(255, 255, 255, 0.55);
--oak-font-white-3: rgba(255, 255, 255, 0.35);
--oak-font-white-4: rgba(255, 255, 255, 0.22);
--oak-font-gray-1: rgba(0, 0, 0, 0.9);
--oak-font-gray-2: rgba(0, 0, 0, 0.6);
--oak-font-gray-3: rgba(0, 0, 0, 0.4);
--oak-font-gray-4: rgba(0, 0, 0, 0.26);
--oak-brand-color: var(--oak-brand-color-8);
--oak-warning-color: var(--oak-warning-color-5);
--oak-error-color: var(--oak-error-color-6);
--oak-success-color: var(--oak-success-color-5);
--oak-brand-color-hover: var(--oak-brand-color-7);
--oak-brand-color-focus: var(--oak-brand-color-2);
--oak-brand-color-active: var(--oak-brand-color-9);
--oak-brand-color-disabled: var(--oak-brand-color-3);
--oak-brand-color-light: var(--oak-brand-color-1);
--oak-warning-color-hover: var(--oak-warning-color-4);
--oak-warning-color-focus: var(--oak-warning-color-2);
--oak-warning-color-active: var(--oak-warning-color-6);
--oak-warning-color-disabled: var(--oak-warning-color-3);
--oak-warning-color-light: var(--oak-warning-color-1);
--oak-error-color-hover: var(--oak-error-color-5);
--oak-error-color-focus: var(--oak-error-color-2);
--oak-error-color-active: var(--oak-error-color-7);
--oak-error-color-disabled: var(--oak-error-color-3);
--oak-error-color-light: var(--oak-error-color-1);
--oak-success-color-hover: var(--oak-success-color-4);
--oak-success-color-focus: var(--oak-success-color-2);
--oak-success-color-active: var(--oak-success-color-6);
--oak-success-color-disabled: var(--oak-success-color-3);
--oak-success-color-light: var(--oak-success-color-1);
--oak-mask-active: rgba(0, 0, 0, 0.6);
--oak-mask-disabled: rgba(255, 255, 255, 0.6);
--oak-bg-color-page: var(--oak-gray-color-2);
--oak-bg-color-container: #fff;
--oak-bg-color-container-hover: var(--oak-gray-color-1);
--oak-bg-color-container-active: var(--oak-gray-color-3);
--oak-bg-color-container-select: #fff;
--oak-bg-color-secondarycontainer: var(--oak-gray-color-1);
--oak-bg-color-secondarycontainer-hover: var(--oak-gray-color-2);
--oak-bg-color-secondarycontainer-active: var(--oak-gray-color-4);
--oak-bg-color-component: var(--oak-gray-color-3);
--oak-bg-color-component-hover: var(--oak-gray-color-4);
--oak-bg-color-component-active: var(--oak-gray-color-6);
--oak-bg-color-component-disabled: var(--oak-gray-color-2);
--oak-bg-color-specialcomponent: #fff;
--oak-text-color-primary: var(--oak-font-gray-1);
--oak-text-color-secondary: var(--oak-font-gray-2);
--oak-text-color-placeholder: var(--oak-font-gray-3);
--oak-text-color-disabled: var(--oak-font-gray-4);
--oak-text-color-anti: #fff;
--oak-text-color-brand: var(--oak-brand-color-8);
--oak-text-color-link: var(--oak-brand-color-8);
--oak-border-level-1-color: var(--oak-gray-color-3);
--oak-component-stroke: var(--oak-gray-color-3);
--oak-border-level-2-color: var(--oak-gray-color-4);
--oak-component-border: var(--oak-gray-color-4);
--oak-shadow-1: 0 1px 10px rgba(0, 0, 0, 0.05), 0 4px 5px rgba(0, 0, 0, 8%), 0 2px 4px -1px rgba(0, 0, 0, 12%);
--oak-shadow-2: 0 3px 14px 2px rgba(0, 0, 0, 0.05), 0 8px 10px 1px rgba(0, 0, 0, 6%), 0 5px 5px -3px rgba(0, 0, 0, 10%);
--oak-shadow-3: 0 6px 30px 5px rgba(0, 0, 0, 0.05), 0 16px 24px 2px rgba(0, 0, 0, 4%), 0 8px 10px -5px rgba(0, 0, 0, 8%);
--oak-shadow-inset-top: inset 0 0.5px 0 #dcdcdc;
--oak-shadow-inset-right: inset 0.5px 0 0 #dcdcdc;
--oak-shadow-inset-bottom: inset 0 -0.5px 0 #dcdcdc;
--oak-shadow-inset-left: inset -0.5px 0 0 #dcdcdc;
--oak-table-shadow-color: rgba(0, 0, 0, 0.08);
--oak-scrollbar-color: rgba(0, 0, 0, 0.1);
--oak-scrollbar-hover-color: rgba(0, 0, 0, 0.3);
--oak-scroll-track-color: #fff;
}
:root[theme-mode="dark"] {
--oak-brand-color-1: #1b2f51;
--oak-brand-color-2: #173463;
--oak-brand-color-3: #143975;
--oak-brand-color-4: #103d88;
--oak-brand-color-5: #0d429a;
--oak-brand-color-6: #054bbe;
--oak-brand-color-7: #2667d4;
--oak-brand-color-8: #4582e6;
--oak-brand-color-9: #699ef5;
--oak-brand-color-10: #96bbf8;
--oak-warning-color-1: #4f2a1d;
--oak-warning-color-2: #582f21;
--oak-warning-color-3: #733c23;
--oak-warning-color-4: #a75d2b;
--oak-warning-color-5: #cf6e2d;
--oak-warning-color-6: #dc7633;
--oak-warning-color-7: #e8935c;
--oak-warning-color-8: #ecbf91;
--oak-warning-color-9: #eed7bf;
--oak-warning-color-10: #f3e9dc;
--oak-error-color-1: #472324;
--oak-error-color-2: #5e2a2d;
--oak-error-color-3: #703439;
--oak-error-color-4: #83383e;
--oak-error-color-5: #a03f46;
--oak-error-color-6: #c64751;
--oak-error-color-7: #de6670;
--oak-error-color-8: #ec888e;
--oak-error-color-9: #edb1b6;
--oak-error-color-10: #eeced0;
--oak-success-color-1: #193a2a;
--oak-success-color-2: #1a4230;
--oak-success-color-3: #17533d;
--oak-success-color-4: #0d7a55;
--oak-success-color-5: #059465;
--oak-success-color-6: #43af8a;
--oak-success-color-7: #46bf96;
--oak-success-color-8: #80d2b6;
--oak-success-color-9: #b4e1d3;
--oak-success-color-10: #deede8;
--oak-gray-color-1: #f3f3f3;
--oak-gray-color-2: #eee;
--oak-gray-color-3: #e7e7e7;
--oak-gray-color-4: #dcdcdc;
--oak-gray-color-5: #c5c5c5;
--oak-gray-color-6: #a6a6a6;
--oak-gray-color-7: #8b8b8b;
--oak-gray-color-8: #777;
--oak-gray-color-9: #5e5e5e;
--oak-gray-color-10: #4b4b4b;
--oak-gray-color-11: #383838;
--oak-gray-color-12: #2c2c2c;
--oak-gray-color-13: #242424;
--oak-gray-color-14: #181818;
--oak-font-white-1: rgba(255, 255, 255, 0.9);
--oak-font-white-2: rgba(255, 255, 255, 0.55);
--oak-font-white-3: rgba(255, 255, 255, 0.35);
--oak-font-white-4: rgba(255, 255, 255, 0.22);
--oak-font-gray-1: rgba(0, 0, 0, 0.9);
--oak-font-gray-2: rgba(0, 0, 0, 0.6);
--oak-font-gray-3: rgba(0, 0, 0, 0.4);
--oak-font-gray-4: rgba(0, 0, 0, 0.26);
--oak-brand-color: var(--oak-brand-color-8);
--oak-warning-color: var(--oak-warning-color-5);
--oak-error-color: var(--oak-error-color-6);
--oak-success-color: var(--oak-success-color-5);
--oak-brand-color-hover: var(--oak-brand-color-7);
--oak-brand-color-focus: var(--oak-brand-color-2);
--oak-brand-color-active: var(--oak-brand-color-9);
--oak-brand-color-disabled: var(--oak-brand-color-3);
--oak-brand-color-light: var(--oak-brand-color-1);
--oak-warning-color-hover: var(--oak-warning-color-4);
--oak-warning-color-focus: var(--oak-warning-color-2);
--oak-warning-color-active: var(--oak-warning-color-6);
--oak-warning-color-disabled: var(--oak-warning-color-3);
--oak-warning-color-light: var(--oak-warning-color-1);
--oak-error-color-hover: var(--oak-error-color-5);
--oak-error-color-focus: var(--oak-error-color-2);
--oak-error-color-active: var(--oak-error-color-7);
--oak-error-color-disabled: var(--oak-error-color-3);
--oak-error-color-light: var(--oak-error-color-1);
--oak-success-color-hover: var(--oak-success-color-4);
--oak-success-color-focus: var(--oak-success-color-2);
--oak-success-color-active: var(--oak-success-color-6);
--oak-success-color-disabled: var(--oak-success-color-3);
--oak-success-color-light: var(--oak-success-color-1);
--oak-mask-active: rgba(0, 0, 0, 0.4);
--oak-mask-disabled: rgba(0, 0, 0, 0.6);
--oak-bg-color-page: var(--oak-gray-color-14);
--oak-bg-color-container: var(--oak-gray-color-13);
--oak-bg-color-container-hover: var(--oak-gray-color-12);
--oak-bg-color-container-active: var(--oak-gray-color-10);
--oak-bg-color-container-select: var(--oak-gray-color-9);
--oak-bg-color-secondarycontainer: var(--oak-gray-color-12);
--oak-bg-color-secondarycontainer-hover: var(--oak-gray-color-11);
--oak-bg-color-secondarycontainer-active: var(--oak-gray-color-9);
--oak-bg-color-component: var(--oak-gray-color-11);
--oak-bg-color-component-hover: var(--oak-gray-color-10);
--oak-bg-color-component-active: var(--oak-gray-color-9);
--oak-bg-color-component-disabled: var(--oak-gray-color-12);
--oak-bg-color-specialcomponent: transparent;
--oak-text-color-primary: var(--oak-font-white-1);
--oak-text-color-secondary: var(--oak-font-white-2);
--oak-text-color-placeholder: var(--oak-font-white-3);
--oak-text-color-disabled: var(--oak-font-white-4);
--oak-text-color-anti: #fff;
--oak-text-color-brand: var(--oak-brand-color-8);
--oak-text-color-link: var(--oak-brand-color-8);
--oak-border-level-1-color: var(--oak-gray-color-11);
--oak-component-stroke: var(--oak-gray-color-11);
--oak-border-level-2-color: var(--oak-gray-color-9);
--oak-component-border: var(--oak-gray-color-9);
--oak-shadow-1: 0 4px 6px rgba(0, 0, 0, 0.06), 0 1px 10px rgba(0, 0, 0, 8%), 0 2px 4px rgba(0, 0, 0, 12%);
--oak-shadow-2: 0 8px 10px rgba(0, 0, 0, 0.12), 0 3px 14px rgba(0, 0, 0, 10%), 0 5px 5px rgba(0, 0, 0, 16%);
--oak-shadow-3: 0 16px 24px rgba(0, 0, 0, 0.14), 0 6px 30px rgba(0, 0, 0, 12%), 0 8px 10px rgba(0, 0, 0, 20%);
--oak-shadow-inset-top: inset 0 0.5px 0 #5e5e5e;
--oak-shadow-inset-right: inset 0.5px 0 0 #5e5e5e;
--oak-shadow-inset-bottom: inset 0 -0.5px 0 #5e5e5e;
--oak-shadow-inset-left: inset -0.5px 0 0 #5e5e5e;
--oak-table-shadow-color: rgba(0, 0, 0, 0.55);
--oak-scrollbar-color: rgba(255, 255, 255, 0.1);
--oak-scrollbar-hover-color: rgba(255, 255, 255, 0.3);
--oak-scroll-track-color: #333;
}
:root {
--oak-radius-small: 2px;
--oak-radius-default: 3px;
--oak-radius-medium: 6px;
--oak-radius-large: 9px;
--oak-radius-extraLarge: 12px;
--oak-radius-round: 999px;
--oak-radius-circle: 50%;
}
:root {
--oak-font-family: PingFang SC, Microsoft YaHei, Arial Regular;
--oak-font-family-medium: PingFang SC, Microsoft YaHei, Arial Medium;
--oak-font-size-link-small: 12px;
--oak-font-size-link-medium: 14px;
--oak-font-size-link-large: 16px;
--oak-font-size-mark-small: 12px;
--oak-font-size-mark-medium: 14px;
--oak-font-size-body-small: 12px;
--oak-font-size-body-medium: 14px;
--oak-font-size-body-large: 16px;
--oak-font-size-title-small: 14px;
--oak-font-size-title-medium: 16px;
--oak-font-size-title-large: 20px;
--oak-font-size-headline-small: 24px;
--oak-font-size-headline-medium: 28px;
--oak-font-size-headline-large: 36px;
--oak-font-size-display-medium: 48px;
--oak-font-size-display-large: 64px;
--oak-line-height-link-small: 20px;
--oak-line-height-link-medium: 22px;
--oak-line-height-link-large: 24px;
--oak-line-height-mark-small: 20px;
--oak-line-height-mark-medium: 22px;
--oak-line-height-body-small: 20px;
--oak-line-height-body-medium: 22px;
--oak-line-height-body-large: 24px;
--oak-line-height-title-small: 22px;
--oak-line-height-title-medium: 24px;
--oak-line-height-title-large: 28px;
--oak-line-height-headline-small: 32px;
--oak-line-height-headline-medium: 36px;
--oak-line-height-headline-large: 44px;
--oak-line-height-display-medium: 56px;
--oak-line-height-display-large: 72px;
--oak-font-link-small: var(--oak-font-size-link-small) /
var(--oak-line-height-link-small) var(--oak-font-family);
--oak-font-link-medium: var(--oak-font-size-link-medium) /
var(--oak-line-height-link-medium) var(--oak-font-family);
--oak-font-link-large: var(--oak-font-size-link-large) /
var(--oak-line-height-link-large) var(--oak-font-family);
--oak-font-mark-small: 600 var(--oak-font-size-mark-small) /
var(--oak-line-height-mark-small) var(--oak-font-family);
--oak-font-mark-medium: 600 var(--oak-font-size-mark-medium) /
var(--oak-line-height-mark-medium) var(--oak-font-family);
--oak-font-body-small: var(--oak-font-size-body-small) /
var(--oak-line-height-body-small) var(--oak-font-family);
--oak-font-body-medium: var(--oak-font-size-body-medium) /
var(--oak-line-height-body-medium) var(--oak-font-family);
--oak-font-body-large: var(--oak-font-size-body-large) /
var(--oak-line-height-body-large) var(--oak-font-family);
--oak-font-title-small: 600 var(--oak-font-size-title-small) /
var(--oak-line-height-title-small) var(--oak-font-family);
--oak-font-title-medium: 600 var(--oak-font-size-title-medium) /
var(--oak-line-height-title-medium) var(--oak-font-family);
--oak-font-title-large: 600 var(--oak-font-size-title-large) /
var(--oak-line-height-title-large) var(--oak-font-family);
--oak-font-headline-small: 600 var(--oak-font-size-headline-small) /
var(--oak-line-height-headline-small) var(--oak-font-family);
--oak-font-headline-medium: 600 var(--oak-font-size-headline-medium) /
var(--oak-line-height-headline-medium) var(--oak-font-family);
--oak-font-headline-large: 600 var(--oak-font-size-headline-large) /
var(--oak-line-height-headline-large) var(--oak-font-family);
--oak-font-display-medium: 600 var(--oak-font-size-display-medium) /
var(--oak-line-height-display-medium) var(--oak-font-family);
--oak-font-display-large: 600 var(--oak-font-size-display-large) /
var(--oak-line-height-display-large) var(--oak-font-family);
}

View File

@ -1,11 +1,15 @@
import { String, Boolean, Text, ForeignKey } from "oak-domain/lib/types/DataType";
import { String, Boolean, Text, Datetime, PrimaryKey, ForeignKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_BooleanValue, Q_StringValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
import { OneOf } from "oak-domain/lib/types/Polyfill";
import * as SubQuery from "../_SubQuery";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction } from "oak-domain/lib/types/Entity";
import { GenericAction } from "oak-domain/lib/actions/action";
import * as Area from "../Area/Schema";
export declare type OpSchema = EntityShape & {
export declare type OpSchema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
detail: String<32>;
areaId: ForeignKey<"area">;
phone: String<12>;
@ -14,7 +18,11 @@ export declare type OpSchema = EntityShape & {
remark: Text;
};
export declare type OpAttr = keyof OpSchema;
export declare type Schema = EntityShape & {
export declare type Schema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
detail: String<32>;
areaId: ForeignKey<"area">;
phone: String<12>;
@ -28,7 +36,6 @@ export declare type Schema = EntityShape & {
declare type AttrFilter = {
id: Q_StringValue | SubQuery.AddressIdSubQuery;
$$createAt$$: Q_DateValue;
$$seq$$: Q_StringValue;
$$updateAt$$: Q_DateValue;
detail: Q_StringValue;
areaId: Q_StringValue | SubQuery.AreaIdSubQuery;
@ -45,7 +52,6 @@ export declare type Projection = {
id: 1;
$$createAt$$?: 1;
$$updateAt$$?: 1;
$$seq$$?: 1;
detail?: 1;
areaId?: 1;
area?: Area.Projection;
@ -60,7 +66,6 @@ export declare type ExportProjection = {
id?: string;
$$createAt$$?: string;
$$updateAt$$?: string;
$$seq$$?: string;
detail?: string;
areaId?: string;
area?: Area.ExportProjection;
@ -79,8 +84,6 @@ export declare type SortAttr = {
id: 1;
} | {
$$createAt$$: 1;
} | {
$$seq$$: 1;
} | {
$$updateAt$$: 1;
} | {

View File

@ -1 +1 @@
{ "attr": { "detail": "详细地址", "area": "所在地区", "phone": "联系电话", "name": "姓名", "default": "是否默认", "remark": "备注" } }
{ "attr": { "detail": "详", "area": "所在地区", "phone": "联系电话", "name": "姓名", "default": "是否默认", "remark": "备注" } }

View File

@ -1,14 +1,13 @@
import { String, Text, ForeignKey } from "oak-domain/lib/types/DataType";
import { String, Text, Datetime, PrimaryKey, ForeignKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
import { OneOf } from "oak-domain/lib/types/Polyfill";
import * as SubQuery from "../_SubQuery";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction } from "oak-domain/lib/types/Entity";
import { GenericAction } from "oak-domain/lib/actions/action";
import * as System from "../System/Schema";
import * as Token from "../Token/Schema";
import * as WechatQrCode from "../WechatQrCode/Schema";
import * as WechatUser from "../WechatUser/Schema";
declare type Passport = 'email' | 'mobile' | 'wechat';
export declare type AppType = 'web' | 'wechatMp' | 'wechatPublic';
export declare type WechatMpConfig = {
type: 'wechatMp';
@ -18,11 +17,8 @@ export declare type WechatMpConfig = {
};
export declare type WebConfig = {
type: 'web';
wechat?: {
appId: string;
appSecret: string;
};
passport: Passport[];
appId?: string;
appSecret?: string;
};
declare type WechatPublicTemplateMsgsConfig = Record<string, {
templateId: string;
@ -33,12 +29,15 @@ declare type WechatPublicTemplateMsgsConfig = Record<string, {
}>;
export declare type WechatPublicConfig = {
type: 'wechatPublic';
isService: boolean;
appId: string;
appSecret: string;
templateMsgs?: WechatPublicTemplateMsgsConfig;
};
export declare type OpSchema = EntityShape & {
export declare type OpSchema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
name: String<32>;
description: Text;
type: AppType;
@ -46,7 +45,11 @@ export declare type OpSchema = EntityShape & {
config: WebConfig | WechatMpConfig | WechatPublicConfig;
};
export declare type OpAttr = keyof OpSchema;
export declare type Schema = EntityShape & {
export declare type Schema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
name: String<32>;
description: Text;
type: AppType;
@ -62,7 +65,6 @@ export declare type Schema = EntityShape & {
declare type AttrFilter = {
id: Q_StringValue | SubQuery.ApplicationIdSubQuery;
$$createAt$$: Q_DateValue;
$$seq$$: Q_StringValue;
$$updateAt$$: Q_DateValue;
name: Q_StringValue;
description: Q_StringValue;
@ -77,7 +79,6 @@ export declare type Projection = {
id: 1;
$$createAt$$?: 1;
$$updateAt$$?: 1;
$$seq$$?: 1;
name?: 1;
description?: 1;
type?: 1;
@ -100,7 +101,6 @@ export declare type ExportProjection = {
id?: string;
$$createAt$$?: string;
$$updateAt$$?: string;
$$seq$$?: string;
name?: string;
description?: string;
type?: string;
@ -127,8 +127,6 @@ export declare type SortAttr = {
id: 1;
} | {
$$createAt$$: 1;
} | {
$$seq$$: 1;
} | {
$$updateAt$$: 1;
} | {

View File

@ -1,11 +1,15 @@
import { String, ForeignKey, Geo } from "oak-domain/lib/types/DataType";
import { String, Datetime, PrimaryKey, ForeignKey, Geo } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
import { OneOf } from "oak-domain/lib/types/Polyfill";
import * as SubQuery from "../_SubQuery";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction } from "oak-domain/lib/types/Entity";
import { ReadOnlyAction } from "oak-domain/lib/actions/action";
import * as Address from "../Address/Schema";
export declare type OpSchema = EntityShape & {
export declare type OpSchema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
name: String<32>;
level: 'province' | 'city' | 'district' | 'street' | 'country';
depth: 0 | 1 | 2 | 3 | 4;
@ -14,7 +18,11 @@ export declare type OpSchema = EntityShape & {
center: Geo;
};
export declare type OpAttr = keyof OpSchema;
export declare type Schema = EntityShape & {
export declare type Schema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
name: String<32>;
level: 'province' | 'city' | 'district' | 'street' | 'country';
depth: 0 | 1 | 2 | 3 | 4;
@ -30,7 +38,6 @@ export declare type Schema = EntityShape & {
declare type AttrFilter = {
id: Q_StringValue | SubQuery.AreaIdSubQuery;
$$createAt$$: Q_DateValue;
$$seq$$: Q_StringValue;
$$updateAt$$: Q_DateValue;
name: Q_StringValue;
level: Q_EnumValue<'province' | 'city' | 'district' | 'street' | 'country'>;
@ -46,7 +53,6 @@ export declare type Projection = {
id: 1;
$$createAt$$?: 1;
$$updateAt$$?: 1;
$$seq$$?: 1;
name?: 1;
level?: 1;
depth?: 1;
@ -67,7 +73,6 @@ export declare type ExportProjection = {
id?: string;
$$createAt$$?: string;
$$updateAt$$?: string;
$$seq$$?: string;
name?: string;
level?: string;
depth?: string;
@ -90,8 +95,6 @@ export declare type SortAttr = {
id: 1;
} | {
$$createAt$$: 1;
} | {
$$seq$$: 1;
} | {
$$updateAt$$: 1;
} | {

View File

@ -1,11 +1,15 @@
import { String, Text } from "oak-domain/lib/types/DataType";
import { String, Text, Datetime, PrimaryKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
import { OneOf } from "oak-domain/lib/types/Polyfill";
import * as SubQuery from "../_SubQuery";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction } from "oak-domain/lib/types/Entity";
import { Action, ParticularAction, IState } from "./Action";
import * as ExtraFile from "../ExtraFile/Schema";
export declare type OpSchema = EntityShape & {
export declare type OpSchema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
entity?: String<32> | null;
entityId?: String<64> | null;
title: String<32>;
@ -15,7 +19,11 @@ export declare type OpSchema = EntityShape & {
iState?: IState | null;
};
export declare type OpAttr = keyof OpSchema;
export declare type Schema = EntityShape & {
export declare type Schema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
entity?: String<32> | null;
entityId?: String<64> | null;
title: String<32>;
@ -30,7 +38,6 @@ export declare type Schema = EntityShape & {
declare type AttrFilter = {
id: Q_StringValue | SubQuery.ArticleIdSubQuery;
$$createAt$$: Q_DateValue;
$$seq$$: Q_StringValue;
$$updateAt$$: Q_DateValue;
entity: Q_StringValue;
entityId: Q_StringValue;
@ -47,7 +54,6 @@ export declare type Projection = {
id: 1;
$$createAt$$?: 1;
$$updateAt$$?: 1;
$$seq$$?: 1;
entity?: 1;
entityId?: 1;
title?: 1;
@ -65,7 +71,6 @@ export declare type ExportProjection = {
id?: string;
$$createAt$$?: string;
$$updateAt$$?: string;
$$seq$$?: string;
entity?: string;
entityId?: string;
title?: string;
@ -84,8 +89,6 @@ export declare type SortAttr = {
id: 1;
} | {
$$createAt$$: 1;
} | {
$$seq$$: 1;
} | {
$$updateAt$$: 1;
} | {

View File

@ -1,10 +1,14 @@
import { String, Boolean, Text, Datetime } from "oak-domain/lib/types/DataType";
import { String, Boolean, Text, Datetime, PrimaryKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_BooleanValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
import { OneOf } from "oak-domain/lib/types/Polyfill";
import * as SubQuery from "../_SubQuery";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction } from "oak-domain/lib/types/Entity";
import { Action, ParticularAction, IState } from "./Action";
export declare type OpSchema = EntityShape & {
export declare type OpSchema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
mobile: String<11>;
code: String<4>;
visitorId: Text;
@ -15,7 +19,11 @@ export declare type OpSchema = EntityShape & {
iState?: IState | null;
};
export declare type OpAttr = keyof OpSchema;
export declare type Schema = EntityShape & {
export declare type Schema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
mobile: String<11>;
code: String<4>;
visitorId: Text;
@ -30,7 +38,6 @@ export declare type Schema = EntityShape & {
declare type AttrFilter = {
id: Q_StringValue | SubQuery.CaptchaIdSubQuery;
$$createAt$$: Q_DateValue;
$$seq$$: Q_StringValue;
$$updateAt$$: Q_DateValue;
mobile: Q_StringValue;
code: Q_StringValue;
@ -48,7 +55,6 @@ export declare type Projection = {
id: 1;
$$createAt$$?: 1;
$$updateAt$$?: 1;
$$seq$$?: 1;
mobile?: 1;
code?: 1;
visitorId?: 1;
@ -64,7 +70,6 @@ export declare type ExportProjection = {
id?: string;
$$createAt$$?: string;
$$updateAt$$?: string;
$$seq$$?: string;
mobile?: string;
code?: string;
visitorId?: string;
@ -81,8 +86,6 @@ export declare type SortAttr = {
id: 1;
} | {
$$createAt$$: 1;
} | {
$$seq$$: 1;
} | {
$$updateAt$$: 1;
} | {

View File

@ -1,11 +1,15 @@
import { String, Int, ForeignKey } from "oak-domain/lib/types/DataType";
import { String, Int, Datetime, PrimaryKey, ForeignKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
import { OneOf } from "oak-domain/lib/types/Polyfill";
import * as SubQuery from "../_SubQuery";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction } from "oak-domain/lib/types/Entity";
import { GenericAction } from "oak-domain/lib/actions/action";
import * as System from "../System/Schema";
export declare type OpSchema = EntityShape & {
export declare type OpSchema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
url: String<64>;
apiPath: String<32>;
protocol: 'http' | 'https';
@ -13,7 +17,11 @@ export declare type OpSchema = EntityShape & {
systemId: ForeignKey<"system">;
};
export declare type OpAttr = keyof OpSchema;
export declare type Schema = EntityShape & {
export declare type Schema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
url: String<64>;
apiPath: String<32>;
protocol: 'http' | 'https';
@ -26,7 +34,6 @@ export declare type Schema = EntityShape & {
declare type AttrFilter = {
id: Q_StringValue | SubQuery.DomainIdSubQuery;
$$createAt$$: Q_DateValue;
$$seq$$: Q_StringValue;
$$updateAt$$: Q_DateValue;
url: Q_StringValue;
apiPath: Q_StringValue;
@ -42,7 +49,6 @@ export declare type Projection = {
id: 1;
$$createAt$$?: 1;
$$updateAt$$?: 1;
$$seq$$?: 1;
url?: 1;
apiPath?: 1;
protocol?: 1;
@ -56,7 +62,6 @@ export declare type ExportProjection = {
id?: string;
$$createAt$$?: string;
$$updateAt$$?: string;
$$seq$$?: string;
url?: string;
apiPath?: string;
protocol?: string;
@ -74,8 +79,6 @@ export declare type SortAttr = {
id: 1;
} | {
$$createAt$$: 1;
} | {
$$seq$$: 1;
} | {
$$updateAt$$: 1;
} | {

View File

@ -1,19 +1,27 @@
import { String, ForeignKey } from "oak-domain/lib/types/DataType";
import { String, Datetime, PrimaryKey, ForeignKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
import { OneOf } from "oak-domain/lib/types/Polyfill";
import * as SubQuery from "../_SubQuery";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction } from "oak-domain/lib/types/Entity";
import { AbleState } from 'oak-domain/lib/actions/action';
import { Action, ParticularAction } from "./Action";
import * as User from "../User/Schema";
import * as Token from "../Token/Schema";
export declare type OpSchema = EntityShape & {
export declare type OpSchema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
email: String<16>;
userId: ForeignKey<"user">;
ableState?: AbleState | null;
};
export declare type OpAttr = keyof OpSchema;
export declare type Schema = EntityShape & {
export declare type Schema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
email: String<16>;
userId: ForeignKey<"user">;
ableState?: AbleState | null;
@ -25,7 +33,6 @@ export declare type Schema = EntityShape & {
declare type AttrFilter = {
id: Q_StringValue | SubQuery.EmailIdSubQuery;
$$createAt$$: Q_DateValue;
$$seq$$: Q_StringValue;
$$updateAt$$: Q_DateValue;
email: Q_StringValue;
userId: Q_StringValue | SubQuery.UserIdSubQuery;
@ -39,7 +46,6 @@ export declare type Projection = {
id: 1;
$$createAt$$?: 1;
$$updateAt$$?: 1;
$$seq$$?: 1;
email?: 1;
userId?: 1;
user?: User.Projection;
@ -54,7 +60,6 @@ export declare type ExportProjection = {
id?: string;
$$createAt$$?: string;
$$updateAt$$?: string;
$$seq$$?: string;
email?: string;
userId?: string;
user?: User.ExportProjection;
@ -73,8 +78,6 @@ export declare type SortAttr = {
id: 1;
} | {
$$createAt$$: 1;
} | {
$$seq$$: 1;
} | {
$$updateAt$$: 1;
} | {

View File

@ -1,12 +1,16 @@
import { String, Int, Text } from "oak-domain/lib/types/DataType";
import { String, Int, Text, Datetime, PrimaryKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
import { OneOf } from "oak-domain/lib/types/Polyfill";
import * as SubQuery from "../_SubQuery";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction } from "oak-domain/lib/types/Entity";
import { GenericAction } from "oak-domain/lib/actions/action";
import * as Article from "../Article/Schema";
import * as User from "../User/Schema";
export declare type OpSchema = EntityShape & {
export declare type OpSchema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
origin: 'qiniu' | 'unknown';
type: 'image' | 'video' | 'audio' | 'file' | 'pdf';
bucket: String<16>;
@ -24,7 +28,11 @@ export declare type OpSchema = EntityShape & {
fileType: String<16>;
};
export declare type OpAttr = keyof OpSchema;
export declare type Schema = EntityShape & {
export declare type Schema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
origin: 'qiniu' | 'unknown';
type: 'image' | 'video' | 'audio' | 'file' | 'pdf';
bucket: String<16>;
@ -48,7 +56,6 @@ export declare type Schema = EntityShape & {
declare type AttrFilter<E> = {
id: Q_StringValue | SubQuery.ExtraFileIdSubQuery;
$$createAt$$: Q_DateValue;
$$seq$$: Q_StringValue;
$$updateAt$$: Q_DateValue;
origin: Q_EnumValue<'qiniu' | 'unknown'>;
type: Q_EnumValue<'image' | 'video' | 'audio' | 'file' | 'pdf'>;
@ -75,7 +82,6 @@ export declare type Projection = {
id: 1;
$$createAt$$?: 1;
$$updateAt$$?: 1;
$$seq$$?: 1;
origin?: 1;
type?: 1;
bucket?: 1;
@ -100,7 +106,6 @@ export declare type ExportProjection = {
id?: string;
$$createAt$$?: string;
$$updateAt$$?: string;
$$seq$$?: string;
origin?: string;
type?: string;
bucket?: string;
@ -132,8 +137,6 @@ export declare type SortAttr = {
id: 1;
} | {
$$createAt$$: 1;
} | {
$$seq$$: 1;
} | {
$$updateAt$$: 1;
} | {

View File

@ -1,10 +1,14 @@
import { String, Datetime } from "oak-domain/lib/types/DataType";
import { String, Datetime, PrimaryKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
import { OneOf } from "oak-domain/lib/types/Polyfill";
import * as SubQuery from "../_SubQuery";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction } from "oak-domain/lib/types/Entity";
import { GenericAction } from "oak-domain/lib/actions/action";
export declare type OpSchema = EntityShape & {
export declare type OpSchema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
title: String<32>;
streamTitle: String<32>;
liveonly: 'online' | 'offline';
@ -18,7 +22,11 @@ export declare type OpSchema = EntityShape & {
expireAt: Datetime;
};
export declare type OpAttr = keyof OpSchema;
export declare type Schema = EntityShape & {
export declare type Schema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
title: String<32>;
streamTitle: String<32>;
liveonly: 'online' | 'offline';
@ -36,7 +44,6 @@ export declare type Schema = EntityShape & {
declare type AttrFilter = {
id: Q_StringValue | SubQuery.LivestreamIdSubQuery;
$$createAt$$: Q_DateValue;
$$seq$$: Q_StringValue;
$$updateAt$$: Q_DateValue;
title: Q_StringValue;
streamTitle: Q_StringValue;
@ -57,7 +64,6 @@ export declare type Projection = {
id: 1;
$$createAt$$?: 1;
$$updateAt$$?: 1;
$$seq$$?: 1;
title?: 1;
streamTitle?: 1;
liveonly?: 1;
@ -76,7 +82,6 @@ export declare type ExportProjection = {
id?: string;
$$createAt$$?: string;
$$updateAt$$?: string;
$$seq$$?: string;
title?: string;
streamTitle?: string;
liveonly?: string;
@ -96,8 +101,6 @@ export declare type SortAttr = {
id: 1;
} | {
$$createAt$$: 1;
} | {
$$seq$$: 1;
} | {
$$updateAt$$: 1;
} | {

View File

@ -1,13 +1,17 @@
import { String, ForeignKey } from "oak-domain/lib/types/DataType";
import { String, Datetime, PrimaryKey, ForeignKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
import { OneOf } from "oak-domain/lib/types/Polyfill";
import * as SubQuery from "../_SubQuery";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction } from "oak-domain/lib/types/Entity";
import { Action, ParticularAction, IState } from "./Action";
import * as User from "../User/Schema";
import * as System from "../System/Schema";
import * as MessageSent from "../MessageSent/Schema";
export declare type OpSchema = EntityShape & {
export declare type OpSchema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
userId: ForeignKey<"user">;
systemId: ForeignKey<"system">;
type: 'adminNotification';
@ -18,7 +22,11 @@ export declare type OpSchema = EntityShape & {
iState?: IState | null;
};
export declare type OpAttr = keyof OpSchema;
export declare type Schema = EntityShape & {
export declare type Schema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
userId: ForeignKey<"user">;
systemId: ForeignKey<"system">;
type: 'adminNotification';
@ -36,7 +44,6 @@ export declare type Schema = EntityShape & {
declare type AttrFilter = {
id: Q_StringValue | SubQuery.MessageIdSubQuery;
$$createAt$$: Q_DateValue;
$$seq$$: Q_StringValue;
$$updateAt$$: Q_DateValue;
userId: Q_StringValue | SubQuery.UserIdSubQuery;
user: User.Filter;
@ -56,7 +63,6 @@ export declare type Projection = {
id: 1;
$$createAt$$?: 1;
$$updateAt$$?: 1;
$$seq$$?: 1;
userId?: 1;
user?: User.Projection;
systemId?: 1;
@ -77,7 +83,6 @@ export declare type ExportProjection = {
id?: string;
$$createAt$$?: string;
$$updateAt$$?: string;
$$seq$$?: string;
userId?: string;
user?: User.ExportProjection;
systemId?: string;
@ -105,8 +110,6 @@ export declare type SortAttr = {
id: 1;
} | {
$$createAt$$: 1;
} | {
$$seq$$: 1;
} | {
$$updateAt$$: 1;
} | {

View File

@ -1,11 +1,15 @@
import { String, ForeignKey } from "oak-domain/lib/types/DataType";
import { String, Datetime, PrimaryKey, ForeignKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
import { OneOf } from "oak-domain/lib/types/Polyfill";
import * as SubQuery from "../_SubQuery";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction } from "oak-domain/lib/types/Entity";
import { Action, ParticularAction, IState } from "./Action";
import * as Message from "../Message/Schema";
export declare type OpSchema = EntityShape & {
export declare type OpSchema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
channel: 'public' | 'jPush' | 'jim' | 'mp' | 'gsm';
data: Object;
messageId: ForeignKey<"message">;
@ -14,7 +18,11 @@ export declare type OpSchema = EntityShape & {
iState?: IState | null;
};
export declare type OpAttr = keyof OpSchema;
export declare type Schema = EntityShape & {
export declare type Schema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
channel: 'public' | 'jPush' | 'jim' | 'mp' | 'gsm';
data: Object;
messageId: ForeignKey<"message">;
@ -28,7 +36,6 @@ export declare type Schema = EntityShape & {
declare type AttrFilter = {
id: Q_StringValue | SubQuery.MessageSentIdSubQuery;
$$createAt$$: Q_DateValue;
$$seq$$: Q_StringValue;
$$updateAt$$: Q_DateValue;
channel: Q_EnumValue<'public' | 'jPush' | 'jim' | 'mp' | 'gsm'>;
data: Object;
@ -45,7 +52,6 @@ export declare type Projection = {
id: 1;
$$createAt$$?: 1;
$$updateAt$$?: 1;
$$seq$$?: 1;
channel?: 1;
data?: 1;
messageId?: 1;
@ -60,7 +66,6 @@ export declare type ExportProjection = {
id?: string;
$$createAt$$?: string;
$$updateAt$$?: string;
$$seq$$?: string;
channel?: string;
data?: string;
messageId?: string;
@ -79,8 +84,6 @@ export declare type SortAttr = {
id: 1;
} | {
$$createAt$$: 1;
} | {
$$seq$$: 1;
} | {
$$updateAt$$: 1;
} | {

View File

@ -1,15 +1,23 @@
import { String, Text } from "oak-domain/lib/types/DataType";
import { String, Text, Datetime, PrimaryKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_StringValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
import { OneOf } from "oak-domain/lib/types/Polyfill";
import * as SubQuery from "../_SubQuery";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction } from "oak-domain/lib/types/Entity";
import { GenericAction } from "oak-domain/lib/actions/action";
export declare type OpSchema = EntityShape & {
export declare type OpSchema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
name: String<24>;
template: Text;
};
export declare type OpAttr = keyof OpSchema;
export declare type Schema = EntityShape & {
export declare type Schema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
name: String<24>;
template: Text;
} & {
@ -18,7 +26,6 @@ export declare type Schema = EntityShape & {
declare type AttrFilter = {
id: Q_StringValue | SubQuery.MessageTypeIdSubQuery;
$$createAt$$: Q_DateValue;
$$seq$$: Q_StringValue;
$$updateAt$$: Q_DateValue;
name: Q_StringValue;
template: Q_StringValue;
@ -30,7 +37,6 @@ export declare type Projection = {
id: 1;
$$createAt$$?: 1;
$$updateAt$$?: 1;
$$seq$$?: 1;
name?: 1;
template?: 1;
} & Partial<ExprOp<OpAttr | string>>;
@ -40,7 +46,6 @@ export declare type ExportProjection = {
id?: string;
$$createAt$$?: string;
$$updateAt$$?: string;
$$seq$$?: string;
name?: string;
template?: string;
} & Partial<ExprOp<OpAttr | string>>;
@ -51,8 +56,6 @@ export declare type SortAttr = {
id: 1;
} | {
$$createAt$$: 1;
} | {
$$seq$$: 1;
} | {
$$updateAt$$: 1;
} | {

View File

@ -1,19 +1,27 @@
import { String, ForeignKey } from "oak-domain/lib/types/DataType";
import { String, Datetime, PrimaryKey, ForeignKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
import { OneOf } from "oak-domain/lib/types/Polyfill";
import * as SubQuery from "../_SubQuery";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction } from "oak-domain/lib/types/Entity";
import { AbleState } from 'oak-domain/lib/actions/action';
import { Action, ParticularAction } from "./Action";
import * as User from "../User/Schema";
import * as Token from "../Token/Schema";
export declare type OpSchema = EntityShape & {
export declare type OpSchema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
mobile: String<16>;
userId: ForeignKey<"user">;
ableState?: AbleState | null;
};
export declare type OpAttr = keyof OpSchema;
export declare type Schema = EntityShape & {
export declare type Schema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
mobile: String<16>;
userId: ForeignKey<"user">;
ableState?: AbleState | null;
@ -25,7 +33,6 @@ export declare type Schema = EntityShape & {
declare type AttrFilter = {
id: Q_StringValue | SubQuery.MobileIdSubQuery;
$$createAt$$: Q_DateValue;
$$seq$$: Q_StringValue;
$$updateAt$$: Q_DateValue;
mobile: Q_StringValue;
userId: Q_StringValue | SubQuery.UserIdSubQuery;
@ -39,7 +46,6 @@ export declare type Projection = {
id: 1;
$$createAt$$?: 1;
$$updateAt$$?: 1;
$$seq$$?: 1;
mobile?: 1;
userId?: 1;
user?: User.Projection;
@ -54,7 +60,6 @@ export declare type ExportProjection = {
id?: string;
$$createAt$$?: string;
$$updateAt$$?: string;
$$seq$$?: string;
mobile?: string;
userId?: string;
user?: User.ExportProjection;
@ -73,8 +78,6 @@ export declare type SortAttr = {
id: 1;
} | {
$$createAt$$: 1;
} | {
$$seq$$: 1;
} | {
$$updateAt$$: 1;
} | {

View File

@ -1,11 +1,15 @@
import { String } from "oak-domain/lib/types/DataType";
import { String, Datetime, PrimaryKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
import { OneOf } from "oak-domain/lib/types/Polyfill";
import * as SubQuery from "../_SubQuery";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction } from "oak-domain/lib/types/Entity";
import { Action, ParticularAction, IState } from "./Action";
import * as ModiEntity from "../ModiEntity/Schema";
export declare type OpSchema = EntityShape & {
export declare type OpSchema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
targetEntity: String<32>;
entity: String<32>;
entityId: String<64>;
@ -16,7 +20,11 @@ export declare type OpSchema = EntityShape & {
iState?: IState | null;
};
export declare type OpAttr = keyof OpSchema;
export declare type Schema = EntityShape & {
export declare type Schema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
targetEntity: String<32>;
entity: String<32>;
entityId: String<64>;
@ -32,7 +40,6 @@ export declare type Schema = EntityShape & {
declare type AttrFilter = {
id: Q_StringValue | SubQuery.ModiIdSubQuery;
$$createAt$$: Q_DateValue;
$$seq$$: Q_StringValue;
$$updateAt$$: Q_DateValue;
targetEntity: Q_StringValue;
entity: Q_StringValue;
@ -50,7 +57,6 @@ export declare type Projection = {
id: 1;
$$createAt$$?: 1;
$$updateAt$$?: 1;
$$seq$$?: 1;
targetEntity?: 1;
entity?: 1;
entityId?: 1;
@ -69,7 +75,6 @@ export declare type ExportProjection = {
id?: string;
$$createAt$$?: string;
$$updateAt$$?: string;
$$seq$$?: string;
targetEntity?: string;
entity?: string;
entityId?: string;
@ -89,8 +94,6 @@ export declare type SortAttr = {
id: 1;
} | {
$$createAt$$: 1;
} | {
$$seq$$: 1;
} | {
$$updateAt$$: 1;
} | {

View File

@ -1,21 +1,29 @@
import { String, ForeignKey } from "oak-domain/lib/types/DataType";
import { String, Datetime, PrimaryKey, ForeignKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
import { OneOf } from "oak-domain/lib/types/Polyfill";
import * as SubQuery from "../_SubQuery";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction } from "oak-domain/lib/types/Entity";
import { AppendOnlyAction } from "oak-domain/lib/actions/action";
import * as Modi from "../Modi/Schema";
import * as User from "../User/Schema";
import * as UserEntityGrant from "../UserEntityGrant/Schema";
import * as WechatQrCode from "../WechatQrCode/Schema";
import * as WechatUser from "../WechatUser/Schema";
export declare type OpSchema = EntityShape & {
export declare type OpSchema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
modiId: ForeignKey<"modi">;
entity: "user" | "userEntityGrant" | "wechatQrCode" | "wechatUser" | string;
entityId: String<64>;
};
export declare type OpAttr = keyof OpSchema;
export declare type Schema = EntityShape & {
export declare type Schema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
modiId: ForeignKey<"modi">;
entity: "user" | "userEntityGrant" | "wechatQrCode" | "wechatUser" | string;
entityId: String<64>;
@ -30,7 +38,6 @@ export declare type Schema = EntityShape & {
declare type AttrFilter<E> = {
id: Q_StringValue | SubQuery.ModiEntityIdSubQuery;
$$createAt$$: Q_DateValue;
$$seq$$: Q_StringValue;
$$updateAt$$: Q_DateValue;
modiId: Q_StringValue | SubQuery.ModiIdSubQuery;
modi: Modi.Filter;
@ -48,7 +55,6 @@ export declare type Projection = {
id: 1;
$$createAt$$?: 1;
$$updateAt$$?: 1;
$$seq$$?: 1;
modiId?: 1;
modi?: Modi.Projection;
entity?: 1;
@ -64,7 +70,6 @@ export declare type ExportProjection = {
id?: string;
$$createAt$$?: string;
$$updateAt$$?: string;
$$seq$$?: string;
modiId?: string;
modi?: Modi.ExportProjection;
entity?: string;
@ -96,8 +101,6 @@ export declare type SortAttr = {
id: 1;
} | {
$$createAt$$: 1;
} | {
$$seq$$: 1;
} | {
$$updateAt$$: 1;
} | {

View File

@ -1,12 +1,16 @@
import { String, ForeignKey } from "oak-domain/lib/types/DataType";
import { String, Datetime, PrimaryKey, ForeignKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_StringValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
import { OneOf } from "oak-domain/lib/types/Polyfill";
import * as SubQuery from "../_SubQuery";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction } from "oak-domain/lib/types/Entity";
import { AppendOnlyAction } from "oak-domain/lib/actions/action";
import * as User from "../User/Schema";
import * as OperEntity from "../OperEntity/Schema";
export declare type OpSchema = EntityShape & {
export declare type OpSchema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
action: String<16>;
data: Object;
filter?: Object | null;
@ -14,7 +18,11 @@ export declare type OpSchema = EntityShape & {
operatorId?: ForeignKey<"user"> | null;
};
export declare type OpAttr = keyof OpSchema;
export declare type Schema = EntityShape & {
export declare type Schema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
action: String<16>;
data: Object;
filter?: Object | null;
@ -28,7 +36,6 @@ export declare type Schema = EntityShape & {
declare type AttrFilter = {
id: Q_StringValue | SubQuery.OperIdSubQuery;
$$createAt$$: Q_DateValue;
$$seq$$: Q_StringValue;
$$updateAt$$: Q_DateValue;
action: Q_StringValue;
data: Object;
@ -44,7 +51,6 @@ export declare type Projection = {
id: 1;
$$createAt$$?: 1;
$$updateAt$$?: 1;
$$seq$$?: 1;
action?: 1;
data?: 1;
filter?: 1;
@ -61,7 +67,6 @@ export declare type ExportProjection = {
id?: string;
$$createAt$$?: string;
$$updateAt$$?: string;
$$seq$$?: string;
action?: string;
data?: string;
filter?: string;
@ -82,8 +87,6 @@ export declare type SortAttr = {
id: 1;
} | {
$$createAt$$: 1;
} | {
$$seq$$: 1;
} | {
$$updateAt$$: 1;
} | {

View File

@ -1,21 +1,29 @@
import { String, ForeignKey } from "oak-domain/lib/types/DataType";
import { String, Datetime, PrimaryKey, ForeignKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
import { OneOf } from "oak-domain/lib/types/Polyfill";
import * as SubQuery from "../_SubQuery";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction } from "oak-domain/lib/types/Entity";
import { AppendOnlyAction } from "oak-domain/lib/actions/action";
import * as Oper from "../Oper/Schema";
import * as User from "../User/Schema";
import * as UserEntityGrant from "../UserEntityGrant/Schema";
import * as WechatQrCode from "../WechatQrCode/Schema";
import * as WechatUser from "../WechatUser/Schema";
export declare type OpSchema = EntityShape & {
export declare type OpSchema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
operId: ForeignKey<"oper">;
entity: "user" | "userEntityGrant" | "wechatQrCode" | "wechatUser" | string;
entityId: String<64>;
};
export declare type OpAttr = keyof OpSchema;
export declare type Schema = EntityShape & {
export declare type Schema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
operId: ForeignKey<"oper">;
entity: "user" | "userEntityGrant" | "wechatQrCode" | "wechatUser" | string;
entityId: String<64>;
@ -30,7 +38,6 @@ export declare type Schema = EntityShape & {
declare type AttrFilter<E> = {
id: Q_StringValue | SubQuery.OperEntityIdSubQuery;
$$createAt$$: Q_DateValue;
$$seq$$: Q_StringValue;
$$updateAt$$: Q_DateValue;
operId: Q_StringValue | SubQuery.OperIdSubQuery;
oper: Oper.Filter;
@ -48,7 +55,6 @@ export declare type Projection = {
id: 1;
$$createAt$$?: 1;
$$updateAt$$?: 1;
$$seq$$?: 1;
operId?: 1;
oper?: Oper.Projection;
entity?: 1;
@ -64,7 +70,6 @@ export declare type ExportProjection = {
id?: string;
$$createAt$$?: string;
$$updateAt$$?: string;
$$seq$$?: string;
operId?: string;
oper?: Oper.ExportProjection;
entity?: string;
@ -96,8 +101,6 @@ export declare type SortAttr = {
id: 1;
} | {
$$createAt$$: 1;
} | {
$$seq$$: 1;
} | {
$$updateAt$$: 1;
} | {

View File

@ -1,18 +1,26 @@
import { String, Text } from "oak-domain/lib/types/DataType";
import { String, Text, Datetime, PrimaryKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
import { OneOf } from "oak-domain/lib/types/Polyfill";
import * as SubQuery from "../_SubQuery";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction } from "oak-domain/lib/types/Entity";
import { GenericAction } from "oak-domain/lib/actions/action";
import { Config } from "../../types/Config";
import * as System from "../System/Schema";
export declare type OpSchema = EntityShape & {
export declare type OpSchema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
name: String<32>;
description: Text;
config: Config;
};
export declare type OpAttr = keyof OpSchema;
export declare type Schema = EntityShape & {
export declare type Schema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
name: String<32>;
description: Text;
config: Config;
@ -23,7 +31,6 @@ export declare type Schema = EntityShape & {
declare type AttrFilter = {
id: Q_StringValue | SubQuery.PlatformIdSubQuery;
$$createAt$$: Q_DateValue;
$$seq$$: Q_StringValue;
$$updateAt$$: Q_DateValue;
name: Q_StringValue;
description: Q_StringValue;
@ -36,7 +43,6 @@ export declare type Projection = {
id: 1;
$$createAt$$?: 1;
$$updateAt$$?: 1;
$$seq$$?: 1;
name?: 1;
description?: 1;
config?: 1;
@ -50,7 +56,6 @@ export declare type ExportProjection = {
id?: string;
$$createAt$$?: string;
$$updateAt$$?: string;
$$seq$$?: string;
name?: string;
description?: string;
config?: string;
@ -65,8 +70,6 @@ export declare type SortAttr = {
id: 1;
} | {
$$createAt$$: 1;
} | {
$$seq$$: 1;
} | {
$$updateAt$$: 1;
} | {

View File

@ -1,15 +1,23 @@
import { String } from "oak-domain/lib/types/DataType";
import { String, Datetime, PrimaryKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_StringValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
import { OneOf } from "oak-domain/lib/types/Polyfill";
import * as SubQuery from "../_SubQuery";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction } from "oak-domain/lib/types/Entity";
import { ReadOnlyAction, RelationAction } from "oak-domain/lib/actions/action";
import * as UserRole from "../UserRole/Schema";
export declare type OpSchema = EntityShape & {
export declare type OpSchema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
name: String<64>;
};
export declare type OpAttr = keyof OpSchema;
export declare type Schema = EntityShape & {
export declare type Schema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
name: String<64>;
userRole$role?: Array<UserRole.Schema>;
} & {
@ -18,7 +26,6 @@ export declare type Schema = EntityShape & {
declare type AttrFilter = {
id: Q_StringValue | SubQuery.RoleIdSubQuery;
$$createAt$$: Q_DateValue;
$$seq$$: Q_StringValue;
$$updateAt$$: Q_DateValue;
name: Q_StringValue;
};
@ -29,7 +36,6 @@ export declare type Projection = {
id: 1;
$$createAt$$?: 1;
$$updateAt$$?: 1;
$$seq$$?: 1;
name?: 1;
userRole$role?: UserRole.Selection & {
$entity: "userRole";
@ -41,7 +47,6 @@ export declare type ExportProjection = {
id?: string;
$$createAt$$?: string;
$$updateAt$$?: string;
$$seq$$?: string;
name?: string;
userRole$role?: UserRole.Exportation & {
$entity: "userRole";
@ -54,8 +59,6 @@ export declare type SortAttr = {
id: 1;
} | {
$$createAt$$: 1;
} | {
$$seq$$: 1;
} | {
$$updateAt$$: 1;
} | {

View File

@ -1,8 +1,8 @@
import { String, Boolean, Text, ForeignKey } from "oak-domain/lib/types/DataType";
import { String, Boolean, Text, Datetime, PrimaryKey, ForeignKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_BooleanValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
import { OneOf } from "oak-domain/lib/types/Polyfill";
import * as SubQuery from "../_SubQuery";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction } from "oak-domain/lib/types/Entity";
import { GenericAction } from "oak-domain/lib/actions/action";
import { Config } from "../../types/Config";
import * as Platform from "../Platform/Schema";
@ -10,7 +10,11 @@ import * as Application from "../Application/Schema";
import * as Domain from "../Domain/Schema";
import * as Message from "../Message/Schema";
import * as User from "../User/Schema";
export declare type OpSchema = EntityShape & {
export declare type OpSchema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
name: String<32>;
description: Text;
config: Config;
@ -18,7 +22,11 @@ export declare type OpSchema = EntityShape & {
super?: Boolean | null;
};
export declare type OpAttr = keyof OpSchema;
export declare type Schema = EntityShape & {
export declare type Schema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
name: String<32>;
description: Text;
config: Config;
@ -35,7 +43,6 @@ export declare type Schema = EntityShape & {
declare type AttrFilter = {
id: Q_StringValue | SubQuery.SystemIdSubQuery;
$$createAt$$: Q_DateValue;
$$seq$$: Q_StringValue;
$$updateAt$$: Q_DateValue;
name: Q_StringValue;
description: Q_StringValue;
@ -51,7 +58,6 @@ export declare type Projection = {
id: 1;
$$createAt$$?: 1;
$$updateAt$$?: 1;
$$seq$$?: 1;
name?: 1;
description?: 1;
config?: 1;
@ -77,7 +83,6 @@ export declare type ExportProjection = {
id?: string;
$$createAt$$?: string;
$$updateAt$$?: string;
$$seq$$?: string;
name?: string;
description?: string;
config?: string;
@ -107,8 +112,6 @@ export declare type SortAttr = {
id: 1;
} | {
$$createAt$$: 1;
} | {
$$seq$$: 1;
} | {
$$updateAt$$: 1;
} | {

View File

@ -1,8 +1,8 @@
import { String, ForeignKey } from "oak-domain/lib/types/DataType";
import { String, Datetime, PrimaryKey, ForeignKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
import { OneOf } from "oak-domain/lib/types/Polyfill";
import * as SubQuery from "../_SubQuery";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction } from "oak-domain/lib/types/Entity";
import { AbleState } from 'oak-domain/lib/actions/action';
import { Action, ParticularAction } from "./Action";
import * as Application from "../Application/Schema";
@ -47,7 +47,11 @@ export declare type ServerEnv = {
type: 'server';
};
export declare type Environment = WechatMpEnv | WebEnv | ServerEnv;
export declare type OpSchema = EntityShape & {
export declare type OpSchema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
applicationId?: ForeignKey<"application"> | null;
entity: "email" | "mobile" | "wechatUser" | string;
entityId: String<64>;
@ -57,7 +61,11 @@ export declare type OpSchema = EntityShape & {
ableState?: AbleState | null;
};
export declare type OpAttr = keyof OpSchema;
export declare type Schema = EntityShape & {
export declare type Schema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
applicationId?: ForeignKey<"application"> | null;
entity: "email" | "mobile" | "wechatUser" | string;
entityId: String<64>;
@ -77,7 +85,6 @@ export declare type Schema = EntityShape & {
declare type AttrFilter<E> = {
id: Q_StringValue | SubQuery.TokenIdSubQuery;
$$createAt$$: Q_DateValue;
$$seq$$: Q_StringValue;
$$updateAt$$: Q_DateValue;
applicationId: Q_StringValue | SubQuery.ApplicationIdSubQuery;
application: Application.Filter;
@ -100,7 +107,6 @@ export declare type Projection = {
id: 1;
$$createAt$$?: 1;
$$updateAt$$?: 1;
$$seq$$?: 1;
applicationId?: 1;
application?: Application.Projection;
entity?: 1;
@ -121,7 +127,6 @@ export declare type ExportProjection = {
id?: string;
$$createAt$$?: string;
$$updateAt$$?: string;
$$seq$$?: string;
applicationId?: string;
application?: Application.ExportProjection;
entity?: string;
@ -159,8 +164,6 @@ export declare type SortAttr = {
id: 1;
} | {
$$createAt$$: 1;
} | {
$$seq$$: 1;
} | {
$$updateAt$$: 1;
} | {

View File

@ -1,8 +1,8 @@
import { String, Text, Datetime, Image, ForeignKey } from "oak-domain/lib/types/DataType";
import { String, Text, Datetime, Image, PrimaryKey, ForeignKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, FulltextFilter, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
import { OneOf } from "oak-domain/lib/types/Polyfill";
import * as SubQuery from "../_SubQuery";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction } from "oak-domain/lib/types/Entity";
import { Action, ParticularAction, UserState, IdState } from "./Action";
import { RelationAction } from "oak-domain/lib/actions/action";
import * as System from "../System/Schema";
@ -17,7 +17,11 @@ import * as WechatUser from "../WechatUser/Schema";
import * as OperEntity from "../OperEntity/Schema";
import * as ModiEntity from "../ModiEntity/Schema";
import * as ExtraFile from "../ExtraFile/Schema";
export declare type OpSchema = EntityShape & {
export declare type OpSchema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
name?: String<16> | null;
nickname?: String<64> | null;
password?: Text | null;
@ -33,7 +37,11 @@ export declare type OpSchema = EntityShape & {
userState?: UserState | null;
};
export declare type OpAttr = keyof OpSchema;
export declare type Schema = EntityShape & {
export declare type Schema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
name?: String<16> | null;
nickname?: String<64> | null;
password?: Text | null;
@ -69,7 +77,6 @@ export declare type Schema = EntityShape & {
declare type AttrFilter = {
id: Q_StringValue | SubQuery.UserIdSubQuery;
$$createAt$$: Q_DateValue;
$$seq$$: Q_StringValue;
$$updateAt$$: Q_DateValue;
name: Q_StringValue;
nickname: Q_StringValue;
@ -94,7 +101,6 @@ export declare type Projection = {
id: 1;
$$createAt$$?: 1;
$$updateAt$$?: 1;
$$seq$$?: 1;
name?: 1;
nickname?: 1;
password?: 1;
@ -159,7 +165,6 @@ export declare type ExportProjection = {
id?: string;
$$createAt$$?: string;
$$updateAt$$?: string;
$$seq$$?: string;
name?: string;
nickname?: string;
password?: string;
@ -229,8 +234,6 @@ export declare type SortAttr = {
id: 1;
} | {
$$createAt$$: 1;
} | {
$$seq$$: 1;
} | {
$$updateAt$$: 1;
} | {

View File

@ -1,14 +1,18 @@
import { String, Int, Boolean, Text, Datetime, ForeignKey } from "oak-domain/lib/types/DataType";
import { String, Int, Boolean, Text, Datetime, PrimaryKey, ForeignKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_BooleanValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
import { OneOf } from "oak-domain/lib/types/Polyfill";
import * as SubQuery from "../_SubQuery";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction } from "oak-domain/lib/types/Entity";
import { Action, ParticularAction } from "./Action";
import * as User from "../User/Schema";
import * as OperEntity from "../OperEntity/Schema";
import * as ModiEntity from "../ModiEntity/Schema";
import * as WechatQrCode from "../WechatQrCode/Schema";
export declare type OpSchema = EntityShape & {
export declare type OpSchema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
entity: String<32>;
entityId: String<64>;
relation: String<32>;
@ -22,7 +26,11 @@ export declare type OpSchema = EntityShape & {
expired?: Boolean | null;
};
export declare type OpAttr = keyof OpSchema;
export declare type Schema = EntityShape & {
export declare type Schema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
entity: String<32>;
entityId: String<64>;
relation: String<32>;
@ -45,7 +53,6 @@ export declare type Schema = EntityShape & {
declare type AttrFilter = {
id: Q_StringValue | SubQuery.UserEntityGrantIdSubQuery;
$$createAt$$: Q_DateValue;
$$seq$$: Q_StringValue;
$$updateAt$$: Q_DateValue;
entity: Q_StringValue;
entityId: Q_StringValue;
@ -68,7 +75,6 @@ export declare type Projection = {
id: 1;
$$createAt$$?: 1;
$$updateAt$$?: 1;
$$seq$$?: 1;
entity?: 1;
entityId?: 1;
relation?: 1;
@ -98,7 +104,6 @@ export declare type ExportProjection = {
id?: string;
$$createAt$$?: string;
$$updateAt$$?: string;
$$seq$$?: string;
entity?: string;
entityId?: string;
relation?: string;
@ -133,8 +138,6 @@ export declare type SortAttr = {
id: 1;
} | {
$$createAt$$: 1;
} | {
$$seq$$: 1;
} | {
$$updateAt$$: 1;
} | {

View File

@ -1,18 +1,26 @@
import { String, ForeignKey } from "oak-domain/lib/types/DataType";
import { String, Datetime, PrimaryKey, ForeignKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
import { OneOf } from "oak-domain/lib/types/Polyfill";
import * as SubQuery from "../_SubQuery";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction } from "oak-domain/lib/types/Entity";
import { ExcludeUpdateAction } from "oak-domain/lib/actions/action";
import * as User from "../User/Schema";
import * as Role from "../Role/Schema";
export declare type OpSchema = EntityShape & {
export declare type OpSchema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
userId: ForeignKey<"user">;
roleId: ForeignKey<"role">;
relation: 'owner';
};
export declare type OpAttr = keyof OpSchema;
export declare type Schema = EntityShape & {
export declare type Schema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
userId: ForeignKey<"user">;
roleId: ForeignKey<"role">;
relation: 'owner';
@ -24,7 +32,6 @@ export declare type Schema = EntityShape & {
declare type AttrFilter = {
id: Q_StringValue | SubQuery.UserRoleIdSubQuery;
$$createAt$$: Q_DateValue;
$$seq$$: Q_StringValue;
$$updateAt$$: Q_DateValue;
userId: Q_StringValue | SubQuery.UserIdSubQuery;
user: User.Filter;
@ -39,7 +46,6 @@ export declare type Projection = {
id: 1;
$$createAt$$?: 1;
$$updateAt$$?: 1;
$$seq$$?: 1;
userId?: 1;
user?: User.Projection;
roleId?: 1;
@ -52,7 +58,6 @@ export declare type ExportProjection = {
id?: string;
$$createAt$$?: string;
$$updateAt$$?: string;
$$seq$$?: string;
userId?: string;
user?: User.ExportProjection;
roleId?: string;
@ -72,8 +77,6 @@ export declare type SortAttr = {
id: 1;
} | {
$$createAt$$: 1;
} | {
$$seq$$: 1;
} | {
$$updateAt$$: 1;
} | {

View File

@ -1,10 +1,9 @@
import { String, Boolean, Text, Datetime, ForeignKey } from "oak-domain/lib/types/DataType";
import { String, Boolean, Text, Datetime, PrimaryKey, ForeignKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_BooleanValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
import { OneOf } from "oak-domain/lib/types/Polyfill";
import * as SubQuery from "../_SubQuery";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction } from "oak-domain/lib/types/Entity";
import { GenericAction } from "oak-domain/lib/actions/action";
import { QrCodeType } from "../../types/Config";
import * as Application from "../Application/Schema";
import * as UserEntityGrant from "../UserEntityGrant/Schema";
import * as OperEntity from "../OperEntity/Schema";
@ -14,10 +13,14 @@ export declare type WechatQrCodeProps = {
props?: Record<string, any>;
state?: Record<string, any>;
};
export declare type OpSchema = EntityShape & {
export declare type OpSchema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
entity: "userEntityGrant" | string;
entityId: String<64>;
type: QrCodeType;
type: 'wechatMpDomainUrl' | 'wechatMpWxaCode' | 'wechatPublic' | 'wechatPublicForMp' | 'webForWechatPublic';
allowShare: Boolean;
tag?: String<32> | null;
expiresAt?: Datetime | null;
@ -30,10 +33,14 @@ export declare type OpSchema = EntityShape & {
props: WechatQrCodeProps;
};
export declare type OpAttr = keyof OpSchema;
export declare type Schema = EntityShape & {
export declare type Schema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
entity: "userEntityGrant" | string;
entityId: String<64>;
type: QrCodeType;
type: 'wechatMpDomainUrl' | 'wechatMpWxaCode' | 'wechatPublic' | 'wechatPublicForMp' | 'webForWechatPublic';
allowShare: Boolean;
tag?: String<32> | null;
expiresAt?: Datetime | null;
@ -54,11 +61,10 @@ export declare type Schema = EntityShape & {
declare type AttrFilter<E> = {
id: Q_StringValue | SubQuery.WechatQrCodeIdSubQuery;
$$createAt$$: Q_DateValue;
$$seq$$: Q_StringValue;
$$updateAt$$: Q_DateValue;
entity: E;
entityId: Q_StringValue;
type: Q_EnumValue<QrCodeType>;
type: Q_EnumValue<'wechatMpDomainUrl' | 'wechatMpWxaCode' | 'wechatPublic' | 'wechatPublicForMp' | 'webForWechatPublic'>;
allowShare: Q_BooleanValue;
tag: Q_StringValue;
expiresAt: Q_DateValue;
@ -79,7 +85,6 @@ export declare type Projection = {
id: 1;
$$createAt$$?: 1;
$$updateAt$$?: 1;
$$seq$$?: 1;
entity?: 1;
entityId?: 1;
type?: 1;
@ -108,7 +113,6 @@ export declare type ExportProjection = {
id?: string;
$$createAt$$?: string;
$$updateAt$$?: string;
$$seq$$?: string;
entity?: string;
entityId?: string;
type?: string;
@ -144,8 +148,6 @@ export declare type SortAttr = {
id: 1;
} | {
$$createAt$$: 1;
} | {
$$seq$$: 1;
} | {
$$updateAt$$: 1;
} | {

View File

@ -17,7 +17,10 @@ exports.desc = {
}
},
type: {
type: "object"
type: "varchar",
params: {
length: 24
}
},
allowShare: {
type: "boolean"

View File

@ -1 +1 @@
{ "attr": { "entity": "关联对象", "entityId": "关联对象id", "type": "类型", "allowShare": "允许分享", "tag": "tag", "ticket": "ticket", "url": "url", "permanent": "是否永久码", "buffer": "小程序码数据(动态)", "expired": "是否过期", "expiresAt": "过期时间", "application": "应用", "props": "属性" } }
{ "attr": { "entity": "关联对象", "entityId": "关联对象id", "type": "类型", "allowShare": "允许分享", "tag": "tag", "ticket": "ticket", "url": "url", "permanent": "是否永久码", "buffer": "小程序码数据(动态)", "expired": "是否过期", "expiresAt": "过期时间", "application": "应用", "props": "属性" }, "v": { "type": { "wechatMpDomainUrl": "小程序域名跳转", "wechatMpWxaCode": "小程序码", "wechatPublic": "公众号码", "wechatPublicForMp": "公众号跳小程序", "webForWechatPublic": "网站跳公众号" } } }

View File

@ -1,15 +1,19 @@
import { String, Boolean, Datetime, Image, ForeignKey } from "oak-domain/lib/types/DataType";
import { String, Boolean, Datetime, Image, PrimaryKey, ForeignKey } from "oak-domain/lib/types/DataType";
import { Q_DateValue, Q_BooleanValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
import { OneOf } from "oak-domain/lib/types/Polyfill";
import * as SubQuery from "../_SubQuery";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction } from "oak-domain/lib/types/Entity";
import { GenericAction } from "oak-domain/lib/actions/action";
import * as User from "../User/Schema";
import * as Application from "../Application/Schema";
import * as OperEntity from "../OperEntity/Schema";
import * as ModiEntity from "../ModiEntity/Schema";
import * as Token from "../Token/Schema";
export declare type OpSchema = EntityShape & {
export declare type OpSchema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
origin: 'mp' | 'public' | 'web';
openId?: String<32> | null;
unionId?: String<32> | null;
@ -24,7 +28,11 @@ export declare type OpSchema = EntityShape & {
avatar?: Image | null;
};
export declare type OpAttr = keyof OpSchema;
export declare type Schema = EntityShape & {
export declare type Schema = {
id: PrimaryKey;
$$createAt$$: Datetime;
$$updateAt$$: Datetime;
$$deleteAt$$?: Datetime | null;
origin: 'mp' | 'public' | 'web';
openId?: String<32> | null;
unionId?: String<32> | null;
@ -48,7 +56,6 @@ export declare type Schema = EntityShape & {
declare type AttrFilter = {
id: Q_StringValue | SubQuery.WechatUserIdSubQuery;
$$createAt$$: Q_DateValue;
$$seq$$: Q_StringValue;
$$updateAt$$: Q_DateValue;
origin: Q_EnumValue<'mp' | 'public' | 'web'>;
openId: Q_StringValue;
@ -72,7 +79,6 @@ export declare type Projection = {
id: 1;
$$createAt$$?: 1;
$$updateAt$$?: 1;
$$seq$$?: 1;
origin?: 1;
openId?: 1;
unionId?: 1;
@ -103,7 +109,6 @@ export declare type ExportProjection = {
id?: string;
$$createAt$$?: string;
$$updateAt$$?: string;
$$seq$$?: string;
origin?: string;
openId?: string;
unionId?: string;
@ -141,8 +146,6 @@ export declare type SortAttr = {
id: 1;
} | {
$$createAt$$: 1;
} | {
$$seq$$: 1;
} | {
$$updateAt$$: 1;
} | {

View File

@ -0,0 +1,87 @@
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { chunk } from '../common/utils';
import { SuperComponent, wxComponent } from '../common/src/index';
import config from '../common/config';
import { ActionSheetTheme, show } from './show';
import props from './props';
const { prefix } = config;
const name = `${prefix}-action-sheet`;
let ActionSheet = class ActionSheet extends SuperComponent {
constructor() {
super(...arguments);
this.externalClasses = [`${prefix}-class`, `${prefix}-class-content`, `${prefix}-class-cancel`];
this.properties = Object.assign({}, props);
this.data = {
prefix,
classPrefix: name,
gridThemeItems: [],
currentSwiperIndex: 0,
};
this.controlledProps = [
{
key: 'visible',
event: 'visible-change',
},
];
this.methods = {
onSwiperChange(e) {
const { detail: { current }, } = e;
this.setData({
currentSwiperIndex: current,
});
},
splitGridThemeActions() {
if (this.data.theme !== ActionSheetTheme.Grid)
return;
this.setData({
gridThemeItems: chunk(this.data.items, this.data.count),
});
},
show() {
this.splitGridThemeActions();
this._trigger('visible-change', { visible: true });
},
resetData(cb) {
this.setData(Object.assign({}, this.initialData), cb);
},
memoInitialData() {
this.initialData = Object.assign(Object.assign({}, this.properties), this.data);
},
close() {
this._trigger('visible-change', { visible: false });
},
onPopupVisibleChange({ detail }) {
if (!detail.visible) {
this._trigger('visible-change', { visible: false });
}
},
onSelect(event) {
const { currentSwiperIndex, items, gridThemeItems, count } = this.data;
const { index } = event.currentTarget.dataset;
const isSwiperMode = items.length > count;
const item = isSwiperMode ? gridThemeItems[currentSwiperIndex][index] : items[index];
const realIndex = isSwiperMode ? index + currentSwiperIndex * count : index;
if (item) {
this.triggerEvent('selected', { selected: item, index: realIndex });
this._trigger('visible-change', { visible: false });
}
},
onCancel() {
this.triggerEvent('cancel');
},
};
}
ready() {
this.memoInitialData();
}
};
ActionSheet.show = show;
ActionSheet = __decorate([
wxComponent()
], ActionSheet);
export default ActionSheet;

View File

@ -0,0 +1,114 @@
@import '../common/style/index.less';
@action-sheet: ~'@{prefix}-action-sheet';
@action-sheet-list-item-height: 96rpx;
@action-sheet-gap-bg-color: #f3f3f3;
@action-sheet-list-item-color--disabled: rgba(0, 0, 0, 0.26);
@action-sheet-square-image-size: 72rpx;
@action-sheet-square-image-padding: 10rpx;
.@{action-sheet} {
.flex-center {
display: flex;
align-items: center;
justify-content: center;
}
.ellipsis {
word-wrap: normal;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
&__grid {
padding: 48rpx 0 16rpx 0;
&-item {
margin-bottom: 32rpx;
}
}
&__list {
background-color: @bg-color-block;
border-bottom: 1rpx solid #f6f6f6;
&:last-child {
border-bottom: none;
}
&-item {
height: @action-sheet-list-item-height;
.flex-center();
&.@{prefix}-is-disabled {
color: @action-sheet-list-item-color--disabled;
}
&-text {
font-size: @font-size-m;
.ellipsis();
}
&-icon {
margin-right: 16rpx;
}
}
}
&__swiper-wrap {
position: relative;
background-color: @bg-color-block;
}
&__square {
height: 148rpx;
margin-bottom: 32rpx;
&-image {
width: @action-sheet-square-image-size;
height: @action-sheet-square-image-size;
padding: @action-sheet-square-image-padding;
}
&-text {
width: 100%;
margin-top: 10rpx;
font-size: 28rpx;
color: rgba(0, 0, 0, 0.9);
text-align: center;
.ellipsis();
}
}
&__footer {
background-color: @bg-color-block;
}
&__gap-list {
height: 16rpx;
background-color: @action-sheet-gap-bg-color;
}
&__gap-grid {
height: 1rpx;
background-color: @action-sheet-gap-bg-color;
}
&__cancel {
.flex-center();
height: @action-sheet-list-item-height;
}
&__dots {
position: absolute;
left: 50%;
bottom: 32rpx;
transform: translateX(-50%);
display: flex;
flex-direction: row;
&-item {
width: 16rpx;
height: 16rpx;
background-color: #dcdcdc;
border-radius: 50%;
margin: 0 16rpx;
transition: all 0.4s ease-in;
&.@{prefix}-is-active {
background-color: #0052d9;
}
}
}
&__safe {
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
}
}

View File

@ -0,0 +1,32 @@
<wxs src="./action-sheet.wxs" module="this" />
<import src="./template/action-sheet-list.wxml" />
<import src="./template/action-sheet-grid.wxml" />
<view id="{{classPrefix}}" class="{{classPrefix}} {{prefix}}-class">
<t-popup visible="{{visible}}" placement="bottom" bind:visible-change="onPopupVisibleChange">
<view class="{{classPrefix}}__content {{prefix}}-class-content">
<block wx:if="{{gridThemeItems.length}}">
<template is="grid" data="{{classPrefix, prefix, gridThemeItems, count, currentSwiperIndex}}" />
</block>
<block wx:elif="{{items && items.length}}">
<view class="{{classPrefix}}__list" wx:for="{{ items }}" wx:key="index">
<template
is="list"
data="{{index, classPrefix, listThemeItemClass: this.getListThemeItemClass({ item, prefix, classPrefix }), item}}"
/>
</view>
</block>
</view>
<slot />
<view wx:if="{{showCancel}}" class="{{classPrefix}}__footer {{classPrefix}}__safe">
<view class="{{classPrefix}}__gap-{{theme}}" />
<view
class="{{classPrefix}}__cancel {{prefix}}-class-cancel"
hover-class="{{classPrefix}}__cancel--hover"
hover-stay-time="70"
bind:tap="onCancel"
>
{{ cancelText }}
</view>
</view>
</t-popup>
</view>

View File

@ -0,0 +1,19 @@
var getListThemeItemClass = function (props) {
var classPrefix = props.classPrefix;
var item = props.item;
var prefix = props.prefix;
var classList = [classPrefix + '__list-item'];
if (item.disabled) {
classList.push(prefix + '-is-disabled');
}
return classList.join(' ');
};
var isImage = function (name) {
return name.indexOf('/') !== -1;
};
module.exports = {
getListThemeItemClass: getListThemeItemClass,
isImage: isImage,
};

View File

@ -0,0 +1,3 @@
import ActionSheet from './action-sheet';
export * from './show';
export default ActionSheet;

View File

@ -0,0 +1,30 @@
const props = {
cancelText: {
type: String,
value: '取消',
},
count: {
type: Number,
value: 8,
},
items: {
type: Array,
},
showCancel: {
type: Boolean,
value: true,
},
theme: {
type: String,
value: 'list',
},
visible: {
type: Boolean,
value: null,
},
defaultVisible: {
type: Boolean,
value: false,
},
};
export default props;

View File

@ -0,0 +1,28 @@
export var ActionSheetTheme;
(function (ActionSheetTheme) {
ActionSheetTheme["List"] = "list";
ActionSheetTheme["Grid"] = "grid";
})(ActionSheetTheme || (ActionSheetTheme = {}));
const getInstance = function (context, selector = '#t-action-sheet') {
if (!context) {
const pages = getCurrentPages();
const page = pages[pages.length - 1];
context = page.$$basePage || page;
}
const instance = context === null || context === void 0 ? void 0 : context.selectComponent(selector);
if (!instance) {
return null;
}
return instance;
};
export const show = function (options) {
const { context, selector } = options;
const instance = getInstance(context, selector);
if (!instance) {
return Promise.reject(new Error('未找到ActionSheet组件, 请检查selector是否正确'));
}
instance.resetData(() => {
instance.setData(Object.assign({}, options), instance.show);
});
return instance;
};

View File

@ -0,0 +1,46 @@
<import src="./action-sheet-item.wxml" />
<template name="grid">
<block wx:if="{{gridThemeItems.length === 1}}">
<t-grid align="center" t-class="{{classPrefix}}__grid" column="{{count / 2}}" class="{{classPrefix}}__single-wrap">
<t-grid-item
t-class="{{classPrefix}}__grid-item"
class="{{classPrefix}}__square"
wx:for="{{gridThemeItems[0]}}"
wx:key="index"
bind:tap="onSelect"
data-index="{{index}}"
>
<template is="item" data="{{classPrefix, item}}" />
</t-grid-item>
</t-grid>
</block>
<block wx:elif="{{gridThemeItems.length > 1}}">
<view class="{{classPrefix}}__swiper-wrap">
<t-swiper height="{{456}}" autoplay="{{false}}" current="{{currentSwiperIndex}}" bindchange="onSwiperChange">
<t-swiper-item wx:for="{{gridThemeItems}}" wx:key="index">
<t-grid align="center" t-class="{{classPrefix}}__grid" column="{{count / 2}}">
<t-grid-item
t-class="{{classPrefix}}__grid-item"
class="{{classPrefix}}__square"
wx:for="{{item}}"
wx:key="index"
data-index="{{index}}"
bind:tap="onSelect"
>
<template is="item" data="{{classPrefix, item}}" />
</t-grid-item>
</t-grid>
</t-swiper-item>
</t-swiper>
<view class="{{classPrefix}}__nav">
<view class="{{classPrefix}}__dots">
<view
wx:for="{{gridThemeItems.length}}"
wx:key="index"
class="{{classPrefix}}__dots-item {{index === currentSwiperIndex ? prefix + '-is-active' : ''}}"
/>
</view>
</view>
</view>
</block>
</template>

View File

@ -0,0 +1,17 @@
<wxs src="../action-sheet.wxs" module="this" />
<template name="item">
<block>
<t-image
slot="image"
wx:if="{{ this.isImage(item.icon) }}"
lazy
class="{{classPrefix}}__square-image"
src="{{item.icon}}"
mode="aspectFill"
/>
<t-icon slot="image" wx:else name="{{item.icon}}" class="{{classPrefix}}__square-image" size="72rpx" />
</block>
<view slot="text" style="{{ item.color ? 'color: ' + item.color : '' }}" class="{{classPrefix}}__square-text">
{{item.label}}
</view>
</template>

View File

@ -0,0 +1,11 @@
<template name="list">
<view
data-index="{{index}}"
style="{{ item.color ? 'color: ' + item.color : '' }}"
class="{{listThemeItemClass}}"
bind:tap="onSelect"
>
<t-icon wx:if="{{item.icon}}" name="{{item.icon}}" class="{{classPrefix}}__list-item-icon" size="48rpx"></t-icon>
<view class="{{classPrefix}}__list-item-text">{{item.label || item}}</view>
</view>
</template>

View File

@ -0,0 +1 @@
export {};

View File

@ -0,0 +1,20 @@
const props = {
cascading: {
type: String,
value: 'right-up',
},
collapseAvatar: {
type: String,
},
externalClasses: {
type: Array,
},
max: {
type: Number,
},
size: {
type: String,
value: 'medium',
},
};
export default props;

View File

@ -0,0 +1,89 @@
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { SuperComponent, wxComponent } from '../common/src/index';
import config from '../common/config';
import avatarGroupProps from './avatar-group-props';
const { prefix } = config;
const name = `${prefix}-avatar-group`;
let AvatarGroup = class AvatarGroup extends SuperComponent {
constructor() {
super(...arguments);
this.externalClasses = [`${prefix}-class`, `${prefix}-class-content`, `${prefix}-class-image`];
this.properties = avatarGroupProps;
this.data = {
prefix,
classPrefix: name,
hasChild: true,
length: 0,
};
this.options = {
multipleSlots: true,
};
this.relations = {
'./avatar': {
type: 'descendant',
linked() {
this.children = this.getRelationNodes('./avatar');
},
},
};
this.methods = {
handleHasChild(children, hasChild) {
children.forEach((child) => {
child.updateIsChild(hasChild);
});
},
handleChildSlot(max, children, f) {
const query = this.createSelectorQuery();
const slotName = `.${this.data.classPrefix}__collapse--slot`;
query.select(slotName).boundingClientRect();
query.exec((res) => {
const isSlot = !!res[0].width;
f(max, children, isSlot);
});
},
handleChildMax(max, children, isSlotElement) {
const len = children.length;
if (!max || max > len)
return;
const slotElement = isSlotElement ? children.pop() : '';
const leftChildren = children.splice(max, len - max, isSlotElement && slotElement);
leftChildren.forEach((child) => {
child.updateShow();
});
},
handleChildSize(size, children) {
if (!size)
return;
children.forEach((child) => {
child.updateSize(size);
});
},
handleChildCascading(cascading, children) {
if (cascading === 'right-up')
return;
const defaultZIndex = 100;
children.forEach((child, index) => {
child.updateCascading(defaultZIndex - index * 10);
});
},
};
}
ready() {
this.setData({
length: this.children.length,
});
this.handleHasChild(this.children, this.data.hasChild);
this.handleChildSlot(this.properties.max, this.children, this.handleChildMax);
this.handleChildSize(this.properties.size, this.children);
this.handleChildCascading(this.properties.cascading, this.children);
}
};
AvatarGroup = __decorate([
wxComponent()
], AvatarGroup);
export default AvatarGroup;

View File

@ -0,0 +1,71 @@
@import '../common/style/index.less';
.@{prefix}-avatar-group {
display: block;
&--content {
display: flex;
}
&--large {
.@{prefix}-size-l {
width: 96rpx;
height: 96rpx;
font-weight: 600;
font-size: 36rpx;
}
}
&--medium {
.@{prefix}-size-m {
width: 80rpx;
height: 80rpx;
font-weight: 600;
font-size: 32rpx;
}
}
&--small {
.@{prefix}-size-s {
width: 64rpx;
height: 64rpx;
font-weight: 600;
font-size: 24rpx;
}
}
&__collapse--slot {
float: left;
}
&__collapse--slot:not(:empty) + &__collapse--default {
display: none;
float: left;
}
&__collapse--slot:empty + &__collapse--default {
display: block;
float: left;
}
.@{prefix}-is-hidden {
display: none;
}
.alt-default {
background-color: #d4e3fc;
color: #0052d9;
&-l {
font-size: 64rpx;
}
&-m {
font-size: 48rpx;
}
&-s {
font-size: 32rpx;
}
}
}

View File

@ -0,0 +1,18 @@
<wxs src="./avatar-group.wxs" module="this" />
<view
class="{{classPrefix}} {{this.getAvatarGroupOuterClass(classPrefix, size)}} {{prefix}}-class"
style="{{this.getAvatarGroupSizePx(size)}}"
>
<slot />
<!-- 自定义折叠元素 -->
<view class="{{classPrefix}}__collapse--slot {{collapseAvatar ? '{{prefix}}-is-hidden' : ''}}">
<slot name="collapseAvatar" />
</view>
<!-- 默认折叠元素 -->
<view class="{{classPrefix}}__collapse--default" wx:if="{{max && (max < length)}}">
<t-avatar t-class-image="{{prefix}}-class-image" t-class-content="{{prefix}}-class-content" size="{{size}}"
>{{collapseAvatar || '+N'}}</t-avatar
>
</view>
</view>

View File

@ -0,0 +1,17 @@
module.exports = {
getAvatarGroupOuterClass: function (classPrefix, size) {
var isIncludePx = size.indexOf('px') > -1;
var classNames = [classPrefix + '--content', isIncludePx ? '' : classPrefix + '--' + size];
return classNames.join(' ');
},
getAvatarGroupSizePx: function (size) {
var isIncludePx = size.indexOf('px') > -1;
if (isIncludePx) {
return 'width:' + size + ';height:' + size + ';';
}
},
getZIndex: function (cascading) {
var zIndex = cascading === 'right-up' ? 100 : 0;
return 'z-index:' + zIndex + ';';
},
};

View File

@ -0,0 +1,74 @@
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { SuperComponent, wxComponent } from '../common/src/index';
import config from '../common/config';
import avatarProps from './props';
const { prefix } = config;
const name = `${prefix}-avatar`;
let Avatar = class Avatar extends SuperComponent {
constructor() {
super(...arguments);
this.options = {
multipleSlots: true,
};
this.externalClasses = [
`${prefix}-class`,
`${prefix}-class-image`,
`${prefix}-class-icon`,
`${prefix}-class-alt`,
`${prefix}-class-content`,
];
this.properties = avatarProps;
this.data = {
prefix,
classPrefix: name,
isShow: true,
zIndex: 0,
isChild: false,
};
this.relations = {
'./avatar-group': {
type: 'ancestor',
linked(target) {
this.parent = target;
},
},
};
this.methods = {
updateIsChild(isChild) {
this.setData({
isChild,
});
},
updateShow() {
this.setData({
isShow: false,
});
},
updateSize(size) {
if (this.properties.size)
return;
this.setData({ size });
},
updateCascading(zIndex) {
this.setData({ zIndex });
},
};
}
onLoadError(e) {
if (this.properties.hideOnLoadFailed) {
this.setData({
isShow: false,
});
}
this.triggerEvent('error', e.detail);
}
};
Avatar = __decorate([
wxComponent()
], Avatar);
export default Avatar;

View File

@ -0,0 +1,82 @@
@import '../common/style/index.less';
.@{prefix}-avatar {
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
font-weight: 600;
&__wrapper {
float: left;
position: relative;
background-color: #d4e3fc;
color: #0052d9;
border-radius: 999rpx;
.@{prefix}-badge {
&-host {
position: absolute;
}
&__round {
top: -10%;
right: -10%;
}
&__circle {
top: -5%;
right: -5%;
}
}
}
&.@{prefix}-size-l {
width: 128rpx;
height: 128rpx;
font-size: 52rpx;
}
&.@{prefix}-size-m {
width: 96rpx;
height: 96rpx;
font-size: 40rpx;
}
&.@{prefix}-size-s {
width: 64rpx;
height: 64rpx;
font-size: 28rpx;
}
.@{prefix}-image,
&__image {
width: 100%;
height: 100%;
}
&--circle {
border-radius: 999rpx;
overflow: hidden;
}
&--round {
border-radius: 10rpx;
overflow: hidden;
}
&__text,
&__icon {
font-size: inherit;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
&:empty {
width: 0;
height: 0;
}
}
}

View File

@ -0,0 +1,43 @@
<wxs src="./avatar.wxs" module="this" />
<view
class="{{classPrefix}}__wrapper {{this.getTClass(size)}} {{prefix}}-class"
style="{{this.getStyles(isShow, zIndex)}}"
>
<view
class="{{this.getAvatarOuterClass(classPrefix, size, shape)}} {{prefix}}-class-image"
style="{{this.getAvatarSizePx(size)}}"
>
<t-image
wx:if="{{image}}"
class="{{prefix}}-image"
t-class-load="{{prefix}}-class-alt"
t-class="{{classPrefix}}__image"
src="{{image}}"
mode="aspectFill"
binderror="onLoadError"
loadFailed="{{alt}}"
/>
<view
wx:elif="{{icon}}"
class="{{classPrefix}}__icon {{this.getIconClass(classPrefix, size)}} {{prefix}}-class-icon"
>
<t-icon name="{{icon}}" />
</view>
<view wx:else class="{{classPrefix}}__text {{prefix}}-class-content">
<slot />
</view>
</view>
<t-badge
class="{{prefix}}-badge-host {{prefix}}-badge__{{shape === 'circle' ? 'circle' : 'round'}}"
wx:if="{{badgeProps.dot || badgeProps.count}}"
color="{{badgeProps.color}}"
count="{{badgeProps.count}}"
max-count="{{badgeProps.maxCount || 100}}"
dot="{{badgeProps.dot}}"
content="{{badgeProps.content}}"
size="{{badgeProps.size}}"
visible="{{badgeProps.visible}}"
offset="{{badgeProps.offset}}"
/>
</view>

View File

@ -0,0 +1,29 @@
module.exports = {
getTClass: function (size) {
var isIncludePx = size.indexOf('px') > -1;
return isIncludePx ? '' : 't-size-' + (size || 'medium').slice(0, 1);
},
getAvatarOuterClass: function (classPrefix, size, shape) {
var isIncludePx = size.indexOf('px') > -1;
var classNames = [
classPrefix,
classPrefix + (shape === 'round' ? '--round' : '--circle'),
isIncludePx ? '' : 't-size-' + (size || 'medium').slice(0, 1),
];
return classNames.join(' ');
},
getAvatarSizePx: function (size = 'medium') {
var pxIndex = size.indexOf('px');
if (pxIndex > -1) {
return 'width:' + size + ';height:' + size + ';font-size:' + ((size.slice(0, pxIndex) / 8) * 3 + 2) + 'px;';
}
},
getStyles: function (isShow, zIndex) {
var styles = 'z-index:' + zIndex + ';';
return styles + (isShow ? '' : 'display: none;');
},
getIconClass: function (classPrefix, size) {
if (size.indexOf('px') > -1) return;
return classPrefix + '__icon--default-' + (size || 'medium').slice(0, 1);
},
};

View File

@ -0,0 +1,32 @@
const props = {
alt: {
type: String,
value: '',
},
badgeProps: {
type: Object,
},
externalClasses: {
type: Array,
},
hideOnLoadFailed: {
type: Boolean,
value: false,
},
icon: {
type: String,
},
image: {
type: String,
value: '',
},
shape: {
type: String,
value: 'circle',
},
size: {
type: String,
value: '',
},
};
export default props;

View File

@ -0,0 +1 @@
export {};

View File

@ -0,0 +1,33 @@
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { SuperComponent, wxComponent } from '../common/src/index';
import config from '../common/config';
import props from './props';
const { prefix } = config;
const name = `${prefix}-back-top`;
let BackTop = class BackTop extends SuperComponent {
constructor() {
super(...arguments);
this.externalClasses = ['t-class', 't-class-icon', 't-class-text'];
this.properties = props;
this.data = {
prefix,
classPrefix: name,
};
}
toTop() {
this.triggerEvent('to-top');
wx.pageScrollTo({
scrollTop: 0,
duration: 300,
});
}
};
BackTop = __decorate([
wxComponent()
], BackTop);
export default BackTop;

View File

@ -0,0 +1,103 @@
// @import (css) '../common/index.wxss';
@import '../common/style/index.less';
@backtop: ~"@{prefix}-back-top";
@back-top-text-font-size: @font-size;
@back-top-icon-font-size: 32rpx;
@back-top-default-color: #666;
.@{backtop} {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: transparent;
overflow: hidden;
box-sizing: border-box;
transition: height .2s;
height: auto;
&.@{prefix}-is-fixed {
position: fixed;
right: 32rpx;
bottom: 133rpx;
}
&.@{prefix}-is-round,
&.@{prefix}-is-round-dark {
width: 96rpx;
height: 96rpx;
border-radius: 50%;
.@{backtop}__icon {
margin: 0;
// border: none;
border-radius: 0;
background-color: transparent;
}
.@{backtop}__text {
padding: 0;
margin-top: 0;
}
}
&.@{prefix}-is-round,
&.@{prefix}-is-half-round {
background-color: rgb(255, 255, 255);
color: #333;
border: 1rpx solid;
border-color: #ddd;
.@{backtop}__icon,
.@{backtop}__text {
color: #333;
}
}
&.@{prefix}-is-round-dark,
&.@{prefix}-is-half-round-dark {
background-color: #000;
color: #fff;
.@{backtop}__icon,
.@{backtop}__text {
color: #fff;
}
}
&.@{prefix}-is-half-round,
&.@{prefix}-is-half-round-dark {
width: 120rpx;
height: 80rpx;
border-radius: 120rpx 0 0 120rpx;
flex-direction: row;
right: 0;
.@{backtop}__icon {
margin: 0;
border-radius: 0;
background-color: transparent;
}
.@{backtop}__text {
padding: 0;
margin-left: 8rpx;
width: 2em;
}
}
&__text {
font-size: @back-top-text-font-size;
color: @back-top-default-color;
line-height: 24rpx;
}
&__icon {
display: flex;
justify-content: center;
align-items: center;
color: @back-top-default-color;
font-size: @back-top-icon-font-size;
}
}

View File

@ -0,0 +1,8 @@
<view
class="{{prefix}}-class {{classPrefix}} {{fixed ? prefix + '-is-fixed' : ''}} {{prefix + '-is-' + theme}}"
bindtap="toTop"
>
<t-icon wx:if="{{!!icon}}" class="{{classPrefix}}__icon {{prefix}}-class-icon" name="{{icon}}" />
<view wx:if="{{!!text}}" class="{{classPrefix}}__text {{prefix}}-class-text"> {{text}} </view>
<slot />
</view>

View File

@ -0,0 +1,22 @@
const props = {
externalClasses: {
type: Array,
},
fixed: {
type: Boolean,
value: true,
},
icon: {
type: String,
value: 'backtop',
},
text: {
type: String,
value: '',
},
theme: {
type: String,
value: 'round',
},
};
export default props;

View File

@ -0,0 +1,2 @@
;
export {};

Some files were not shown because too many files have changed in this diff Show More