将月历显示控件改为左对齐
This commit is contained in:
@@ -46,10 +46,14 @@ function createPage(data = {}) {
|
||||
|
||||
async function run() {
|
||||
const planningWxml = fs.readFileSync(path.join(__dirname, 'index.wxml'), 'utf8')
|
||||
const planningWxss = fs.readFileSync(path.join(__dirname, 'index.wxss'), 'utf8')
|
||||
const toolbarMarkup = planningWxml.match(/<view class="month-toolbar">([\s\S]*?)<\/view>\s*<view class="month-card/)
|
||||
assert.ok(toolbarMarkup)
|
||||
assert.ok(toolbarMarkup[1].indexOf('month-toolbar-title') < toolbarMarkup[1].indexOf('month-toolbar-controls'))
|
||||
assert.ok(toolbarMarkup[1].indexOf('month-mode-switch') < toolbarMarkup[1].indexOf('row-name-switch'))
|
||||
const toolbarControlsStyle = planningWxss.match(/\.month-toolbar-controls\s*\{([^}]*)\}/)
|
||||
assert.ok(toolbarControlsStyle)
|
||||
assert.doesNotMatch(toolbarControlsStyle[1], /margin-left:\s*auto/)
|
||||
|
||||
assert.deepStrictEqual(definition.data.viewModes.map(item => item.value), ['month', 'week', 'day'])
|
||||
assert.strictEqual(definition.data.viewMode, 'month')
|
||||
|
||||
@@ -540,7 +540,6 @@
|
||||
|
||||
.month-toolbar-title {
|
||||
flex: 0 0 auto;
|
||||
margin-right: auto;
|
||||
color: #615a51;
|
||||
font-size: 24rpx;
|
||||
font-weight: 800;
|
||||
@@ -551,7 +550,6 @@
|
||||
flex: 0 0 auto;
|
||||
align-items: center;
|
||||
gap: 12rpx;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.month-mode-switch {
|
||||
|
||||
+1
-1
@@ -415,4 +415,4 @@
|
||||
|
||||
## 2026-10-29 Salon 月历显示工具栏对齐
|
||||
|
||||
- 月历显示模式切换与姓名开关合并为右侧控制组,姓名开关开启时模式切换紧邻其左侧,标题维持左对齐。
|
||||
- 月历显示模式切换与姓名开关合并为左对齐控制组,紧跟“月历显示”标题排列,不再居中或推到右侧。
|
||||
|
||||
Reference in New Issue
Block a user