适配小程序代码结构
This commit is contained in:
48
unpackage/dist/dev/mp-weixin/pages/speaking_training_edu/components/DeviceTab.js
vendored
Normal file
48
unpackage/dist/dev/mp-weixin/pages/speaking_training_edu/components/DeviceTab.js
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const DeviceListPopup = () => "../../ucenter/components/DeviceListPopup.js";
|
||||
const _sfc_main = {
|
||||
name: "DeviceTab",
|
||||
components: {
|
||||
DeviceListPopup
|
||||
},
|
||||
methods: {
|
||||
// 打开设备列表弹窗
|
||||
openDeviceList() {
|
||||
if (this.$refs.deviceListPopup) {
|
||||
this.$refs.deviceListPopup.open();
|
||||
}
|
||||
},
|
||||
// 对外暴露的"加载更多"方法,供页面 onReachBottom 调用(保留接口兼容性)
|
||||
loadMore() {
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
|
||||
const _component_DeviceListPopup = common_vendor.resolveComponent("DeviceListPopup");
|
||||
(_easycom_uni_icons2 + _component_DeviceListPopup)();
|
||||
}
|
||||
const _easycom_uni_icons = () => "../../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
|
||||
if (!Math) {
|
||||
_easycom_uni_icons();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.p({
|
||||
type: "list",
|
||||
size: "24",
|
||||
color: "#2A68FF"
|
||||
}),
|
||||
b: common_vendor.p({
|
||||
type: "right",
|
||||
size: "16",
|
||||
color: "#999"
|
||||
}),
|
||||
c: common_vendor.o((...args) => $options.openDeviceList && $options.openDeviceList(...args)),
|
||||
d: common_vendor.sr("deviceListPopup", "2243c9b8-2")
|
||||
};
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/speaking_training_edu/components/DeviceTab.js.map
|
||||
7
unpackage/dist/dev/mp-weixin/pages/speaking_training_edu/components/DeviceTab.json
vendored
Normal file
7
unpackage/dist/dev/mp-weixin/pages/speaking_training_edu/components/DeviceTab.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"device-list-popup": "../../ucenter/components/DeviceListPopup",
|
||||
"uni-icons": "../../../uni_modules/uni-icons/components/uni-icons/uni-icons"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/speaking_training_edu/components/DeviceTab.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/speaking_training_edu/components/DeviceTab.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="device-tab"><view class="device-entry" bindtap="{{c}}"><view class="entry-content"><uni-icons wx:if="{{a}}" u-i="2243c9b8-0" bind:__l="__l" u-p="{{a}}"/><text class="entry-text">查看设备列表</text></view><uni-icons wx:if="{{b}}" u-i="2243c9b8-1" bind:__l="__l" u-p="{{b}}"/></view><device-list-popup class="r" u-r="deviceListPopup" u-i="2243c9b8-2" bind:__l="__l"/></view>
|
||||
27
unpackage/dist/dev/mp-weixin/pages/speaking_training_edu/components/DeviceTab.wxss
vendored
Normal file
27
unpackage/dist/dev/mp-weixin/pages/speaking_training_edu/components/DeviceTab.wxss
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
.device-tab {
|
||||
padding: 148rpx 32rpx 32rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #f5f5f5;
|
||||
min-height: 100vh;
|
||||
}
|
||||
.device-entry {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 32rpx 24rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 16rpx;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.03);
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
.entry-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.entry-text {
|
||||
margin-left: 16rpx;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
}
|
||||
11
unpackage/dist/dev/mp-weixin/pages/speaking_training_edu/components/HomeworkTab.js
vendored
Normal file
11
unpackage/dist/dev/mp-weixin/pages/speaking_training_edu/components/HomeworkTab.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
name: "HomeworkTab"
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {};
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/speaking_training_edu/components/HomeworkTab.js.map
|
||||
4
unpackage/dist/dev/mp-weixin/pages/speaking_training_edu/components/HomeworkTab.json
vendored
Normal file
4
unpackage/dist/dev/mp-weixin/pages/speaking_training_edu/components/HomeworkTab.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/speaking_training_edu/components/HomeworkTab.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/speaking_training_edu/components/HomeworkTab.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<scroll-view class="tab-content" scroll-y><view class="section"><text class="section-title">作业列表</text><view class="placeholder-box"><text class="placeholder-text"> 这里展示布置 / 提交的作业记录(待接入接口) </text></view></view><view class="section"><text class="section-title">常用操作</text><view class="btn-row"><button class="primary-btn" type="primary" size="mini"> 布置作业 </button><button class="outline-btn" type="default" size="mini"> 批改作业 </button></view></view></scroll-view>
|
||||
37
unpackage/dist/dev/mp-weixin/pages/speaking_training_edu/components/HomeworkTab.wxss
vendored
Normal file
37
unpackage/dist/dev/mp-weixin/pages/speaking_training_edu/components/HomeworkTab.wxss
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
|
||||
.tab-content {
|
||||
padding: 148rpx 32rpx 32rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.section {
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
.section-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
margin-bottom: 16rpx;
|
||||
display: block;
|
||||
}
|
||||
.placeholder-box {
|
||||
padding: 40rpx 32rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 16rpx;
|
||||
border: 1px dashed #e0e0e0;
|
||||
}
|
||||
.placeholder-text {
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
}
|
||||
.btn-row {
|
||||
flex-direction: row;
|
||||
display: flex;
|
||||
gap: 24rpx;
|
||||
}
|
||||
.primary-btn {
|
||||
background-color: #007aff;
|
||||
border-radius: 999rpx;
|
||||
}
|
||||
.outline-btn {
|
||||
border-radius: 999rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user