diff --git a/env.js b/env.js new file mode 100644 index 0000000000000000000000000000000000000000..d7553e4b031ce918e67a304b6b15a63e67ac8c8f --- /dev/null +++ b/env.js @@ -0,0 +1,38 @@ +module.exports = { + "is-custom-runtime": false, + "compile": true, + "h5": { + "options": { + "headless": true + }, + "executablePath": "" + }, + "mp-weixin": { + "port": 9420, + "account": "", + "args": "", + "cwd": "", + "launch": true, + "teardown": "disconnect", + "remote": false, + "executablePath": "" + }, + "app-plus": { + "android": { + "id": "", + "executablePath": "" + }, + "version": "", + "ios": { + "id": "", + "executablePath": "" + }, + "uni-app-x": { + "version": "/Applications/HBuilderX-Alpha.app/Contents/HBuilderX/plugins/uniappx-launcher/base/version.txt", + "android": { + "id": "emulator-5554", + "executablePath": "/Applications/HBuilderX-Alpha.app/Contents/HBuilderX/plugins/uniappx-launcher/base/android_base.apk" + } + } + } +} \ No newline at end of file diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000000000000000000000000000000000000..882d3642fc1699f6bc7e6a83120ca8a040d2fdc7 --- /dev/null +++ b/jest.config.js @@ -0,0 +1,11 @@ +module.exports = { + testTimeout: 10000, + reporters: [ + 'default' + ], + watchPathIgnorePatterns: ['/node_modules/', '/dist/', '/.git/'], + moduleFileExtensions: ['js', 'json'], + rootDir: __dirname, + testMatch: ["/pages/**/*test.[jt]s?(x)"], + testPathIgnorePatterns: ['/node_modules/'] +} diff --git a/pages.json b/pages.json index 76fea74a1a10238a2da1bb199524a4b5d5bc6f9d..0a6ecf52aa41a0ea28bb8a51f472db4d5aa3982f 100644 --- a/pages.json +++ b/pages.json @@ -143,7 +143,265 @@ "style": { "navigationBarTitleText": "退出应用" } - } + }, + { + "path": "pages/tabBar/CSS/CSS", + "style": { + "navigationBarTitleText": "CSS" + } + }, + { + "path": "pages/CSS/background/background-color", + "style": { + "navigationBarTitleText": "background-color" + } + }, + { + "path": "pages/CSS/background/background-image", + "style": { + "navigationBarTitleText": "background-image" + } + }, + { + "path": "pages/CSS/border/border-color", + "style": { + "navigationBarTitleText": "border-color" + } + }, + { + "path": "pages/CSS/border/border-radius", + "style": { + "navigationBarTitleText": "border-radius" + } + }, + { + "path": "pages/CSS/border/border-style", + "style": { + "navigationBarTitleText": "border-style" + } + }, + { + "path": "pages/CSS/border/border-width", + "style": { + "navigationBarTitleText": "border-width" + } + }, + { + "path": "pages/CSS/border/border", + "style": { + "navigationBarTitleText": "border" + } + }, + { + "path": "pages/CSS/box-shadow/box-shadow", + "style": { + "navigationBarTitleText": "box-shadow" + } + }, + { + "path": "pages/CSS/flex/align-content", + "style": { + "navigationBarTitleText": "align-content" + } + }, + { + "path": "pages/CSS/flex/align-items", + "style": { + "navigationBarTitleText": "align-items" + } + }, + { + "path": "pages/CSS/flex/flex-basis", + "style": { + "navigationBarTitleText": "flex-basis" + } + }, + { + "path": "pages/CSS/flex/flex-direction", + "style": { + "navigationBarTitleText": "flex-direction" + } + }, + { + "path": "pages/CSS/flex/flex-flow", + "style": { + "navigationBarTitleText": "flex-flow" + } + }, + { + "path": "pages/CSS/flex/flex-grow", + "style": { + "navigationBarTitleText": "flex-grow" + } + }, + { + "path": "pages/CSS/flex/flex-shrink", + "style": { + "navigationBarTitleText": "flex-shrink" + } + }, + { + "path": "pages/CSS/flex/flex", + "style": { + "navigationBarTitleText": "flex" + } + }, + { + "path": "pages/CSS/flex/justify-content", + "style": { + "navigationBarTitleText": "justify-content" + } + }, + { + "path": "pages/CSS/layout/height", + "style": { + "navigationBarTitleText": "height" + } + }, + { + "path": "pages/CSS/layout/max-height", + "style": { + "navigationBarTitleText": "max-height" + } + }, + { + "path": "pages/CSS/layout/max-width", + "style": { + "navigationBarTitleText": "max-width" + } + }, + { + "path": "pages/CSS/layout/min-height", + "style": { + "navigationBarTitleText": "min-height" + } + }, + { + "path": "pages/CSS/layout/min-width", + "style": { + "navigationBarTitleText": "min-width" + } + }, + { + "path": "pages/CSS/layout/position", + "style": { + "navigationBarTitleText": "position" + } + }, + { + "path": "pages/CSS/layout/width", + "style": { + "navigationBarTitleText": "width" + } + }, + { + "path": "pages/CSS/margin/margin-bottom", + "style": { + "navigationBarTitleText": "margin-bottom" + } + }, + { + "path": "pages/CSS/margin/margin-left", + "style": { + "navigationBarTitleText": "margin-left" + } + }, + { + "path": "pages/CSS/margin/margin-right", + "style": { + "navigationBarTitleText": "margin-right" + } + }, + { + "path": "pages/CSS/margin/margin-top", + "style": { + "navigationBarTitleText": "margin-top" + } + }, + { + "path": "pages/CSS/margin/margin", + "style": { + "navigationBarTitleText": "margin" + } + }, + { + "path": "pages/CSS/padding/padding-bottom", + "style": { + "navigationBarTitleText": "padding-bottom" + } + }, + { + "path": "pages/CSS/padding/padding-left", + "style": { + "navigationBarTitleText": "padding-left" + } + }, + { + "path": "pages/CSS/padding/padding-right", + "style": { + "navigationBarTitleText": "padding-right" + } + }, + { + "path": "pages/CSS/padding/padding-top", + "style": { + "navigationBarTitleText": "padding-top" + } + }, + { + "path": "pages/CSS/padding/padding", + "style": { + "navigationBarTitleText": "padding" + } + }, + { + "path": "pages/CSS/text/color", + "style": { + "navigationBarTitleText": "color" + } + }, + { + "path": "pages/CSS/text/font-family", + "style": { + "navigationBarTitleText": "font-family" + } + }, + { + "path": "pages/CSS/text/font-size", + "style": { + "navigationBarTitleText": "font-size" + } + }, + { + "path": "pages/CSS/text/font-style", + "style": { + "navigationBarTitleText": "font-style" + } + }, + { + "path": "pages/CSS/text/font-weight", + "style": { + "navigationBarTitleText": "font-weight" + } + }, + { + "path": "pages/CSS/text/line-height", + "style": { + "navigationBarTitleText": "line-height" + } + }, + { + "path": "pages/CSS/text/text-align", + "style": { + "navigationBarTitleText": "text-align" + } + }, + { + "path": "pages/CSS/text/text-decoration-line", + "style": { + "navigationBarTitleText": "text-decoration-line" + } + } ], "globalStyle": { "pageOrientation": "portrait", @@ -175,7 +433,13 @@ "iconPath": "static/api.png", "selectedIconPath": "static/apiHL.png", "text": "接口" - } + }, + { + "pagePath": "pages/tabBar/CSS/CSS", + "iconPath": "static/extui.png", + "selectedIconPath": "static/extuiHL.png", + "text": "CSS" + } ] }, "uniIdRouter": {}, diff --git a/pages/CSS/background/background-color.uvue b/pages/CSS/background/background-color.uvue new file mode 100644 index 0000000000000000000000000000000000000000..36c63c44f188583891831a932f8a98d24ba86851 --- /dev/null +++ b/pages/CSS/background/background-color.uvue @@ -0,0 +1,39 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/background/background-image.uvue b/pages/CSS/background/background-image.uvue new file mode 100644 index 0000000000000000000000000000000000000000..a23041251fc73b69a09db1483cb83c36e2d5aa69 --- /dev/null +++ b/pages/CSS/background/background-image.uvue @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/border/border-color.uvue b/pages/CSS/border/border-color.uvue new file mode 100644 index 0000000000000000000000000000000000000000..ae03864d8049dd1aa6b987d1b74a0d86d8991d66 --- /dev/null +++ b/pages/CSS/border/border-color.uvue @@ -0,0 +1,40 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/border/border-radius.uvue b/pages/CSS/border/border-radius.uvue new file mode 100644 index 0000000000000000000000000000000000000000..35447a38abfd9f8e7713aeda333f467cf7b116c3 --- /dev/null +++ b/pages/CSS/border/border-radius.uvue @@ -0,0 +1,40 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/border/border-style.uvue b/pages/CSS/border/border-style.uvue new file mode 100644 index 0000000000000000000000000000000000000000..6420c8506e5ee88bce061cc863d22207595dcae5 --- /dev/null +++ b/pages/CSS/border/border-style.uvue @@ -0,0 +1,40 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/border/border-width.uvue b/pages/CSS/border/border-width.uvue new file mode 100644 index 0000000000000000000000000000000000000000..40005a134bb0cd75f36ab774f226d0398c8093dc --- /dev/null +++ b/pages/CSS/border/border-width.uvue @@ -0,0 +1,40 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/border/border.uvue b/pages/CSS/border/border.uvue new file mode 100644 index 0000000000000000000000000000000000000000..e20202b150469ddb0b44e4d8b45c88c93d9bf293 --- /dev/null +++ b/pages/CSS/border/border.uvue @@ -0,0 +1,20 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/box-shadow/box-shadow.uvue b/pages/CSS/box-shadow/box-shadow.uvue new file mode 100644 index 0000000000000000000000000000000000000000..7fac0af367738a82ce70ef04f4e031d885fa3e68 --- /dev/null +++ b/pages/CSS/box-shadow/box-shadow.uvue @@ -0,0 +1,103 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/flex/align-content.uvue b/pages/CSS/flex/align-content.uvue new file mode 100644 index 0000000000000000000000000000000000000000..af2c205524d492fd64823fb9926aee7d1d916d71 --- /dev/null +++ b/pages/CSS/flex/align-content.uvue @@ -0,0 +1,89 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/flex/align-items.uvue b/pages/CSS/flex/align-items.uvue new file mode 100644 index 0000000000000000000000000000000000000000..d52d1b0a40d7a58f9e9b7c940ac8e09079ea83fe --- /dev/null +++ b/pages/CSS/flex/align-items.uvue @@ -0,0 +1,52 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/flex/flex-basis.uvue b/pages/CSS/flex/flex-basis.uvue new file mode 100644 index 0000000000000000000000000000000000000000..f94abb3f044d34ecaef400357edeb8ad7340866a --- /dev/null +++ b/pages/CSS/flex/flex-basis.uvue @@ -0,0 +1,28 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/flex/flex-direction.uvue b/pages/CSS/flex/flex-direction.uvue new file mode 100644 index 0000000000000000000000000000000000000000..c7e3afc30da36d4a29d9b7129fc710b4ebf16d37 --- /dev/null +++ b/pages/CSS/flex/flex-direction.uvue @@ -0,0 +1,51 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/flex/flex-flow.uvue b/pages/CSS/flex/flex-flow.uvue new file mode 100644 index 0000000000000000000000000000000000000000..7a021ff3e391ddb26c6cc3750fcd8c610919409e --- /dev/null +++ b/pages/CSS/flex/flex-flow.uvue @@ -0,0 +1,63 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/flex/flex-grow.uvue b/pages/CSS/flex/flex-grow.uvue new file mode 100644 index 0000000000000000000000000000000000000000..e40fa97a4b2d64f61daf5e40721381ed7ccb1268 --- /dev/null +++ b/pages/CSS/flex/flex-grow.uvue @@ -0,0 +1,31 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/flex/flex-shrink.uvue b/pages/CSS/flex/flex-shrink.uvue new file mode 100644 index 0000000000000000000000000000000000000000..04d5431d36a81600bdd6ae1ee99f9c82cbdc0fc2 --- /dev/null +++ b/pages/CSS/flex/flex-shrink.uvue @@ -0,0 +1,31 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/flex/flex.uvue b/pages/CSS/flex/flex.uvue new file mode 100644 index 0000000000000000000000000000000000000000..87cf159f7e4d4e5b22d72278af88b59ab19b71f3 --- /dev/null +++ b/pages/CSS/flex/flex.uvue @@ -0,0 +1,51 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/flex/justify-content.uvue b/pages/CSS/flex/justify-content.uvue new file mode 100644 index 0000000000000000000000000000000000000000..74c78e44c1add871d5493bca20c8129cb3b62bbe --- /dev/null +++ b/pages/CSS/flex/justify-content.uvue @@ -0,0 +1,61 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/layout/height.uvue b/pages/CSS/layout/height.uvue new file mode 100644 index 0000000000000000000000000000000000000000..8f59d2e6564f4f0308fdfaaeb52546caaf951dd5 --- /dev/null +++ b/pages/CSS/layout/height.uvue @@ -0,0 +1,24 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/layout/max-height.uvue b/pages/CSS/layout/max-height.uvue new file mode 100644 index 0000000000000000000000000000000000000000..f4b93e558514ca744a5312a1a154b3c7f0a4e3f3 --- /dev/null +++ b/pages/CSS/layout/max-height.uvue @@ -0,0 +1,24 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/layout/max-width.uvue b/pages/CSS/layout/max-width.uvue new file mode 100644 index 0000000000000000000000000000000000000000..97cb20c48da934b9bfe5adc3571725965ec17149 --- /dev/null +++ b/pages/CSS/layout/max-width.uvue @@ -0,0 +1,24 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/layout/min-height.uvue b/pages/CSS/layout/min-height.uvue new file mode 100644 index 0000000000000000000000000000000000000000..23cd6a6ddf36395fb76744f9543cfa4cf6999605 --- /dev/null +++ b/pages/CSS/layout/min-height.uvue @@ -0,0 +1,24 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/layout/min-width.uvue b/pages/CSS/layout/min-width.uvue new file mode 100644 index 0000000000000000000000000000000000000000..ff75cacf7d591a7726d5666d25549b43f097c470 --- /dev/null +++ b/pages/CSS/layout/min-width.uvue @@ -0,0 +1,24 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/layout/position.uvue b/pages/CSS/layout/position.uvue new file mode 100644 index 0000000000000000000000000000000000000000..bbfa86a1640a660843865090252bb4a5fe76884e --- /dev/null +++ b/pages/CSS/layout/position.uvue @@ -0,0 +1,70 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/layout/width.uvue b/pages/CSS/layout/width.uvue new file mode 100644 index 0000000000000000000000000000000000000000..57107dbf4e375ed14e40855c76bdf44ab7ca7b0d --- /dev/null +++ b/pages/CSS/layout/width.uvue @@ -0,0 +1,24 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/margin/margin-bottom.uvue b/pages/CSS/margin/margin-bottom.uvue new file mode 100644 index 0000000000000000000000000000000000000000..a5923a7e4a0238a694e5c4f1a02a899224108b5a --- /dev/null +++ b/pages/CSS/margin/margin-bottom.uvue @@ -0,0 +1,32 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/margin/margin-left.uvue b/pages/CSS/margin/margin-left.uvue new file mode 100644 index 0000000000000000000000000000000000000000..c69c7af40213f3d7758062417ec3309b9bc3acb1 --- /dev/null +++ b/pages/CSS/margin/margin-left.uvue @@ -0,0 +1,32 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/margin/margin-right.uvue b/pages/CSS/margin/margin-right.uvue new file mode 100644 index 0000000000000000000000000000000000000000..82b6f637ed66c1cd0f218c11fb2ca68390301c8b --- /dev/null +++ b/pages/CSS/margin/margin-right.uvue @@ -0,0 +1,32 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/margin/margin-top.uvue b/pages/CSS/margin/margin-top.uvue new file mode 100644 index 0000000000000000000000000000000000000000..707acc5a95e142670f968245b819b0af2952dac8 --- /dev/null +++ b/pages/CSS/margin/margin-top.uvue @@ -0,0 +1,32 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/margin/margin.uvue b/pages/CSS/margin/margin.uvue new file mode 100644 index 0000000000000000000000000000000000000000..2e16deb25d7dbacce85dd5df18c187d2162d4ebd --- /dev/null +++ b/pages/CSS/margin/margin.uvue @@ -0,0 +1,32 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/padding/padding-bottom.uvue b/pages/CSS/padding/padding-bottom.uvue new file mode 100644 index 0000000000000000000000000000000000000000..c91e1605241f6c0571b1247a9c4d3ecaeb927dd1 --- /dev/null +++ b/pages/CSS/padding/padding-bottom.uvue @@ -0,0 +1,29 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/padding/padding-left.uvue b/pages/CSS/padding/padding-left.uvue new file mode 100644 index 0000000000000000000000000000000000000000..0e2c51477b34c445dfd72d7cd216041d5b6b481e --- /dev/null +++ b/pages/CSS/padding/padding-left.uvue @@ -0,0 +1,29 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/padding/padding-right.uvue b/pages/CSS/padding/padding-right.uvue new file mode 100644 index 0000000000000000000000000000000000000000..0f85586ea10e7d8823e9b3e33bf9b5ff1e28f95c --- /dev/null +++ b/pages/CSS/padding/padding-right.uvue @@ -0,0 +1,29 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/padding/padding-top.uvue b/pages/CSS/padding/padding-top.uvue new file mode 100644 index 0000000000000000000000000000000000000000..cd4257ed8682220bd77ae5078b6d0d449b25a53a --- /dev/null +++ b/pages/CSS/padding/padding-top.uvue @@ -0,0 +1,29 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/padding/padding.uvue b/pages/CSS/padding/padding.uvue new file mode 100644 index 0000000000000000000000000000000000000000..474201bb17f46623c6ed1c8c8c2ecbfb1353a8b9 --- /dev/null +++ b/pages/CSS/padding/padding.uvue @@ -0,0 +1,29 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/text/color.uvue b/pages/CSS/text/color.uvue new file mode 100644 index 0000000000000000000000000000000000000000..4922e32120835ea5160691a86f251c4d29088745 --- /dev/null +++ b/pages/CSS/text/color.uvue @@ -0,0 +1,21 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/text/font-family.uvue b/pages/CSS/text/font-family.uvue new file mode 100644 index 0000000000000000000000000000000000000000..5da9ff1dc5b227299fcef574c91e8b1ce9b5dfa8 --- /dev/null +++ b/pages/CSS/text/font-family.uvue @@ -0,0 +1,18 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/text/font-size.uvue b/pages/CSS/text/font-size.uvue new file mode 100644 index 0000000000000000000000000000000000000000..5d3ac9092a09b7bd512e857897a698b727b15f69 --- /dev/null +++ b/pages/CSS/text/font-size.uvue @@ -0,0 +1,15 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/text/font-style.uvue b/pages/CSS/text/font-style.uvue new file mode 100644 index 0000000000000000000000000000000000000000..ba6225d2fec5ff12c784924298f124ca3e611f6a --- /dev/null +++ b/pages/CSS/text/font-style.uvue @@ -0,0 +1,18 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/text/font-weight.uvue b/pages/CSS/text/font-weight.uvue new file mode 100644 index 0000000000000000000000000000000000000000..1e8240a29e999369fa67d1833b328e78ddba3b9f --- /dev/null +++ b/pages/CSS/text/font-weight.uvue @@ -0,0 +1,20 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/text/line-height.uvue b/pages/CSS/text/line-height.uvue new file mode 100644 index 0000000000000000000000000000000000000000..939dba7984147d14402ac792bbf6ae1b4f634f5d --- /dev/null +++ b/pages/CSS/text/line-height.uvue @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/text/text-align.uvue b/pages/CSS/text/text-align.uvue new file mode 100644 index 0000000000000000000000000000000000000000..cbcb5787a16da05a78123125639e2655bfdc1f03 --- /dev/null +++ b/pages/CSS/text/text-align.uvue @@ -0,0 +1,20 @@ + + + + + \ No newline at end of file diff --git a/pages/CSS/text/text-decoration-line.uvue b/pages/CSS/text/text-decoration-line.uvue new file mode 100644 index 0000000000000000000000000000000000000000..029ccf1a448654eb1b435b7cc03ff18a69710cc6 --- /dev/null +++ b/pages/CSS/text/text-decoration-line.uvue @@ -0,0 +1,18 @@ + + + + + \ No newline at end of file diff --git a/pages/component/button/button.test.js b/pages/component/button/button.test.js new file mode 100644 index 0000000000000000000000000000000000000000..3a3c201159fa41f52b3402da52b60d6e823666a4 --- /dev/null +++ b/pages/component/button/button.test.js @@ -0,0 +1,82 @@ +function getData(key = '') { + return new Promise(async (resolve, reject) => { + const data = await page.data() + resolve(key ? data[key] : data) + }) +} + +let page +beforeAll(async () => { + page = await program.reLaunch('/pages/component/button/button') + await page.waitFor(1000) +}) + +describe('Button.uvue', () => { + it('click', async () => { + const defaultBtn = await page.$('.default-button') + const disabledBtn = await page.$('.disabled-button') + expect(await getData('count')).toEqual(0) + await defaultBtn.tap() + expect(await getData('count')).toEqual(1) + await disabledBtn.tap() + expect(await getData('count')).toEqual(1) + }) + it('length', async () => { + const btnLen = await page.$$('.button') + expect(btnLen.length).toBe(13) + }) + it('text', async () => { + const textBtn = await page.$('.text-button') + expect(await textBtn.text()).toEqual('按钮') + await page.setData({ + text: 'button' + }) + // TODO 待修复 + expect(await textBtn.text()).toEqual('button') + }) + it('type', async () => { + // TODO 目前获取组件属性只能通过组件的name,并且拿到的是最后一个 + const btn = await page.$('Button') + expect(await btn.property('type')).toBe('warn') + await page.setData({ + type: 'default' + }) + await page.waitFor(500) + expect(await btn.property('type')).toBe('default') + await page.setData({ + type: 'warn' + }) + await page.waitFor(500) + expect(await btn.property('type')).toBe('warn') + }) + it('size', async () => { + const btn = await page.$('Button') + expect(await btn.property('size')).toBe('mini') + await page.setData({ + size: 'default' + }) + await page.waitFor(500) + expect(await btn.property('size')).toBe('default') + await page.setData({ + size: 'mini' + }) + }) + it('plain', async () => { + const btn = await page.$('Button') + expect(await btn.property('plain')).toBe(false) + await page.setData({ + plain: true + }) + await page.waitFor(500) + expect(await btn.property('plain')).toBe(true) + }) + it('disabled', async () => { + const btn = await page.$('Button') + expect(await btn.property('disabled')).toBe(false) + await page.setData({ + disabled: true + }) + await page.waitFor(500) + expect(await btn.property('disabled')).toBe(true) + }) +}) \ No newline at end of file diff --git a/pages/component/button/button.uvue b/pages/component/button/button.uvue index 8e7d90f2438ad47e4c90019183015e94c309816f..31a3c1cd59ad5c472fadb7fac2c1757944b0f849 100644 --- a/pages/component/button/button.uvue +++ b/pages/component/button/button.uvue @@ -2,18 +2,18 @@ - + - - + + - + @@ -24,7 +24,8 @@ - + @@ -36,7 +37,13 @@ return { title: 'button', loading: false, - _timer: 0 + _timer: 0, + text: '按钮', + type: 'warn', + size: 'mini', + plain: false, + disabled: false, + count: 0 } }, onShow() { @@ -55,6 +62,9 @@ // clearTimeout(this._timer); // } // } + addCount() { + this.count++ + } }, } diff --git a/pages/component/text/text.uvue b/pages/component/text/text.uvue index 5b64edefc7ff4199b516803d90299773e2436c6b..050db7e72e1eb4e45e0d6bff9ef06c4a64f75192 100644 --- a/pages/component/text/text.uvue +++ b/pages/component/text/text.uvue @@ -18,18 +18,18 @@ return { title: 'text', texts: [ - 'HBuilder,400万开发者选择的IDE', - 'MUI,轻巧、漂亮的前端开源框架', - 'wap2app,M站快速转换原生体验的App', - '5+Runtime,为HTML5插上原生的翅膀', 'HBuilderX,轻巧、极速,极客编辑器', - 'uni-app,终极跨平台方案', - 'HBuilder,400万开发者选择的IDE', - 'MUI,轻巧、漂亮的前端开源框架', - 'wap2app,M站快速转换原生体验的App', - '5+Runtime,为HTML5插上原生的翅膀', - 'HBuilderX,轻巧、极速,极客编辑器', - 'uni-app,终极跨平台方案', + 'uni-app x,终极跨平台方案', + 'uniCloud,js serverless云服务', + 'uts,大一统语言', + 'uniMPSdk,让你的App具备小程序能力', + 'uni-admin,开源、现成的全端管理后台', + 'uni-id,开源、全端的账户中心', + 'uni-pay,开源、云端一体、全平台的支付', + 'uni-ai,聚合ai能力', + 'uni-cms,开源、云端一体、全平台的内容管理平台', + 'uni-im,开源、云端一体、全平台的im即时消息', + 'uni统计,开源、完善、全平台的统计报表', '......' ] as string[], text: '', diff --git a/pages/tabBar/CSS/CSS.uvue b/pages/tabBar/CSS/CSS.uvue new file mode 100644 index 0000000000000000000000000000000000000000..50b2d72417f0bc648e8d80e1a7e724796c3f3436 --- /dev/null +++ b/pages/tabBar/CSS/CSS.uvue @@ -0,0 +1,346 @@ + + + + + \ No newline at end of file