This commit is contained in:
xingyy 2023-12-05 10:11:10 +08:00
commit 6689df27e2
19026 changed files with 2881888 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
/dist
/node_modules

16
.hbuilderx/launch.json Normal file
View File

@ -0,0 +1,16 @@
{ // launch.json configurations app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtypelocalremote, localremote
"version": "0.0",
"configurations": [{
"default" :
{
"launchtype" : "local"
},
"mp-weixin" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
]
}

5
.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/

14
.idea/UniappTool.xml Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="cn.fjdmy.uniapp.UniappProjectDataService">
<option name="basePath" value="$PROJECT_DIR$/src" />
<option name="generalBasePath" value="$PROJECT_DIR$" />
<option name="manifestPath" value="$PROJECT_DIR$/src/manifest.json" />
<option name="pagesPath" value="$PROJECT_DIR$/src/pages.json" />
<option name="scanNum" value="1" />
<option name="type" value="store" />
<option name="uniapp" value="true" />
<option name="uniappCli" value="true" />
<option name="vueVersion" value="3" />
</component>
</project>

8
.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/uni-ticket-system.iml" filepath="$PROJECT_DIR$/.idea/uni-ticket-system.iml" />
</modules>
</component>
</project>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
<excludeFolder url="file://$MODULE_DIR$/dist" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

0
dist/dev/mp-weixin/App.wxml vendored Normal file
View File

30
dist/dev/mp-weixin/app.js vendored Normal file
View File

@ -0,0 +1,30 @@
"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const common_vendor = require("./common/vendor.js");
const tmui_index = require("./tmui/index.js");
require("./tmui/tool/lib/fetch.js");
require("./tmui/tool/function/util.js");
require("./tmui/tool/function/preview.js");
require("./tmui/tool/lib/language.js");
require("./tmui/tool/lib/share.js");
require("./tmui/tool/router/index.js");
require("./tmui/tool/lib/tmuiconfigDefault.js");
if (!Math) {
"./pages/index/index.js";
"./pages/fankui/index.js";
}
const _sfc_main = {};
function _sfc_render(_ctx, _cache) {
return {};
}
const App = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:/WebstormProjects/uni-ticket-system/src/App.vue"]]);
function createApp() {
const app = common_vendor.createSSRApp(App);
app.use(tmui_index.tmui, { shareDisable: false });
return {
app,
Pinia: common_vendor.Pinia
};
}
createApp().app.mount("#app");
exports.createApp = createApp;

14
dist/dev/mp-weixin/app.json vendored Normal file
View File

@ -0,0 +1,14 @@
{
"pages": [
"pages/index/index",
"pages/fankui/index"
],
"window": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#FFFFFF",
"backgroundColor": "#FFFFFF"
},
"darkmode": false,
"usingComponents": {}
}

8919
dist/dev/mp-weixin/app.wxss vendored Normal file

File diff suppressed because one or more lines are too long

11037
dist/dev/mp-weixin/common/vendor.js vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,48 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
if (!Math) {
(tmText + tmSheet + tmTabbarItem + tmTabbar + tmApp)();
}
const tmApp = () => "../../tmui/components/tm-app/tm-app.js";
const tmSheet = () => "../../tmui/components/tm-sheet/tm-sheet.js";
const tmText = () => "../../tmui/components/tm-text/tm-text.js";
const tmTabbar = () => "../../tmui/components/tm-tabbar/tm-tabbar.js";
const tmTabbarItem = () => "../../tmui/components/tm-tabbar-item/tm-tabbar-item.js";
const _sfc_main = {
__name: "index",
emits: ["update:modelValue"],
setup(__props, { emit }) {
const acc = common_vendor.ref(1);
common_vendor.watch(acc, () => {
emit("update:modelValue", acc.value);
});
return (_ctx, _cache) => {
return {
a: common_vendor.p({
label: "点击中间+按钮可以体验异步加载动态效果."
}),
b: common_vendor.o(($event) => acc.value = 0),
c: common_vendor.p({
activeColor: "orange",
count: "HOT",
["open-type"]: "reLaunch",
text: "选票",
icon: "tmicon-collection-fill"
}),
d: common_vendor.o(($event) => acc.value = 1),
e: common_vendor.p({
activeColor: "orange",
text: "我的",
icon: "tmicon-cog-fill"
}),
f: common_vendor.o(($event) => acc.value = $event),
g: common_vendor.p({
autoSelect: false,
active: acc.value
})
};
};
}
};
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "D:/WebstormProjects/uni-ticket-system/src/components/self-tabbar/index.vue"]]);
wx.createComponent(Component);

View File

@ -0,0 +1,10 @@
{
"component": true,
"usingComponents": {
"tm-app": "../../tmui/components/tm-app/tm-app",
"tm-sheet": "../../tmui/components/tm-sheet/tm-sheet",
"tm-text": "../../tmui/components/tm-text/tm-text",
"tm-tabbar": "../../tmui/components/tm-tabbar/tm-tabbar",
"tm-tabbar-item": "../../tmui/components/tm-tabbar-item/tm-tabbar-item"
}
}

View File

@ -0,0 +1 @@
<tm-app u-s="{{['d']}}" u-i="20ba34b6-0" bind:__l="__l"><tm-sheet u-s="{{['d']}}" u-i="20ba34b6-1,20ba34b6-0" bind:__l="__l"><tm-text wx:if="{{a}}" u-i="20ba34b6-2,20ba34b6-1" bind:__l="__l" u-p="{{a}}"></tm-text></tm-sheet><tm-tabbar wx:if="{{g}}" u-s="{{['d']}}" u-i="20ba34b6-3,20ba34b6-0" bind:__l="__l" bindupdateActive="{{f}}" u-p="{{g}}"><tm-tabbar-item wx:if="{{c}}" bindclick="{{b}}" u-i="20ba34b6-4,20ba34b6-3" bind:__l="__l" u-p="{{c}}"></tm-tabbar-item><tm-tabbar-item wx:if="{{e}}" bindclick="{{d}}" u-i="20ba34b6-5,20ba34b6-3" bind:__l="__l" u-p="{{e}}"></tm-tabbar-item></tm-tabbar></tm-app>

View File

View File

@ -0,0 +1,8 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {};
function _sfc_render(_ctx, _cache) {
return {};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:/WebstormProjects/uni-ticket-system/src/pages/fankui/index.vue"]]);
wx.createPage(MiniProgramPage);

View File

@ -0,0 +1,7 @@
{
"navigationBarTitleText": "",
"navigationStyle": "custom",
"titlePenetrate": "YES",
"transparentTitle": "always",
"usingComponents": {}
}

View File

@ -0,0 +1 @@
<view>1111</view>

View File

22
dist/dev/mp-weixin/pages/index/index.js vendored Normal file
View File

@ -0,0 +1,22 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
if (!Math) {
selfTabbar();
}
const selfTabbar = () => "../../components/self-tabbar/index.js";
const _sfc_main = {
__name: "index",
setup(__props) {
const acc = common_vendor.ref(0);
return (_ctx, _cache) => {
return {
a: common_vendor.o(($event) => acc.value = $event),
b: common_vendor.p({
modelValue: acc.value
})
};
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "D:/WebstormProjects/uni-ticket-system/src/pages/index/index.vue"]]);
wx.createPage(MiniProgramPage);

View File

@ -0,0 +1,9 @@
{
"navigationBarTitleText": "",
"navigationStyle": "custom",
"titlePenetrate": "YES",
"transparentTitle": "always",
"usingComponents": {
"self-tabbar": "../../components/self-tabbar/index"
}
}

View File

@ -0,0 +1 @@
<view><self-tabbar wx:if="{{b}}" u-i="666bc61e-0" bind:__l="__l" bindupdateModelValue="{{a}}" u-p="{{b}}"></self-tabbar></view>

View File

30
dist/dev/mp-weixin/project.config.json vendored Normal file
View File

@ -0,0 +1,30 @@
{
"description": "项目配置文件。",
"packOptions": {
"ignore": [],
"include": []
},
"setting": {
"urlCheck": false,
"es6": true,
"postcss": false,
"minified": true,
"newFeature": true,
"bigPackageSizeSupport": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"condition": false
},
"compileType": "miniprogram",
"libVersion": "3.2.3",
"appid": "touristappid",
"projectname": "tmui3.0",
"condition": {},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 4
}
}

View File

@ -0,0 +1,7 @@
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "tmui3.0",
"setting": {
"compileHotReLoad": true
}
}

