@antmjs/vantui
Version:
一套适用于Taro3及React的vantui组件库
56 lines (55 loc) • 1.62 kB
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = Demo;
var _components = require("@tarojs/components");
var _vantui = require("@antmjs/vantui");
var _jsxRuntime = require("react/jsx-runtime");
function Demo() {
var primaryShow = function primaryShow() {
_vantui.Notify.show({
message: '-----通知内容-----',
type: 'primary'
});
};
var successShow = function successShow() {
_vantui.Notify.show({
message: '-----通知内容-----',
type: 'success'
});
};
var dangerShow = function dangerShow() {
_vantui.Notify.show({
message: '-----通知内容-----',
type: 'danger'
});
};
var warningShow = function warningShow() {
_vantui.Notify.show({
message: '-----通知内容-----',
type: 'warning'
});
};
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.View, {
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vantui.Button, {
onClick: primaryShow,
type: "info",
children: "\u4E3B\u8981\u901A\u77E5"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_vantui.Button, {
onClick: successShow,
type: "primary",
children: "\u6210\u529F\u901A\u77E5"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_vantui.Button, {
onClick: dangerShow,
type: "danger",
children: "\u5371\u9669\u901A\u77E5"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_vantui.Button, {
onClick: warningShow,
type: "warning",
children: "\u8B66\u544A\u7528\u6CD5"
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_vantui.Notify, {
id: "vanNotify"
})]
});
}
;