Skip to content

Commit

Permalink
chore: styleIsolation configuration is migrated from options to json (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
anlyyao authored Apr 22, 2024
1 parent 8efdf67 commit 501f44e
Show file tree
Hide file tree
Showing 121 changed files with 105 additions and 94 deletions.
1 change: 1 addition & 0 deletions src/action-sheet/action-sheet.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-icon": "../icon/icon",
"t-popup": "../popup/popup",
Expand Down
1 change: 1 addition & 0 deletions src/avatar-group/avatar-group.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-avatar": "../avatar/avatar"
}
Expand Down
1 change: 1 addition & 0 deletions src/avatar/avatar.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-icon": "../icon/icon",
"t-badge": "../badge/badge",
Expand Down
1 change: 0 additions & 1 deletion src/avatar/avatar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const name = `${prefix}-avatar`;
export default class Avatar extends SuperComponent {
options: WechatMiniprogram.Component.ComponentOptions = {
multipleSlots: true,
styleIsolation: 'apply-shared',
};

externalClasses = [
Expand Down
1 change: 1 addition & 0 deletions src/back-top/back-top.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-icon": "../icon/icon"
}
Expand Down
6 changes: 1 addition & 5 deletions src/badge/_example/base/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
Component({
options: {
styleIsolation: 'apply-shared',
},
});
Component({});
1 change: 1 addition & 0 deletions src/badge/_example/base/index.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-badge": "tdesign-miniprogram/badge/badge",
"t-icon": "tdesign-miniprogram/icon/icon",
Expand Down
6 changes: 1 addition & 5 deletions src/badge/_example/size/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
Component({
options: {
styleIsolation: 'apply-shared',
},
});
Component({});
1 change: 1 addition & 0 deletions src/badge/_example/size/index.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-badge": "tdesign-miniprogram/badge/badge",
"t-avatar": "tdesign-miniprogram/avatar/avatar"
Expand Down
6 changes: 1 addition & 5 deletions src/badge/_example/theme/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
Component({
options: {
styleIsolation: 'apply-shared',
},
});
Component({});
1 change: 1 addition & 0 deletions src/badge/_example/theme/index.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-badge": "tdesign-miniprogram/badge/badge",
"t-cell": "tdesign-miniprogram/cell/cell",
Expand Down
2 changes: 1 addition & 1 deletion src/badge/badge.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {}
}