BIN
dist/dev/mp-weixin/static/logo.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -0,0 +1,305 @@
"use strict";
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
const common_vendor = require("../../../common/vendor.js");
const tmui_tool_lib_tmpinia = require("../../tool/lib/tmpinia.js");
const tmui_tool_lib_minxs = require("../../tool/lib/minxs.js");
const tmui_tool_useFun_useTheme = require("../../tool/useFun/useTheme.js");
const tmui_tool_useFun_useWindowInfo = require("../../tool/useFun/useWindowInfo.js");
require("../../tool/theme/theme.js");
require("../../tool/theme/colortool.js");
require("../../tool/lib/interface.js");
require("../../tool/function/util.js");
require("../../tool/function/preview.js");
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "tm-app",
props: __spreadProps(__spreadValues({}, tmui_tool_lib_minxs.custom_props), {
/**
* 是否透明背景
*/
transprent: {
type: [Boolean, String],
default: false
},
/**
* 是否透明背景,等同transprent,因单词拼写错误现在写一个正确的
*/
transparent: {
type: [Boolean, String],
default: false
},
//整体的主题色调同全局色一样。
/**暂时不可用 */
theme: {
type: String,
default: "grey-5"
},
bgImg: {
type: String,
default: ""
},
/** 背景层div的样式 */
bgStyle: {
type: String,
default: ""
},
//应用的背景颜色。
color: {
type: String,
default: "grey-4"
},
/**自定义暗黑的背景,你也可以通过全局配置 */
darkColor: {
type: String,
default: "#050505"
},
/**是否模糊背景,暂时不可用 */
blur: {
type: [Boolean, String],
default: false
},
/**这是一个淘汰的属性请在pages.json中配置即可会自动读取。而不需要在这里设置 */
navbar: {
type: Object,
default: () => {
return {
background: "",
fontColor: ""
};
}
},
/**是否自动修改系统自带的navbar的主题。 */
navbarDarkAuto: {
type: Boolean,
default: true
}
}),
setup(__props, { expose }) {
const props = __props;
const store = tmui_tool_lib_tmpinia.useTmpiniaStore();
const tmcfg = common_vendor.computed(() => store.tmStore);
const isSetThemeOk = common_vendor.ref(false);
const {
dark,
isNvue,
customCSSStyle,
customClass,
parentClass,
transparent,
_props,
proxy,
blur,
round,
margin,
padding,
theme
} = tmui_tool_useFun_useTheme.useTheme(common_vendor.computed(() => props), tmcfg);
const tmcomputed = theme();
let isTabbarPage = false;
let nowPage = getCurrentPages().pop();
const _bgStyle = common_vendor.computed(() => props.bgStyle);
let winSize = tmui_tool_useFun_useWindowInfo.useWindowInfo();
let appConfig = common_vendor.ref({
width: winSize.width,
height: winSize.height,
theme: tmcomputed.value.backgroundColor,
bgImg: props.bgImg,
dark: dark.value
});
common_vendor.onLoad((opts) => {
var _a, _b;
try {
(_b = store.tmuiConfig.router) == null ? void 0 : _b.useTmRouterAfter({
path: (_a = nowPage == null ? void 0 : nowPage.route) != null ? _a : "",
opts,
context: proxy != null ? proxy : null
});
} catch (error) {
}
});
common_vendor.onMounted(() => {
_onInit();
});
function _onInit() {
var _a, _b;
let barLit = (_b = (_a = common_vendor.index.$tm.tabBar) == null ? void 0 : _a.list) != null ? _b : [];
for (let i = 0; i < barLit.length; i++) {
if ((nowPage == null ? void 0 : nowPage.route) == barLit[i].pagePath) {
isTabbarPage = true;
break;
}
}
if (store.tmuiConfig.autoDark) {
osChangeTheme(common_vendor.index.getSystemInfoSync().osTheme);
} else {
setAppStyle();
}
}
common_vendor.watch([() => tmcfg.value.color, dark], () => {
isSetThemeOk.value = false;
setAppStyle();
});
common_vendor.watch([() => props.color], () => {
appConfig.value.theme = tmcomputed.value.backgroundColor;
});
function setAppStyle() {
var _a, _b, _c;
if (dark.value) {
appConfig.value.theme = ((_c = (_b = (_a = store.tmuiConfig) == null ? void 0 : _a.themeConfig) == null ? void 0 : _b.dark) == null ? void 0 : _c.bodyColor) || props.darkColor;
} else {
appConfig.value.theme = tmcomputed.value.backgroundColor;
}
common_vendor.index.setBackgroundColor({
backgroundColor: appConfig.value.theme,
backgroundColorBottom: appConfig.value.theme,
backgroundColorTop: appConfig.value.theme
}).catch((error) => {
});
if (dark.value) {
try {
if (!common_vendor.index.$tm.isOpenDarkModel && props.navbarDarkAuto) {
common_vendor.index.setNavigationBarColor({
backgroundColor: "#000000",
frontColor: "#ffffff"
}).catch((error) => {
});
}
} catch (error) {
}
if (isTabbarPage) {
if (common_vendor.index.$tm.tabBar.selectedColor.indexOf("@") == -1) {
common_vendor.index.setTabBarStyle({
backgroundColor: "#141415",
borderStyle: "black",
color: "#ffffff",
selectedColor: common_vendor.index.$tm.tabBar.selectedColor || tmcomputed.value.textColor
}).catch((error) => {
});
}
}
} else {
try {
let nowPageConfigs = common_vendor.index.$tm.pages.filter((el) => el.path == (nowPage == null ? void 0 : nowPage.route));
if (nowPageConfigs.length > 0 && !props.navbar.background) {
if (nowPageConfigs[0].navigationBarTextStyle.indexOf("@") > -1)
return;
let tcolor = nowPageConfigs[0].navigationBarTextStyle;
tcolor = tcolor.toLocaleLowerCase();
tcolor = tcolor == "black" ? "#000000" : tcolor;
tcolor = tcolor == "white" ? "#ffffff" : tcolor;
if (props.navbarDarkAuto) {
common_vendor.index.setNavigationBarColor({
backgroundColor: nowPageConfigs[0].navigationBarBackgroundColor,
frontColor: tcolor
}).catch((error) => {
});
}
common_vendor.index.setStorageSync(
"tmuiNavStyle",
JSON.stringify({
navbarBackground: nowPageConfigs[0].navigationBarBackgroundColor,
navbarFontColor: tcolor
})
);
} else if (!common_vendor.index.$tm.isOpenDarkModel) {
if (props.navbarDarkAuto) {
common_vendor.index.setNavigationBarColor({
backgroundColor: props.navbar.background,
frontColor: props.navbar.fontColor
}).catch((error) => {
});
}
common_vendor.index.setStorageSync(
"tmuiNavStyle",
JSON.stringify({
navbarBackground: props.navbar.background,
navbarFontColor: props.navbar.fontColor
})
);
}
} catch (error) {
}
try {
if (isTabbarPage && !common_vendor.index.$tm.isOpenDarkModel) {
common_vendor.index.setTabBarStyle({
backgroundColor: common_vendor.index.$tm.tabBar.backgroundColor || props.navbar.background,
borderStyle: common_vendor.index.$tm.tabBar.borderStyle || "white",
color: common_vendor.index.$tm.tabBar.color || props.navbar.fontColor,
selectedColor: common_vendor.index.$tm.tabBar.selectedColor || tmcomputed.value.textColor
}).catch((error) => {
});
}
} catch (error) {
}
}
isSetThemeOk.value = true;
}
function setTheme(colorName) {
store.setTmVuetifyTheme(colorName);
}
function setDark(darks) {
let maindark = !dark.value;
if (typeof darks !== "undefined" && typeof darks == "boolean") {
maindark = darks;
}
appConfig.value.dark = maindark;
store.setTmVuetifyDark(maindark);
setAppStyle();
}
try {
common_vendor.index.onThemeChange((ev) => {
osChangeTheme(ev.theme);
});
} catch (error) {
console.warn("没有主题切换功能:", error);
}
function osChangeTheme(ev) {
if (!store.tmuiConfig.autoDark)
return;
if (ev === "light") {
setDark(false);
} else if (ev === "dark") {
setDark(true);
}
}
common_vendor.provide(
"appTextColor",
common_vendor.computed(() => tmcomputed.value.textColor)
);
common_vendor.provide("custom_space_size", [0, 0]);
expose({
setTheme,
setDark
});
return (_ctx, _cache) => {
return {
a: common_vendor.s(common_vendor.unref(appConfig).theme ? {
background: common_vendor.unref(transparent) ? "" : common_vendor.unref(appConfig).theme
} : ""),
b: common_vendor.s(common_vendor.unref(_props).bgImg ? {
backgroundImage: `url(${common_vendor.unref(_props).bgImg})`
} : ""),
c: common_vendor.s(common_vendor.unref(_bgStyle))
};
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-690d8382"], ["__file", "D:/WebstormProjects/uni-ticket-system/src/tmui/components/tm-app/tm-app.vue"]]);
wx.createComponent(Component);

View File

@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@ -0,0 +1 @@
<view class="flex relative app flex-1 data-v-690d8382" style="{{a + ';' + b + ';' + c}}"><block wx:if="{{$slots.d}}"><slot></slot></block><block wx:else><text class="data-v-690d8382">在这里放置内容</text></block></view>

View File

@ -0,0 +1,11 @@
.app.data-v-690d8382 {
background-attachment: fixed;
background-position: 0px 0px;
background-repeat: no-repeat;
background-size: 100% 100%;
min-height: 100%;
flex-direction: column;
}

View File

@ -0,0 +1,234 @@
"use strict";
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
const common_vendor = require("../../../common/vendor.js");
const tmui_tool_lib_minxs = require("../../tool/lib/minxs.js");
require("../../tool/theme/theme.js");
require("../../tool/theme/colortool.js");
require("../../tool/lib/interface.js");
if (!Math) {
(tmText + tmIcon + tmSheet)();
}
const tmSheet = () => "../tm-sheet/tm-sheet.js";
const tmText = () => "../tm-text/tm-text.js";
const tmIcon = () => "../tm-icon/tm-icon.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "tm-badge",
props: __spreadProps(__spreadValues({}, tmui_tool_lib_minxs.custom_props), {
round: {
type: [Number],
default: 6
},
border: {
type: [Number],
default: 0
},
margin: {
type: Array,
default: () => [0, 0]
},
padding: {
type: Array,
default: () => [0, 0]
},
transprent: {
type: [Boolean],
default: false
},
label: {
type: String,
default: ""
},
fontSize: {
type: Number,
default: 22
},
//为真时,隐藏插槽数据,展现状态文本模式。
status: {
type: [Boolean],
default: false
},
dot: {
type: [Boolean],
default: false
},
icon: {
type: [String],
default: ""
},
//如果count为数字时显示数字角标如果为string是显示文本角标。
count: {
type: [Number, String],
default: 0
},
maxCount: {
type: [Number],
default: 999
},
top: {
type: [Number],
default: 0
},
right: {
type: [Number],
default: 0
}
}),
emits: ["click"],
setup(__props, { emit: emits }) {
const props = __props;
const customCSSStyle = common_vendor.computed(() => tmui_tool_lib_minxs.computedStyle(props));
const customClass = common_vendor.computed(() => tmui_tool_lib_minxs.computedClass(props));
const istext = common_vendor.computed(() => {
return isNaN(parseInt(String(props.count)));
});
const show = common_vendor.computed(() => {
if (!props.dot && !props.icon && !props.count)
return false;
return true;
});
const size = common_vendor.computed(() => {
if (props.status || props.dot) {
return {
w: 12,
h: 12,
pr: 6,
t: 3
};
}
if (props.icon) {
let p = props.fontSize * 1.6;
return {
w: p,
h: p,
pr: 12,
t: 10
};
}
if (isNaN(parseInt(String(props.count)))) {
return {
w: 0,
h: 0,
pr: 10,
t: 10
};
}
if (props.count < 10) {
return {
w: 30,
h: 30,
pr: 12,
t: 10
};
}
if (props.count >= 10) {
return {
w: 0,
h: 0,
pr: 10,
t: 10
};
}
return {
w: 0,
h: 0,
pr: 0,
t: 0
};
});
const _icon = common_vendor.computed(() => props.icon);
const _dot = common_vendor.computed(() => props.dot);
const _count = common_vendor.computed(() => props.count);
return (_ctx, _cache) => {
return common_vendor.e({
a: !props.status
}, !props.status ? {} : {}, {
b: common_vendor.unref(show)
}, common_vendor.unref(show) ? common_vendor.e({
c: common_vendor.unref(_count) > 0 && !common_vendor.unref(istext)
}, common_vendor.unref(_count) > 0 && !common_vendor.unref(istext) ? {
d: common_vendor.p({
color: "white",
["font-size"]: props.fontSize,
_class: common_vendor.unref(size).h == 0 ? "py-3 px-6" : "",
label: common_vendor.unref(_count) > props.maxCount ? props.maxCount + "+" : common_vendor.unref(_count)
})
} : {}, {
e: common_vendor.unref(_count) && common_vendor.unref(istext)
}, common_vendor.unref(_count) && common_vendor.unref(istext) ? {
f: common_vendor.p({
color: "white",
["font-size"]: props.fontSize,
_class: common_vendor.unref(size).h == 0 ? "py-3 px-6" : "",
label: common_vendor.unref(_count)
})
} : {}, {
g: common_vendor.unref(_icon)
}, common_vendor.unref(_icon) ? {
h: common_vendor.p({
color: "white",
["font-size"]: props.fontSize,
name: common_vendor.unref(_icon)
})
} : {}, {
i: common_vendor.p({
color: props.color,
_class: [common_vendor.unref(customClass), "flex-center flex-col"],
_style: [common_vendor.unref(customCSSStyle), {
flexShrink: 1
}],
followTheme: props.followTheme,
dark: props.dark,
round: props.round,
shadow: props.shadow,
outlined: props.outlined,
border: props.border,
borderStyle: props.borderStyle,
borderDirection: props.borderDirection,
text: props.text,
transprent: props.transprent,
linear: props.linear,
linearDeep: props.linearDeep,
width: common_vendor.unref(size).w,
height: common_vendor.unref(size).h,
margin: props.margin,
padding: props.padding
}),
j: common_vendor.n((common_vendor.unref(_dot) || common_vendor.unref(_count) || common_vendor.unref(_icon)) && !props.status ? "absolute flex-top-start-end r-0" : ""),
k: common_vendor.n(props.top ? `t-${String(props.top)}` : ""),
l: common_vendor.n(props.right ? `r-${String(props.right)}` : "")
}) : {}, {
m: props.status
}, props.status ? {
n: common_vendor.p({
eventPenetrationEnabled: "true",
["font-size"]: props.fontSize,
_class: "ml-10",
label: props.label
})
} : {}, {
o: common_vendor.o(($event) => emits("click", $event)),
p: common_vendor.n(props.status ? "flex-row flex-row-center-center mx-8" : "")
});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "D:/WebstormProjects/uni-ticket-system/src/tmui/components/tm-badge/tm-badge.vue"]]);
wx.createComponent(Component);

View File

@ -0,0 +1,8 @@
{
"component": true,
"usingComponents": {
"tm-sheet": "../tm-sheet/tm-sheet",
"tm-text": "../tm-text/tm-text",
"tm-icon": "../tm-icon/tm-icon"
}
}

View File

@ -0,0 +1 @@
<view bindtap="{{o}}" class="{{['flex', 'relative', p]}}"><view wx:if="{{a}}" eventPenetrationEnabled="true"><slot></slot></view><view wx:if="{{b}}" eventPenetrationEnabled="true" class="{{[j, k, l]}}" style="{{'z-index:' + 10}}"><tm-sheet wx:if="{{i}}" u-s="{{['d']}}" u-i="57535228-0" bind:__l="__l" u-p="{{i}}"><tm-text wx:if="{{c}}" u-i="57535228-1,57535228-0" bind:__l="__l" u-p="{{d}}"></tm-text><tm-text wx:if="{{e}}" u-i="57535228-2,57535228-0" bind:__l="__l" u-p="{{f}}"></tm-text><tm-icon wx:if="{{g}}" u-i="57535228-3,57535228-0" bind:__l="__l" u-p="{{h}}"></tm-icon></tm-sheet></view><tm-text wx:if="{{m}}" u-i="57535228-4" bind:__l="__l" u-p="{{n}}"></tm-text></view>

View File

@ -0,0 +1,200 @@
"use strict";
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
const common_vendor = require("../../../common/vendor.js");
const tmui_tool_theme_theme = require("../../tool/theme/theme.js");
const tmui_tool_lib_minxs = require("../../tool/lib/minxs.js");
const tmui_tool_lib_tmpinia = require("../../tool/lib/tmpinia.js");
require("../../tool/theme/colortool.js");
require("../../tool/lib/interface.js");
require("../../tool/function/util.js");
require("../../tool/function/preview.js");
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "tm-icon",
props: __spreadProps(__spreadValues({}, tmui_tool_lib_minxs.custom_props), {
fontSize: {
type: [Number],
default: 34
},
color: {
type: String,
default: ""
},
/** 自定义图标规则为:myicon-music-e617,图标前缀和字体名称相同-图标类名-图标unicode符 */
name: {
type: String,
//图标名称。
default: ""
},
spin: {
type: [Boolean],
default: false
},
unit: {
type: String,
default: "rpx"
},
//-1表示自动
lineHeight: {
type: [Number],
default: -1
},
rotate: {
type: Boolean,
default: false
},
rotateDeg: {
type: Number,
default: 0
},
/**
* 为了提高响应速度只有开启了自定图标显示功能才会去解析用户自定义图标规则名称
*/
customicon: {
type: Boolean,
default: false
}
}),
emits: ["click", "longpress"],
setup(__props, { emit: emits }) {
var _a, _b;
const props = __props;
const store = tmui_tool_lib_tmpinia.useTmpiniaStore();
const _rotateDeg = common_vendor.computed(() => props.rotateDeg);
(_b = (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.proxy) != null ? _b : null;
const tmcfg = common_vendor.computed(() => store.tmStore);
const customCSSStyle = common_vendor.computed(() => tmui_tool_lib_minxs.computedStyle(props));
const customClass = common_vendor.computed(() => tmui_tool_lib_minxs.computedClass(props));
const isDark = common_vendor.computed(() => tmui_tool_lib_minxs.computedDark(props, tmcfg.value));
common_vendor.computed(() => tmui_tool_lib_minxs.computedTheme(props, isDark.value, tmcfg.value));
function clickhandle(e) {
emits("click", e);
}
const appTextColor = common_vendor.inject(
"appTextColor",
common_vendor.computed(() => void 0)
);
const textColor = common_vendor.computed(() => {
if (props.followTheme && store.tmStore.color)
return store.tmStore.color;
let isColorHex = tmui_tool_theme_theme.theme.isCssColor(props.color);
if (isColorHex)
return props.color;
if (props.color && !isColorHex) {
let nowcolor = tmui_tool_theme_theme.theme.getColor(props.color);
return nowcolor.csscolor;
}
if (appTextColor.value)
return appTextColor.value;
return "rgba(34, 34, 34, 1.0)";
});
const fontSizeComputed = common_vendor.computed(() => {
let strc = {
fontSize: (props.fontSize || 30) + props.unit,
lineHeight: props.lineHeight > -1 ? props.lineHeight + props.unit : (props.fontSize || 30) + props.unit
};
if (props.lineHeight == 0) {
delete strc.lineHeight;
}
return strc;
});
const isImg = common_vendor.computed(() => {
if (props.name[0] == "." || props.name[0] == "@" || props.name[0] == "/" || props.name[0] == "~" || props.name.substring(0, 5) == "data:" || props.name.substring(0, 4) == "http" || props.name.substring(0, 5) == "https" || props.name.substring(0, 3) == "ftp") {
return true;
}
return false;
});
const prefx = common_vendor.computed(() => {
var _a2;
let prefix = (_a2 = props.name.split("-")) == null ? void 0 : _a2[0];
return prefix;
});
const iconComputed = common_vendor.computed(() => {
if (isImg.value)
return props.name;
if (props.customicon) {
try {
let names = props.name.split("-");
if (/^e[0-9|a-z|A-Z]{3}/.test(names[names.length - 1])) {
let clasName = props.name.substring(0, props.name.lastIndexOf("-"));
return clasName;
}
} catch (e) {
}
}
return props.name;
});
const spinComputed = common_vendor.computed(() => props.spin);
const custom_space_size = common_vendor.inject("custom_space_size", [0, 0]);
common_vendor.computed(() => Math.ceil(props.fontSize || 34) + custom_space_size[0]);
common_vendor.computed(() => Math.ceil(props.fontSize || 34) + custom_space_size[1]);
common_vendor.watch(spinComputed, () => {
});
common_vendor.onBeforeMount(() => {
});
common_vendor.onMounted(() => {
});
return (_ctx, _cache) => {
return common_vendor.e({
a: !common_vendor.unref(isImg)
}, !common_vendor.unref(isImg) ? {
b: common_vendor.o(clickhandle),
c: common_vendor.o(($event) => emits("longpress", $event)),
d: common_vendor.n(props.rotate ? "ani" : ""),
e: common_vendor.n(common_vendor.unref(spinComputed) ? "spin" : ""),
f: common_vendor.n(common_vendor.unref(prefx)),
g: common_vendor.n(common_vendor.unref(iconComputed)),
h: common_vendor.n(common_vendor.unref(customClass)),
i: common_vendor.s({
transform: `rotate(${common_vendor.unref(_rotateDeg)}deg)`
}),
j: common_vendor.s(common_vendor.unref(fontSizeComputed)),
k: common_vendor.s({
color: common_vendor.unref(textColor)
}),
l: common_vendor.s(common_vendor.unref(customCSSStyle))
} : {}, {
m: common_vendor.unref(isImg)
}, common_vendor.unref(isImg) ? {
n: common_vendor.o(clickhandle),
o: common_vendor.o(($event) => emits("longpress", $event)),
p: common_vendor.unref(iconComputed),
q: common_vendor.n(props.rotate ? "ani" : ""),
r: common_vendor.n(common_vendor.unref(spinComputed) ? "spin" : ""),
s: common_vendor.n(common_vendor.unref(customClass)),
t: common_vendor.s({
transform: `rotate(${common_vendor.unref(_rotateDeg)}deg)`
}),
v: common_vendor.s({
width: (props.fontSize || 30) + props.unit,
height: (props.fontSize || 30) + props.unit
}),
w: common_vendor.s(common_vendor.unref(customCSSStyle))
} : {}, {
x: common_vendor.s({
marginRight: common_vendor.unref(custom_space_size)[0] + "rpx",
marginBottom: common_vendor.unref(custom_space_size)[1] + "rpx"
})
});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-e3e455a0"], ["__file", "D:/WebstormProjects/uni-ticket-system/src/tmui/components/tm-icon/tm-icon.vue"]]);
wx.createComponent(Component);

View File

@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@ -0,0 +1 @@
<view render-whole="{{true}}" class="flex flex-row flex-row-center-center data-v-e3e455a0" style="{{x}}"><text wx:if="{{a}}" bindtap="{{b}}" bindlongpress="{{c}}" class="{{['data-v-e3e455a0', d, e, 'text-size-n d-inline-block', f, g, h]}}" style="{{i + ';' + j + ';' + k + ';' + l}}"></text><image wx:if="{{m}}" render-whole="{{true}}" bindtap="{{n}}" bindlongpress="{{o}}" ref="icon" src="{{p}}" class="{{['data-v-e3e455a0', q, r, s]}}" style="{{t + ';' + v + ';' + w}}"></image></view>

View File

@ -0,0 +1,20 @@
.ani.data-v-e3e455a0 {
transition-duration: 0.3s;
transition-timing-function: ease;
transition-property: transform;
}
.spin.data-v-e3e455a0 {
transform-origin: 50% 50%;
animation: xhRote-e3e455a0 1.2s infinite linear;
}
@keyframes xhRote-e3e455a0 {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}

View File

@ -0,0 +1,253 @@
"use strict";
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
const common_vendor = require("../../../common/vendor.js");
const tmui_tool_lib_minxs = require("../../tool/lib/minxs.js");
const tmui_tool_lib_tmpinia = require("../../tool/lib/tmpinia.js");
const tmui_tool_useFun_useTheme = require("../../tool/useFun/useTheme.js");
require("../../tool/theme/theme.js");
require("../../tool/theme/colortool.js");
require("../../tool/lib/interface.js");
require("../../tool/function/util.js");
require("../../tool/function/preview.js");
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "tm-sheet",
props: __spreadProps(__spreadValues({}, tmui_tool_lib_minxs.custom_props), {
parenClass: {
type: String,
default: ""
},
contStyle: {
type: String,
default: ""
},
height: {
type: [Number],
default: 0
},
width: {
type: [Number],
default: 0
},
color: {
type: String,
default: "white"
},
transprent: {
type: [Boolean, String],
default: false
},
border: {
type: [Number, String],
default: 0
},
margin: {
type: Array,
default: () => [32]
},
padding: {
type: Array,
default: () => [24]
},
unit: {
type: String,
default: "rpx"
},
hoverClass: {
type: String,
default: "none"
},
//暗下强制的背景色,
//有时自动的背景,可能不是你想要暗黑背景,此时可以使用此参数,强制使用背景色,
//只能是颜色值。
darkBgColor: {
type: String,
default: ""
},
//不是同层背景默认是同层为false
//如果输入框表单与tmshee在同一层下。他们的黑白暗黑背景色是相同的。为了区分这个问题需要单独指示以便区分背景同层。
//主意:它只在黑和白之间的色系才起作用,其它颜色下不起作用。
noLevel: {
type: Boolean,
default: false
},
//是否开启磨砂背景。只有是黑白灰色系才能使用。
blur: {
type: Boolean,
default: false
},
url: {
type: String,
default: ""
},
round: {
type: [Number, Array],
default: 0
}
}),
emits: ["click", "longpress", "touchend", "touchstart", "touchcancel", "mousedown", "mouseup", "mouseleave"],
setup(__props, { emit: emits }) {
const props = __props;
const store = tmui_tool_lib_tmpinia.useTmpiniaStore();
const tmcfg = common_vendor.computed(() => store.tmStore);
const {
dark,
isNvue,
customCSSStyle,
customClass,
parentClass,
transparent,
_props,
proxy,
blur,
round,
margin,
padding,
theme
} = tmui_tool_useFun_useTheme.useTheme(common_vendor.computed(() => props), tmcfg);
const tmcomputed = theme({ text: blur.value && tmcfg.value.os == "ios" && isNvue.value ? true : null });
const _width = common_vendor.computed(() => props.width + padding.value[0] + padding.value[2]);
const _height = common_vendor.computed(() => props.height + padding.value[1] + padding.value[3]);
const _width_real = common_vendor.computed(() => props.width);
const _height_real = common_vendor.computed(() => props.height);
const _blue_sheet = common_vendor.ref(true);
const blurEffect = common_vendor.computed(() => {
if (props.blur === true && dark.value)
return "dark";
if (props.blur === true && !dark.value)
return "extralight";
return "none";
});
common_vendor.watch(
() => dark.value,
() => {
}
);
const _bgcolor = common_vendor.computed(() => {
var _a;
if (transparent.value === true)
return `background-color:rgba(255,255,255,0);`;
if (props.darkBgColor !== "" && dark.value === true) {
return `background-color:${props.darkBgColor};`;
}
if (props.linearColor.length == 2) {
return {
"background-image": `linear-gradient(${tmcomputed.value.linearDirectionStr},${props.linearColor[0]},${props.linearColor[1]})`
};
}
if (((_a = tmcomputed.value.gradientColor) == null ? void 0 : _a.length) == 2) {
return tmcomputed.value.backgroundColorCss;
}
if (_props.value.noLevel && tmcomputed.value.isBlackAndWhite === true && dark.value === true) {
return `background-color: ${tmcomputed.value.inputcolor}`;
}
return `background-color: ${tmcomputed.value.backgroundColor}`;
});
const isLongPress = common_vendor.ref(false);
function longpress(e) {
isLongPress.value = true;
emits("longpress", e);
}
function touchstart(e) {
isLongPress.value = true;
emits("touchstart", e);
}
function touchend(e) {
isLongPress.value = false;
emits("touchend", e);
}
function touchcancel(e) {
isLongPress.value = false;
emits("touchcancel", e);
}
function mousedown(e) {
isLongPress.value = true;
emits("mousedown", e);
}
function mouseup(e) {
isLongPress.value = false;
emits("mouseup", e);
}
function mouseleave(e) {
isLongPress.value = false;
emits("mouseleave", e);
}
function onClick(e) {
emits("click", e);
if (typeof props.url === "string" && props.url) {
common_vendor.index.navigateTo({
url: props.url,
fail(result) {
console.log(result);
}
});
}
}
let textColor = common_vendor.computed(() => {
return tmcomputed.value.textColor;
});
common_vendor.provide("appTextColor", textColor);
return (_ctx, _cache) => {
return common_vendor.e({
a: _blue_sheet.value
}, _blue_sheet.value ? {
b: common_vendor.n(common_vendor.unref(customClass)),
c: common_vendor.s(common_vendor.unref(_props).contStyle),
d: (common_vendor.unref(_props).url ? " opacity-7 " : " ") + common_vendor.unref(_props).hoverClass,
e: common_vendor.unref(blurEffect),
f: common_vendor.o(onClick),
g: common_vendor.o(longpress),
h: common_vendor.o(touchend),
i: common_vendor.o(touchstart),
j: common_vendor.o(touchcancel),
k: common_vendor.o(mousedown),
l: common_vendor.o(mouseup),
m: common_vendor.o(mouseleave),
n: common_vendor.n(common_vendor.unref(parentClass)),
o: common_vendor.n(!_ctx.isDisabledRoundAndriod ? common_vendor.unref(round) : ""),
p: common_vendor.s({
marginLeft: common_vendor.unref(margin)[0] + "rpx",
marginTop: common_vendor.unref(margin)[1] + "rpx",
marginRight: common_vendor.unref(margin)[2] + "rpx",
marginBottom: common_vendor.unref(margin)[3] + "rpx",
paddingLeft: common_vendor.unref(padding)[0] + "rpx",
paddingTop: common_vendor.unref(padding)[1] + "rpx",
paddingRight: common_vendor.unref(padding)[2] + "rpx",
paddingBottom: common_vendor.unref(padding)[3] + "rpx"
}),
q: common_vendor.s(common_vendor.unref(_height_real) ? {
height: common_vendor.unref(_height) + common_vendor.unref(_props).unit
} : ""),
r: common_vendor.s(common_vendor.unref(_width_real) ? {
width: common_vendor.unref(_width) + common_vendor.unref(_props).unit
} : ""),
s: common_vendor.s(common_vendor.unref(tmcomputed).borderCss),
t: common_vendor.s(common_vendor.unref(blur) && common_vendor.unref(store).tmStore.os == "ios" && common_vendor.unref(isNvue) === true ? "" : common_vendor.unref(_bgcolor)),
v: common_vendor.s(!common_vendor.unref(transparent) && common_vendor.unref(_props).shadow > 0 ? common_vendor.unref(tmcomputed).shadowColor : ""),
w: common_vendor.s(!common_vendor.unref(transparent) && common_vendor.unref(blur) ? {
backdropFilter: "blur(6px)"
} : ""),
x: common_vendor.s(common_vendor.unref(customCSSStyle))
} : {});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-c6f3e58c"], ["__file", "D:/WebstormProjects/uni-ticket-system/src/tmui/components/tm-sheet/tm-sheet.vue"]]);
wx.createComponent(Component);

View File

@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@ -0,0 +1 @@
<view wx:if="{{a}}" hover-class="{{d}}" blurEffect="{{e}}" bindtap="{{f}}" bindlongpress="{{g}}" bindtouchend="{{h}}" bindtouchstart="{{i}}" bindtouchcancel="{{j}}" bindmousedown="{{k}}" bindmouseup="{{l}}" bindmouseleave="{{m}}" class="{{['data-v-c6f3e58c', 'flex flex-col noNvueBorder', n, o]}}" style="{{p + ';' + q + ';' + r + ';' + s + ';' + t + ';' + v + ';' + w + ';' + x}}"><view class="{{['data-v-c6f3e58c', 'flex noNvueBorder flex-col flex-1', b]}}" style="{{c}}"><slot></slot></view></view>

View File

@ -0,0 +1,5 @@
.noNvueBorder.data-v-c6f3e58c {
box-sizing: border-box;
}

View File

@ -0,0 +1,397 @@
"use strict";
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
const common_vendor = require("../../../common/vendor.js");
const tmui_tool_lib_minxs = require("../../tool/lib/minxs.js");
const tmui_tool_lib_tmpinia = require("../../tool/lib/tmpinia.js");
require("../../tool/theme/theme.js");
require("../../tool/theme/colortool.js");
require("../../tool/lib/interface.js");
require("../../tool/function/util.js");
require("../../tool/function/preview.js");
if (!Math) {
(tmIcon + tmBadge + tmText + tmSheet)();
}
const tmBadge = () => "../tm-badge/tm-badge.js";
const tmText = () => "../tm-text/tm-text.js";
const tmIcon = () => "../tm-icon/tm-icon.js";
const tmSheet = () => "../tm-sheet/tm-sheet.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "tm-tabbar-item",
props: __spreadProps(__spreadValues({}, tmui_tool_lib_minxs.custom_props), {
followTheme: {
type: [Boolean, String],
default: true
},
transprent: {
type: Boolean,
default: true
},
//背景主题色
color: {
type: String,
default: "white"
},
//默认的文字主题
fontColor: {
type: String,
default: "grey-darken-1"
},
linear: {
type: String,
default: ""
},
//激活后的主题色。
activeColor: {
type: String,
default: "primary"
},
//当前是否是活动项。
active: {
type: Boolean,
default: false
},
//是否开启向上凸起的按钮。
btnTop: {
type: Boolean,
default: false
},
text: {
type: String,
default: ""
},
icon: {
type: String,
default: ""
},
//未选中时的图标,如果不填写默认使用相同的图标。
unicon: {
type: String,
default: ""
},
textSize: {
type: Number,
default: 20
},
iconSize: {
type: Number,
default: 38
},
dot: {
type: [Boolean],
default: false
},
dotColor: {
type: [String],
default: "red"
},
dotIcon: {
type: [String],
default: ""
},
//如果count为数字时显示数字角标如果为string是显示文本角标。
count: {
type: [Number, String],
default: 0
},
maxCount: {
type: [Number],
default: 99
},
url: {
type: [String],
default: ""
},
//链接打开方式同官方。
openType: {
type: String,
default: "navigate"
},
//打开链接之前执行的勾子函数返回fase阻止打开。也可以返回new Promise.
beforeClick: {
type: [Function, Boolean],
default: () => false
},
load: {
type: [Boolean, String],
default: false
},
//自定项目数据在执行beforeClick时会返回给函数内部
data: {
type: [Object, String, Number],
default: () => void 0
},
/**是否禁用选项. */
disabled: {
type: Boolean,
default: false
},
/**
* 为了提高响应速度只有开启了自定图标显示功能才会去解析用户自定义图标规则名称
*/
customicon: {
type: Boolean,
default: false
}
}),
emits: ["click", "beforeClick"],
setup(__props, { emit: emits }) {
var _a, _b, _c;
const props = __props;
const store = tmui_tool_lib_tmpinia.useTmpiniaStore();
const proxy = (_b = (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.proxy) != null ? _b : null;
const _btnTop = common_vendor.computed(() => props.btnTop);
const _transprent = common_vendor.computed(() => {
if (_btnTop.value === true)
return false;
return true;
});
const _styletop = common_vendor.computed(() => {
if (_btnTop.value !== true)
return "top:15px";
return "top:0px";
});
const _padding = common_vendor.computed(() => {
return [0, 0];
});
const _disabled = common_vendor.computed(() => props.disabled);
const _load = common_vendor.ref(props.load);
const _active = common_vendor.ref(false);
const c_font_style = common_vendor.computed(() => {
return {
dotColor: props.dotColor,
text: props.text,
icon: props.icon,
textSize: props.textSize,
iconSize: props.iconSize,
unicon: props.unicon
};
});
const uid = common_vendor.index.$tm.u.getUid(1);
const tmTabbarWidth = common_vendor.inject(
"tmTabbarWidth",
common_vendor.computed(() => 50)
);
const _width = common_vendor.computed(() => {
if (_btnTop.value === true)
return 60;
return tmTabbarWidth.value;
});
common_vendor.inject(
"tmTabbarUrl",
common_vendor.computed(() => "")
);
const tmTabbarItemList = common_vendor.inject(
"tmTabbarItemList",
common_vendor.computed(() => [])
);
const nowUid = common_vendor.inject(
"tmTabbarUid",
common_vendor.computed(() => "")
);
common_vendor.inject("tmTabbarItemSafe", false);
const tmTabbarItemActive = common_vendor.inject(
"tmTabbarItemActive",
common_vendor.computed(() => -1)
);
const tmTabbarItemAutoSelect = common_vendor.inject(
"tmTabbarItemAutoSelect",
common_vendor.computed(() => false)
);
const _color = common_vendor.computed(() => {
if (_active.value === true && !_btnTop.value) {
if (store.tmStore.color && props.followTheme) {
return store.tmStore.color;
}
return props.activeColor;
}
return props.fontColor;
});
let parent = proxy == null ? void 0 : proxy.$parent;
while (parent) {
if ((parent == null ? void 0 : parent.tmTabbarId) == "tmTabbarId" || !parent) {
break;
} else {
parent = (_c = parent == null ? void 0 : parent.$parent) != null ? _c : void 0;
}
}
if (parent) {
parent.pushKey(uid);
}
common_vendor.onUnmounted(() => {
if (parent) {
parent.delKey(uid);
}
});
if (tmTabbarItemAutoSelect.value) {
_active.value = props.active || false;
} else {
if (tmTabbarItemList.value[tmTabbarItemActive.value] == uid) {
_active.value = true;
} else {
_active.value = false;
}
}
function setActive() {
if (nowUid.value == uid) {
_active.value = true;
} else {
_active.value = false;
}
}
common_vendor.watch([nowUid, () => props.active], () => {
if (tmTabbarItemAutoSelect.value) {
setActive();
}
});
common_vendor.watch(tmTabbarItemActive, () => {
if (!tmTabbarItemAutoSelect.value) {
if (tmTabbarItemList.value[tmTabbarItemActive.value] == uid) {
common_vendor.nextTick$1(() => {
_active.value = true;
});
} else {
common_vendor.nextTick$1(() => {
_active.value = false;
});
}
}
});
common_vendor.watch([() => props.load], () => {
_load.value = props.load;
});
function itemClick() {
return __async(this, null, function* () {
if (_load.value || _disabled.value)
return;
if (typeof props.beforeClick === "function") {
_load.value = true;
let p = yield props.beforeClick(props.data);
if (typeof p === "function") {
p = yield p(props.data);
}
_load.value = false;
if (!p)
return;
}
emits("click");
common_vendor.nextTick$1(() => {
if (tmTabbarItemAutoSelect.value) {
if (parent) {
parent.setNowurl(props.url, uid);
}
setActive();
}
if (props.url == "")
return;
common_vendor.index.$tm.u.routerTo(props.url, props.openType);
});
});
}
return (_ctx, _cache) => {
return common_vendor.e({
a: !_load.value
}, !_load.value ? {
b: common_vendor.p({
customicon: props.customicon,
_style: "line-height: 0px;",
color: common_vendor.unref(_color),
["font-size"]: common_vendor.unref(c_font_style).iconSize,
name: _active.value ? common_vendor.unref(c_font_style).icon : common_vendor.unref(c_font_style).unicon || common_vendor.unref(c_font_style).icon
})
} : {}, {
c: _load.value
}, _load.value ? {
d: common_vendor.p({
spin: true,
_style: "line-height: 0px;",
color: common_vendor.unref(_color),
["font-size"]: common_vendor.unref(c_font_style).iconSize,
name: "tmicon-shuaxin"
})
} : {}, {
e: common_vendor.n(_active.value ? "anifun" : ""),
f: "65px",
g: common_vendor.p({
fontSize: 20,
color: common_vendor.unref(c_font_style).dotColor,
eventPenetrationEnabled: true,
dot: props.dot,
count: props.count,
icon: props.dotIcon,
maxCount: props.maxCount
}),
h: common_vendor.unref(c_font_style).text !== ""
}, common_vendor.unref(c_font_style).text !== "" ? {
i: common_vendor.p({
color: common_vendor.unref(_color),
_class: "pb-0",
["font-size"]: common_vendor.unref(c_font_style).textSize,
label: common_vendor.unref(c_font_style).text
})
} : {}, {
j: common_vendor.o(itemClick),
k: common_vendor.p({
height: 60,
width: common_vendor.unref(_width),
round: 24,
unit: "px",
_class: "flex-center flex ",
parenClass: "relative",
_style: common_vendor.unref(_styletop),
followTheme: common_vendor.unref(_btnTop) && props.followTheme,
transprent: common_vendor.unref(_transprent),
color: props.color,
margin: [0, 0],
padding: common_vendor.unref(_padding),
shadow: props.shadow,
outlined: props.outlined,
border: props.border,
borderStyle: props.borderStyle,
borderDirection: props.borderDirection,
linear: props.linear,
linearDeep: props.linearDeep
})
});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-f3ab9f5c"], ["__file", "D:/WebstormProjects/uni-ticket-system/src/tmui/components/tm-tabbar-item/tm-tabbar-item.vue"]]);
wx.createComponent(Component);

View File

@ -0,0 +1,9 @@
{
"component": true,
"usingComponents": {
"tm-badge": "../tm-badge/tm-badge",
"tm-text": "../tm-text/tm-text",
"tm-icon": "../tm-icon/tm-icon",
"tm-sheet": "../tm-sheet/tm-sheet"
}
}

View File

@ -0,0 +1 @@
<view class="flex flex-col flex-col-top-center data-v-f3ab9f5c" style="height:75px"><tm-sheet wx:if="{{k}}" u-s="{{['d']}}" class="relative data-v-f3ab9f5c" bindclick="{{j}}" u-i="f3ab9f5c-0" bind:__l="__l" u-p="{{k}}"><tm-badge wx:if="{{g}}" class="data-v-f3ab9f5c" u-s="{{['d']}}" u-i="f3ab9f5c-1,f3ab9f5c-0" bind:__l="__l" u-p="{{g}}"><view class="{{[e, 'flex', 'flex-col', 'flex-col-center-center', 'data-v-f3ab9f5c']}}" style="{{'width:' + f + ';' + ('height:' + '30px')}}"><block wx:if="{{$slots.d}}"><slot></slot></block><block wx:else><tm-icon wx:if="{{a}}" class="data-v-f3ab9f5c" u-i="f3ab9f5c-2,f3ab9f5c-1" bind:__l="__l" u-p="{{b}}"></tm-icon></block><tm-icon wx:if="{{c}}" class="data-v-f3ab9f5c" u-i="f3ab9f5c-3,f3ab9f5c-1" bind:__l="__l" u-p="{{d}}"></tm-icon></view></tm-badge><tm-text wx:if="{{h}}" class="data-v-f3ab9f5c" u-i="f3ab9f5c-4,f3ab9f5c-0" bind:__l="__l" u-p="{{i}}"></tm-text></tm-sheet></view>

View File

@ -0,0 +1,17 @@
.anifun.data-v-f3ab9f5c {
animation: scale-f3ab9f5c 0.2s ease;
}
@keyframes scale-f3ab9f5c {
0% {
transform: scale(0.9);
}
50% {
transform: scale(1.1);
}
100% {
transform: scale(1);
}
}

View File

@ -0,0 +1,207 @@
"use strict";
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
const common_vendor = require("../../../common/vendor.js");
const tmui_tool_lib_minxs = require("../../tool/lib/minxs.js");
const tmui_tool_lib_tmpinia = require("../../tool/lib/tmpinia.js");
require("../../tool/theme/theme.js");
require("../../tool/theme/colortool.js");
require("../../tool/lib/interface.js");
require("../../tool/function/util.js");
require("../../tool/function/preview.js");
if (!Math) {
tmSheet();
}
const tmSheet = () => "../tm-sheet/tm-sheet.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "tm-tabbar",
props: __spreadProps(__spreadValues({}, tmui_tool_lib_minxs.custom_props), {
transprent: {
type: [Boolean],
default: false
},
color: {
type: [String],
default: "white"
},
text: {
type: [Boolean],
default: false
},
round: {
type: [Number],
default: 0
},
shadow: {
type: [Number],
default: 0
},
//如果为0取当前窗口宽度。
width: {
type: [Number],
default: 0
},
//底部偏移
bottom: {
type: [Number],
default: 0
},
//是否显示安全区域
showSafe: {
type: [Boolean],
default: false
},
//动态激活项的索引-1表示不激活任何项。
active: {
type: Number,
default: -1
},
//是否自动选中。如果禁用则用户通过active来切换选中值否则点击项目时自动选中。
autoSelect: {
type: Boolean,
default: true
},
/** 在nvue上没有用处请自行放到最尾部的地方。 */
zIndex: {
type: [Number],
default: 200
},
/**是否占位底部填充空白view */
place: {
type: Boolean,
default: false
}
}),
emits: ["change", "update:active"],
setup(__props, { expose, emit: emits }) {
var _a, _b;
const props = __props;
tmui_tool_lib_tmpinia.useTmpiniaStore();
let sys = common_vendor.index.getSystemInfoSync();
const _width = common_vendor.computed(() => common_vendor.index.upx2px(props.width) || (sys == null ? void 0 : sys.windowWidth) || 750);
const _blur = common_vendor.computed(() => props.blur);
const _place = common_vendor.computed(() => props.place);
const _activeUrl = common_vendor.ref("");
const _activeUid = common_vendor.ref("");
const tmTabbarId = "tmTabbarId";
const _cachlist = common_vendor.ref([]);
const _showSafe = common_vendor.ref(props.showSafe);
const _activeIndex = common_vendor.ref(props.active);
const win_bottom = (_b = (_a = sys == null ? void 0 : sys.safeAreaInsets) == null ? void 0 : _a.bottom) != null ? _b : 0;
if (win_bottom > 0) {
_showSafe.value = true;
}
const _totalBarHeight = common_vendor.computed(() => {
if (_showSafe.value)
return 90;
return 75;
});
const _BarHeight = common_vendor.computed(() => {
if (_showSafe.value)
return 75;
return 60;
});
function setNowurl(url, nowuid) {
_activeUrl.value = url;
_activeUid.value = String(nowuid);
}
function pushKey(uid) {
_cachlist.value = [.../* @__PURE__ */ new Set([..._cachlist.value, uid])];
}
function delKey(uid) {
_cachlist.value = _cachlist.value.filter((el) => el != uid);
}
expose({ tmTabbarId, setNowurl, pushKey, delKey });
common_vendor.provide(
"tmTabbarUrl",
common_vendor.computed(() => _activeUrl.value)
);
common_vendor.provide(
"tmTabbarUid",
common_vendor.computed(() => _activeUid.value)
);
common_vendor.provide(
"tmTabbarWidth",
common_vendor.computed(() => Math.ceil(_width / _cachlist.value.length))
);
common_vendor.provide(
"tmTabbarItemList",
common_vendor.computed(() => _cachlist.value)
);
common_vendor.provide(
"tmTabbarItemActive",
common_vendor.computed(() => _activeIndex.value)
);
common_vendor.provide("tmTabbarItemSafe", _showSafe.value);
common_vendor.provide(
"tmTabbarItemAutoSelect",
common_vendor.computed(() => props.autoSelect)
);
common_vendor.watch(
() => props.active,
() => {
if (props.active == _activeIndex.value)
return;
_activeIndex.value = props.active;
}
);
common_vendor.watch(_activeIndex, () => {
emits("change", _activeIndex.value);
emits("update:active", _activeIndex.value);
});
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.p({
blur: common_vendor.unref(_blur),
color: props.color,
parenClass: "relative",
followTheme: props.followTheme,
dark: props.dark,
round: props.round,
shadow: props.shadow,
outlined: props.outlined,
border: 0,
borderDirection: "top",
text: props.text,
transprent: false,
linear: props.linear,
linearDeep: props.linearDeep,
margin: [0, 0],
padding: [0, 0],
height: common_vendor.unref(_BarHeight),
width: common_vendor.unref(_width),
unit: "px"
}),
b: common_vendor.unref(_width) + "px",
c: common_vendor.unref(_width) + "px",
d: common_vendor.unref(_totalBarHeight) + "px",
e: common_vendor.unref(_width) + "px",
f: common_vendor.unref(_totalBarHeight) + "px",
g: `translateY(${props.bottom}rpx)`,
h: props.zIndex,
i: common_vendor.unref(_place)
}, common_vendor.unref(_place) ? {
j: common_vendor.unref(_totalBarHeight) + "px"
} : {});
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "D:/WebstormProjects/uni-ticket-system/src/tmui/components/tm-tabbar/tm-tabbar.vue"]]);
wx.createComponent(Component);

View File

@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"tm-sheet": "../tm-sheet/tm-sheet"
}
}

View File

@ -0,0 +1 @@
<view><view class="fixed l-0 b-0 flex tabbar" style="{{'width:' + e + ';' + ('height:' + f) + ';' + ('transform:' + g) + ';' + ('z-index:' + h)}}"><view class="relative" style="top:15px"><tm-sheet wx:if="{{a}}" class="relative" u-i="16481f32-0" bind:__l="__l" u-p="{{a}}"></tm-sheet></view><view class="absolute flex flex-col l-0" style="{{'width:' + c + ';' + ('height:' + d)}}"><view class="relative barcont flex flex-row flex-row-top-center flex-around flex-1" style="{{'width:' + b}}"><slot></slot></view></view></view><view wx:if="{{i}}" style="{{'height:' + j}}"></view></view>

View File

@ -0,0 +1,8 @@
.barcont {
display: flex;
flex-direction: row !important;
justify-content: space-around !important;
align-items: flex-start;
}

View File

@ -0,0 +1,126 @@
"use strict";
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
const common_vendor = require("../../../common/vendor.js");
const tmui_tool_theme_theme = require("../../tool/theme/theme.js");
const tmui_tool_lib_minxs = require("../../tool/lib/minxs.js");
const tmui_tool_lib_tmpinia = require("../../tool/lib/tmpinia.js");
require("../../tool/theme/colortool.js");
require("../../tool/lib/interface.js");
require("../../tool/function/util.js");
require("../../tool/function/preview.js");
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "tm-text",
props: __spreadProps(__spreadValues({}, tmui_tool_lib_minxs.custom_props), {
label: {
type: [String, Number],
default: ""
},
fontSize: {
type: [Number],
default: 28
},
color: {
type: String,
default: ""
},
selectable: {
type: [Boolean],
default: false
},
unit: {
type: String,
default: "rpx"
},
parentClass: {
type: String,
default: ""
},
lineHeight: {
type: [Number, String],
default: "auto"
}
}),
emits: ["click"],
setup(__props, { emit: emits }) {
const props = __props;
const store = tmui_tool_lib_tmpinia.useTmpiniaStore();
const _parentClass = common_vendor.computed(() => props.parentClass);
const tmcfg = common_vendor.computed(() => store.tmStore);
const customCSSStyle = common_vendor.computed(() => tmui_tool_lib_minxs.computedStyle(props));
const customClass = common_vendor.computed(() => tmui_tool_lib_minxs.computedClass(props));
const isDark = common_vendor.computed(() => tmui_tool_lib_minxs.computedDark(props, tmcfg.value));
const _label = common_vendor.computed(() => props.label);
const _fontSize = common_vendor.computed(() => {
var _a, _b, _c;
return Number(props.fontSize) * ((_c = (_b = (_a = store == null ? void 0 : store.tmuiConfig) == null ? void 0 : _a.themeConfig) == null ? void 0 : _b.globalFontSizeRatio) != null ? _c : 1);
});
const appTextColor = common_vendor.inject(
"appTextColor",
common_vendor.computed(() => void 0)
);
const textColor = common_vendor.computed(() => {
if (props.followTheme && store.tmStore.color)
return store.tmStore.color;
let isColorHex = tmui_tool_theme_theme.theme.isCssColor(props.color);
if (isColorHex)
return props.color;
if (props.color && !isColorHex) {
let nowcolor = tmui_tool_theme_theme.theme.getColor(props.color);
return nowcolor.csscolor;
}
if (!appTextColor) {
if (isDark)
return "rgba(252, 252, 252, 1.0)";
return "rgba(34, 34, 34, 1.0)";
}
if (appTextColor.value) {
return appTextColor.value;
}
return "rgba(34, 34, 34, 1.0)";
});
return (_ctx, _cache) => {
return {
a: common_vendor.t(common_vendor.unref(_label)),
b: common_vendor.o(($event) => emits("click", $event)),
c: __props.selectable,
d: __props.selectable,
e: common_vendor.n(__props.fontSize ? "" : "text-size-m"),
f: common_vendor.n(common_vendor.unref(customClass)),
g: common_vendor.s(props.lineHeight == "auto" ? {
lineHeight: (common_vendor.unref(_fontSize) ? common_vendor.unref(_fontSize) * 1.3 : 42) + props.unit
} : {}),
h: common_vendor.s(props.lineHeight > 0 ? {
lineHeight: props.lineHeight + props.unit
} : {}),
i: common_vendor.s({
color: common_vendor.unref(textColor)
}),
j: common_vendor.s(common_vendor.unref(_fontSize) ? {
fontSize: common_vendor.unref(_fontSize) + props.unit
} : ""),
k: common_vendor.s(common_vendor.unref(customCSSStyle)),
l: common_vendor.n(common_vendor.unref(_parentClass))
};
};
}
});
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-3acfd808"], ["__file", "D:/WebstormProjects/uni-ticket-system/src/tmui/components/tm-text/tm-text.vue"]]);
wx.createComponent(Component);

View File

@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@ -0,0 +1 @@
<view render-whole="{{true}}" class="{{['flex', 'text-view', 'nv', 'data-v-3acfd808', l]}}"><text bindtap="{{b}}" selectable="{{c}}" user-select="{{d}}" class="{{['data-v-3acfd808', e, f]}}" style="{{g + ';' + h + ';' + i + ';' + j + ';' + k}}"><block wx:if="{{$slots.d}}"><slot></slot></block><block wx:else>{{a}}</block></text></view>

View File

@ -0,0 +1,11 @@
.text-view.data-v-3acfd808 {
box-sizing: border-box;
}
.nv.data-v-3acfd808 {
display: inline-flex;
vertical-align: middle;
flex-shrink:1;
}

244
dist/dev/mp-weixin/tmui/index.js vendored Normal file
View File

@ -0,0 +1,244 @@
"use strict";
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var _a, _b, _c, _d;
const common_vendor = require("../common/vendor.js");
const tmui_tool_lib_fetch = require("./tool/lib/fetch.js");
const tmui_tool_function_util = require("./tool/function/util.js");
const tmui_tool_lib_language = require("./tool/lib/language.js");
const tmui_tool_lib_share = require("./tool/lib/share.js");
const tmui_tool_router_index = require("./tool/router/index.js");
const tmui_tool_lib_tmuiconfigDefault = require("./tool/lib/tmuiconfigDefault.js");
const tmui_tool_function_preview = require("./tool/function/preview.js");
const easycom = {
autoscan: true,
custom: {
"^tm-(.*)": "@/tmui/components/tm-$1/tm-$1.vue"
}
};
const pages$1 = [
{
path: "pages/index/index",
style: {
navigationBarTitleText: "",
navigationStyle: "custom",
titlePenetrate: "YES",
transparentTitle: "always"
}
},
{
path: "pages/fankui/index",
style: {
navigationBarTitleText: "",
navigationStyle: "custom",
titlePenetrate: "YES",
transparentTitle: "always"
}
}
];
const globalStyle = {
navigationBarTextStyle: "black",
navigationBarTitleText: "uni-app",
navigationBarBackgroundColor: "#FFFFFF",
backgroundColor: "#FFFFFF"
};
const condition = {
current: 0,
list: [
{
name: "",
path: "",
query: ""
}
]
};
const PageJsonInit = {
easycom,
pages: pages$1,
globalStyle,
condition
};
let pages = [];
if (typeof (PageJsonInit == null ? void 0 : PageJsonInit.pages) == "undefined") {
PageJsonInit.pages = [];
}
PageJsonInit.pages.forEach((el) => {
var _a2, _b2, _c2, _d2, _e, _f, _g, _h, _i, _j;
let customType = (_b2 = (_a2 = el == null ? void 0 : el.style) == null ? void 0 : _a2.navigationStyle) != null ? _b2 : "default";
let bg = ((_f = (_e = (_c2 = el.style) == null ? void 0 : _c2.navigationBarBackgroundColor) != null ? _e : (_d2 = PageJsonInit == null ? void 0 : PageJsonInit.globalStyle) == null ? void 0 : _d2.navigationBarBackgroundColor) != null ? _f : "#FFFFFF") || "#FFFFFF";
let txtColor = ((_j = (_i = (_g = el.style) == null ? void 0 : _g.navigationBarTextStyle) != null ? _i : (_h = PageJsonInit == null ? void 0 : PageJsonInit.globalStyle) == null ? void 0 : _h.navigationBarTextStyle) != null ? _j : "black") || "black";
pages.push({
path: el.path,
custom: customType,
navigationBarBackgroundColor: bg,
navigationBarTextStyle: txtColor
});
});
if (Array.isArray((_a = PageJsonInit == null ? void 0 : PageJsonInit.subPackages) != null ? _a : null)) {
PageJsonInit == null ? void 0 : PageJsonInit.subPackages.forEach((el) => {
let rootPath = el.root;
el.pages.forEach((el2) => {
var _a2, _b2, _c2, _d2, _e, _f, _g, _h, _i, _j;
let elany = el2;
let bg = ((_d2 = (_c2 = (_a2 = el2.style) == null ? void 0 : _a2.navigationBarBackgroundColor) != null ? _c2 : (_b2 = PageJsonInit == null ? void 0 : PageJsonInit.globalStyle) == null ? void 0 : _b2.navigationBarBackgroundColor) != null ? _d2 : "#FFFFFF") || "#FFFFFF";
let txtColor = ((_h = (_g = (_e = el2.style) == null ? void 0 : _e.navigationBarTextStyle) != null ? _g : (_f = PageJsonInit == null ? void 0 : PageJsonInit.globalStyle) == null ? void 0 : _f.navigationBarTextStyle) != null ? _h : "black") || "black";
pages.push({
path: rootPath + "/" + elany.path,
custom: (_j = (_i = elany == null ? void 0 : elany.style) == null ? void 0 : _i.navigationStyle) != null ? _j : "default",
navigationBarBackgroundColor: bg,
navigationBarTextStyle: txtColor
});
});
});
}
let pagers = PageJsonInit;
let tabBar = (_b = pagers == null ? void 0 : pagers.tabBar) != null ? _b : {
color: "",
selectedColor: "",
borderStyle: "",
backgroundColor: "",
list: []
};
let cusutomIconList = [];
let $tm = {
tabBar,
pages,
globalNavStyle: (_c = PageJsonInit == null ? void 0 : PageJsonInit.globalStyle.navigationStyle) != null ? _c : "",
isOpenDarkModel: ((_d = PageJsonInit == null ? void 0 : PageJsonInit.globalStyle) == null ? void 0 : _d.navigationBarBackgroundColor).indexOf("@") > -1,
isColor: (color) => {
const reg1 = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
const reg2 = /^(rgb|RGB|rgba|RGBA)/;
return reg1.test(color) || reg2.test(color);
},
/**tmui3.0工具函数 */
u: __spreadProps(__spreadValues({}, tmui_tool_function_util.util), { preview: tmui_tool_function_preview.preview }),
/**tmui3.0国际化语言辅助函数 */
language: tmui_tool_lib_language.language,
fetch: tmui_tool_lib_fetch.fetchNet,
tmicon: [
{
font: "tmicon",
prefix: "tmicon-",
fontJson: cusutomIconList
}
],
config: tmui_tool_lib_tmuiconfigDefault.tmuiconfigdefault
};
const tmui = {
/**
* tmui3.0
* @param app Vue
* @param options tmui3.0配置
*/
install: (app, options = {}) => {
common_vendor.index.addInterceptor("navigateTo", {
invoke(result) {
common_vendor.nextTick$1(() => {
linsInko({
path: result.url,
context: null,
openType: "navigateTo"
});
});
},
success(result) {
}
});
common_vendor.index.addInterceptor("redirectTo", {
success(result) {
var _a2, _b2, _c2;
let pages2 = getCurrentPages().pop();
let path = (_a2 = pages2 == null ? void 0 : pages2.route) != null ? _a2 : "";
let msg = (_b2 = result.errMsg) != null ? _b2 : "";
let opentype = (_c2 = msg.split(":")[0]) != null ? _c2 : "";
linsInko({
path,
context: null,
openType: opentype
});
}
});
common_vendor.index.addInterceptor("reLaunch", {
success(result) {
var _a2, _b2, _c2;
let pages2 = getCurrentPages().pop();
let path = (_a2 = pages2 == null ? void 0 : pages2.route) != null ? _a2 : "";
let msg = (_b2 = result.errMsg) != null ? _b2 : "";
let opentype = (_c2 = msg.split(":")[0]) != null ? _c2 : "";
linsInko({
path,
context: null,
openType: opentype
});
}
});
common_vendor.index.addInterceptor("navigateBack", {
invoke(result) {
common_vendor.nextTick$1(() => {
var _a2, _b2, _c2;
let pages2 = getCurrentPages().pop();
let path = (_a2 = pages2 == null ? void 0 : pages2.route) != null ? _a2 : "";
let msg = (_b2 = result.errMsg) != null ? _b2 : "";
(_c2 = msg.split(":")[0]) != null ? _c2 : "";
linsInko({
path,
context: null,
openType: "navigateBack"
});
});
},
success(result) {
}
});
function linsInko(obj) {
var _a2, _b2;
obj.path = obj.path[0] == "/" ? obj.path.substr(1) : obj.path;
((_a2 = options.router) == null ? void 0 : _a2.useTmRouterBefore) ? (_b2 = options.router) == null ? void 0 : _b2.useTmRouterBefore(obj) : tmui_tool_router_index.useTmRouterBefore();
}
options = tmui_tool_function_util.deepObjectMerge($tm.config, options);
const pinia = app.config.globalProperties.$pinia || null;
const tmPiniaPlugin = (context) => {
if (context.store.$id === "tmpinia") {
context.store.tmuiConfig = options;
context.store.$state.tmuiConfig = options;
}
};
if (pinia) {
pinia.use(tmPiniaPlugin);
} else {
const pinia2 = common_vendor.createPinia();
pinia2.use(tmPiniaPlugin);
app.use(pinia2);
}
app.use(tmui_tool_lib_language.languageByGlobal());
let appconfig = {};
if (!$tm.config.shareDisable) {
const { onShareAppMessage, onShareTimeline } = tmui_tool_lib_share.share();
appconfig = __spreadProps(__spreadValues({}, appconfig), { onShareAppMessage, onShareTimeline });
}
app.mixin(__spreadValues({}, appconfig));
$tm = __spreadProps(__spreadValues({}, $tm), {
config: options
});
common_vendor.index.$tm = $tm;
app.config.globalProperties.tm = $tm;
}
};
exports.tmui = tmui;

View File

@ -0,0 +1,36 @@
"use strict";
const common_vendor = require("../../../common/vendor.js");
function preview(url = "", list = [], rangKey = "url") {
if (!url) {
common_vendor.index.$tm.u.toast("参数有误");
return;
}
if (arguments.length == 1) {
common_vendor.index.previewImage({
current: url,
urls: [url]
});
} else if (arguments.length === 3) {
if (typeof list[0] === "object" && typeof list[0] !== "undefined") {
let urls = [];
list.forEach((item) => {
urls.push(item[rangKey]);
});
common_vendor.index.previewImage({
current: url,
urls,
fail: (er) => {
console.warn(er);
}
});
} else if (typeof list[0] === "string") {
common_vendor.index.previewImage({
current: url,
urls: list
});
}
} else {
common_vendor.index.$tm.u.toast("参数有误");
}
}
exports.preview = preview;

View File

@ -0,0 +1,594 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
const common_vendor = require("../../../common/vendor.js");
const tmui_tool_function_preview = require("./preview.js");
function isNumber(arg, defaultNum = 0) {
const p = Number(arg);
return p || defaultNum;
}
function isString(arg, defaultStr = "") {
let p = "";
if (typeof arg === "string" && arg != null) {
p = String(arg);
} else
p = defaultStr;
return p;
}
function paginate(total, pageSize) {
const pages = Math.ceil(total / pageSize);
const pageArr = [];
for (let i = 0; i < pages; i++) {
pageArr.push(i + 1);
}
return pageArr;
}
function getValue(data, keys) {
const keyArr = keys.split(".");
let result = __spreadValues({}, data);
for (const key of keyArr) {
result = result[key];
if (result === void 0 || result === null) {
return result;
}
}
return result;
}
function setValue(data, keys, value) {
const keyArr = keys.split(".");
let obj = data;
for (let i = 0; i < keyArr.length - 1; i++) {
const key = keyArr[i];
if (!(key in obj)) {
obj[key] = {};
}
obj = obj[key];
}
obj[keyArr[keyArr.length - 1]] = value;
}
function getMaxDepth(data) {
let maxDepth = 0;
function traverse(obj, depth) {
if (typeof obj !== "object" || obj === null) {
maxDepth = Math.max(maxDepth, depth);
return;
}
for (const key in obj) {
if (obj.hasOwnProperty(key)) {
traverse(obj[key], depth + 1);
}
}
}
traverse(data, 0);
return maxDepth;
}
function deepObjectMerge(FirstOBJ, SecondOBJ) {
var _a;
for (var key in SecondOBJ) {
FirstOBJ[key] = FirstOBJ[key] && ((_a = FirstOBJ[key]) == null ? void 0 : _a.toString()) === "[object Object]" ? deepObjectMerge(FirstOBJ[key], SecondOBJ[key]) : FirstOBJ[key] = SecondOBJ[key];
}
return FirstOBJ;
}
function splitData(arr = [], size = 1) {
const result = [];
for (let i = 0; i < arr.length; i += size) {
result.push(arr.slice(i, i + size));
}
return result;
}
function deepClone(data) {
if (data === null || typeof data !== "object") {
return data;
}
if (Array.isArray(data)) {
const clone2 = [];
for (const item of data) {
clone2.push(deepClone(item));
}
return clone2;
}
if (data instanceof Date) {
return new Date(data.getTime());
}
if (data instanceof RegExp) {
const flags = data.flags;
return new RegExp(data.source, flags);
}
if (typeof data === "function") {
return data;
}
const clone = {};
for (const key in data) {
if (Object.prototype.hasOwnProperty.call(data, key)) {
clone[key] = deepClone(data[key]);
}
}
return clone;
}
function timeMuch(t) {
let format = {
d: "00",
h: "00",
m: "00",
s: "00"
};
if (t > 0) {
let d = Math.floor(t / 86400);
let h = Math.floor(t / 3600 % 24);
let m = Math.floor(t / 60 % 60);
let s = Math.floor(t % 60);
format.d = d < 10 ? "0" + d : d;
format.h = h < 10 ? "0" + h : h;
format.m = m < 10 ? "0" + m : m;
format.s = s < 10 ? "0" + s : s;
}
return format;
}
function getDateToNewData(timestamp = (/* @__PURE__ */ new Date()).getTime()) {
if (typeof timestamp == "string") {
timestamp = new Date(timestamp).getTime();
}
var arrTimestamp = (timestamp + "").split("");
for (var start = 0; start < 13; start++) {
if (!arrTimestamp[start]) {
arrTimestamp[start] = "0";
}
}
timestamp = Number(arrTimestamp.join("")) * 1;
var minute = 1e3 * 60;
var hour = minute * 60;
var day = hour * 24;
var month = day * 30;
var now = (/* @__PURE__ */ new Date()).getTime();
var diffValue = now - timestamp;
if (diffValue < 0) {
return "不久前";
}
var monthC = diffValue / month;
var weekC = diffValue / (7 * day);
var dayC = diffValue / day;
var hourC = diffValue / hour;
var minC = diffValue / minute;
var zero = function(value) {
if (value < 10) {
return "0" + value;
}
return value;
};
if (monthC > 12) {
return function() {
var date = new Date(timestamp);
return date.getFullYear() + "年" + zero(date.getMonth() + 1) + "月" + zero(date.getDate()) + "日";
}();
} else if (monthC >= 1) {
return parseInt(monthC + "") + "月前";
} else if (weekC >= 1) {
return parseInt(weekC + "") + "周前";
} else if (dayC >= 1) {
return parseInt(dayC + "") + "天前";
} else if (hourC >= 1) {
return parseInt(hourC + "") + "小时前";
} else if (minC >= 1) {
return parseInt(minC + "") + "分钟前";
}
return "刚刚";
}
function callPhone(phoneNumber = "") {
let num = phoneNumber.toString();
return new Promise((rs, rj) => {
common_vendor.index.makePhoneCall({
phoneNumber: num,
success: () => rs(true),
fail: (err) => rj(err)
});
});
}
function scanCode(onlyFromCamera = true, scanType = ["barCode", "qrCode", "datamatrix", "datamatrix"]) {
return new Promise((rs, rj) => {
common_vendor.index.scanCode({
onlyFromCamera,
scanType,
success: (res) => rs(res),
fail: (error) => rj(error)
});
});
}
function setClipboardData(data) {
return new Promise((rs, rj) => {
common_vendor.index.setClipboardData({
data,
success: () => rs(true),
fail: (error) => rj(error)
});
});
}
function getClipboardData() {
return new Promise((rs, rj) => {
common_vendor.index.getClipboardData({
success: (res) => rs(res.data),
fail: (error) => rj(error)
});
});
}
function setCookie(key, data) {
try {
common_vendor.index.setStorageSync(key, data);
return true;
} catch (e) {
return false;
}
}
function delCookie(key) {
try {
common_vendor.index.removeStorageSync(key);
return true;
} catch (e) {
return false;
}
}
function getCookie(key) {
try {
const value = common_vendor.index.getStorageSync(key);
try {
let val = JSON.parse(value);
return val;
} catch (e) {
return value;
}
} catch (e) {
return void 0;
}
}
function httpUrlAddKey(uri, key, value) {
if (!value) {
return uri;
}
var re = new RegExp("([?&])" + key + "=.*?(&|$)", "i");
var separator = uri.indexOf("?") !== -1 ? "&" : "?";
if (uri.match(re)) {
return uri.replace(re, "$1" + key + "=" + value + "$2");
} else {
return uri + separator + key + "=" + value;
}
}
function getQueryString(url, key) {
var query_string = url.substring(url.indexOf("?"));
if (!query_string)
return "";
var re = /[?&]?([^=]+)=([^&]*)/g;
var tokens;
while (tokens = re.exec(query_string)) {
if (decodeURIComponent(tokens[1]) === key) {
return decodeURIComponent(tokens[2]);
}
}
return "";
}
function getUid(rdix = 1, length = 12, isAddStr = false) {
return Math.floor(Math.random() * rdix * Math.floor(Math.random() * Date.now())).toString(isAddStr ? 16 : 10).substring(0, length);
}
var timeout = getUid(1);
function debounce(func, wait = 500, immediate = false) {
if (timeout !== null)
clearTimeout(timeout);
if (immediate) {
timeout = setTimeout(() => {
timeout = null;
}, wait);
typeof func === "function" && func();
} else {
timeout = getUid(1);
timeout = setTimeout(() => {
typeof func === "function" && func();
}, wait);
}
}
var throttleFlag;
function throttle(func, wait = 500, immediate = true) {
if (immediate) {
if (!throttleFlag) {
throttleFlag = true;
typeof func === "function" && func();
setTimeout(() => {
throttleFlag = false;
}, wait);
}
} else {
if (!throttleFlag) {
throttleFlag = true;
setTimeout(() => {
throttleFlag = false;
typeof func === "function" && func();
}, wait);
}
}
}
function quereyDom(t, node) {
return new Promise((res, rej) => {
const query = common_vendor.index.createSelectorQuery().in(t);
query.select(node).boundingClientRect((el) => {
res(el);
}).exec();
});
}
const queryDom = quereyDom;
function isPhone(phone) {
let val = String(phone);
let reg = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
return !!val.match(reg);
}
function isChina(s) {
var patrn = /[\u4E00-\u9FA5]|[\uFE30-\uFFA0]/gi;
return !!patrn.exec(s);
}
function isEmpty(s) {
if (typeof s === "string") {
s = s.trim();
}
if (s == "")
return true;
if (s == null)
return true;
if (typeof s === "undefined")
return true;
if (Array.isArray(s)) {
if (s.length == 0)
return true;
}
if (typeof s === "object") {
if (Object.keys(s).length == 0)
return true;
}
return false;
}
function isEmail(s) {
let reg = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/;
return !!s.match(reg);
}
function isIdCard(val) {
val = String(val);
var p = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
var factor = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2];
var parity = [1, 0, "X", 9, 8, 7, 6, 5, 4, 3, 2];
var code = val.substring(17);
if (p.test(val)) {
var sum = 0;
for (var i = 0; i < 17; i++) {
let id = val[i];
sum += id * factor[i];
}
if (parity[sum % 11] == code.toUpperCase()) {
return true;
}
}
return false;
}
function isIdCar(s) {
let reg = /^[京|沪|津|渝|鲁|冀|晋|蒙|辽|吉|黑|苏|浙|皖|闽|赣|豫|湘|鄂|粤|桂|琼|川|贵|云|藏|陕|甘|青|宁|新|港|澳|台|新|使]{1}[A-Z]{1}[A-Z_0-9]{5,6}$/;
return !!s.match(reg);
}
function isPasswordOfNumber(s, len = 6, maxLen = 20) {
s = String(s);
let reg = new RegExp(`^[0-9]{${len},${maxLen}}$`);
return !!s.match(reg);
}
function isPasswordOfOther(s, len = 6, maxLen = 20, model = 0) {
s = String(s);
let reg = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$/;
if (model === 1) {
reg = /^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?!([^(0-9a-zA-Z)])+$).{6,20}$/;
}
if (model === 2) {
reg = /(?=.*([a-zA-Z].*))(?=.*[0-9].*)[a-zA-Z0-9-*/+.~!@#$%^&*()]{6,20}$/;
}
return !!s.match(reg);
}
function isDate(s) {
if (s == null || typeof s === "undefined" || !s)
return false;
if (typeof s === "string") {
s = s.replace("-", "/");
}
let d = new Date(s);
if (d.toString() == "Invalid Date")
return false;
return true;
}
function toast(word, mask = true, icon = "none") {
common_vendor.index.showToast({
mask,
title: word,
icon
});
}
function getWindow() {
var _a, _b, _c, _d, _e;
const sysinfo = common_vendor.index.getSystemInfoSync();
let top = 0;
let height = sysinfo.windowHeight;
let nowPage = getCurrentPages().pop();
let isCustomHeader = false;
(_b = (_a = common_vendor.index.$tm) == null ? void 0 : _a.pages) != null ? _b : [];
let bottom = (_d = (_c = sysinfo.safeAreaInsets) == null ? void 0 : _c.bottom) != null ? _d : 0;
if (((_e = common_vendor.index.$tm) == null ? void 0 : _e.globalNavStyle) == "custom") {
isCustomHeader = true;
} else {
for (let i = 0; i < common_vendor.index.$tm.pages.length; i++) {
if ((nowPage == null ? void 0 : nowPage.route) == common_vendor.index.$tm.pages[i].path && common_vendor.index.$tm.pages[i].custom == "custom") {
isCustomHeader = true;
break;
}
}
}
let results = { bottom, height, width: sysinfo.windowWidth, top, isCustomHeader, statusBarHeight: sysinfo.statusBarHeight || 0, sysinfo };
return results;
}
function routerTo(url, type = "navigate") {
let funType = {
navigate: "navigateTo",
redirect: "redirectTo",
switchTab: "switchTab",
reLaunch: "reLaunch",
navigateBack: "navigateBack"
};
let fun = funType[type];
if (fun == "navigateBack") {
common_vendor.index.navigateBack({
fail(error) {
console.error(error);
}
});
} else if (fun == "reLaunch") {
common_vendor.index.reLaunch({
url,
fail(error) {
console.error(error);
}
});
} else if (fun == "switchTab") {
common_vendor.index.switchTab({
url,
fail(error) {
console.error(error);
}
});
} else if (fun == "redirectTo") {
common_vendor.index.redirectTo({
url,
fail(error) {
console.error(error);
}
});
} else if (fun == "navigateTo") {
common_vendor.index.navigateTo({
url,
fail(error) {
console.error(error);
}
});
}
}
function torpx(v, screenWidth = 0) {
if (typeof screenWidth === "undefined" || !screenWidth) {
screenWidth = common_vendor.index.getSystemInfoSync().screenWidth;
}
let pixelRatio = 750 / screenWidth;
return Math.ceil(v * pixelRatio);
}
function topx(v) {
return Math.ceil(common_vendor.index.upx2px(Number(v)));
}
var lastTime = 0;
function requestAnimationFrame(callback) {
const currentTime = (/* @__PURE__ */ new Date()).getTime();
const timeToCall = Math.max(0, 16 - (currentTime - lastTime));
const id = setTimeout(() => {
callback(currentTime + timeToCall);
}, timeToCall);
lastTime = currentTime + timeToCall;
return id;
}
function cancelAnimationFrame(id) {
clearTimeout(id);
}
function valToMarginAr(val) {
let ar = [];
if (typeof val === "string" && val) {
ar = [Number(val)];
} else if (typeof val === "number" && isNaN(Number(val))) {
ar = [val];
} else if (typeof val === "undefined" || typeof val === null || val === "" || val === void 0) {
val = [0];
} else if (Array.isArray(val)) {
ar = val.map((el) => Number(el));
}
if (ar.length == 1) {
ar = new Array(4).fill(ar[0]);
} else if (ar.length == 2) {
ar = [...ar, ...ar];
} else if (ar.length == 3) {
ar = [...ar, 0];
}
return ar;
}
function valToRoundStrClass(val) {
let dstr = "";
if (typeof val == "number")
return "round-" + val;
if (val.length == 1)
return "round-" + val;
if (val.length == 2)
return `round-tl-${val[0]} round-tr-${val[1]}`;
if (val.length == 3)
return `round-tl-${val[0]} round-tr-${val[1]} round-br-${val[2]} `;
if (val.length == 4)
return `round-tl-${val[0]} round-tr-${val[1]} round-br-${val[2]} round-bl-${val[2]}`;
return dstr;
}
const util = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
callPhone,
cancelAnimationFrame,
debounce,
deepClone,
deepObjectMerge,
default: tmui_tool_function_preview.preview,
delCookie,
getClipboardData,
getCookie,
getDateToNewData,
getMaxDepth,
getQueryString,
getUid,
getValue,
getWindow,
httpUrlAddKey,
isChina,
isDate,
isEmail,
isEmpty,
isIdCar,
isIdCard,
isNumber,
isPasswordOfNumber,
isPasswordOfOther,
isPhone,
isString,
paginate,
quereyDom,
queryDom,
requestAnimationFrame,
routerTo,
scanCode,
setClipboardData,
setCookie,
setValue,
splitData,
throttle,
timeMuch,
toast,
topx,
torpx,
valToMarginAr,
valToRoundStrClass
}, Symbol.toStringTag, { value: "Module" }));
exports.deepObjectMerge = deepObjectMerge;
exports.getCookie = getCookie;
exports.setCookie = setCookie;
exports.util = util;
exports.valToMarginAr = valToMarginAr;
exports.valToRoundStrClass = valToRoundStrClass;

