Commit 76427263 by Jaxon

style: 格式化 WXML/WXSS/JSON 文件并优化 Prettier 配置

- 添加 .json 文件到 Prettier 格式化范围
- 统一 WXML 属性换行和缩进风格
- 优化 WXSS 选择器和属性格式
- 调整 JSON 文件缩进为制表符
- 更新 Prettier 插件处理 WXML 内联表达式逻辑
- 扩展 ESLint 配置支持更多小程序文件类型
- 改进样式检查配置支持 BEM 和下划线命名
- 统一 VSCode 设置中格式化工具配置
1 parent b891c63b
Showing 43 changed files with 967 additions and 704 deletions
...@@ -9,3 +9,4 @@ uni_modules ...@@ -9,3 +9,4 @@ uni_modules
# 只格式化 wxml # 只格式化 wxml
!*.wxml !*.wxml
!*.json
...@@ -41,10 +41,16 @@ ...@@ -41,10 +41,16 @@
"editor.defaultFormatter": "dbaeumer.vscode-eslint" "editor.defaultFormatter": "dbaeumer.vscode-eslint"
}, },
"[css]": { "[css]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint" "editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[wxss]": {
"editor.defaultFormatter": "stylelint.vscode-stylelint"
}, },
"[scss]": { "[scss]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint" "editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[less]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}, },
"[javascript]": { "[javascript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint" "editor.defaultFormatter": "dbaeumer.vscode-eslint"
...@@ -52,9 +58,6 @@ ...@@ -52,9 +58,6 @@
"[typescript]": { "[typescript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint" "editor.defaultFormatter": "dbaeumer.vscode-eslint"
}, },
"[json]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[markdown]": { "[markdown]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint" "editor.defaultFormatter": "dbaeumer.vscode-eslint"
}, },
...@@ -67,6 +70,9 @@ ...@@ -67,6 +70,9 @@
"[wxml]": { "[wxml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode" "editor.defaultFormatter": "esbenp.prettier-vscode"
}, },
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
// extensions // extensions
"extensions.ignoreRecommendations": true, "extensions.ignoreRecommendations": true,
...@@ -118,7 +124,7 @@ ...@@ -118,7 +124,7 @@
"**/yarn.lock": true "**/yarn.lock": true
}, },
"typescript.tsserver.exclude": ["**/node_modules", "**/dist", "**/.turbo","**/uni_modules","**/miniprogram_npm"], "typescript.tsserver.exclude": ["**/node_modules", "**/dist", "**/.turbo", "**/uni_modules", "**/miniprogram_npm"],
// search // search
"search.searchEditor.singleClickBehaviour": "peekDefinition", "search.searchEditor.singleClickBehaviour": "peekDefinition",
...@@ -169,9 +175,11 @@ ...@@ -169,9 +175,11 @@
"stylelint.enable": true, "stylelint.enable": true,
"stylelint.packageManager": "pnpm", "stylelint.packageManager": "pnpm",
"stylelint.validate": ["css", "less", "postcss", "scss", "vue","wxss"], "stylelint.validate": ["css", "less", "postcss", "scss", "vue", "wxss"],
"stylelint.customSyntax": "postcss-html", "stylelint.snippet": ["css", "less", "postcss", "scss", "vue", "wxss"],
"stylelint.snippet": ["css", "less", "postcss", "scss", "vue","wxss"], "stylelint.reportInvalidScopeDisables": true,
"stylelint.reportNeedlessDisables": true,
"stylelint.runtimeEnvironment": "node",
"typescript.inlayHints.enumMemberValues.enabled": true, "typescript.inlayHints.enumMemberValues.enabled": true,
"typescript.preferences.preferTypeOnlyAutoImports": true, "typescript.preferences.preferTypeOnlyAutoImports": true,
......
.btn-add-box-popup .t { .btn-add-box-popup .t {
font-size: 36rpx; height: 88rpx;
text-align: center; font-size: 36rpx;
height: 88rpx; font-weight: bold;
line-height: 88rpx; line-height: 88rpx;
font-weight: bold; text-align: center;
} }
.btn-add-box-popup .bd { .btn-add-box-popup .bd {
padding: 0 32rpx; padding: 0 32rpx;
padding-bottom: 32rpx; padding-bottom: 32rpx;
} }
.btn-add-box-popup .del-btn { .btn-add-box-popup .del-btn {
margin-top: 32rpx; margin-top: 32rpx;
} }
.content { .content {
...@@ -19,14 +21,17 @@ ...@@ -19,14 +21,17 @@
font-size: 32rpx; font-size: 32rpx;
line-height: 54rpx; line-height: 54rpx;
} }
.link { .link {
color: #10AEFF; color: #10aeff;
} }
.btn-group { .btn-group {
padding: 32rpx; display: flex;
display: flex; justify-content: space-around;
justify-content: space-around; padding: 32rpx;
} }
.mt32 { .mt32 {
margin-top: 32rpx; margin-top: 32rpx;
}
\ No newline at end of file \ No newline at end of file
}
/* pages/order-list/cps.wxss */
\ No newline at end of file \ No newline at end of file
/* pages/order-list/cps.wxss */
<canvas canvas-id="bubble" style="width:{{width}}px;height:{{height}}px" class="like-fx" ></canvas>
\ No newline at end of file \ No newline at end of file
<canvas canvas-id="bubble"
style="width:{{ width }}px;height:{{ height }}px"
class="like-fx"></canvas>
<view class="page-container"> <view class="page-container">
<!-- 快捷功能 --> <!-- 快捷功能 -->
<block wx:if="{{!id && provinces}}"> <block wx:if="{{ !id && provinces }}">
<view class="quick-action-card"> <view class="quick-action-card">
<view class="quick-action-btn" bindtap="readFromWx"> <view class="quick-action-btn" bindtap="readFromWx">
<view class="quick-icon">📍</view> <view class="quick-icon">📍</view>
<view class="quick-text"> <view class="quick-text">
<view class="quick-title">一键导入</view> <view class="quick-title">一键导入</view>
<view class="quick-desc">使用微信收货地址</view> <view class="quick-desc">使用微信收货地址</view>
</view> </view>
<view class="quick-arrow">›</view> <view class="quick-arrow">›</view>
</view> </view>
</view> </view>
</block> </block>
<!-- 地址信息卡片 -->
<!-- 地址信息卡片 --> <view class="form-card">
<view class="form-card"> <view class="card-title">
<view class="card-title"> <view class="title-icon">📮</view>
<view class="title-icon">📮</view> <text>收货地址</text>
<text>收货地址</text> </view>
</view> <view class="form-section">
<picker bindchange="provinceChange"
<view class="form-section"> value="{{ pIndex }}"
<picker bindchange="provinceChange" value="{{pIndex}}" range="{{provinces}}" range-key="name"> range="{{ provinces }}"
<van-cell custom-class="custom-cell" title="省份" value="{{provinces[pIndex].name}}" is-link /> range-key="name">
</picker> <van-cell custom-class="custom-cell"
<picker wx:if="{{cities}}" bindchange="cityChange" value="{{cIndex}}" range="{{cities}}" range-key="name"> title="省份"
<van-cell custom-class="custom-cell" title="城市" value="{{cities[cIndex].name}}" is-link /> value="{{ provinces[pIndex].name }}"
</picker> is-link />
<picker wx:if="{{areas}}" bindchange="areaChange" value="{{aIndex}}" range="{{areas}}" range-key="name"> </picker>
<van-cell custom-class="custom-cell" title="区县" value="{{areas[aIndex].name}}" is-link /> <picker wx:if="{{ cities }}"
</picker> bindchange="cityChange"
<picker wx:if="{{streets}}" bindchange="streetChange" value="{{sIndex}}" range="{{streets}}" range-key="name"> value="{{ cIndex }}"
<van-cell custom-class="custom-cell" title="街道/镇" value="{{streets[sIndex].name}}" is-link /> range="{{ cities }}"
</picker> range-key="name">
<picker wx:if="{{communities}}" bindchange="communityChange" value="{{ccIndex}}" range="{{communities}}" range-key="name"> <van-cell custom-class="custom-cell"
<van-cell custom-class="custom-cell" title="社区/村委会" value="{{communities[ccIndex].name}}" is-link /> title="城市"
</picker> value="{{ cities[cIndex].name }}"
<van-field is-link />
custom-class="custom-field" </picker>
label="详细地址" <picker wx:if="{{ areas }}"
model:value="{{ address }}" bindchange="areaChange"
placeholder="如街道、楼栋号、门牌号等" value="{{ aIndex }}"
input-align="right" range="{{ areas }}"
clearable range-key="name">
type="textarea" <van-cell custom-class="custom-cell"
autosize title="区县"
/> value="{{ areas[aIndex].name }}"
<van-cell wx:if="{{ shipping_address_gps === '1' }}" custom-class="custom-cell" title="GPS定位" value="{{ addressData.latitude ? '已定位' : '点击定位' }}" is-link bind:click="chooseLocation" /> is-link />
</view> </picker>
</view> <picker wx:if="{{ streets }}"
bindchange="streetChange"
<!-- 联系人信息卡片 --> value="{{ sIndex }}"
<view class="form-card"> range="{{ streets }}"
<view class="card-title"> range-key="name">
<view class="title-icon">👤</view> <van-cell custom-class="custom-cell"
<text>联系人信息</text> title="街道/镇"
</view> value="{{ streets[sIndex].name }}"
is-link />
<view class="form-section"> </picker>
<van-field <picker wx:if="{{ communities }}"
custom-class="custom-field" bindchange="communityChange"
label="收货人" value="{{ ccIndex }}"
model:value="{{ linkMan }}" range="{{ communities }}"
placeholder="请输入收货人姓名" range-key="name">
input-align="right" <van-cell custom-class="custom-cell"
clearable title="社区/村委会"
/> value="{{ communities[ccIndex].name }}"
<van-field is-link />
custom-class="custom-field" </picker>
label="手机号码" <van-field custom-class="custom-field"
model:value="{{ mobile }}" label="详细地址"
placeholder="请输入11位手机号" model:value="{{ address }}"
input-align="right" placeholder="如街道、楼栋号、门牌号等"
type="number" input-align="right"
clearable clearable
/> type="textarea"
</view> autosize />
</view> <van-cell wx:if="{{ shipping_address_gps === '1' }}"
custom-class="custom-cell"
<!-- 底部操作按钮 --> title="GPS定位"
<view class="bottom-actions"> value="{{ addressData.latitude ? '已定位' : '点击定位' }}"
<button class="save-btn primary-btn" bindtap="bindSave"> is-link
<text class="btn-text">保存地址</text> bind:click="chooseLocation" />
</button> </view>
<button class="save-btn danger-btn" bindtap="deleteAddress" data-id="{{id}}" wx:if="{{id}}"> </view>
<text class="btn-text">删除地址</text> <!-- 联系人信息卡片 -->
</button> <view class="form-card">
</view> <view class="card-title">
<view class="title-icon">👤</view>
<!-- 底部安全区域 --> <text>联系人信息</text>
<view class="safe-area-bottom"></view> </view>
<view class="form-section">
<van-field custom-class="custom-field"
label="收货人"
model:value="{{ linkMan }}"
placeholder="请输入收货人姓名"
input-align="right"
clearable />
<van-field custom-class="custom-field"
label="手机号码"
model:value="{{ mobile }}"
placeholder="请输入11位手机号"
input-align="right"
type="number"
clearable />
</view>
</view>
<!-- 底部操作按钮 -->
<view class="bottom-actions">
<button class="save-btn primary-btn" bindtap="bindSave">
<text class="btn-text">
保存地址
</text>
</button>
<button class="save-btn danger-btn"
bindtap="deleteAddress"
data-id="{{ id }}"
wx:if="{{ id }}">
<text class="btn-text">
删除地址
</text>
</button>
</view>
<!-- 底部安全区域 -->
<view class="safe-area-bottom"></view>
</view> </view>
<import src="/template/login/index.wxml" /> <import src="/template/login/index.wxml" />
<view class="asset-container"> <view class="asset-container">
<!-- 顶部装饰背景 --> <!-- 顶部装饰背景 -->
<view class="header-bg"> <view class="header-bg">
<view class="bg-circle circle-1"></view> <view class="bg-circle circle-1">
<view class="bg-circle circle-2"></view> </view>
<view class="bg-circle circle-3"></view> <view class="bg-circle circle-2">
</view> </view>
<view class="bg-circle circle-3">
<!-- 资产卡片 --> </view>
<view class="asset-card"> </view>
<view class="asset-header"> <!-- 资产卡片 -->
<view class="header-title">我的资产</view> <view class="asset-card">
<view class="header-subtitle">Asset Overview</view> <view class="asset-header">
</view> <view class="header-title">
我的资产
<view class="balance-main"> </view>
<view class="balance-label">可用余额(元)</view> <view class="header-subtitle">
<view class="balance-amount"> Asset Overview
<text class="currency-symbol">¥</text> </view>
<text class="amount-number">{{balance}}</text> </view>
</view> <view class="balance-main">
</view> <view class="balance-label">
可用余额(元)
<view class="asset-stats"> </view>
<view class='stat-item'> <view class="balance-amount">
<view class="stat-value">¥{{freeze}}</view> <view class="balance-label">
<view class="stat-label">冻结金额</view> 可用余额(元)
</view> </view>
<view class="stat-divider"></view> <text class="currency-symbol">
<view class='stat-item'> ¥
<view class="stat-value">¥{{totleConsumed}}</view> </text>
<view class="stat-label">累计消费</view> <text class="amount-number">
</view> {{balance}}
</view> </text>
</view> </view>
</view>
<!-- 操作按钮区 --> <view class="asset-stats">
<view class='action-buttons'> <view class="stat-item">
<button class="action-btn btn-primary" hover-class="btn-hover" bind:tap="recharge"> <view class="stat-value">
<view class="btn-icon">💰</view> ¥{{freeze}}
<view class="btn-text">充值</view> </view>
</button> <view class="stat-label">
<button class='action-btn btn-primary' hover-class="btn-hover" bind:tap="payDeposit"> 冻结金额
<view class="btn-icon">🔒</view> </view>
<view class="btn-text">押金</view> </view>
</button> <view class="stat-divider">
<button wx:if="{{ withdrawal === '1' }}" class='action-btn btn-primary' hover-class="btn-hover" bind:tap="withdraw"> </view>
<view class="btn-icon">💸</view> <view class="stat-item">
<view class="btn-text">提现</view> <view class="stat-value">
</button> ¥{{totleConsumed}}
</view> </view>
<view class="stat-label">
累计消费
</view>
</view>
</view>
</view>
<!-- 操作按钮区 -->
<view class="action-buttons">
<button class="action-btn btn-primary"
hover-class="btn-hover"
bind:tap="recharge">
<view class="btn-icon">
💰
</view>
<view class="btn-text">
充值
</view>
</button>
<button class="action-btn btn-primary"
hover-class="btn-hover"
bind:tap="payDeposit">
<view class="btn-icon">
🔒
</view>
<view class="btn-text">
押金
</view>
</button>
<button wx:if="{{ withdrawal === '1' }}"
class="action-btn btn-primary"
hover-class="btn-hover"
bind:tap="withdraw">
<view class="btn-icon">
💸
</view>
<view class="btn-text">
提现
</view>
</button>
</view>
</view> </view>
<!-- 交易记录区域 --> <!-- 交易记录区域 -->
<view class="records-section"> <view class="records-section">
<van-tabs active="{{ active }}" bind:change="tabClick" color="#5B7FFF" title-active-color="#5B7FFF"> <van-tabs active="{{ active }}"
<van-tab wx:for="{{tabs}}" wx:key="*this" title="{{item}}" /> bind:change="tabClick"
</van-tabs> color="#5B7FFF"
title-active-color="#5B7FFF">
<view class="filter-section" wx:if="{{activeIndex === 0}}"> <van-tab wx:for="{{tabs}}"
<picker mode="date" value="{{ dateAddBegin }}" bindchange="dateAddBeginChange"> wx:key="*this"
<van-cell title="交易开始日期" value="{{ dateAddBegin ? dateAddBegin : '请选择' }}" is-link border="{{false}}" /> title="{{item}}" />
</picker> </van-tabs>
<picker mode="date" value="{{ dateAddEnd }}" bindchange="dateAddEndChange"> <view class="filter-section" wx:if="{{activeIndex === 0}}">
<van-cell title="交易结束日期" value="{{ dateAddEnd ? dateAddEnd : '请选择' }}" is-link border="{{false}}" /> <picker mode="date"
</picker> value="{{ dateAddBegin }}"
</view> bindchange="dateAddBeginChange">
<van-cell title="交易开始日期"
<view class="list-container"> value="{{ dateAddBegin ? dateAddBegin : '请选择' }}"
<van-cell-group wx:if="{{activeIndex === 0}}" border="{{false}}"> is-link
<van-empty wx:if="{{!cashlogs}}" description="暂无资金明细" /> border="{{false}}" />
<van-cell wx:for="{{cashlogs}}" wx:key="index" title="{{ item.typeStr }}" label="{{ item.dateAdd }}" value="{{ item.amount }}" border="{{false}}" /> </picker>
</van-cell-group> <picker mode="date"
<van-cell-group wx:if="{{activeIndex === 1}}" border="{{false}}"> value="{{ dateAddEnd }}"
<van-empty wx:if="{{!withDrawlogs}}" description="暂无提现记录" /> bindchange="dateAddEndChange">
<van-cell wx:for="{{withDrawlogs}}" wx:key="index" title="{{ item.statusStr }}" label="{{ item.dateAdd }}{{ item.rejectionReason ? ' 驳回原因:' + item.rejectionReason : '' }}" border="{{false}}"> <van-cell title="交易结束日期"
<view slot=""> value="{{ dateAddEnd ? dateAddEnd : '请选择' }}"
<view class="price"><text>¥</text>{{ item.money }}</view> is-link
<view wx:if="{{ item.status === 3 && item.packageInfo }}"> border="{{false}}" />
<van-button type="primary" size="mini" bind:click="confirmTX" data-item="{{ item }}" color="#5B7FFF">确认收款</van-button> </picker>
</view> </view>
</view> <view class="list-container">
</van-cell> <van-cell-group wx:if="{{activeIndex === 0}}" border="{{false}}">
</van-cell-group> <van-empty wx:if="{{!cashlogs}}" description="暂无资金明细" />
<van-cell-group wx:if="{{activeIndex === 2}}" border="{{false}}"> <van-cell wx:for="{{cashlogs}}"
<van-empty wx:if="{{!depositlogs}}" description="暂无押金记录" /> wx:key="index"
<van-cell wx:for="{{depositlogs}}" wx:key="index" title="{{ item.statusStr }}" label="{{ item.dateAdd }}" border="{{false}}"> title="{{ item.typeStr }}"
<view slot=""> label="{{ item.dateAdd }}"
<view class="price"><text>¥</text>{{ item.amount }}</view> value="{{ item.amount }}"
<view wx:if="{{ item.status === -1 }}"> border="{{false}}" />
<van-button type="primary" size="mini" color="#5B7FFF" data-item="{{ item }}" bind:click="payStatusDepositV2">支付押金</van-button> </van-cell-group>
</view> <van-cell-group wx:if="{{activeIndex === 1}}" border="{{false}}">
<view wx:if="{{ item.status === 1 }}"> <van-empty wx:if="{{!withDrawlogs}}" description="暂无提现记录" />
<van-button type="primary" size="mini" color="#5B7FFF" data-item="{{ item }}" bind:click="depositBackApplyV2">申请退回</van-button> <van-cell wx:for="{{withDrawlogs}}"
</view> wx:key="index"
</view> title="{{ item.statusStr }}"
</van-cell> label="{{ item.dateAdd }}{{ item.rejectionReason ? ' 驳回原因:' + item.rejectionReason : '' }}"
</van-cell-group> border="{{false}}">
</view> <view slot="">
<view class="price">
<text>¥</text>
{{ item.money }}
</view>
<view wx:if="{{ item.status === 3 && item.packageInfo }}">
<van-button type="primary"
size="mini"
bind:click="confirmTX"
data-item="{{ item }}"
color="#5B7FFF">
确认收款
</van-button>
</view>
</view>
</van-cell>
</van-cell-group>
<van-cell-group wx:if="{{activeIndex === 2}}" border="{{false}}">
<van-empty wx:if="{{!depositlogs}}" description="暂无押金记录" />
<van-cell wx:for="{{depositlogs}}"
wx:key="index"
title="{{ item.statusStr }}"
label="{{ item.dateAdd }}"
border="{{false}}">
<view slot="">
<view class="price">
<text>¥</text>
{{ item.amount }}
</view>
<view wx:if="{{ item.status === -1 }}">
<van-button type="primary"
size="mini"
color="#5B7FFF"
data-item="{{ item }}"
bind:click="payStatusDepositV2">
支付押金
</van-button>
</view>
<view wx:if="{{ item.status === 1 }}">
<van-button type="primary"
size="mini"
color="#5B7FFF"
data-item="{{ item }}"
bind:click="depositBackApplyV2">
申请退回
</van-button>
</view>
</view>
</van-cell>
</van-cell-group>
</view>
</view> </view>
<van-empty wx:if="{{!cmsArticles}}" description="暂无记录" />
<van-cell wx:for="{{cmsArticles}}" wx:key="id" title="{{item.title}}" is-link url="/pages/help/detail?id={{item.id}}" />
\ No newline at end of file \ No newline at end of file
<van-empty wx:if="{{ !cmsArticles }}" description="暂无记录" />
<van-cell wx:for="{{ cmsArticles }}"
wx:key="id"
title="{{ item.title }}"
is-link
url="/pages/help/detail?id={{ item.id }}"></van-cell>
/* pages/cms/list.wxss */
\ No newline at end of file \ No newline at end of file
/* pages/cms/list.wxss */
/* pages/coupons/merge.wxss */
\ No newline at end of file \ No newline at end of file
/* pages/coupons/merge.wxss */
/* pages/goods-details/day.wxss */
\ No newline at end of file \ No newline at end of file
/* pages/goods-details/day.wxss */
/* pages/goods-details/times01.wxss */
\ No newline at end of file \ No newline at end of file
/* pages/goods-details/times01.wxss */
/* pages/goods-details/times02.wxss */
\ No newline at end of file \ No newline at end of file
/* pages/goods-details/times02.wxss */
<view class="live-page"> <view class="live-page">
<block wx:if="{{aliveRooms}}"> <block wx:if="{{ aliveRooms }}">
<view class="live-container"> <view class="live-container">
<view class="live-card" wx:for="{{aliveRooms}}" wx:key="id" bindtap="goLiveRoom" data-id="{{item.roomid}}" data-status="{{item.live_status}}"> <view class="live-card"
<!-- 直播封面 --> wx:for="{{ aliveRooms }}"
<view class="live-cover"> wx:key="id"
<image src="{{item.share_img}}" class="cover-image" mode="aspectFill" lazy-load="true" /> bindtap="goLiveRoom"
data-id="{{ item.roomid }}"
<!-- 直播状态标签 --> data-status="{{ item.live_status }}">
<view class="status-badge status-{{item.live_status}}"> <!-- 直播封面 -->
<block wx:if="{{item.live_status === 101}}"> <view class="live-cover">
<view class="status-dot"></view> <image src="{{ item.share_img }}"
<text class="status-text">正在直播</text> class="cover-image"
</block> mode="aspectFill"
<block wx:elif="{{item.live_status === 102}}"> lazy-load="true" />
<text class="status-text">即将开播</text> <!-- 直播状态标签 -->
</block> <view class="status-badge status-{{ item.live_status }}">
<block wx:elif="{{item.live_status === 103}}"> <block wx:if="{{ item.live_status === 101 }}">
<text class="status-text">已结束</text> <view class="status-dot"></view>
</block> <text class="status-text">
<block wx:else> 正在直播
<text class="status-text">已过期</text> </text>
</block> </block>
</view> <block wx:elif="{{ item.live_status === 102 }}">
<text class="status-text">
<!-- 渐变遮罩 --> 即将开播
<view class="cover-mask"></view> </text>
</view> </block>
<block wx:elif="{{ item.live_status === 103 }}">
<!-- 直播信息 --> <text class="status-text">
<view class="live-info"> 已结束
<view class="live-title">{{item.name}}</view> </text>
</block>
<view class="live-meta"> <block wx:else>
<view class="meta-item"> <text class="status-text">
<van-icon size="28rpx" name="manager-o" color="#666" /> 已过期
<text class="meta-text">{{item.anchor_name}}</text> </text>
</view> </block>
<view class="meta-item"> </view>
<van-icon size="28rpx" name="clock-o" color="#666" /> <!-- 渐变遮罩 -->
<text class="meta-text">{{item.start_time_str}}</text> <view class="cover-mask"></view>
</view> </view>
</view> <!-- 直播信息 -->
<view class="live-info">
<!-- 操作按钮 --> <view class="live-title">{{ item.name }}</view>
<view class="live-action"> <view class="live-meta">
<view wx:if="{{item.live_status === 107 || item.live_status === 106 || item.live_status === 104}}" class="action-btn btn-disabled"> <view class="meta-item">
<text>已过期</text> <van-icon size="28rpx"
</view> name="manager-o"
<view wx:elif="{{item.live_status === 102}}" class="action-btn btn-upcoming"> color="#666" />
<van-icon size="28rpx" name="bell" /> <text class="meta-text">
<text>预约提醒</text> {{ item.anchor_name }}
</view> </text>
<view wx:elif="{{item.live_status === 103}}" class="action-btn btn-ended"> </view>
<van-icon size="28rpx" name="replay" /> <view class="meta-item">
<text>查看回放</text> <van-icon size="28rpx"
</view> name="clock-o"
<view wx:else class="action-btn btn-live"> color="#666" />
<view class="live-pulse"></view> <text class="meta-text">
<text>进入直播间</text> {{ item.start_time_str }}
</view> </text>
</view> </view>
</view> </view>
</view> <!-- 操作按钮 -->
</view> <view class="live-action">
</block> <view wx:if="{{ item.live_status === 107 || item.live_status === 106 || item.live_status === 104 }}"
class="action-btn btn-disabled">
<!-- 空状态 --> <text>已过期</text>
<block wx:else> </view>
<view class="empty-state"> <view wx:elif="{{ item.live_status === 102 }}" class="action-btn btn-upcoming">
<!-- 高版本系统:emoji --> <van-icon size="28rpx" name="bell" />
<text wx:if="{{useFingerprintEmoji}}" <text>预约提醒</text>
class="empty-emoji">🫆</text> </view>
<!-- 低版本或未知系统:原图 --> <view wx:elif="{{ item.live_status === 103 }}" class="action-btn btn-ended">
<image wx:else <van-icon size="28rpx" name="replay" />
class="empty-image" <text>查看回放</text>
src="/images/zw.png" </view>
mode="aspectFit" /> <view wx:else class="action-btn btn-live">
<text class="empty-text">暂无直播内容</text> <view class="live-pulse"></view>
</view> <text>进入直播间</text>
</block> </view>
</view>
</view>
</view>
</view>
</block>
<!-- 空状态 -->
<block wx:else>
<view class="empty-state">
<!-- 高版本系统:emoji -->
<text wx:if="{{ useFingerprintEmoji }}" class="empty-emoji">
🫆
</text>
<!-- 低版本或未知系统:原图 -->
<image wx:else
class="empty-image"
src="/images/zw.png"
mode="aspectFit" />
<text class="empty-text">
暂无直播内容
</text>
</view>
</block>
</view> </view>
<van-tabs active="{{ active }}" bind:change="tabClick"> <van-tabs active="{{ active }}" bind:change="tabClick">
<van-tab wx:for="{{ tabs }}" wx:key="*this" title="{{ item }}"></van-tab> <van-tab wx:for="{{ tabs }}"
wx:key="*this"
title="{{ item }}"></van-tab>
</van-tabs> </van-tabs>
<van-empty wx:if="{{ !list }}" description="暂无统计" /> <van-empty wx:if="{{ !list }}" description="暂无统计" />
<van-cell wx:for="{{ list }}" wx:key="*this" title="{{ item.day }}" value="共 {{ item.orders }} 单" label="累计销售额 ¥{{ item.amountOrders }}" />
\ No newline at end of file \ No newline at end of file
<van-cell wx:for="{{ list }}"
wx:key="*this"
title="{{ item.day }}"
value="共 {{ item.orders }} 单"
label="累计销售额 ¥{{ item.amountOrders }}"></van-cell>
/* pages/test/wifi.wxss */
\ No newline at end of file \ No newline at end of file
/* pages/test/wifi.wxss */
<!-- pages/goods_detail/index.wxml --> <!-- pages/goods_detail/index.wxml -->
<import src="../../wxParse/wxParse.wxml" /> <import src="../../wxParse/wxParse.wxml" />
<view class="detail_swiper"> <view class="detail_swiper">
<swiper indicator-dots="{{true}}" <swiper indicator-dots="{{ true }}"
autoplay="{{true}}" autoplay="{{ true }}"
circular="{{true}}"> circular="{{ true }}">
<swiper-item wx:for="{{goodsObj.pics}}" <swiper-item wx:for="{{ goodsObj.pics }}"
wx:key="id" wx:key="id"
bindtap="handlePrevewImage" bindtap="handlePrevewImage"
data-url="{{item.pic}}"> data-url="{{ item.pic }}">
<image src="{{item.pic}}" mode="widthFix"> <image src="{{ item.pic }}" mode="widthFix"></image>
</image>
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
<view class="goods_price"> <view class="goods_price">
¥{{goodsObj.goods_price}} ¥{{ goodsObj.goods_price }}
</view> </view>
<view class="goods_name_row"> <view class="goods_name_row">
<view class="goods_name"> <view class="goods_name">
{{goodsObj.goods_name}} {{ goodsObj.goods_name }}
</view> </view>
<view class="goods_collect" bindtap="handleCollect"> <view class="goods_collect" bindtap="handleCollect">
<text class="iconfont {{isCollect?'icon-shoucang1':'icon-shoucang'}}"> <text class="iconfont {{ isCollect?'icon-shoucang1':'icon-shoucang' }}">
</text> </text>
<view class="collect_text"> <view class="collect_text">
收藏 收藏
...@@ -36,29 +36,24 @@ ...@@ -36,29 +36,24 @@
<!-- 富文本 --> <!-- 富文本 -->
<!-- {{goodsObj.goods_introduce}} --> <!-- {{goodsObj.goods_introduce}} -->
<!-- <rich-text is="wxParse" nodes="{{goodsObj.goods_introduce}}"></rich-text> --> <!-- <rich-text is="wxParse" nodes="{{goodsObj.goods_introduce}}"></rich-text> -->
<template is="wxParse" data="{{wxParseData:article.nodes}}" /> <template is="wxParse" data="{{ wxParseData:article.nodes }}" />
</view> </view>
</view> </view>
<view class="btm_tool"> <view class="btm_tool">
<view class="tool_item"> <view class="tool_item">
<view class="iconfont icon-kefu1"> <view class="iconfont icon-kefu1"></view>
</view>
<view>客服</view> <view>客服</view>
<button open-type="contact"> <button open-type="contact"></button>
</button>
</view> </view>
<view class="tool_item"> <view class="tool_item">
<view class="iconfont icon-fenxiang"> <view class="iconfont icon-fenxiang"></view>
</view>
<view>分享</view> <view>分享</view>
<button open-type="share"> <button open-type="share"></button>
</button>
</view> </view>
<navigator open-type="switchTab" <navigator open-type="switchTab"
url="/pages/cart/index" url="/pages/cart/index"
class="tool_item"> class="tool_item">
<view class="iconfont .icon-shopcart"> <view class="iconfont .icon-shopcart"></view>
</view>
<view>购物车</view> <view>购物车</view>
</navigator> </navigator>
<view class="tool_item btn_cart " bindtap="handleCartAdd"> <view class="tool_item btn_cart " bindtap="handleCartAdd">
......
{ {
"usingComponents": {},
"navigationBarTitleText": "商品支付"
}
\ No newline at end of file \ No newline at end of file
"usingComponents": {},
"navigationBarTitleText": "商品支付"
}
<!-- 购物车内容 --> <!-- 购物车内容 -->
<view class="cart_content"> <view class="cart_content">
<!-- <view class="cart_title">商品列表</view> --> <!-- <view class="cart_title">商品列表</view> -->
<view class="cart_main"> <view class="cart_main">
<view class="cart_item" wx:for="{{cart}}" wx:key="goods_id"> <view class="cart_item"
<!-- 商品图片 --> wx:for="{{cart}}"
<navigator class="cart_img_wrap"> wx:key="goods_id">
<image mode="widthFix" src="{{item.basicInfo.pic}}"></image> <!-- 商品图片 -->
</navigator> <navigator class="cart_img_wrap">
<!-- 商品信息 --> <image mode="widthFix" src="{{item.basicInfo.pic}}">
<view class="cart_info_wrap"> </image>
<view class="goods_name">{{item.basicInfo.name}}</view> </navigator>
<view class="goods_price_wrap"> <!-- 商品信息 -->
<view class="goods_price">¥{{item.basicInfo.minPrice}}</view> <view class="cart_info_wrap">
<view class="cart_num_tool" wx:if="{{item.num}}"> <view class="goods_name">
<view class="goods_num">X {{item.num}}</view> {{item.basicInfo.name}}
</view> </view>
</view> <view class="goods_price_wrap">
</view> <view class="goods_price">
</view> ¥{{item.basicInfo.minPrice}}
</view> </view>
<view class="cart_num_tool" wx:if="{{item.num}}">
<view class="goods_num">
X {{item.num}}
</view>
</view>
</view>
</view>
</view>
</view>
</view> </view>
<view class="peisong-way"> <view class="peisong-way">
<view class="address-box"> <view class="address-box">
<view class="add-address" hidden="{{curAddressData}}"> <view class="add-address" hidden="{{curAddressData}}">
<view class="title" bindtap="addAddress">新增收货地址</view> <view class="title" bindtap="addAddress">
</view> 新增收货地址
<view class="show-address" hidden="{{!curAddressData}}" bindtap="selectAddress"> </view>
<view class="name-tel">{{curAddressData.linkMan}} {{curAddressData.mobile}}</view> </view>
<view class="addr-text">{{curAddressData.address}}</view> <view class="show-address"
</view> hidden="{{!curAddressData}}"
</view> bindtap="selectAddress">
<view class="name-tel">
{{curAddressData.linkMan}} {{curAddressData.mobile}}
</view>
<view class="addr-text">
{{curAddressData.address}}
</view>
</view>
</view>
</view> </view>
<!-- 底部工具栏 --> <!-- 底部工具栏 -->
<view class="footer_tool"> <view class="footer_tool">
<!-- 总价格 -->
<view class="total_price_wrap">
<view class="total_price">
合计:
<text class="total_price_text">¥{{totalPrice}}</text>
</view>
<view>包含运费</view>
</view>
<view class="order_pay_wrap" bindtap="handleOrderPay">支付({{totalNum}})</view>
</view>
\ No newline at end of file \ No newline at end of file
<!-- 总价格 -->
<view class="total_price_wrap">
<view class="total_price">
合计:
<text class="total_price_text">
¥{{totalPrice}}
</text>
</view>
<view>包含运费</view>
</view>
<view class="order_pay_wrap" bindtap="handleOrderPay">
支付({{totalNum}})
</view>
</view>
...@@ -2,168 +2,176 @@ ...@@ -2,168 +2,176 @@
@import "/template/login/index.wxss"; @import "/template/login/index.wxss";
page { page {
padding-bottom: 90rpx; padding-bottom: 90rpx;
} }
.revice_address_row .user_info_row { .revice_address_row .user_info_row {
display: flex; display: flex;
padding: 20rpx; padding: 20rpx;
} }
.revice_address_row .user_info_row .user_info { .revice_address_row .user_info_row .user_info {
flex: 5; flex: 5;
} }
.revice_address_row .user_info_row .user_phone { .revice_address_row .user_info_row .user_phone {
flex: 3; position: relative;
text-align: right; display: flex;
flex: 3;
width: 30px;
height: 1000%;
height: 30px;
text-align: right;
} }
.cart_content .cart_title { .cart_content .cart_title {
padding: 20rpx; padding: 20rpx;
font-size: 36rpx; font-size: 36rpx;
color: var(--themeColor); color: var(--themeColor);
border-top: 1rpx solid currentColor; border-top: 1rpx solid currentcolor;
border-bottom: 1rpx solid currentColor; border-bottom: 1rpx solid currentcolor;
} }
.cart_content .cart_main .cart_item { .cart_content .cart_main .cart_item {
display: flex; display: flex;
padding: 10rpx; padding: 10rpx;
border-bottom: 1rpx solid #ccc; border-bottom: 1rpx solid #ccc;
} }
.cart_content .cart_main .cart_item .cart_img_wrap { .cart_content .cart_main .cart_item .cart_img_wrap {
flex: 2; display: flex;
display: flex; flex: 2;
justify-content: center; align-items: center;
align-items: center; justify-content: center;
} }
.cart_content .cart_main .cart_item .cart_img_wrap image { .cart_content .cart_main .cart_item .cart_img_wrap image {
width: 80%; width: 80%;
} }
.cart_content .cart_main .cart_item .cart_info_wrap { .cart_content .cart_main .cart_item .cart_info_wrap {
flex: 4; display: flex;
display: flex; flex: 4;
flex-direction: column; flex-direction: column;
justify-content: space-around; justify-content: space-around;
} }
.cart_content .cart_main .cart_item .cart_info_wrap .goods_name { .cart_content .cart_main .cart_item .cart_info_wrap .goods_name {
display: -webkit-box; display: -webkit-box;
overflow: hidden; overflow: hidden;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
color: #666; color: #666;
} }
.cart_content .cart_main .cart_item .cart_info_wrap .goods_price_wrap { .cart_content .cart_main .cart_item .cart_info_wrap .goods_price_wrap {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.cart_content .cart_main .cart_item .cart_info_wrap .goods_price_wrap .goods_price { .cart_content .cart_main .cart_item .cart_info_wrap .goods_price_wrap .goods_price {
color: var(--themeColor); font-size: 34rpx;
font-size: 34rpx; color: var(--themeColor);
} }
.cart_content .cart_main .cart_item .cart_info_wrap .goods_price_wrap .cart_num_tool { .cart_content .cart_main .cart_item .cart_info_wrap .goods_price_wrap .cart_num_tool {
display: flex; display: flex;
} }
.cart_content .cart_main .cart_item .cart_info_wrap .goods_price_wrap .cart_num_tool .goods_num { .cart_content .cart_main .cart_item .cart_info_wrap .goods_price_wrap .cart_num_tool .goods_num {
width: 55rpx; display: flex;
height: 55rpx; align-items: center;
display: flex; justify-content: center;
justify-content: center; width: 55rpx;
align-items: center; height: 55rpx;
} }
.footer_tool { .footer_tool {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
width: 100%; display: flex;
height: 90rpx; width: 100%;
background-color: #fff; height: 90rpx;
display: flex; background-color: #fff;
border-top: 1rpx solid #ccc; border-top: 1rpx solid #ccc;
} }
.footer_tool .total_price_wrap { .footer_tool .total_price_wrap {
flex: 5; flex: 5;
padding-right: 15rpx; padding-right: 15rpx;
text-align: right; text-align: right;
} }
.footer_tool .total_price_wrap .total_price .total_price_text { .footer_tool .total_price_wrap .total_price .total_price_text {
color: var(--themeColor); font-size: 34rpx;
font-size: 34rpx; font-weight: 600;
font-weight: 600; color: var(--themeColor);
} }
.footer_tool .order_pay_wrap { .footer_tool .order_pay_wrap {
flex: 3; display: flex;
background-color: #1CD8D2; flex: 3;
color: #fff; align-items: center;
font-size: 32rpx; justify-content: center;
font-weight: 600; font-size: 32rpx;
display: flex; font-weight: 600;
justify-content: center; color: #fff;
align-items: center; background-color: #1cd8d2;
} }
.peisong-way { .peisong-way {
width: 100%; width: 100%;
background-color: #fff; margin-bottom: 20rpx;
margin-bottom: 20rpx; background-color: #fff;
} }
.address-box { .address-box {
width: 100%; width: 100%;
background: url(https://cdn.it120.cc/images/weappshop/arrow-right.png) no-repeat 705rpx center, margin: 20rpx 0;
url(https://cdn.it120.cc/images/weappshop/addr-line.png) no-repeat center bottom; background:
background-size: 16rpx auto, 750rpx auto; url("https://cdn.it120.cc/images/weappshop/arrow-right.png") no-repeat 705rpx center,
background-color: #fff; url("https://cdn.it120.cc/images/weappshop/addr-line.png") no-repeat center bottom;
margin: 20rpx 0; background-color: #fff;
background-size:
16rpx auto,
750rpx auto;
} }
.add-addres { .add-addres {
width: 100%; width: 100%;
} }
.add-address .title { .add-address .title {
font-size: 28rpx; padding: 40rpx 0 40rpx 90rpx;
color: #000; margin-left: 30rpx;
margin-left: 30rpx; font-size: 28rpx;
background: url(https://cdn.it120.cc/images/weappshop/ico-add-addr.png) no-repeat left center; color: #000;
background-size: 60rpx auto; background: url("https://cdn.it120.cc/images/weappshop/ico-add-addr.png") no-repeat left center;
padding: 40rpx 0 40rpx 90rpx; background-size: 60rpx auto;
} }
.show-address { .show-address {
width: 664rpx; box-sizing: border-box;
box-sizing: border-box; width: 664rpx;
padding-left: 100rpx; padding-left: 100rpx;
background: url(https://cdn.it120.cc/images/weappshop/ico-addr.png) no-repeat 30rpx 35rpx; background: url("https://cdn.it120.cc/images/weappshop/ico-addr.png") no-repeat 30rpx 35rpx;
background-size: 30rpx auto; background-size: 30rpx auto;
} }
.show-address .name-tel { .show-address .name-tel {
font-size: 28rpx; padding: 30rpx 0 20rpx;
color: #000; font-size: 28rpx;
padding: 30rpx 0 20rpx 0; color: #000;
} }
.show-address .addr-text { .show-address .addr-text {
font-size: 24rpx; padding-bottom: 34rpx;
color: #888; font-size: 24rpx;
padding-bottom: 34rpx; line-height: 36rpx;
line-height: 36rpx; color: #888;
} }
form { form {
width: 100%;
}
\ No newline at end of file \ No newline at end of file
width: 100%;
}
<!-- pages/user/index.wxml --> <!-- pages/user/index.wxml -->
<import src="/template/login/index.wxml" /> <import src="/template/login/index.wxml" />
<view class="user_info_wrap"> <view class="user_info_wrap">
<view wx:if="{{userinfo.avatarUrl}}" class="user_img_wrap"> <view wx:if="{{userinfo.avatarUrl}}" class="user_img_wrap">
<image class="user_bg" src="{{userinfo.avatarUrl}}"></image> <image class="user_bg" src="{{userinfo.avatarUrl}}"></image>
<view class="user_info"> <view class="user_info">
<image class="user_icon" src="{{userinfo.avatarUrl}}"></image> <image class="user_icon" src="{{userinfo.avatarUrl}}"></image>
<view class="user_name">{{userinfo.nickName}}</view> <view class="user_name">
</view> {{userinfo.nickName}}
</view> </view>
<view wx:else class="user_btn"> </view>
<image class="nologin" mode="widthFix" src="../../images/nologin.png"></image> </view>
<view bindtap="login">点击登录账户</view> <view wx:else class="user_btn">
</view> <image class="nologin"
mode="widthFix"
src="../../images/nologin.png"></image>
<view bindtap="login">
点击登录账户
</view>
</view>
</view> </view>
<view class="user_content"> <view class="user_content">
<view class="user_main"> <view class="user_main">
<!-- 历史足迹 --> <!-- 历史足迹 -->
<view class="history_wrap"> <view class="history_wrap">
<navigator> <navigator>
<view class="his_num">0</view> <view class="his_num">
<view class="his_name">收藏的店铺</view> 0
</navigator> </view>
<navigator url="/pages/collect/index"> <view class="his_name">
<view class="his_num">{{collectNums}}</view> 收藏的店铺
<view class="his_name">收藏的商品</view> </view>
</navigator> </navigator>
<navigator> <navigator url="/pages/collect/index">
<view class="his_num">0</view> <view class="his_num">
<view class="his_name">关注的商品</view> {{collectNums}}
</navigator> </view>
<navigator> <view class="his_name">
<view class="his_num">0</view> 收藏的商品
<view class="his_name">我的足迹</view> </view>
</navigator> </navigator>
</view> <navigator>
<!-- 我的订单 --> <view class="his_num">
<view class="orders_wrap"> 0
<view class="orders_title">我的订单</view> </view>
<view class="order_content"> <view class="his_name">
<navigator url="/pages/order/index?type=0"> 关注的商品
<view class="iconfont icon-daifukuan"></view> </view>
<view class="order_name">待付款</view> </navigator>
</navigator> <navigator>
<navigator url="/pages/order/index?type=1"> <view class="his_num">
<view class="iconfont icon-daifahuo"></view> 0
<view class="order_name">待发货</view> </view>
</navigator> <view class="his_name">
<navigator url="/pages/order/index?type=2"> 我的足迹
<view class="iconfont icon-ziyuan"></view> </view>
<view class="order_name">待收货</view> </navigator>
</navigator> </view>
<navigator url="/pages/order/index?type=3"> <!-- 我的订单 -->
<view class="iconfont icon-daipingjia"></view> <view class="orders_wrap">
<view class="order_name">待评价</view> <view class="orders_title">
</navigator> 我的订单
<navigator url="/pages/order/index?type=4"> </view>
<view class="iconfont icon-yiwancheng"></view> <view class="order_content">
<view class="order_name">已完成</view> <navigator url="/pages/order/index?type=0">
</navigator> <view class="iconfont icon-daifukuan"></view>
</view> <view class="order_name">
</view> 待付款
<!-- 收货地址管理 --> </view>
<navigator url="/pages/select-address/index" class="address_wrap">收货地址管理</navigator> </navigator>
<!-- 应用信息相关 --> <navigator url="/pages/order/index?type=1">
<view class="app_info_wrap"> <view class="iconfont icon-daifahuo"></view>
<view class="app_info_item app_info_contact"> <view class="order_name">
<text>联系客服</text> 待发货
<text>13944362281</text> </view>
</view> </navigator>
<navigator url="/pages/feedback/index" class="app_info_item">意见反馈</navigator> <navigator url="/pages/order/index?type=2">
<view class="app_info_item">关于我们</view> <view class="iconfont icon-ziyuan"></view>
</view> <view class="order_name">
<!-- 推荐 --> 待收货
<view class="recommend_wrap">把应用推荐给其他人</view> </view>
</view> </navigator>
<navigator url="/pages/order/index?type=3">
<view class="iconfont icon-daipingjia"></view>
<view class="order_name">
待评价
</view>
</navigator>
<navigator url="/pages/order/index?type=4">
<view class="iconfont icon-yiwancheng"></view>
<view class="order_name">
已完成
</view>
</navigator>
</view>
</view>
<!-- 收货地址管理 -->
<navigator url="/pages/select-address/index" class="address_wrap">
收货地址管理
</navigator>
<!-- 应用信息相关 -->
<view class="app_info_wrap">
<view class="app_info_item app_info_contact">
<text>联系客服</text>
<text>13944362281</text>
</view>
<navigator url="/pages/feedback/index" class="app_info_item">
意见反馈
</navigator>
<view class="app_info_item">
关于我们
</view>
</view>
<!-- 推荐 -->
<view class="recommend_wrap">
把应用推荐给其他人
</view>
</view>
</view> </view>
<template is="apifmLogin" data="{{wxlogin: wxlogin}}" />
\ No newline at end of file \ No newline at end of file
<template is="apifmLogin" data="{{wxlogin: wxlogin}}" />
...@@ -2,143 +2,144 @@ ...@@ -2,143 +2,144 @@
@import "/template/login/index.wxss"; @import "/template/login/index.wxss";
page { page {
background-color: #edece8; background-color: #edece8;
} }
.user_info_wrap { .user_info_wrap {
height: 45vh; /* background: linear-gradient(-90deg, rgba(252, 88, 89, 1) 0%, rgba(255, 167, 124, 1) 100%) no-repeat; */
overflow: hidden; position: relative;
background-color: #1CD8D2; height: 45vh;
/* background: linear-gradient(-90deg, rgba(252, 88, 89, 1) 0%, rgba(255, 167, 124, 1) 100%) no-repeat; */ overflow: hidden;
position: relative; background-color: #1cd8d2;
} }
.nologin { .nologin {
width: 120rpx; width: 120rpx;
margin: 0 auto; margin: 0 auto;
} }
.user_info_wrap .user_img_wrap { .user_info_wrap .user_img_wrap {
position: relative; position: relative;
} }
.user_info_wrap .user_img_wrap .user_bg { .user_info_wrap .user_img_wrap .user_bg {
height: 50vh; height: 50vh;
filter: blur(10rpx); filter: blur(10rpx);
} }
.user_info_wrap .user_img_wrap .user_info { .user_info_wrap .user_img_wrap .user_info {
position: absolute; position: absolute;
left: 50%; top: 20%;
transform: translateX(-50%); left: 50%;
top: 20%; text-align: center;
text-align: center; transform: translateX(-50%);
} }
.user_info_wrap .user_img_wrap .user_info .user_icon { .user_info_wrap .user_img_wrap .user_info .user_icon {
width: 150rpx; width: 150rpx;
height: 150rpx; height: 150rpx;
border-radius: 50%; border-radius: 50%;
} }
.user_info_wrap .user_img_wrap .user_info .user_name { .user_info_wrap .user_img_wrap .user_info .user_name {
color: #fff; margin-top: 40rpx;
margin-top: 40rpx; color: #fff;
} }
.user_info_wrap .user_btn { .user_info_wrap .user_btn {
position: absolute; position: absolute;
left: 50%; top: 20%;
transform: translateX(-50%); left: 50%;
top: 20%; display: flex;
/* border: 1rpx solid greenyellow; */ flex-direction: column;
color: #fff; align-items: center;
font-size: 38rpx; justify-content: center;
padding: 30rpx; padding: 30rpx;
border-radius: 10rpx; font-size: 38rpx;
display: flex;
flex-direction: column; /* border: 1rpx solid greenyellow; */
justify-content: center; color: #fff;
align-items: center; border-radius: 10rpx;
transform: translateX(-50%);
} }
.user_content { .user_content {
position: relative; position: relative;
} }
.user_content .user_main { .user_content .user_main {
padding-bottom: 100rpx; position: absolute;
color: #666; top: -40rpx;
position: absolute; left: 50%;
width: 90%; width: 90%;
left: 50%; padding-bottom: 100rpx;
transform: translateX(-50%); color: #666;
top: -40rpx; transform: translateX(-50%);
} }
.user_content .user_main .history_wrap { .user_content .user_main .history_wrap {
background-color: #fff; display: flex;
display: flex; background-color: #fff;
} }
.user_content .user_main .history_wrap navigator { .user_content .user_main .history_wrap navigator {
flex: 1; flex: 1;
text-align: center; padding: 10rpx 0;
padding: 10rpx 0; text-align: center;
} }
.user_content .user_main .history_wrap navigator .his_num { .user_content .user_main .history_wrap navigator .his_num {
color: var(--themeColor); color: var(--themeColor);
} }
.user_content .user_main .orders_wrap { .user_content .user_main .orders_wrap {
background-color: #fff; margin-top: 30rpx;
margin-top: 30rpx; background-color: #fff;
} }
.user_content .user_main .orders_wrap .orders_title { .user_content .user_main .orders_wrap .orders_title {
padding: 20rpx; padding: 20rpx;
border-bottom: 1rpx solid #ccc; border-bottom: 1rpx solid #ccc;
} }
.user_content .user_main .orders_wrap .order_content { .user_content .user_main .orders_wrap .order_content {
display: flex; display: flex;
} }
.user_content .user_main .orders_wrap .order_content navigator { .user_content .user_main .orders_wrap .order_content navigator {
padding: 15rpx 0; flex: 1;
flex: 1; padding: 15rpx 0;
text-align: center; text-align: center;
} }
.user_content .user_main .orders_wrap .order_content navigator .iconfont { .user_content .user_main .orders_wrap .order_content navigator .iconfont {
color: var(--themeColor); font-size: 40rpx;
font-size: 40rpx; color: var(--themeColor);
} }
.user_content .user_main .address_wrap { .user_content .user_main .address_wrap {
margin-top: 30rpx; padding: 20rpx;
background-color: #fff; margin-top: 30rpx;
padding: 20rpx; background-color: #fff;
} }
.user_content .user_main .app_info_wrap { .user_content .user_main .app_info_wrap {
margin-top: 30rpx; margin-top: 30rpx;
background-color: #fff; background-color: #fff;
} }
.user_content .user_main .app_info_wrap .app_info_item { .user_content .user_main .app_info_wrap .app_info_item {
padding: 20rpx; padding: 20rpx;
border-bottom: 1rpx solid #ccc; border-bottom: 1rpx solid #ccc;
} }
.user_content .user_main .app_info_wrap .app_info_contact { .user_content .user_main .app_info_wrap .app_info_contact {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.user_content .user_main .recommend_wrap { .user_content .user_main .recommend_wrap {
margin-top: 30rpx;
background-color: #fff;
padding: 20rpx;
}
\ No newline at end of file \ No newline at end of file
padding: 20rpx;
margin-top: 30rpx;
background-color: #fff;
}
/*! /* !
* WeUI v2.0.1 (https://github.com/weui/weui-wxss) * WeUI v2.0.1 (https://github.com/weui/weui-wxss)
* Copyright 2019 Tencent, Inc. * Copyright 2019 Tencent, Inc.
* Licensed under the MIT license * Licensed under the MIT license
......
/*! /* !
* WeUI v2.0.1 (https://github.com/weui/weui-wxss) * WeUI v2.0.1 (https://github.com/weui/weui-wxss)
* Copyright 2019 Tencent, Inc. * Copyright 2019 Tencent, Inc.
* Licensed under the MIT license * Licensed under the MIT license
......
/*! /* !
* WeUI v2.0.1 (https://github.com/weui/weui-wxss) * WeUI v2.0.1 (https://github.com/weui/weui-wxss)
* Copyright 2019 Tencent, Inc. * Copyright 2019 Tencent, Inc.
* Licensed under the MIT license * Licensed under the MIT license
......
/*! /* !
* WeUI v2.0.1 (https://github.com/weui/weui-wxss) * WeUI v2.0.1 (https://github.com/weui/weui-wxss)
* Copyright 2019 Tencent, Inc. * Copyright 2019 Tencent, Inc.
* Licensed under the MIT license * Licensed under the MIT license
......
/*! /* !
* WeUI v2.0.1 (https://github.com/weui/weui-wxss) * WeUI v2.0.1 (https://github.com/weui/weui-wxss)
* Copyright 2019 Tencent, Inc. * Copyright 2019 Tencent, Inc.
* Licensed under the MIT license * Licensed under the MIT license
......
/*! /* !
* WeUI v2.0.1 (https://github.com/weui/weui-wxss) * WeUI v2.0.1 (https://github.com/weui/weui-wxss)
* Copyright 2019 Tencent, Inc. * Copyright 2019 Tencent, Inc.
* Licensed under the MIT license * Licensed under the MIT license
......
/*! /* !
* WeUI v2.0.1 (https://github.com/weui/weui-wxss) * WeUI v2.0.1 (https://github.com/weui/weui-wxss)
* Copyright 2019 Tencent, Inc. * Copyright 2019 Tencent, Inc.
* Licensed under the MIT license * Licensed under the MIT license
......
/*! /* !
* WeUI v2.0.1 (https://github.com/weui/weui-wxss) * WeUI v2.0.1 (https://github.com/weui/weui-wxss)
* Copyright 2019 Tencent, Inc. * Copyright 2019 Tencent, Inc.
* Licensed under the MIT license * Licensed under the MIT license
......
/*! /* !
* WeUI v2.0.1 (https://github.com/weui/weui-wxss) * WeUI v2.0.1 (https://github.com/weui/weui-wxss)
* Copyright 2019 Tencent, Inc. * Copyright 2019 Tencent, Inc.
* Licensed under the MIT license * Licensed under the MIT license
......
/*! /* !
* WeUI v2.0.1 (https://github.com/weui/weui-wxss) * WeUI v2.0.1 (https://github.com/weui/weui-wxss)
* Copyright 2019 Tencent, Inc. * Copyright 2019 Tencent, Inc.
* Licensed under the MIT license * Licensed under the MIT license
......
/*! /* !
* WeUI v2.0.1 (https://github.com/weui/weui-wxss) * WeUI v2.0.1 (https://github.com/weui/weui-wxss)
* Copyright 2019 Tencent, Inc. * Copyright 2019 Tencent, Inc.
* Licensed under the MIT license * Licensed under the MIT license
......
/*! /* !
* WeUI v2.0.1 (https://github.com/weui/weui-wxss) * WeUI v2.0.1 (https://github.com/weui/weui-wxss)
* Copyright 2019 Tencent, Inc. * Copyright 2019 Tencent, Inc.
* Licensed under the MIT license * Licensed under the MIT license
......
/*! /* !
* WeUI v2.0.1 (https://github.com/weui/weui-wxss) * WeUI v2.0.1 (https://github.com/weui/weui-wxss)
* Copyright 2019 Tencent, Inc. * Copyright 2019 Tencent, Inc.
* Licensed under the MIT license * Licensed under the MIT license
......
/*! /* !
* WeUI v2.0.1 (https://github.com/weui/weui-wxss) * WeUI v2.0.1 (https://github.com/weui/weui-wxss)
* Copyright 2019 Tencent, Inc. * Copyright 2019 Tencent, Inc.
* Licensed under the MIT license * Licensed under the MIT license
......
...@@ -7,9 +7,19 @@ ...@@ -7,9 +7,19 @@
// 上面的代码在 scss里面格式化是OK的,在Vue里面会有问题 // 上面的代码在 scss里面格式化是OK的,在Vue里面会有问题
.test { .test {
background: #fff; background: #fff;
.test1 { .test1 {
color: #f9ff99; color: #f9ff99;
} }
}
.revice_address_row .user_info_row .user_phone {
position: relative;
display: flex;
flex: 3;
width: 30px;
height: 1000%;
height: 30px;
text-align: right;
} }
...@@ -20,7 +20,7 @@ export async function jsonc(): Promise<Linter.Config[]> { ...@@ -20,7 +20,7 @@ export async function jsonc(): Promise<Linter.Config[]> {
return [ return [
{ {
files: [ "*.json", "**/*.json5", "**/*.jsonc", "*.code-workspace" ], files: [ "**/*.json", "**/*.json5", "**/*.jsonc", "*.code-workspace" ],
languageOptions: { languageOptions: {
parser: parserJsonc as any, parser: parserJsonc as any,
}, },
......
...@@ -5,7 +5,7 @@ import type { Linter } from "eslint"; ...@@ -5,7 +5,7 @@ import type { Linter } from "eslint";
export function customConfigMiniprogram (): Linter.Config[] { export function customConfigMiniprogram (): Linter.Config[] {
return [ return [
{ {
files: [ "apps/**/miniprogram/**/**" ], files: [ "apps/**/miniprogram/**/*.?([cm])[jt]s?(x)" ],
rules: { rules: {
// ==================== CommonJS 相关 ==================== // ==================== CommonJS 相关 ====================
// 小程序强制使用 CommonJS,不支持 ES Modules 语法 // 小程序强制使用 CommonJS,不支持 ES Modules 语法
......
...@@ -6,30 +6,62 @@ const { group, hardline, indent, join, softline } = doc.builders; ...@@ -6,30 +6,62 @@ const { group, hardline, indent, join, softline } = doc.builders;
const originalPrinter = prettierPluginMp.printers.wxml; const originalPrinter = prettierPluginMp.printers.wxml;
function printEndTag(path) { // Helper: indent each line of a string by the given number of spaces
const node = path.getValue(); function indentLines(content, indentSize) {
return `</${node.name}>`; if (typeof content !== "string") return content;
const spaces = " ".repeat(indentSize);
return content.split("\n").map(line => line ? spaces + line : line).join("\n");
} }
// Helper: format WXS JavaScript code
function replaceLineWithSoftline(node) { function formatWxsByBabelCompat(jsCode, opts) {
if (!node || typeof node === "string") return node; try {
if (Array.isArray(node)) return node.map(item => replaceLineWithSoftline(item)); // Simple formatting: preserve structure but normalize spacing
let formatted = jsCode;
if (node.type === "line") { // Normalize line endings
return softline; formatted = formatted.replaceAll("\r\n", "\n");
// Remove trailing whitespace from each line
formatted = formatted.split("\n").map(line => line.trimEnd()).join("\n");
return formatted;
} catch {
return jsCode; // Return original on error
} }
}
if (node.contents) { // Helper: enforce quote style for WXS string literals
return { function enforceWxsStringQuotes(code, useSingle) {
...node, if (typeof code !== "string") return code;
contents: replaceLineWithSoftline(node.contents), // Simple quote normalization for string literals
}; // Only replace quotes that are clearly string delimiters
if (useSingle) {
// Replace double quotes with single quotes where safe
return code.replaceAll(/"([^"\n]*)"/g, (match, content) => {
if (content.includes("'")) return match; // Keep double if contains single
return `'${content}'`;
});
} else {
// Replace single quotes with double quotes where safe
return code.replaceAll(/'([^'\n]*)'/g, (match, content) => {
if (content.includes('"')) return match; // Keep single if contains double
return `"${content}"`;
});
} }
}
return node; // Helper: check if mustache content is a simple identifier
function isSimpleMustacheIdentifier(innerLines) {
if (!Array.isArray(innerLines) || innerLines.length !== 1) return false;
const line = innerLines[0].trim();
// Simple identifier: letters, numbers, underscore, dots only
return /^[a-z_$][\w$.]*$/i.test(line);
} }
function printEndTag(path) {
const node = path.getValue();
return `</${node.name}>`;
}
function printMisc(path, opts) { function printMisc(path, opts) {
const node = path.getValue(); const node = path.getValue();
...@@ -96,12 +128,11 @@ function printCharData(path, opts, print) { ...@@ -96,12 +128,11 @@ function printCharData(path, opts, print) {
const { value } = node; const { value } = node;
if (!value) return ""; if (!value) return "";
if (value.trim() === "") { if (value.trim() === "") {
// Return whitespace as-is; element-level logic decides whether to keep it // Return empty string for whitespace-only nodes to ensure consistency
return value; return "";
} }
// Normalize inline template expressions // Normalize inline template expressions
const normalized = formatWxmlInterpolations(value, opts); const normalized = formatWxmlInterpolations(value, opts);
// Do not trim() here to avoid silently removing significant leading/trailing spaces in text nodes
return normalized; return normalized;
} }
// Helper: build doc for multi-line mustache printed text, or return null if not applicable // Helper: build doc for multi-line mustache printed text, or return null if not applicable
...@@ -253,36 +284,8 @@ function printElement(path, opts, print) { ...@@ -253,36 +284,8 @@ function printElement(path, opts, print) {
const hasAnyAttrs = attrsArr.length > 0; const hasAnyAttrs = attrsArr.length > 0;
// Simplified: treat <block> as always-block, selected tags as prefer-break. // Simplified: treat <block> as always-block, selected tags as prefer-break.
// 如果标签有任何属性且有子节点,强制不内联子节点 // Determine shouldInline based on tag type and content
let shouldInline = (singleTextInline || smallInlineMix) && !isAlwaysBlock && !isPreferBlock && !hasAnyAttrs; const shouldInline = (singleTextInline || smallInlineMix) && !isAlwaysBlock && !isPreferBlock && !hasMultipleAttrs;
// Only <text> strictly checks: if it has any attributes, force break (no inline)
if (lowerName === "text" && hasAnyAttrs) {
shouldInline = false;
}
// For <text>, baseline: do not inline unless content is short/simple and structure is trivial
if (lowerName === "text") {
shouldInline = false;
if (!hasAnyAttrs && onlyTextualChildren && !hasNewline && node.children.length === 1) {
const only = node.children[0];
const rawCombined = getNodeString(only);
const trimmed = typeof rawCombined === "string" ? rawCombined.trim() : "";
const isSingleMustache = trimmed.startsWith("{{") && trimmed.endsWith("}}");
const containsMustache = typeof rawCombined === "string" && rawCombined.includes("{{");
if (containsMustache && isSingleMustache) {
const inner = trimmed.slice(2, -2);
// Complexity heuristics: break if contains object/array literal, or has multiple &&, or both && and ||
const hasObjectLiteral = /\{[^}]*:/.test(inner);
const hasArrayLiteral = /\[[^,\]]*,[^\]]*\]/.test(inner) || /^\s*\[/.test(inner.trim());
const andCount = (inner.match(/&&/g) || []).length;
const hasOr = inner.includes("||");
const complex = hasObjectLiteral || hasArrayLiteral || andCount >= 2 || (andCount >= 1 && hasOr);
shouldInline = !complex;
} else if (isTextNodeType(only)) {
// single pure text: inline if reasonably short
shouldInline = trimmed.length <= 50;
}
}
}
// Note: <text> is handled via early return above; strict text mode is unused. // Note: <text> is handled via early return above; strict text mode is unused.
...@@ -310,18 +313,8 @@ function printElement(path, opts, print) { ...@@ -310,18 +313,8 @@ function printElement(path, opts, print) {
for (const [ i, printed ] of childrenParts.entries()) { for (const [ i, printed ] of childrenParts.entries()) {
if (i > 0) childrenWithBreaks.push(hardline); if (i > 0) childrenWithBreaks.push(hardline);
const entry = childEntries[i]; const entry = childEntries[i];
// Split multi-line text nodes into doc parts separated by hardline // Don't split multi-line text to avoid instability; trust the printed output
if (entry && (entry.node.type === "WXText" || entry.node.type === "WXCharData") && typeof printed === "string" && printed.includes("\n")) { childrenWithBreaks.push(printed);
const lines = printed.split("\n");
for (const [ li, line_ ] of lines.entries()) {
if (li > 0) childrenWithBreaks.push(hardline);
if (line_ !== "") {
childrenWithBreaks.push(line_);
}
}
} else {
childrenWithBreaks.push(printed);
}
} }
{ {
// Special-case: multi-line mustache block like "{{\n title\n}}" inside non-<text> tag // Special-case: multi-line mustache block like "{{\n title\n}}" inside non-<text> tag
...@@ -348,15 +341,6 @@ function printElement(path, opts, print) { ...@@ -348,15 +341,6 @@ function printElement(path, opts, print) {
} }
} }
if (node.endTag) { if (node.endTag) {
// 检查是否有属性且没有子节点
const hasAttrs = attrsArr.length > 0;
const hasChildren = node.children && node.children.length > 0;
// 如果有属性但没有子节点,结束标签应该换行
if (hasAttrs && !hasChildren) {
parts.push(hardline);
}
parts.push(path.call(print, "endTag")); parts.push(path.call(print, "endTag"));
} }
return group(parts); return group(parts);
...@@ -365,8 +349,10 @@ function formatInlineJsExpression(expr, opts) { ...@@ -365,8 +349,10 @@ function formatInlineJsExpression(expr, opts) {
if (typeof expr !== "string") return expr; if (typeof expr !== "string") return expr;
// 1) Collapse any newlines (and surrounding spaces) into a single space // 1) Collapse any newlines (and surrounding spaces) into a single space
let s = expr.replaceAll(/[ \t]*[\r\n]+[ \t]*/g, " "); let s = expr.replaceAll(/[ \t]*[\r\n]+[ \t]*/g, " ");
// 2) Normalize spaces around logical operators without touching others // 2) Normalize spaces around logical operators
s = s.replaceAll(/\s*&&\s*/g, " && ").replaceAll(/\s*\|\|\s*/g, " || "); s = s.replaceAll(/\s*&&\s*/g, " && ").replaceAll(/\s*\|\|\s*/g, " || ");
// 3) Normalize multiple spaces to single space
s = s.replaceAll(/ {2,}/g, " ");
return s.trim(); return s.trim();
} }
function isPlaceholderLikeValue(value) { function isPlaceholderLikeValue(value) {
...@@ -411,11 +397,11 @@ function formatWxmlInterpolations(text, opts) { ...@@ -411,11 +397,11 @@ function formatWxmlInterpolations(text, opts) {
if (typeof text !== "string" || !text.includes("{{")) return text; if (typeof text !== "string" || !text.includes("{{")) return text;
return text.replaceAll(/\{\{([\s\S]*?)\}\}/g, (match) => { return text.replaceAll(/\{\{([\s\S]*?)\}\}/g, (match) => {
const inner = match.slice(2, -2); // 去掉 {{ }} const inner = match.slice(2, -2); // 去掉 {{ }}
const leadingWs = inner.match(/^\s*/)[0]; const trimmedExpr = inner.trim();
const trailingWs = inner.match(/\s*$/)[0]; if (!trimmedExpr) return "{{}}";
const expr = inner.slice(leadingWs.length, inner.length - trailingWs.length); const formatted = formatInlineJsExpression(trimmedExpr, opts);
const formatted = formatInlineJsExpression(expr, opts); // Always use single space for consistency
return `{{${leadingWs}${formatted}${trailingWs}}}`; return `{{ ${formatted} }}`;
}); });
} }
......
...@@ -6,10 +6,11 @@ type ConfigOverride = NonNullable<Config["overrides"]>[number]; ...@@ -6,10 +6,11 @@ type ConfigOverride = NonNullable<Config["overrides"]>[number];
export function configMiniprogram():ConfigOverride[] { export function configMiniprogram():ConfigOverride[] {
return [ return [
// WXSS 文件的配置(纯样式文件)
{ {
// 使用 postcss-html 解析器处理 HTML/Vue 中的样式块 files: [ "**/apps/miniprogram/**/*.wxss", "**/apps/uniapp/**/*.css" ],
files: [ "**/apps/miniprogram/**/*.{wxss,css,scss,less,vue}", "**/apps/uniapp/**/*.{css,scss,less,vue}" ], customSyntax: "postcss",
customSyntax: "postcss-html", extends: [ "stylelint-config-recess-order" ],
rules: { rules: {
// 允许 rpx 单位(uni-app 响应式单位) // 允许 rpx 单位(uni-app 响应式单位)
"unit-no-unknown": [ "unit-no-unknown": [
...@@ -18,11 +19,38 @@ export function configMiniprogram():ConfigOverride[] { ...@@ -18,11 +19,38 @@ export function configMiniprogram():ConfigOverride[] {
ignoreUnits: [ "rpx" ] ignoreUnits: [ "rpx" ]
} }
], ],
// 允许未知的属性值(uni-app 特有值) // 允许未知的属性值(uni-app 特有值)
"declaration-property-value-no-unknown": null,
// 允许 uni-app 的条件编译注释
"comment-no-empty": null,
// 小程序特有的选择器
"selector-type-no-unknown": [
true,
{
ignore: [ "custom-elements" ],
ignoreTypes: [ "/^(page|view|text|image|button|input|scroll-view|swiper|navigator)/" ]
}
],
},
},
// Vue 和 HTML 中的样式块
{
files: [ "**/apps/miniprogram/**/*.{vue,html}", "**/apps/uniapp/**/*.{vue,html}" ],
customSyntax: "postcss-html",
extends: [ "stylelint-config-recess-order" ],
rules: {
// 允许 rpx 单位
"unit-no-unknown": [
true,
{
ignoreUnits: [ "rpx" ]
}
],
// 允许未知的属性值
"declaration-property-value-no-unknown": null, "declaration-property-value-no-unknown": null,
// 允许 uni-app 的条件编译注释 // 允许 uni-app 的条件编译注释
"comment-no-empty": null, "comment-no-empty": null,
// 小程序特有的选择器 // 小程序特有的选择器
"selector-type-no-unknown": [ "selector-type-no-unknown": [
true, true,
{ {
......
...@@ -72,7 +72,7 @@ export default { ...@@ -72,7 +72,7 @@ export default {
plugins: [ plugins: [
"stylelint-order", // CSS 声明顺序 "stylelint-order", // CSS 声明顺序
"@stylistic/stylelint-plugin", // 代码风格 "@stylistic/stylelint-plugin", // 代码风格
// "stylelint-prettier", // 与 Prettier 集成 // "stylelint-prettier", // 与 Prettier 集成(已禁用,改用 stylelint 扩展)
"stylelint-scss", // SCSS 特定规则 "stylelint-scss", // SCSS 特定规则
], ],
...@@ -187,10 +187,13 @@ export default { ...@@ -187,10 +187,13 @@ export default {
// 禁用 SCSS 操作符后换行规则 // 禁用 SCSS 操作符后换行规则
"scss/operator-no-newline-after": null, "scss/operator-no-newline-after": null,
// CSS 类名规则(支持 BEM、工具类、状态类等规范) // CSS 类名规则(支持 BEM、工具类、状态类、下划线分隔等规范)
// 允许的格式:o-, c-, u-, t-, s-, is-, has-, _-, js-, qa- 前缀,支持 BEM __ -- 语法 // 允许的格式:o-, c-, u-, t-, s-, is-, has-, _-, js-, qa- 前缀,支持 BEM __ -- 语法,支持下划线分隔
"selector-class-pattern": "selector-class-pattern":
"^(?:(?:o|c|u|t|s|is|has|_|js|qa)-)?[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*(?:__[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*)?(?:--[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*)?(?:[.+])?$", "^(?:(?:o|c|u|t|s|is|has|_|js|qa)-)?[a-zA-Z0-9]+(?:[_-][a-zA-Z0-9]+)*(?:__[a-zA-Z0-9]+(?:[_-][a-zA-Z0-9]+)*)?(?:--[a-zA-Z0-9]+(?:[_-][a-zA-Z0-9]+)*)?(?:[.+])?$",
// CSS 自定义属性规则(支持 kebab-case 和 camelCase)
"custom-property-pattern": "^[a-zA-Z][a-zA-Z0-9_-]*$",
// 禁用 :not() 伪类符号规则 // 禁用 :not() 伪类符号规则
"selector-not-notation": null, "selector-not-notation": null,
......
...@@ -57,7 +57,7 @@ pre-commit: ...@@ -57,7 +57,7 @@ pre-commit:
glob: '*.{js,jsx,ts,tsx}' glob: '*.{js,jsx,ts,tsx}'
lint-style: lint-style:
run: pnpm stylelint --fix --allow-empty-input {staged_files} run: pnpm stylelint --fix --allow-empty-input {staged_files}
glob: '*.{scss,less,styl,html,vue,css}' glob: '*.{scss,less,styl,html,vue,css,wxss}'
lint-package: lint-package:
run: pnpm eslint --cache --fix {staged_files} run: pnpm eslint --cache --fix {staged_files}
glob: 'package.json' glob: 'package.json'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!