1 change: 1 addition & 0 deletions src/button/button.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-icon": "../icon/icon",
"t-loading": "../loading/loading"
Expand Down
3 changes: 0 additions & 3 deletions src/calendar/_example/without-popup/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
Component({
options: {
styleIsolation: 'apply-shared',
},
methods: {
handleSelect(e) {
const { value, entireValue } = e.detail;
Expand Down
1 change: 1 addition & 0 deletions src/calendar/_example/without-popup/index.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-calendar": "tdesign-miniprogram/calendar/calendar"
}
Expand Down
1 change: 0 additions & 1 deletion src/calendar/calendar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export default class Calendar extends SuperComponent {

options: WechatMiniprogram.Component.ComponentOptions = {
multipleSlots: true,
styleIsolation: 'apply-shared',
};

properties = props;
Expand Down
1 change: 1 addition & 0 deletions src/cascader/cascader.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-icon": "../icon/icon",
"t-popup": "../popup/popup",
Expand Down
3 changes: 2 additions & 1 deletion src/cell-group/cell-group.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"component": true
"component": true,
"styleIsolation": "apply-shared"
}
1 change: 1 addition & 0 deletions src/cell/cell.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-icon": "../icon/icon",
"t-image": "../image/image"
Expand Down
1 change: 1 addition & 0 deletions src/check-tag/check-tag.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-icon": "../icon/icon"
}
Expand Down
1 change: 1 addition & 0 deletions src/checkbox-group/checkbox-group.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-checkbox": "../checkbox/checkbox"
}
Expand Down
3 changes: 0 additions & 3 deletions src/checkbox/_example/special/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
Component({
options: {
styleIsolation: 'apply-shared',
},
data: {
value: [0, 1],
value1: [0, 1],
Expand Down
1 change: 1 addition & 0 deletions src/checkbox/_example/special/index.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-checkbox-group": "tdesign-miniprogram/checkbox-group/checkbox-group",
"t-checkbox": "tdesign-miniprogram/checkbox/checkbox",
Expand Down
1 change: 1 addition & 0 deletions src/checkbox/checkbox.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-icon": "../icon/icon"
}
Expand Down
1 change: 0 additions & 1 deletion src/checkbox/checkbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export default class CheckBox extends SuperComponent {

options: ComponentsOptionsType = {
multipleSlots: true,
// styleIsolation: 'shared',
};

properties = {
Expand Down
1 change: 1 addition & 0 deletions src/col/col.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {}
}
1 change: 1 addition & 0 deletions src/collapse-panel/collapse-panel.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-cell": "../cell/cell"
}
Expand Down
3 changes: 2 additions & 1 deletion src/collapse/collapse.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"component": true
"component": true,
"styleIsolation": "apply-shared"
}
1 change: 1 addition & 0 deletions src/count-down/count-down.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-icon": "../icon/icon"
}
Expand Down
3 changes: 0 additions & 3 deletions src/date-time-picker/_example/time/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
Component({
options: {
styleIsolation: 'apply-shared',
},
data: {
mode: '',
second: '10:00:00',
Expand Down
1 change: 1 addition & 0 deletions src/date-time-picker/_example/time/index.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"styleIsolation": "apply-shared",
"usingComponents": {
"t-cell": "tdesign-miniprogram/cell/cell",
"t-date-time-picker": "tdesign-miniprogram/date-time-picker/date-time-picker"
Expand Down
1 change: 1 addition & 0 deletions src/date-time-picker/date-time-picker.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-picker": "../picker/picker",
"t-picker-item": "../picker-item/picker-item"
Expand Down
3 changes: 0 additions & 3 deletions src/dialog/_example/status/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
Component({
options: {
styleIsolation: 'apply-shared',
},
data: {
confirmBtn: { content: '确定', variant: 'base' },
dialogKey: '',
Expand Down
1 change: 1 addition & 0 deletions src/dialog/_example/status/index.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-button": "tdesign-miniprogram/button/button",
"t-dialog": "tdesign-miniprogram/dialog/dialog"
Expand Down
1 change: 1 addition & 0 deletions src/dialog/dialog.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-popup": "../popup/popup",
"t-icon": "../icon/icon",
Expand Down
3 changes: 2 additions & 1 deletion src/divider/divider.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"component": true
"component": true,
"styleIsolation": "apply-shared"
}
1 change: 1 addition & 0 deletions src/drawer/drawer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-popup": "../popup/popup",
"t-icon": "../icon/icon"
Expand Down
1 change: 1 addition & 0 deletions src/dropdown-item/dropdown-item.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-button": "../button/button",
"t-radio": "../radio/radio",
Expand Down
1 change: 1 addition & 0 deletions src/dropdown-menu/dropdown-menu.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-icon": "../icon/icon"
}
Expand Down
1 change: 1 addition & 0 deletions src/empty/empty.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-icon": "../icon/icon",
"t-image": "../image/image"
Expand Down
1 change: 1 addition & 0 deletions src/fab/fab.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-button": "../button/button",
"t-draggable": "./draggable/draggable"
Expand Down
1 change: 1 addition & 0 deletions src/footer/footer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-image": "../image/image"
}
Expand Down
1 change: 1 addition & 0 deletions src/grid-item/grid-item.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-image": "../image/image",
"t-icon": "../icon/icon",
Expand Down
1 change: 1 addition & 0 deletions src/grid/grid.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {}
}
1 change: 1 addition & 0 deletions src/icon/icon.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {}
}
1 change: 1 addition & 0 deletions src/image-viewer/image-viewer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-image": "../image/image",
"t-icon": "../icon/icon"
Expand Down
1 change: 1 addition & 0 deletions src/image/image.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-loading": "../loading/loading",
"t-icon": "../icon/icon"
Expand Down
3 changes: 2 additions & 1 deletion src/indexes-anchor/indexes-anchor.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"component": true
"component": true,
"styleIsolation": "apply-shared"
}
1 change: 1 addition & 0 deletions src/indexes/indexes.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-icon": "../icon/icon",
"t-cell": "../cell/cell",
Expand Down
1 change: 1 addition & 0 deletions src/input/input.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-icon": "../icon/icon"
}
Expand Down
1 change: 1 addition & 0 deletions src/link/link.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-icon": "../icon/icon"
}
Expand Down
6 changes: 1 addition & 5 deletions src/loading/_example/size/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
Component({
options: {
styleIsolation: 'apply-shared',
},
});
Component({});
1 change: 1 addition & 0 deletions src/loading/loading.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {}
}
1 change: 1 addition & 0 deletions src/message/message-item/message.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-icon": "../../icon/icon",
"t-link": "../../link/link"
Expand Down
1 change: 0 additions & 1 deletion src/message/message-item/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export default class Message extends SuperComponent {
];

options: ComponentsOptionsType = {
styleIsolation: 'apply-shared',
multipleSlots: true,
};

Expand Down
1 change: 1 addition & 0 deletions src/message/message.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {
"t-message-item": "./message-item/message"
}
Expand Down
1 change: 0 additions & 1 deletion src/message/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ let gap = 12; // 两条message之间的间距,单位px
@wxComponent()
export default class Message extends SuperComponent {
options: ComponentsOptionsType = {
styleIsolation: 'apply-shared',
multipleSlots: true,
};

Expand Down
Loading

0 comments on commit 501f44e

Please sign in to comment.