View File

@ -0,0 +1,157 @@
"use strict";
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
const common_vendor = require("../../../common/vendor.js");
let config = {
url: "",
data: {},
statusCode: 200,
header: {
// "content-type":"application/json"
},
method: "POST",
timeout: 6e4,
dataType: "json",
responseType: "text",
sslVerify: true,
withCredentials: false,
firstIpv4: false
};
function request(cog = config, complete, beforeRequest2, afterRequest2) {
let newConfig = __spreadValues(__spreadValues({}, config), cog);
return new Promise((resolve, reject) => __async(this, null, function* () {
if (typeof beforeRequest2 === "function") {
let opts = yield beforeRequest2(newConfig);
if (typeof opts !== "object") {
opts = {};
}
newConfig = __spreadValues(__spreadValues({}, newConfig), opts);
}
common_vendor.index.request({
url: newConfig.url || "",
data: newConfig.data,
header: newConfig.header,
method: newConfig.method,
timeout: newConfig.timeout,
dataType: newConfig.dataType,
responseType: newConfig.responseType,
sslVerify: newConfig.sslVerify,
withCredentials: newConfig.withCredentials,
firstIpv4: newConfig.firstIpv4,
success(result) {
return __async(this, null, function* () {
var _a2;
if (result.statusCode !== (newConfig == null ? void 0 : newConfig.statusCode)) {
reject(result);
return;
}
if (typeof afterRequest2 === "function") {
let opts = yield afterRequest2(result);
try {
if (typeof opts !== "object") {
opts = result;
}
if (typeof opts === "object" && ((_a2 = Object.keys(opts)) == null ? void 0 : _a2.length) == 0) {
opts = result;
}
} catch (e) {
console.error("tmui:", e);
}
result = __spreadValues({}, opts);
}
resolve(result);
});
},
fail(result) {
reject(result);
},
complete(result) {
if (typeof complete === "function") {
complete(result);
}
}
});
}));
}
var beforeRequest = (val) => val;
var afterRequest = (val) => val;
class fetchNet {
/**
* 构建新的请求
* @param cog 请示配置见fetchConfig
* @param beforeRequest 访问前执行的函数可以是Promise,你可以对执行前的参数进行修改之类的将以你最新的修改参数为准进行请求
* @param afterRequest 访问后执行的函数可以是Promise,提供请示后的数据你可以在这里修改返回这样所有请求的数据返回后都为返回你修改后的数据
*/
constructor(cog, beforeRequestFun, afterRequesFunt) {
config = __spreadValues(__spreadValues({}, config), cog || {});
if (typeof beforeRequestFun == "function") {
beforeRequest = beforeRequestFun;
}
if (typeof afterRequesFunt == "function") {
afterRequest = afterRequesFunt;
}
}
static get(url, data = {}, opts = {}) {
let cfg = __spreadProps(__spreadValues(__spreadValues({}, config), opts || {}), { url, method: "GET", data });
return request(cfg);
}
static post(url, data = {}, opts = {}) {
let cfg = __spreadProps(__spreadValues(__spreadValues({}, config), opts || {}), { url, method: "POST", data });
return request(cfg);
}
/**
* 请求
* @param cog 配置
* @param complete 访问结束后执行的函数
*/
static request() {
return __async(this, arguments, function* (cog = config, beforeFun, afterFun, complete) {
let newConfig = __spreadValues(__spreadValues({}, config), cog);
if (typeof beforeFun == "function") {
let testFun = yield beforeFun();
let cb = { errMsg: "中止请求" };
if (!testFun)
return cb;
}
return request(newConfig, complete, beforeFun || beforeRequest, afterFun || afterRequest);
});
}
}
exports.fetchNet = fetchNet;

View File

@ -0,0 +1,39 @@
"use strict";
var cssDirection = /* @__PURE__ */ ((cssDirection2) => {
cssDirection2["left"] = "left";
cssDirection2["right"] = "right";
cssDirection2["bottom"] = "bottom";
cssDirection2["top"] = "top";
cssDirection2["leftright"] = "x";
cssDirection2["topbottom"] = "y";
cssDirection2["topleft"] = "top-left";
cssDirection2["topright"] = "top-right";
cssDirection2["bottomleft"] = "bottom-left";
cssDirection2["bottomright"] = "bottom-right";
cssDirection2["all"] = "all";
return cssDirection2;
})(cssDirection || {});
var linearDirection = /* @__PURE__ */ ((linearDirection2) => {
linearDirection2["left"] = "to left";
linearDirection2["right"] = "to right";
linearDirection2["top"] = "to top";
linearDirection2["bottom"] = "to bottom";
linearDirection2["none"] = "";
return linearDirection2;
})(linearDirection || {});
var linearDeep = /* @__PURE__ */ ((linearDeep2) => {
linearDeep2["light"] = "light";
linearDeep2["dark"] = "dark";
linearDeep2["accent"] = "accent";
return linearDeep2;
})(linearDeep || {});
var borderStyle = /* @__PURE__ */ ((borderStyle2) => {
borderStyle2["solid"] = "solid";
borderStyle2["dashed"] = "dashed";
borderStyle2["dotted"] = "dotted";
return borderStyle2;
})(borderStyle || {});
exports.borderStyle = borderStyle;
exports.cssDirection = cssDirection;
exports.linearDeep = linearDeep;
exports.linearDirection = linearDirection;

View File

@ -0,0 +1,130 @@
"use strict";
const common_vendor = require("../../../common/vendor.js");
const language$2 = "English-US";
const en = {
language: language$2,
"index.search.subtext": "Fully compatible with vue3 TypeScript pinia component library",
"index.search.tips": "Chinese/English name",
"index.search.btntext": "search",
"index.com.navtitle": "TMUI All platforms",
"index.com.title": "Category Navigation",
"index.com.tongyong": "Universal",
"index.com.row": "Layout",
"index.com.show": "Display",
"index.com.form": "Form",
"index.com.fd": "Reminder",
"index.com.nav": "Navigation",
"index.com.yewu": "Business",
"index.com.other": "Other",
"index.com.tubiao": "Chart",
"index.com.tongyongSub": "can't translate",
"index.com.rowSub": "can't translate",
"index.com.showSub": "can't translate",
"index.com.formSub": "can't translate",
"index.com.fdSub": "can't translate",
"index.com.navSub": "can't translate",
"index.com.yewuSub": "can't translate",
"index.com.otherSub": "can't translate",
"index.com.tubiaoSub": "Echarts 5.3.2",
"index.com.render": "Render",
"index.com.renderSub": "cavas render",
"index.com.pag": "PAG",
"index.com.pagSub": "pag animation",
"index.com.bottom": "TMUI3.0",
"index.com.setLocal": "language setting",
"index.com.autoDark": "followDark system",
"index.com.love": "Action support",
"index.com.loveSub": "Watch an ad",
"index.com.themetext": "Dynamically switch theme sore of see docs",
"index.com.themeGreen": "Yellow",
"index.com.themeBlue": "Blue",
"index.com.themeRed": "Red",
"index.com.themeDefault": "Default",
"index.com.themeCustText": "custom",
"message.load.text": "Loading",
"message.error.text": "Error",
"message.info.text": "Tips",
"message.warn.text": "Warning",
"message.quest.text": "Question",
"message.success.text": "Success",
"message.disabled.text": "Disabled",
"message.wait.text": "Waiting"
};
const language$1 = "简体-中国";
const zhHans = {
language: language$1,
"index.search.subtext": "全端兼容vue3 TypeScript pinia组件库",
"index.search.tips": "组件中文/英文名称",
"index.search.btntext": "搜索组件",
"index.com.navtitle": "TMUI 全平台组件库",
"index.com.title": "分类导航",
"index.com.tongyong": "通用组件",
"index.com.tongyongSub": "高频常用组件",
"index.com.row": "布局组件",
"index.com.rowSub": "布局排版",
"index.com.show": "展示组件",
"index.com.showSub": "常见数据展示",
"index.com.form": "表单录入",
"index.com.formSub": "数据提交类",
"index.com.fd": "反馈类型",
"index.com.fdSub": "提示弹层类组件",
"index.com.nav": "导航类型",
"index.com.navSub": "分页导航类",
"index.com.yewu": "业务型组件",
"index.com.yewuSub": "优惠券导购类",
"index.com.other": "其它",
"index.com.otherSub": "功能型组件",
"index.com.tubiao": "图表组件",
"index.com.tubiaoSub": "Echarts 5.3.2",
"index.com.render": "tmCv",
"index.com.renderSub": "canvas动画渲染",
"index.com.pag": "PAG",
"index.com.pagSub": "腾讯pag动画",
"index.com.bottom": "TMUI3.0",
"index.com.setLocal": "设置语言",
"index.com.autoDark": "暗黑跟随系统",
"index.com.love": "TMUI用户中心",
"index.com.loveSub": "看广告赚积分",
"index.com.themetext": "动态切换主题,默认主题见文档",
"index.com.themeGreen": "小黄",
"index.com.themeBlue": "蓝色",
"index.com.themeRed": "红色",
"index.com.themeDefault": "默认",
"index.com.themeCustText": "自定",
"message.load.text": "加载中",
"message.error.text": "操作错误",
"message.info.text": "提示信息",
"message.warn.text": "警告信息",
"message.quest.text": "似乎有问题",
"message.success.text": "操作成功",
"message.disabled.text": "禁止操作",
"message.wait.text": "请稍候.."
};
const language = function(key) {
const messages = {
en,
"zh-Hans": zhHans
};
let i18nConfig = {
locale: common_vendor.index.getLocale(),
// 获取已设置的语言
messages
};
const i18n = common_vendor.createI18n(i18nConfig);
return i18n.global.t(key);
};
const languageByGlobal = function() {
const messages = {
en,
"zh-Hans": zhHans
};
let i18nConfig = {
locale: common_vendor.index.getLocale(),
// 获取已设置的语言
messages
};
const i18n = common_vendor.createI18n(i18nConfig);
return i18n;
};
exports.language = language;
exports.languageByGlobal = languageByGlobal;

View File

@ -0,0 +1,255 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
const tmui_tool_theme_theme = require("../theme/theme.js");
const tmui_tool_lib_interface = require("./interface.js");
const custom_props = {
/**
* 自定义的样式属性
*/
_style: {
type: [Array, String, Object],
default: () => []
},
/**
* 自定义类名
*/
_class: {
type: [Array, String],
default: ""
},
/**
* 当前组件的主题可以是颜色值也可以是主题名称
*/
color: {
type: String,
default: "primary"
},
/**
* 是否跟随全局主题的变换而变换
*/
followTheme: {
type: [Boolean, String],
default: false
},
/**
* 暗黑
*/
dark: {
type: [Boolean, String],
default: false
},
/**
* 是否跟随主题全局切换暗黑模式
*/
followDark: {
type: [Boolean, String],
default: true
},
/**
* 圆角
*/
round: {
type: [Number, Array],
default: 0
},
/**
* 投影安卓上只有黑灰投影
*/
shadow: {
type: [Number],
default: 0
//4
},
/**
* 是否镂空背景
*/
outlined: {
type: [Boolean],
default: false
},
/**
* 边线
*/
border: {
type: [Number],
default: 0
},
/**
* 边线样式
* @field solid|dashed|dotted
* @default solid
*/
borderStyle: {
type: String,
default: tmui_tool_lib_interface.borderStyle.solid
},
/**
* 边线的方向
*/
borderDirection: {
type: String,
default: tmui_tool_lib_interface.cssDirection.all
},
/**
* 是否浅色背景
*/
text: {
type: [Boolean, String],
default: false
},
/**
* 是否透明背景
*/
transprent: {
type: [Boolean, String],
default: true
},
/**
* 是否透明背景,等同transprent,因单词拼写错误现在写一个正确的
*/
transparent: {
type: [Boolean, String],
default: true
},
/**
* 渐变背景方向,
* left:->right:->top:->bottom:->
*/
linear: {
type: String,
default: ""
},
/** 渐变的亮浅 light,dark,accent亮系渐变和深色渐变。 */
linearDeep: {
type: String,
default: "light"
},
/**当开启渐变时,如果提供些数组属性将产生自定义颜色的渐变值。 */
linearColor: {
type: [Array],
default: () => []
},
//是否禁用圆角功能 ,针对安卓的特别处理。
isDisabledRoundAndriod: {
type: [Boolean, String],
default: false
},
//是否开启磨砂背景。
blur: {
type: Boolean,
default: false
},
/**线的边线颜色,如果不提供自动从color中匹配计算。 */
borderColor: {
type: String,
default: ""
}
};
const computedDark = (props, tmcfg) => {
const followDark = props.followDark;
const dark = props.dark;
const glboalDark = tmcfg.dark;
if (followDark) {
return glboalDark;
}
return dark;
};
const computedClass = (props) => {
const _class = props._class;
if (typeof _class == "string") {
return _class;
}
if (Array.isArray(_class)) {
return _class.join(" ");
}
return "";
};
const computedStyle = (props) => {
const _style = props._style;
if (typeof _style == "string") {
let p = _style.split(";");
let k = p.map((el) => {
el = el.replace(";", "");
let node = {};
let idx = el.split(":");
node[idx[0]] = idx[1];
return node;
});
let kl = {};
k.forEach((el) => {
kl = __spreadValues(__spreadValues({}, kl), el);
});
return kl;
}
if (typeof _style == "object" && !Array.isArray(_style)) {
return _style;
}
if (typeof _style == "object" && Array.isArray(_style)) {
let kl = {};
_style.forEach((el) => {
kl = __spreadValues(__spreadValues({}, kl), el);
});
return kl;
}
return {};
};
const computedTheme = (props, dark, store) => {
var _a;
const color = props.color;
const border = props.border;
const shadow = props.shadow;
const round = props.round;
const outlined = props.outlined;
const text = props.text;
const borderStyle2 = props.borderStyle;
const borderDirection = props.borderDirection;
const linear = props.linear;
const linearDeep2 = props.linearDeep;
const blur = props.blur;
var borderColor = (_a = props == null ? void 0 : props.borderColor) != null ? _a : "";
var theme = new tmui_tool_theme_theme.theme.themeColors(store.colorList);
if (tmui_tool_theme_theme.theme.isCssColor(color) && !theme.hasColors(color)) {
theme = new tmui_tool_theme_theme.theme.themeColors(theme.add(color, color));
}
let defaultColorName = color || "primary";
if ((props == null ? void 0 : props.followTheme) == true && store.color) {
defaultColorName = store.color;
borderColor = "";
}
let c = theme.getTheme({
colorname: defaultColorName,
dark,
borderWidth: border,
shadow: parseInt(String(shadow)),
round: parseInt(String(round)),
outlined: outlined ? true : false,
text: text ? true : false,
borderStyle: borderStyle2,
borderDirection,
linearDirection: linear,
linearDeep: linearDeep2,
blur,
borderColor
});
return c;
};
exports.computedClass = computedClass;
exports.computedDark = computedDark;
exports.computedStyle = computedStyle;
exports.computedTheme = computedTheme;
exports.custom_props = custom_props;

View File

@ -0,0 +1,46 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
const common_vendor = require("../../../common/vendor.js");
const share = (args = {}) => {
let defaultWxshareConfig = __spreadValues({}, args);
let shareAppOptions = {};
let shareTimeOptions = {};
const shareApp = (options = {}) => {
common_vendor.onShareAppMessage((res) => {
return __spreadValues(__spreadValues(__spreadValues({}, defaultWxshareConfig), options), shareAppOptions);
});
};
const setShareApp = (options = {}) => {
shareAppOptions = options;
};
const shareTime = (options = {}) => {
common_vendor.onShareTimeline(() => {
return __spreadValues(__spreadValues(__spreadValues({}, defaultWxshareConfig), options), shareTimeOptions);
});
};
const setShareTime = (options = {}) => {
shareTimeOptions = options;
};
return {
onShareAppMessage: shareApp,
onShareTimeline: shareTime,
setShareApp,
setShareTime
};
};
exports.share = share;

View File

@ -0,0 +1,132 @@
"use strict";
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var _a, _b;
const common_vendor = require("../../../common/vendor.js");
const tmui_tool_theme_theme = require("../theme/theme.js");
const tmui_tool_function_util = require("../function/util.js");
let pdefault_cookies_color = tmui_tool_function_util.getCookie("setTmVuetifyColor") || "";
let pdefault_cookies_black = tmui_tool_function_util.getCookie("setTmVuetifyBlack");
let pdefault_cookies_local = tmui_tool_function_util.getCookie("setTmVuetifyLocal") || "zh-Hans";
let pdefault_cookies_colorArrayList = tmui_tool_function_util.getCookie("colorArrayList");
let dark = typeof pdefault_cookies_black === "boolean" ? pdefault_cookies_black : false;
let themeObj = new tmui_tool_theme_theme.theme.themeColors();
if (pdefault_cookies_colorArrayList) {
const result2 = pdefault_cookies_colorArrayList.filter((item) => themeObj.colors.every((subItem) => subItem.name !== item.name));
themeObj = new tmui_tool_theme_theme.theme.themeColors([...themeObj.colors, ...result2]);
}
const colorArray = themeObj.colors;
const os = (_b = (_a = common_vendor.index.getSystemInfoSync()) == null ? void 0 : _a.osName) != null ? _b : "";
tmui_tool_function_util.setCookie("colorArrayList", colorArray);
const useTmpiniaStore = common_vendor.defineStore("tmpinia", {
state: () => {
return {
tmStore: {
color: pdefault_cookies_color,
dark,
tmVueTifly_pages: "",
tmVueTifly_pagesIndex: "",
os,
//这里是微信小程序和微信H5的配置资料。
wxshareConfig_miniMp: {
title: "",
// 分享标题
desc: "",
// 描述
imageUrl: "",
// 分享图片
path: "",
// 分享路径
copyLink: "",
// 复制链接
query: {}
// 分享参数
},
//当前存储存的主题对象。
colorList: colorArray,
//当前的语言
local: pdefault_cookies_local
}
};
},
actions: {
setPageNow(url) {
this.tmStore = __spreadProps(__spreadValues({}, this.tmStore), {
tmVueTifly_pages: url
});
},
setPageNowIndex(index) {
this.tmStore = __spreadProps(__spreadValues({}, this.tmStore), {
tmVueTifly_pagesIndex: index
});
},
setTmVuetifyDark(dark2) {
dark2 = typeof dark2 !== "boolean" ? false : dark2;
tmui_tool_function_util.setCookie("setTmVuetifyBlack", dark2);
this.tmStore = __spreadProps(__spreadValues({}, this.tmStore), {
dark: dark2
});
},
setTmAutoDark(autoDark = false) {
var _a2, _b2;
tmui_tool_function_util.setCookie("setTmVuetifyAutoDark", autoDark);
this.tmuiConfig.autoDark = autoDark;
if (autoDark) {
let nowstrdark = "";
nowstrdark = (_b2 = (_a2 = common_vendor.index.getSystemInfoSync()) == null ? void 0 : _a2.osTheme) != null ? _b2 : "";
this.setTmVuetifyDark(nowstrdark == "dark" ? true : false);
}
},
setWxShare(cfg) {
let pcf = cfg || {};
if (typeof pcf !== "object" || Array.isArray(cfg))
pcf = {};
this.tmStore = __spreadProps(__spreadValues({}, this.tmStore), {
wxshareConfig_miniMp: __spreadValues(__spreadValues({}, this.tmStore.wxshareConfig_miniMp), pcf)
});
},
setTmVuetifyTheme(color) {
let defaultColorName = color;
if (!defaultColorName || defaultColorName == "" || tmui_tool_theme_theme.theme.isCssColor(defaultColorName)) {
defaultColorName = "";
}
tmui_tool_function_util.setCookie("setTmVuetifyColor", defaultColorName);
this.tmStore = __spreadProps(__spreadValues({}, this.tmStore), { color: defaultColorName });
},
//添加一个主题
setTmVuetifyAddTheme(colorName, color, isSet = true) {
this.tmStore = __spreadProps(__spreadValues({}, this.tmStore), {
colorList: themeObj.add(colorName, color)
});
tmui_tool_function_util.setCookie("colorArrayList", this.tmStore.colorList);
if (isSet) {
this.setTmVuetifyTheme(colorName);
}
},
setTmLocal(language) {
language = language || "zh-Hans";
tmui_tool_function_util.setCookie("setTmVuetifyLocal", language);
this.tmStore = __spreadProps(__spreadValues({}, this.tmStore), {
local: language
});
}
}
});
exports.useTmpiniaStore = useTmpiniaStore;

View File

@ -0,0 +1,35 @@
"use strict";
const tmui_tool_router_index = require("../router/index.js");
const tmuiconfigdefault = {
autoDark: false,
theme: {},
/** 开启全局分离功能,默认关闭 */
shareDisable: true,
themeConfig: {
theme: {},
globalFontSizeRatio: 1,
/** 是否关闭弹层背景的模糊 */
overflowBlur: false,
dark: {
/**一般的卡片项目暗黑背景 */
cardcolor: "#0A0A0B",
/**输入框,表单等暗黑背景 */
inputcolor: "#111112",
/**禁用输入框,表单等暗黑背景 */
disablecolor: "rgba(30, 30, 30, 1.0)",
/**暗黑下的页面背景 */
bodycolor: "rgb(5, 5, 5)",
/**文本禁用色. */
textDisableColor: "rgba(100, 100, 100, 1.0)"
},
component: {
button: {
round: 2,
shadow: 2
}
}
},
router: { useTmRouterAfter: tmui_tool_router_index.useTmRouterAfter, useTmRouterBefore: tmui_tool_router_index.useTmRouterBefore },
custom: {}
};
exports.tmuiconfigdefault = tmuiconfigdefault;

View File

@ -0,0 +1,7 @@
"use strict";
const useTmRouterBefore = (arg) => {
};
const useTmRouterAfter = (arg) => {
};
exports.useTmRouterAfter = useTmRouterAfter;
exports.useTmRouterBefore = useTmRouterBefore;

View File

@ -0,0 +1,208 @@
"use strict";
var colortool = {
rgbaToHsla(scolor) {
let { r, g, b, a } = scolor;
r = r / 255;
g = g / 255;
b = b / 255;
var max = Math.max(r, g, b);
var min = Math.min(r, g, b);
var h, s, l;
if (max === min) {
h = 0;
} else if (max === r) {
h = 60 * (g - b) / (max - min);
} else if (max === g) {
h = 60 * (2 + (b - r) / (max - min));
} else {
h = 60 * (4 + (r - g) / (max - min));
}
if (h < 0) {
h += 360;
}
l = (max + min) / 2;
if (max === min) {
s = 0;
} else if (l < 0.5) {
s = (max - min) / (max + min);
} else {
s = (max - min) / (2 - max - min);
}
return { h, s: s * 100, l: l * 100, a };
},
hslaToRgba(scolor) {
let { h, s, l, a } = scolor;
h = h / 360;
s = s / 100;
l = l / 100;
var r, g, b;
if (s === 0) {
r = g = b = l;
} else {
let hue2rgb = function(p2, q2, t) {
if (t < 0)
t += 1;
if (t > 1)
t -= 1;
if (t < 1 / 6)
return p2 + (q2 - p2) * 6 * t;
if (t < 1 / 2)
return q2;
if (t < 2 / 3)
return p2 + (q2 - p2) * (2 / 3 - t) * 6;
return p2;
};
var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
var p = 2 * l - q;
r = hue2rgb(p, q, h + 1 / 3);
g = hue2rgb(p, q, h);
b = hue2rgb(p, q, h - 1 / 3);
}
return {
r: Math.round(r * 255),
g: Math.round(g * 255),
b: Math.round(b * 255),
a
};
},
cssToRgba: function(sColor) {
if (!sColor) {
return { r: 0, g: 0, b: 0, a: 0 };
}
let reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
sColor = sColor.toLowerCase();
if (sColor && reg.test(sColor)) {
if (sColor.length === 4) {
let sColorNew = "#";
for (let i = 1; i < 4; i += 1) {
sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
}
sColor = sColorNew;
}
let sColorChange = [];
for (let i = 1; i < 7; i += 2) {
sColorChange.push(parseInt("0x" + sColor.slice(i, i + 2)));
}
return {
r: sColorChange[0],
g: sColorChange[1],
b: sColorChange[2],
a: 1
};
} else if (/^(rgb|RGB|rgba|RGBA)/.test(sColor)) {
let arr = sColor.replace(/(?:\(|\)|rgba|rgb|RGB|RGBA)*/g, "").split(",");
let p = arr.map((val) => Number(val));
if (p.length < 3) {
return {
r: 0,
g: 0,
b: 0,
a: 1
};
}
if (p.length == 3) {
p.push(1);
}
return {
r: p[0],
g: p[1],
b: p[2],
a: p[3]
};
} else {
return {
r: 0,
g: 0,
b: 0,
a: 1
};
}
},
rgbaToHsva: function(rgba2) {
if (!rgba2)
return {
h: 0,
s: 1,
v: 1,
a: 1
};
const r = rgba2.r / 255;
const g = rgba2.g / 255;
const b = rgba2.b / 255;
const max = Math.max(r, g, b);
const min = Math.min(r, g, b);
let h = 0;
if (max !== min) {
if (max === r) {
h = 60 * (0 + (g - b) / (max - min));
} else if (max === g) {
h = 60 * (2 + (b - r) / (max - min));
} else if (max === b) {
h = 60 * (4 + (r - g) / (max - min));
}
}
if (h < 0)
h = h + 360;
const s = max === 0 ? 0 : (max - min) / max;
const hsv = [h, s, max];
return {
h: hsv[0],
s: hsv[1],
v: hsv[2],
a: rgba2.a
};
},
hsvaToRgba: function(sColor) {
var { h, s, v, a } = sColor;
var r = 0;
var g = 0;
var b = 0;
var i;
var f;
var p;
var q;
var t;
i = Math.floor(h * 6);
f = h * 6 - i;
p = v * (1 - s);
q = v * (1 - f * s);
t = v * (1 - (1 - f) * s);
switch (i % 6) {
case 0:
r = v;
g = t;
b = p;
break;
case 1:
r = q;
g = v;
b = p;
break;
case 2:
r = p;
g = v;
b = t;
break;
case 3:
r = p;
g = q;
b = v;
break;
case 4:
r = t;
g = p;
b = v;
break;
case 5:
r = v;
g = p;
b = q;
break;
}
return { r, g, b, a };
},
rgbaToCss: function(sColor) {
return `rgba(${sColor.r},${sColor.g},${sColor.b},${sColor.a})`;
}
};
exports.colortool = colortool;

View File

@ -0,0 +1,461 @@
"use strict";
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var __publicField = (obj, key, value) => {
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
return value;
};
var _a, _b, _c;
const common_vendor = require("../../../common/vendor.js");
const tmui_tool_theme_colortool = require("./colortool.js");
const tmui_tool_lib_interface = require("../lib/interface.js");
let localTheme = {};
let theme = ((_c = (_b = (_a = common_vendor.index) == null ? void 0 : _a.$tm) == null ? void 0 : _b.config) == null ? void 0 : _c.theme) ? __spreadValues({}, common_vendor.index.$tm.config.theme) : localTheme;
var colors = [];
var colorObj = __spreadValues({
red: "#FE1C00",
pink: "#CA145D",
purple: "#A61BC3",
"deep-purple": "#6A0E81",
indigo: "#652DF4",
blue: "#0163FF",
"light-blue": "#0889FF",
cyan: "#11CDE8",
teal: "#00998a",
green: "#5DBD1F",
"light-green": "#83D54A",
lime: "#D4ED00",
yellow: "#FFC400",
amber: "#FFFB01",
orange: "#FEA600",
"deep-orange": "#FE5C00",
brown: "#795548",
"blue-grey": "#607D8B",
grey: "#9E9E9E",
black: "#000000",
white: "#FFFFFF",
primary: "#0163FF",
"grey-5": "#fafafa",
"grey-4": "#f5f5f5",
"grey-3": "#eeeeee",
"grey-2": "#e0e0e0",
"grey-1": "#bdbdbd",
"grey-darken-1": "#757575",
"grey-darken-2": "#616161",
"grey-darken-3": "#404044",
"grey-darken-4": "#202022",
"grey-darken-5": "#111112",
"grey-darken-6": "#0A0A0B"
}, theme);
for (const key in colorObj) {
if (Object.prototype.hasOwnProperty.call(colorObj, key)) {
const element = String(colorObj[key]);
if (isCssColor(element)) {
let rgba = tmui_tool_theme_colortool.colortool.cssToRgba(element);
colors.push({
name: key,
value: element,
hsva: tmui_tool_theme_colortool.colortool.rgbaToHsva(tmui_tool_theme_colortool.colortool.cssToRgba(element)),
rgba: tmui_tool_theme_colortool.colortool.cssToRgba(element),
hsla: tmui_tool_theme_colortool.colortool.rgbaToHsla(rgba),
csscolor: `rgba(${rgba.r},${rgba.g},${rgba.b},${rgba.a})`
});
}
}
}
function isCssColor(color) {
const reg1 = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
const reg2 = /^(rgb|RGB|rgba|RGBA)/;
return reg1.test(color) || reg2.test(color);
}
function getColor(colorName) {
let isHand = colors.findIndex(function(el, index) {
return el.name == colorName;
});
if (isHand == -1) {
colorName = "primary";
isHand = colors.findIndex(function(el, index) {
return el.name == colorName;
});
console.warn("主题中不存在相关名称的主题。");
}
return colors[isHand];
}
class themeColors {
constructor(c = colors) {
__publicField(this, "colors", []);
this.colors = c;
}
hasColors(colorName = "") {
let isHand = this.colors.filter(function(el, index) {
return el.name == colorName;
});
return isHand.length > 0;
}
add(colorName = "", value = "") {
let isHand = this.colors.filter(function(el, index) {
return el.name == colorName;
});
if (isHand.length > 0) {
return this.colors;
}
if (!value) {
console.error("颜色值必填!!!");
return this.colors;
}
let rgba = tmui_tool_theme_colortool.colortool.cssToRgba(value);
let color = {
csscolor: "",
hsva: { h: 0, s: 0, v: 0, a: 0 },
hsla: { h: 0, s: 0, l: 0, a: 0 },
rgba: { r: 0, g: 0, b: 0, a: 0 },
name: colorName,
value
};
color.csscolor = tmui_tool_theme_colortool.colortool.rgbaToCss(rgba);
color.hsva = tmui_tool_theme_colortool.colortool.rgbaToHsva(rgba);
color.rgba = rgba;
color.hsla = tmui_tool_theme_colortool.colortool.rgbaToHsla(rgba);
this.colors.push(color);
return this.colors;
}
del(colorName) {
let isHand = this.colors.findIndex(function(el, index) {
return el.name == colorName;
});
if (isHand == -1) {
console.error("删除失败,主题中不存在相关名称的主题。");
return;
}
this.colors.splice(isHand, 1);
}
getColor(colorName) {
let isHand = this.colors.findIndex(function(el, index) {
return el.name == colorName;
});
if (isHand == -1) {
colorName = "primary";
isHand = this.colors.findIndex(function(el, index) {
return el.name == colorName;
});
console.error("主题中不存在相关名称的主题。");
}
return this.colors[isHand];
}
/**
* 计算主题
* @author tmui3.0|tmzdy
* @param config 样式的细化
* @returns cssstyle 返回一个计算好的主题系
*/
getTheme(config = { colorname: "primary", dark: false }) {
var _a2, _b2, _c2, _d;
if (!config["colorname"]) {
console.error("颜色名称必填");
config.colorname = "primary";
}
let index = this.colors.findIndex((el) => el.name == config.colorname);
if (index == -1) {
console.error("主题不存在默认为primary");
config.colorname = "primary";
}
let nowColor = __spreadValues({}, this.colors[index]);
config.borderWidth = isNaN(parseInt(String(config["borderWidth"]))) ? 0 : (_a2 = config["borderWidth"]) != null ? _a2 : 0;
config.borderStyle = config["borderStyle"] ? config["borderStyle"] : "solid";
config.borderColor = config["borderColor"] || "";
config.borderDirection = config["borderDirection"] || tmui_tool_lib_interface.cssDirection.all;
config.linearDirection = config["linearDirection"] || tmui_tool_lib_interface.linearDirection.none;
config.linearDeep = config["linearDeep"] || tmui_tool_lib_interface.linearDeep.light;
config.shadow = isNaN(parseInt(String(config["shadow"]))) ? 6 : config["shadow"];
config.round = isNaN(parseInt(String(config["round"]))) ? 4 : config["round"];
config.opaticy = isNaN(parseInt(String(config["opaticy"]))) ? 1 : config["opaticy"];
config.outlined = typeof config["outlined"] == "boolean" ? config["outlined"] : false;
config.text = typeof config["text"] == "boolean" ? config["text"] : false;
config.blur = typeof config["blur"] == "boolean" ? config["blur"] : false;
function isDarkColorFun(r, g, b) {
const yiq = (r * 2126 + g * 7152 + b * 722) / 1e4;
return yiq < 180;
}
let isBlack = false;
let isWhite = false;
let isBlackAndWhite = false;
let isGrey = false;
let isDarkColor = false;
isDarkColor = isDarkColorFun(nowColor.rgba.r, nowColor.rgba.g, nowColor.rgba.b);
if (nowColor.hsla.h == 0 && nowColor.hsla.s == 0 && nowColor.hsla.l == 0) {
isBlack = true;
}
if (nowColor.hsla.h == 0 && nowColor.hsla.s == 0 && nowColor.hsla.l == 100) {
isWhite = true;
}
if (nowColor.hsla.h == 0 && nowColor.hsla.s == 0 && nowColor.hsla.l < 100) {
isGrey = true;
}
if (nowColor.hsla.h == 0 && nowColor.hsla.s == 0) {
isBlackAndWhite = true;
}
let css = {};
css.color = nowColor.value;
css.config = __spreadValues({}, config);
css.isBlackAndWhite = isBlackAndWhite;
css.gradientColor = [];
css.colorname = config.colorname;
let borderhsl = __spreadValues({}, nowColor.hsla);
css.borderCss = {};
let bghsl = __spreadValues({}, nowColor.hsla);
if (config.dark && !isBlackAndWhite) {
bghsl.l = 40;
}
if (config.blur) {
bghsl.a = 0.85;
}
css.backgroundColor = tmui_tool_theme_colortool.colortool.rgbaToCss(tmui_tool_theme_colortool.colortool.hslaToRgba(__spreadValues({}, bghsl)));
if (isBlackAndWhite && config.dark) {
css.backgroundColor = tmui_tool_theme_colortool.colortool.rgbaToCss(tmui_tool_theme_colortool.colortool.hslaToRgba(__spreadProps(__spreadValues({}, bghsl), { h: 240, s: 3, l: 8 })));
css.border = tmui_tool_theme_colortool.colortool.rgbaToCss(tmui_tool_theme_colortool.colortool.hslaToRgba(__spreadProps(__spreadValues({}, borderhsl), { h: 240, s: 3, l: 12 })));
}
if (isWhite && !config.dark) {
css.border = tmui_tool_theme_colortool.colortool.rgbaToCss(tmui_tool_theme_colortool.colortool.hslaToRgba(__spreadProps(__spreadValues({}, borderhsl), { l: 90 })));
}
if (isBlack && !config.dark) {
css.border = tmui_tool_theme_colortool.colortool.rgbaToCss(tmui_tool_theme_colortool.colortool.hslaToRgba(__spreadProps(__spreadValues({}, borderhsl), { l: 12 })));
}
css.backgroundColorCss = { "background-color": css.backgroundColor };
let txcolor = __spreadValues({}, nowColor.hsla);
if (config.dark) {
txcolor.l = 95;
} else {
if (isDarkColor) {
txcolor.l = 95;
} else {
if (isGrey) {
txcolor.l = 10;
} else {
txcolor.l = 20;
}
}
}
if (config.outlined) {
txcolor.l = nowColor.hsla.l;
if (config.dark) {
txcolor.l = 55;
} else {
if (nowColor.hsla.h != 0 && nowColor.hsla.s != 0 && !isDarkColorFun(nowColor.rgba.r, nowColor.rgba.g, nowColor.rgba.b)) {
txcolor.l = 20;
}
}
if ((isBlack || isWhite) && config.dark) {
txcolor.l = 100;
}
config.borderWidth = config["borderWidth"] || 2;
let n_hsl = { h: nowColor.hsla.h, s: nowColor.hsla.s, l: 0, a: 0 };
let o_bgcss = tmui_tool_theme_colortool.colortool.rgbaToCss(tmui_tool_theme_colortool.colortool.hslaToRgba(n_hsl));
css.backgroundColor = o_bgcss;
css.backgroundColorCss = { "background-color": o_bgcss };
css.textColor = tmui_tool_theme_colortool.colortool.rgbaToCss(tmui_tool_theme_colortool.colortool.hslaToRgba(txcolor));
}
if (config.text) {
txcolor.l = nowColor.hsla.l;
if (isGrey) {
txcolor.l = 15;
} else {
if (nowColor.hsla.h != 0 && nowColor.hsla.s != 0 && !isDarkColorFun(nowColor.rgba.r, nowColor.rgba.g, nowColor.rgba.b)) {
txcolor.l = 20;
}
}
if (config.dark) {
txcolor.l = 60;
if (!isBlackAndWhite) {
txcolor.s = 100;
}
}
if (isBlack) {
txcolor.l = 90;
}
if (isWhite) {
txcolor.l = 15;
}
if (nowColor.hsla.h == 0 && nowColor.hsla.s == 0 && config.dark) {
txcolor.l = 90;
}
css.textColor = tmui_tool_theme_colortool.colortool.rgbaToCss(tmui_tool_theme_colortool.colortool.hslaToRgba(txcolor));
css.border = css.textColor;
let o_now_bgColor = nowColor.csscolor;
let n_hsl = { h: nowColor.hsla.h, s: nowColor.hsla.s, l: 96, a: nowColor.hsla.a };
if (config.dark) {
if (nowColor.hsla.h != 0 && nowColor.hsla.s != 0) {
n_hsl.l = 12;
n_hsl.s = 35;
} else {
n_hsl.l = 12;
n_hsl.s = 0;
}
}
if (config.blur) {
n_hsl.a = 0.85;
}
o_now_bgColor = tmui_tool_theme_colortool.colortool.rgbaToCss(tmui_tool_theme_colortool.colortool.hslaToRgba(n_hsl));
css.backgroundColor = o_now_bgColor;
css.backgroundColorCss = { "background-color": o_now_bgColor };
}
if (config.shadow) {
let n_hsl = { h: nowColor.hsla.h, s: 100, l: 50, a: 0.2 };
if (nowColor.hsla.h == 0 && nowColor.hsla.s == 0) {
n_hsl = { h: 0, s: 0, l: 20, a: 0.07 };
}
let o_bgcss = tmui_tool_theme_colortool.colortool.rgbaToCss(tmui_tool_theme_colortool.colortool.hslaToRgba(n_hsl));
css.shadowColor = {
boxShadow: `0rpx ${config.shadow * 2.5}rpx ${config.shadow * 6}rpx ${o_bgcss}`
};
}
if (config.linearDirection) {
let liner_color_1 = { h: 0, s: 0, l: 0, a: nowColor.hsla.a };
let liner_color_2 = { h: 0, s: 0, l: 0, a: nowColor.hsla.a };
let dir_str = tmui_tool_lib_interface.linearDirection[config.linearDirection];
let addling = 0;
if (nowColor.hsla.h < 180 && nowColor.hsla.h > 0) {
addling = 20;
} else {
addling = -37;
}
if (nowColor.hsla.h == 0 && nowColor.hsla.s == 0 && nowColor.hsla.l == 100) {
if (config.linearDeep == "light") {
liner_color_1.l = 80;
liner_color_2.l = 20;
} else {
liner_color_1.l = 50;
liner_color_2.l = 40;
}
} else if (nowColor.hsla.h == 0 && nowColor.hsla.s == 0 && nowColor.hsla.l == 0) {
if (config.linearDeep == "light") {
liner_color_1.l = 40;
liner_color_2.l = 10;
} else {
liner_color_1.l = 30;
liner_color_2.l = 0;
}
} else {
liner_color_2.h = nowColor.hsla.h;
liner_color_2.s = nowColor.hsla.s;
liner_color_1.h = nowColor.hsla.h;
liner_color_1.s = nowColor.hsla.s;
if (config.linearDeep == "light") {
liner_color_1.h = liner_color_1.h;
liner_color_1.s = 90;
liner_color_1.l = 70;
liner_color_2.l = 44;
} else if (config.linearDeep == "dark") {
liner_color_2.s = 90;
liner_color_2.l = 26;
liner_color_1.s = 90;
liner_color_1.l = 50;
} else if (config.linearDeep == "accent") {
liner_color_1.h -= 0;
liner_color_1.s = 90;
liner_color_1.l = 54;
liner_color_2.h -= addling;
liner_color_2.s = 90;
liner_color_2.l = 54;
}
}
if (config.dark) {
liner_color_1.l = 40;
liner_color_2.l = 40;
txcolor.l = 90;
}
let color_t_1 = tmui_tool_theme_colortool.colortool.rgbaToCss(tmui_tool_theme_colortool.colortool.hslaToRgba(liner_color_1));
let color_t_2 = tmui_tool_theme_colortool.colortool.rgbaToCss(tmui_tool_theme_colortool.colortool.hslaToRgba(liner_color_2));
if (!config.text && !config.outlined) {
css.backgroundColorCss = { "background-image": `linear-gradient(${dir_str},${color_t_1},${color_t_2})` };
let newBgcolor = {
h: (liner_color_1.h + liner_color_2.h) / 2,
s: (liner_color_1.s + liner_color_2.s) / 2,
l: (liner_color_1.l + liner_color_2.l) / 2,
a: (liner_color_1.a + liner_color_2.a) / 2
};
let newBgcolorRgb = tmui_tool_theme_colortool.colortool.hslaToRgba(newBgcolor);
if (!config.dark) {
if (!isDarkColorFun(newBgcolorRgb.r, newBgcolorRgb.g, newBgcolorRgb.b) && nowColor.hsla.h != 0 && nowColor.hsla.s != 0) {
txcolor.l = 20;
}
}
css.backgroundColor = tmui_tool_theme_colortool.colortool.rgbaToCss(tmui_tool_theme_colortool.colortool.hslaToRgba(newBgcolor));
css.gradientColor = [color_t_1, color_t_2];
css.linearDirectionStr = dir_str;
}
}
if (config.dark == true) {
css = __spreadValues(__spreadValues({}, css), (_d = (_c2 = (_b2 = common_vendor.index.$tm.config) == null ? void 0 : _b2.themeConfig) == null ? void 0 : _c2.dark) != null ? _d : {});
}
css.textColor = tmui_tool_theme_colortool.colortool.rgbaToCss(tmui_tool_theme_colortool.colortool.hslaToRgba(txcolor));
if (config.dark) {
if (nowColor.hsla.h == 0 && nowColor.hsla.s == 0) {
css.border = tmui_tool_theme_colortool.colortool.rgbaToCss(tmui_tool_theme_colortool.colortool.hslaToRgba(__spreadProps(__spreadValues({}, nowColor.hsla), { l: 12 })));
} else {
css.border = tmui_tool_theme_colortool.colortool.rgbaToCss(tmui_tool_theme_colortool.colortool.hslaToRgba(__spreadProps(__spreadValues({}, nowColor.hsla), { l: bghsl.l + 10 })));
}
} else {
if (nowColor.hsla.h == 0 && nowColor.hsla.s == 0) {
css.border = tmui_tool_theme_colortool.colortool.rgbaToCss(tmui_tool_theme_colortool.colortool.hslaToRgba(__spreadProps(__spreadValues({}, nowColor.hsla), { l: 90 })));
} else {
if (config.text && config.outlined) {
css.border = tmui_tool_theme_colortool.colortool.rgbaToCss(tmui_tool_theme_colortool.colortool.hslaToRgba(__spreadProps(__spreadValues({}, nowColor.hsla), { l: 90 })));
} else if (!config.text && config.outlined) {
css.border = tmui_tool_theme_colortool.colortool.rgbaToCss(tmui_tool_theme_colortool.colortool.hslaToRgba(__spreadValues({}, txcolor)));
} else if (!config.text && !config.outlined && config.borderWidth > 0) {
css.border = tmui_tool_theme_colortool.colortool.rgbaToCss(tmui_tool_theme_colortool.colortool.hslaToRgba(__spreadProps(__spreadValues({}, nowColor.hsla), { l: bghsl.l - 3 })));
}
}
css.border = config.borderColor || css.border;
}
let bcss = `${config.borderWidth}rpx ${config.borderStyle} ${css.border}`;
if (config.borderDirection == "all") {
css.borderCss[`border`] = bcss;
} else if (config.borderDirection == "x" || config.borderDirection == "leftright") {
css.borderCss[`border-left`] = bcss;
css.borderCss[`border-right`] = bcss;
} else if (config.borderDirection == "y" || config.borderDirection == "topbottom") {
css.borderCss[`border-top`] = bcss;
css.borderCss[`border-bottom`] = bcss;
} else if (config.borderDirection == "bottomleft") {
css.borderCss[`border-left`] = bcss;
css.borderCss[`border-bottom`] = bcss;
} else if (config.borderDirection == "bottomright") {
css.borderCss[`border-right`] = bcss;
css.borderCss[`border-bottom`] = bcss;
} else if (config.borderDirection == "topleft") {
css.borderCss[`border-left`] = bcss;
css.borderCss[`border-top`] = bcss;
} else if (config.borderDirection == "topright") {
css.borderCss[`border-right`] = bcss;
css.borderCss[`border-top`] = bcss;
} else {
let str = "-" + config.borderDirection;
css.borderCss[`border${str}`] = bcss;
}
return css;
}
}
const theme$1 = {
isCssColor,
themeColors,
getColor
};
exports.theme = theme$1;

View File

@ -0,0 +1,157 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
const common_vendor = require("../../../common/vendor.js");
const tmui_tool_function_util = require("../function/util.js");
const tmui_tool_theme_theme = require("../theme/theme.js");
const useTheme = (props, store) => {
var _a, _b;
let dark = common_vendor.ref(false);
let isNvue = common_vendor.ref(false);
let customCSSStyle = common_vendor.ref({});
let parentClass = common_vendor.ref("");
let transparent = common_vendor.ref(false);
let blur = common_vendor.ref(false);
let customClass = common_vendor.ref("");
let margin = common_vendor.ref([]);
let padding = common_vendor.ref([]);
let round = common_vendor.ref("");
let theme = common_vendor.ref(computedTheme(props.value, dark.value, store.value));
let customThemeConfig = {};
common_vendor.watchEffect(() => {
var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
const followDark = props.value.followDark;
let lsdark = props.value.dark;
if (followDark) {
lsdark = store.value.dark;
}
dark.value = lsdark;
if (store.value.os == "android" && isNvue.value) {
blur.value = false;
} else {
blur.value = (_b2 = (_a2 = props.value) == null ? void 0 : _a2.blur) != null ? _b2 : false;
}
customCSSStyle.value = computedStyle((_c = props.value) == null ? void 0 : _c._style);
parentClass.value = ((_d = props.value) == null ? void 0 : _d.parenClass) || ((_e = props.value) == null ? void 0 : _e.parentClass) || "";
transparent.value = ((_h = (_f = props.value) == null ? void 0 : _f.transprent) != null ? _h : (_g = props.value) == null ? void 0 : _g.transparent) || false;
customClass.value = computedClas((_j = (_i = props.value) == null ? void 0 : _i._class) != null ? _j : "");
margin.value = tmui_tool_function_util.valToMarginAr((_l = (_k = props.value) == null ? void 0 : _k.margin) != null ? _l : null);
padding.value = tmui_tool_function_util.valToMarginAr((_n = (_m = props.value) == null ? void 0 : _m.padding) != null ? _n : null);
round.value = tmui_tool_function_util.valToRoundStrClass((_p = (_o = props.value) == null ? void 0 : _o.round) != null ? _p : "");
theme.value = computedTheme(__spreadValues(__spreadValues({}, props.value), customThemeConfig), dark.value, store.value);
});
return {
dark,
isNvue,
round,
padding,
margin,
customCSSStyle,
theme: (config = {}) => {
for (let key in config) {
if (config[key] !== null) {
customThemeConfig[key] = config[key];
}
}
return theme;
},
customClass,
parentClass,
transparent,
_props: props,
proxy: (_b = (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.proxy) != null ? _b : null,
blur
};
};
function computedStyle(_style) {
if (typeof _style == "string") {
let p = _style.split(";");
let k = p.map((el) => {
el = el.replace(";", "");
let node = {};
let idx = el.split(":");
node[idx[0]] = idx[1];
return node;
});
let kl = {};
k.forEach((el) => {
kl = __spreadValues(__spreadValues({}, kl), el);
});
return kl;
}
if (typeof _style == "object" && !Array.isArray(_style)) {
return _style;
}
if (typeof _style == "object" && Array.isArray(_style)) {
let kl = {};
_style.forEach((el) => {
kl = __spreadValues(__spreadValues({}, kl), el);
});
return kl;
}
return {};
}
function computedClas(_class) {
if (typeof _class == "string") {
return _class;
}
if (Array.isArray(_class)) {
return _class.join(" ");
}
return "";
}
function computedTheme(props, dark, store) {
var _a;
const color = props.color;
const border = props.border;
const shadow = props.shadow;
const round = props.round;
const outlined = props.outlined;
const text = props.text;
const borderStyle = props.borderStyle;
const borderDirection = props.borderDirection;
const linear = props.linear;
const linearDeep2 = props.linearDeep;
const blur = props.blur;
var borderColor = (_a = props == null ? void 0 : props.borderColor) != null ? _a : "";
var theme = new tmui_tool_theme_theme.theme.themeColors(store.colorList);
if (tmui_tool_theme_theme.theme.isCssColor(color) && !theme.hasColors(color)) {
theme = new tmui_tool_theme_theme.theme.themeColors(theme.add(color, color));
}
let defaultColorName = color || "primary";
if ((props == null ? void 0 : props.followTheme) == true && store.color) {
defaultColorName = store.color;
borderColor = "";
}
let c = theme.getTheme({
colorname: defaultColorName,
dark,
borderWidth: border,
shadow: parseInt(String(shadow)),
round: parseInt(String(round)),
outlined,
text,
borderStyle,
borderDirection,
linearDirection: linear,
linearDeep: linearDeep2,
blur,
borderColor
});
return c;
}
exports.useTheme = useTheme;

View File

@ -0,0 +1,34 @@
"use strict";
const common_vendor = require("../../../common/vendor.js");
const useWindowInfo = () => {
let winSize = common_vendor.reactive({
top: 0,
topSafe: 0,
width: common_vendor.index.upx2px(750),
height: common_vendor.index.upx2px(750),
statusBar: 24,
navigatorBar: 44,
bottomSafe: 0,
nvue: false,
// 是否存在系统自带的状态栏针对h5优化。
h5IsSystemBar: true
});
function init() {
var _a, _b, _c, _d, _e, _f, _g, _h;
let sysinfo = common_vendor.index.getSystemInfoSync();
winSize.topSafe = ((_a = sysinfo == null ? void 0 : sysinfo.statusBarHeight) != null ? _a : 24) + ((_b = sysinfo == null ? void 0 : sysinfo.navigationBarHeight) != null ? _b : 44);
winSize.width = (_c = sysinfo == null ? void 0 : sysinfo.windowWidth) != null ? _c : common_vendor.index.upx2px(750);
winSize.height = (_d = sysinfo == null ? void 0 : sysinfo.windowHeight) != null ? _d : common_vendor.index.upx2px(750);
winSize.statusBar = (_e = sysinfo == null ? void 0 : sysinfo.statusBarHeight) != null ? _e : 24;
winSize.navigatorBar = (_f = sysinfo == null ? void 0 : sysinfo.navigationBarHeight) != null ? _f : 44;
winSize.bottomSafe = (_h = (_g = sysinfo.safeAreaInsets) == null ? void 0 : _g.bottom) != null ? _h : 0;
}
init();
common_vendor.onMounted(() => {
setTimeout(() => {
init();
}, 0);
});
return winSize;
};
exports.useWindowInfo = useWindowInfo;

18
index.html Normal file
View File

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
<title></title>
<!--preload-links-->
<!--app-context-->
</head>
<body>
<div id="app"><!--app-html--></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>

12
node_modules/.bin/acorn generated vendored Normal file
View File

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../acorn/bin/acorn" "$@"
else
exec node "$basedir/../acorn/bin/acorn" "$@"
fi

17
node_modules/.bin/acorn.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\acorn\bin\acorn" %*

28
node_modules/.bin/acorn.ps1 generated vendored Normal file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args
} else {
& "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../acorn/bin/acorn" $args
} else {
& "node$exe" "$basedir/../acorn/bin/acorn" $args
}
$ret=$LASTEXITCODE
}
exit $ret

12
node_modules/.bin/autoprefixer generated vendored Normal file
View File

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../autoprefixer/bin/autoprefixer" "$@"
else
exec node "$basedir/../autoprefixer/bin/autoprefixer" "$@"
fi

17
node_modules/.bin/autoprefixer.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\autoprefixer\bin\autoprefixer" %*

28
node_modules/.bin/autoprefixer.ps1 generated vendored Normal file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../autoprefixer/bin/autoprefixer" $args
} else {
& "$basedir/node$exe" "$basedir/../autoprefixer/bin/autoprefixer" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../autoprefixer/bin/autoprefixer" $args
} else {
& "node$exe" "$basedir/../autoprefixer/bin/autoprefixer" $args
}
$ret=$LASTEXITCODE
}
exit $ret

12
node_modules/.bin/browserslist generated vendored Normal file
View File

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../browserslist/cli.js" "$@"
else
exec node "$basedir/../browserslist/cli.js" "$@"
fi

17
node_modules/.bin/browserslist.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\browserslist\cli.js" %*

28
node_modules/.bin/browserslist.ps1 generated vendored Normal file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../browserslist/cli.js" $args
} else {
& "$basedir/node$exe" "$basedir/../browserslist/cli.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../browserslist/cli.js" $args
} else {
& "node$exe" "$basedir/../browserslist/cli.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

12
node_modules/.bin/cross-env generated vendored Normal file
View File

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../cross-env/src/bin/cross-env.js" "$@"
else
exec node "$basedir/../cross-env/src/bin/cross-env.js" "$@"
fi

12
node_modules/.bin/cross-env-shell generated vendored Normal file
View File

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../cross-env/src/bin/cross-env-shell.js" "$@"
else
exec node "$basedir/../cross-env/src/bin/cross-env-shell.js" "$@"
fi

17
node_modules/.bin/cross-env-shell.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\cross-env\src\bin\cross-env-shell.js" %*

28
node_modules/.bin/cross-env-shell.ps1 generated vendored Normal file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../cross-env/src/bin/cross-env-shell.js" $args
} else {
& "$basedir/node$exe" "$basedir/../cross-env/src/bin/cross-env-shell.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../cross-env/src/bin/cross-env-shell.js" $args
} else {
& "node$exe" "$basedir/../cross-env/src/bin/cross-env-shell.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

17
node_modules/.bin/cross-env.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\cross-env\src\bin\cross-env.js" %*

28
node_modules/.bin/cross-env.ps1 generated vendored Normal file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../cross-env/src/bin/cross-env.js" $args
} else {
& "$basedir/node$exe" "$basedir/../cross-env/src/bin/cross-env.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../cross-env/src/bin/cross-env.js" $args
} else {
& "node$exe" "$basedir/../cross-env/src/bin/cross-env.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

12
node_modules/.bin/cssesc generated vendored Normal file
View File

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../cssesc/bin/cssesc" "$@"
else
exec node "$basedir/../cssesc/bin/cssesc" "$@"
fi

17
node_modules/.bin/cssesc.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\cssesc\bin\cssesc" %*

28
node_modules/.bin/cssesc.ps1 generated vendored Normal file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../cssesc/bin/cssesc" $args
} else {
& "$basedir/node$exe" "$basedir/../cssesc/bin/cssesc" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../cssesc/bin/cssesc" $args
} else {
& "node$exe" "$basedir/../cssesc/bin/cssesc" $args
}
$ret=$LASTEXITCODE
}
exit $ret

12
node_modules/.bin/esbuild generated vendored Normal file
View File

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../esbuild/bin/esbuild" "$@"
else
exec node "$basedir/../esbuild/bin/esbuild" "$@"
fi

17
node_modules/.bin/esbuild.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\esbuild\bin\esbuild" %*

28
node_modules/.bin/esbuild.ps1 generated vendored Normal file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../esbuild/bin/esbuild" $args
} else {
& "$basedir/node$exe" "$basedir/../esbuild/bin/esbuild" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../esbuild/bin/esbuild" $args
} else {
& "node$exe" "$basedir/../esbuild/bin/esbuild" $args
}
$ret=$LASTEXITCODE
}
exit $ret

12
node_modules/.bin/escodegen generated vendored Normal file
View File

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../escodegen/bin/escodegen.js" "$@"
else
exec node "$basedir/../escodegen/bin/escodegen.js" "$@"
fi

17
node_modules/.bin/escodegen.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\escodegen\bin\escodegen.js" %*

28
node_modules/.bin/escodegen.ps1 generated vendored Normal file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../escodegen/bin/escodegen.js" $args
} else {
& "$basedir/node$exe" "$basedir/../escodegen/bin/escodegen.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../escodegen/bin/escodegen.js" $args
} else {
& "node$exe" "$basedir/../escodegen/bin/escodegen.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

12
node_modules/.bin/esgenerate generated vendored Normal file
View File

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../escodegen/bin/esgenerate.js" "$@"
else
exec node "$basedir/../escodegen/bin/esgenerate.js" "$@"
fi

17
node_modules/.bin/esgenerate.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\escodegen\bin\esgenerate.js" %*

28
node_modules/.bin/esgenerate.ps1 generated vendored Normal file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../escodegen/bin/esgenerate.js" $args
} else {
& "$basedir/node$exe" "$basedir/../escodegen/bin/esgenerate.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../escodegen/bin/esgenerate.js" $args
} else {
& "node$exe" "$basedir/../escodegen/bin/esgenerate.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret

12
node_modules/.bin/esparse generated vendored Normal file
View File

@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../esprima/bin/esparse.js" "$@"
else
exec node "$basedir/../esprima/bin/esparse.js" "$@"
fi

17
node_modules/.bin/esparse.cmd generated vendored Normal file
View File

@ -0,0 +1,17 @@
@ECHO off
GOTO start
:find_dp0
SET dp0=%~dp0
EXIT /b
:start
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\esprima\bin\esparse.js" %*

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